diff --git a/api-spec/openapiSpecv3-2_0.json b/api-spec/openapiSpecv3-2_0.json index d295422bc..58c893e4a 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" @@ -1186,6 +1279,14 @@ "items": { "type": "string" } + }, + "user_parameters": { + "description": "
Version: 9.10.5.cl or laterDeprecated: 10.4.0.cl and later
\n\nDefine attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters).", + "allOf": [ + { + "$ref": "#/components/schemas/User_Parameter_Options" + } + ] } }, "required": [ @@ -1315,6 +1416,14 @@ "items": { "type": "string" } + }, + "user_parameters": { + "description": "
Version: 9.10.5.cl or laterDeprecated: 10.4.0.cl and later
\n\nDefine attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters).", + "allOf": [ + { + "$ref": "#/components/schemas/User_Parameter_Options" + } + ] } }, "required": [ @@ -2852,7 +2961,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 +4736,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 +4750,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 +4762,7 @@ }, "required": [ "dbt_connection_identifier", + "model_tables", "import_worksheets" ] } @@ -5455,6 +5565,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 +5925,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 +6133,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 +6463,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 +8780,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 +9010,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 +9172,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 +11927,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,13 +12234,13 @@ } } }, - "/api/rest/2.0/system/config-update": { + "/api/rest/2.0/system/preferences/communication-channels/search": { "post": { - "operationId": "updateSystemConfig", - "description": "\n Version: 9.2.0.cl or later\n\nUpdates the current configuration of the cluster. You must send the configuration data in JSON format.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "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", - "9.2.0.cl" + "10.14.0.cl" ], "requestBody": { "content": { @@ -12044,14 +12248,24 @@ "schema": { "type": "object", "properties": { - "configuration": { - "description": "Configuration JSON with the key-value pair of configuration attributes to be updated.", - "type": "object" + "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": [ - "configuration" - ] + } } } }, @@ -12059,8 +12273,45 @@ }, "parameters": [], "responses": { - "204": { - "description": "Configuration successfully updated." + "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.", @@ -12105,13 +12356,13 @@ } } }, - "/api/rest/2.0/tags/assign": { + "/api/rest/2.0/system/config-update": { "post": { - "operationId": "assignTag", - "description": "\n Version: 9.0.0.cl or later\n\nAssigns tags to Liveboards, Answers, Tables, and Worksheets.\n\nRequires edit access to the metadata object.\n\n\n\n\n#### Endpoint URL\n", + "operationId": "updateSystemConfig", + "description": "\n Version: 9.2.0.cl or later\n\nUpdates the current configuration of the cluster. You must send the configuration data in JSON format.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Tags", - "9.0.0.cl" + "System", + "9.2.0.cl" ], "requestBody": { "content": { @@ -12119,24 +12370,13 @@ "schema": { "type": "object", "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TagMetadataTypeInput" - } - }, - "tag_identifiers": { - "description": "GUID or name of the tag.", - "type": "array", - "items": { - "type": "string" - } + "configuration": { + "description": "Configuration JSON with the key-value pair of configuration attributes to be updated.", + "type": "object" } }, "required": [ - "metadata", - "tag_identifiers" + "configuration" ] } } @@ -12146,7 +12386,7 @@ "parameters": [], "responses": { "204": { - "description": "Tags successfully assigned." + "description": "Configuration successfully updated." }, "400": { "description": "Invalid request.", @@ -12191,10 +12431,10 @@ } } }, - "/api/rest/2.0/tags/create": { + "/api/rest/2.0/tags/assign": { "post": { - "operationId": "createTag", - "description": "\n Version: 9.0.0.cl or later\n\nCreates a tag object.\n\nTags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags.\n\n\n\n\n#### Endpoint URL\n", + "operationId": "assignTag", + "description": "\n Version: 9.0.0.cl or later\n\nAssigns tags to Liveboards, Answers, Tables, and Worksheets.\n\nRequires edit access to the metadata object.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "Tags", "9.0.0.cl" @@ -12205,11 +12445,97 @@ "schema": { "type": "object", "properties": { - "name": { - "description": "Name of the tag.", - "type": "string" - }, - "color": { + "metadata": { + "description": "Metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TagMetadataTypeInput" + } + }, + "tag_identifiers": { + "description": "GUID or name of the tag.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "metadata", + "tag_identifiers" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Tags successfully assigned." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/create": { + "post": { + "operationId": "createTag", + "description": "\n Version: 9.0.0.cl or later\n\nCreates a tag object.\n\nTags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Name of the tag.", + "type": "string" + }, + "color": { "description": "Hex color code to be assigned to the tag. For example, #ff78a9.", "type": "string" } @@ -13557,6 +13883,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 +14260,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 +14284,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 +14370,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 +14436,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 +14454,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 +14479,7 @@ "type": "string", "enum": [ "METADATA_ONLY", - "METADATA_AND_VALUES", - "EDITABLE_METADATA_AND_VALUES" + "METADATA_AND_VALUES" ] } } @@ -14210,10 +14549,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 +14561,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 +14586,7 @@ ], "responses": { "204": { - "description": "Updating the variable is successful." + "description": "Variable name updated successfully." }, "400": { "description": "Invalid request.", @@ -14306,13 +14631,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 +14645,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 +14672,7 @@ "parameters": [], "responses": { "204": { - "description": "Updating variable values is successful." + "description": "Variable values updated successfully." }, "400": { "description": "Invalid request.", @@ -15287,51 +15610,742 @@ } } } - } - }, - "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." - }, - "creation_time_in_millis": { - "type": "number", - "format": "float", - "description": "Token creation time in milliseconds." + "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" + ] + } + } }, - "expiration_time_in_millis": { - "type": "number", - "format": "float", - "description": "Token expiration 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" + } + } + } + } + } + } }, - "valid_for_user_id": { - "type": "string", - "description": "Username to whom the token is issued." + "400": { + "description": "Invalid request.", + "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." - } + "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/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" + ], + "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" + ] + } + } + }, + "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": { @@ -15624,6 +16638,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 +16874,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 +18249,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 +18287,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 +19042,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 +19624,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 +19706,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 +19887,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 +20361,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 +20703,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 +20959,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 +21109,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 +21221,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 +22100,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 +23254,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 +23310,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 +23525,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": { @@ -22017,4 +23749,4 @@ } } ] -} +} \ No newline at end of file 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/CreateEmailCustomisationResponse.md b/sdks/java/docs/CreateEmailCustomisationResponse.md deleted file mode 100644 index 65a77dacf..000000000 --- a/sdks/java/docs/CreateEmailCustomisationResponse.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# CreateEmailCustomisationResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tenantId** | **String** | Tenant ID | | -|**org** | [**OrgType**](OrgType.md) | | | -|**name** | **String** | Email customization name. | | -|**templateProperties** | **Object** | Customization configuration for the email | | - - -## Implemented Interfaces - -* Serializable - - diff --git a/sdks/java/docs/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/DbtConnectionRequest.md b/sdks/java/docs/DbtConnectionRequest.md deleted file mode 100644 index e7e067fcc..000000000 --- a/sdks/java/docs/DbtConnectionRequest.md +++ /dev/null @@ -1,35 +0,0 @@ - - -# DbtConnectionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**connectionName** | **String** | Name of the connection. | | -|**databaseName** | **String** | Name of the Database. | | -|**importType** | [**ImportTypeEnum**](#ImportTypeEnum) | Mention type of Import | [optional] | -|**accessToken** | **String** | Access token is mandatory when Import_Type is DBT_CLOUD. | [optional] | -|**dbtUrl** | **String** | DBT URL is mandatory when Import_Type is DBT_CLOUD. | [optional] | -|**accountId** | **String** | Account ID is mandatory when Import_Type is DBT_CLOUD | [optional] | -|**projectId** | **String** | Project ID is mandatory when Import_Type is DBT_CLOUD | [optional] | -|**dbtEnvId** | **String** | DBT Environment ID\" | [optional] | -|**projectName** | **String** | Name of the project | [optional] | -|**fileContent** | **File** | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' | [optional] | - - - -## Enum: ImportTypeEnum - -| Name | Value | -|---- | -----| -| DBT_CLOUD | "DBT_CLOUD" | -| ZIP_FILE | "ZIP_FILE" | - - -## Implemented Interfaces - -* Serializable - - diff --git a/sdks/java/docs/DbtGenerateSyncTmlRequest.md b/sdks/java/docs/DbtGenerateSyncTmlRequest.md deleted file mode 100644 index 0c56b5658..000000000 --- a/sdks/java/docs/DbtGenerateSyncTmlRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# DbtGenerateSyncTmlRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dbtConnectionIdentifier** | **String** | Unique ID of the DBT connection. | | -|**fileContent** | **File** | 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] | - - -## Implemented Interfaces - -* Serializable - - diff --git a/sdks/java/docs/DbtGenerateTmlRequest.md b/sdks/java/docs/DbtGenerateTmlRequest.md deleted file mode 100644 index 875bb692d..000000000 --- a/sdks/java/docs/DbtGenerateTmlRequest.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# DbtGenerateTmlRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dbtConnectionIdentifier** | **String** | Unique ID of the DBT connection. | | -|**modelTables** | [**List<ModelTableList>**](ModelTableList.md) | List of Models and their respective Tables | [optional] | -|**importWorksheets** | [**ImportWorksheetsEnum**](#ImportWorksheetsEnum) | Mention the worksheet tmls to import | | -|**worksheets** | **List<String>** | List of worksheets is mandatory when import_Worksheets is type SELECTED | [optional] | -|**fileContent** | **File** | 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] | - - - -## Enum: ImportWorksheetsEnum - -| Name | Value | -|---- | -----| -| ALL | "ALL" | -| NONE | "NONE" | -| SELECTED | "SELECTED" | - - -## Implemented Interfaces - -* Serializable - - diff --git a/sdks/java/docs/DeleteWebhookConfigurationsRequest.md b/sdks/java/docs/DeleteWebhookConfigurationsRequest.md new file mode 100644 index 000000000..bf03ae0d3 --- /dev/null +++ b/sdks/java/docs/DeleteWebhookConfigurationsRequest.md @@ -0,0 +1,17 @@ + + +# DeleteWebhookConfigurationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**webhookIdentifiers** | **List<String>** | List of webhook identifiers to delete. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EmailCustomisationApi.md b/sdks/java/docs/EmailCustomisationApi.md deleted file mode 100644 index eb47004f1..000000000 --- a/sdks/java/docs/EmailCustomisationApi.md +++ /dev/null @@ -1,146 +0,0 @@ -# EmailCustomisationApi - -All URIs are relative to *CLUSTER_URL* - -| Method | HTTP request | -|------------- | ------------- | -| [**createEmailCustomisation**](EmailCustomisationApi.md#createEmailCustomisation) | **POST** /api/rest/2.0/customization/email | -| [**deleteEmailCustomisation**](EmailCustomisationApi.md#deleteEmailCustomisation) | **POST** /api/rest/2.0/customization/email/{template_identifier}/delete | -| [**searchEmailCustomisation**](EmailCustomisationApi.md#searchEmailCustomisation) | **POST** /api/rest/2.0/customization/email/search | -| [**validateEmailCustomisation**](EmailCustomisationApi.md#validateEmailCustomisation) | **POST** /api/rest/2.0/customization/email/validate | - - - -# **createEmailCustomisation** -> CreateEmailCustomisationResponse createEmailCustomisation(createEmailCustomisationRequest) - - - - Version: 10.10.0.cl or later Creates a custom configuration for the email customisation #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines To create a custom confuguration: 1. Pass these parameters in your API request. - A JSON map of configuration attributes `template_properties`. The following example shows the configuration attribures for a csutom configuration: ``` { { \"logoUrl\": \"<logo_url>\", \"homeUrl\": \"<home_url>\", \"productName\": \"<Company Name in the Mail>\", \"footerAddress\": \"<address to be visible in the footer>\", \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": <true/false>, \"hideTsVocabularyDefinitions\": <true/false>e, \"hideProductName\": <true/false>, \"hideFooterPhone\": <true/false>, \"hideFooterAddress\": <true/false>, \"hidePrivacyPolicy\": <true/false>, \"hideManageNotification\": <true/false>, \"fontfamily\": \"<to maintain a single font in the entire email>\" } } ``` - -### Parameters - -| Name | Type | -|------------- | ------------- | -| **createEmailCustomisationRequest** | [**CreateEmailCustomisationRequest**](CreateEmailCustomisationRequest.md) - -### Return type - -[**CreateEmailCustomisationResponse**](CreateEmailCustomisationResponse.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Invalid request. | - | -| **403** | Unauthorized access. | - | -| **500** | Unexpected error | - | - - -# **deleteEmailCustomisation** -> deleteEmailCustomisation(templateIdentifier) - - - - Version: 10.10.0.cl or later Deletes the configuration for the email customisation. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines Deletes the configuration available for the cluster/org. Pass the `template_identifier` in the API request. Note: `template_identifier` can be fetched from search API request. - -### Parameters - -| Name | Type | -|------------- | ------------- | -| **templateIdentifier** | **String** - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Email Customization configuration successfully deleted. | - | -| **400** | Invalid request. | - | -| **403** | Unauthorized access. | - | -| **500** | Unexpected error | - | - - -# **searchEmailCustomisation** -> List<CreateEmailCustomisationResponse> searchEmailCustomisation() - - - - Version: 10.10.0.cl or later Search the email customisation configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines To get the list of configurations set in the cluster/org. - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<CreateEmailCustomisationResponse>**](CreateEmailCustomisationResponse.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Invalid request. | - | -| **403** | Unauthorized access. | - | -| **500** | Unexpected error | - | - - -# **validateEmailCustomisation** -> validateEmailCustomisation() - - - - Version: 10.10.0.cl or later Validates the email customisation configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Triggered test email for customization configuration | - | -| **400** | Invalid request. | - | -| **403** | Unauthorized access. | - | -| **500** | Unexpected error | - | - diff --git a/sdks/java/docs/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/CreateEmailCustomisationRequest.md b/sdks/java/docs/OrgDetails.md similarity index 56% rename from sdks/java/docs/CreateEmailCustomisationRequest.md rename to sdks/java/docs/OrgDetails.md index fa3492e91..0e22f8f2f 100644 --- a/sdks/java/docs/CreateEmailCustomisationRequest.md +++ b/sdks/java/docs/OrgDetails.md @@ -1,13 +1,14 @@ -# CreateEmailCustomisationRequest +# OrgDetails ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**templateProperties** | **Object** | Email customization configuration as key value pair | | +|**id** | **String** | Unique id of the org | | +|**name** | **String** | Name of the org | | ## Implemented Interfaces 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/UpdateDbtConnectionRequest.md b/sdks/java/docs/UpdateDbtConnectionRequest.md deleted file mode 100644 index 73be6dee2..000000000 --- a/sdks/java/docs/UpdateDbtConnectionRequest.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# UpdateDbtConnectionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dbtConnectionIdentifier** | **String** | Unique ID of the DBT Connection. | | -|**connectionName** | **String** | Name of the connection. | [optional] | -|**databaseName** | **String** | Name of the Database. | [optional] | -|**importType** | [**ImportTypeEnum**](#ImportTypeEnum) | Mention type of Import | [optional] | -|**accessToken** | **String** | Access token is mandatory when Import_Type is DBT_CLOUD. | [optional] | -|**dbtUrl** | **String** | DBT URL is mandatory when Import_Type is DBT_CLOUD. | [optional] | -|**accountId** | **String** | Account ID is mandatory when Import_Type is DBT_CLOUD | [optional] | -|**projectId** | **String** | Project ID is mandatory when Import_Type is DBT_CLOUD | [optional] | -|**dbtEnvId** | **String** | DBT Environment ID\" | [optional] | -|**projectName** | **String** | Name of the project | [optional] | -|**fileContent** | **File** | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' | [optional] | - - - -## Enum: ImportTypeEnum - -| Name | Value | -|---- | -----| -| DBT_CLOUD | "DBT_CLOUD" | -| ZIP_FILE | "ZIP_FILE" | - - -## Implemented Interfaces - -* Serializable - - 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/InputVariableValue.md b/sdks/java/docs/VariableUpdateScopeInput.md similarity index 69% rename from sdks/java/docs/InputVariableValue.md rename to sdks/java/docs/VariableUpdateScopeInput.md index efd60ca49..a1e2a1d7a 100644 --- a/sdks/java/docs/InputVariableValue.md +++ b/sdks/java/docs/VariableUpdateScopeInput.md @@ -1,17 +1,18 @@ -# InputVariableValue +# VariableUpdateScopeInput +Input for variable value update in batch operations ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**value** | **String** | The connection property value | | |**orgIdentifier** | **String** | The unique name of the org | | |**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Principal type | [optional] | |**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | -|**priority** | **Integer** | The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. | [optional] | +|**modelIdentifier** | **String** | Unique ID of the model | [optional] | +|**priority** | **Integer** | Priority level | [optional] | 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/VariableValueInput.md b/sdks/java/docs/VariableValueInput.md deleted file mode 100644 index 6204e0aee..000000000 --- a/sdks/java/docs/VariableValueInput.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VariableValueInput - -Input for variable value update - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**variableIdentifier** | **String** | ID or Name of the variable | | -|**variableValues** | [**List<InputVariableValue>**](InputVariableValue.md) | Values of the variable | | - - -## Implemented Interfaces - -* Serializable - - 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/ApiCallback.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiCallback.java index 06d8f5141..f69899eb6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiCallback.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiCallback.java @@ -4,8 +4,10 @@ package com.thoughtspot.client; -import java.util.List; +import java.io.IOException; + import java.util.Map; +import java.util.List; /** * Callback for asynchronous API call. 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..2d44eff36 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java @@ -4,10 +4,16 @@ package com.thoughtspot.client; -import com.thoughtspot.client.auth.ApiKeyAuth; -import com.thoughtspot.client.auth.Authentication; -import com.thoughtspot.client.auth.HttpBasicAuth; -import com.thoughtspot.client.auth.HttpBearerAuth; +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; + +import javax.net.ssl.*; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -25,6 +31,7 @@ import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; import java.text.DateFormat; import java.time.LocalDate; import java.time.OffsetDateTime; @@ -35,39 +42,33 @@ import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.net.ssl.*; -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; -/** ApiClient class. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.auth.Authentication; +import com.thoughtspot.client.auth.HttpBasicAuth; +import com.thoughtspot.client.auth.HttpBearerAuth; +import com.thoughtspot.client.auth.ApiKeyAuth; + +/** + *

ApiClient class.

+ */ + @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiClient { private String basePath = "https://localhost:443"; - protected List servers = - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "{base-url}", - "No description provided", - new HashMap() { - { - put( - "base-url", - new ServerVariable( - "No description provided", - "https://localhost:443", - new HashSet())); - } - }))); + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "{base-url}", + "No description provided", + new HashMap() {{ + put("base-url", new ServerVariable( + "No description provided", + "https://localhost:443", + new HashSet( + ) + )); + }} + ) + )); protected Integer serverIndex = 0; protected Map serverVariables = null; private boolean debugging = false; @@ -92,7 +93,9 @@ public class ApiClient { private HttpLoggingInterceptor loggingInterceptor; - /** Basic constructor for ApiClient */ + /** + * Basic constructor for ApiClient + */ public ApiClient() { this((ApiClientConfiguration) null, (OkHttpClient) null); } @@ -167,7 +170,7 @@ private void initHttpClient() { private void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor : interceptors) { + for (Interceptor interceptor: interceptors) { builder.addInterceptor(interceptor); } @@ -182,7 +185,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(); } @@ -286,9 +289,9 @@ public boolean isVerifyingSsl() { } /** - * Configure whether to verify certificate and hostname when making https requests. Default to - * true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types - * of cryptographic attacks. + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. * * @param verifyingSsl True to verify TLS/SSL connection * @return ApiClient @@ -309,8 +312,8 @@ public InputStream getSslCaCert() { } /** - * Configure the CA certificate to be trusted when making https requests. Use null to reset to - * default. + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. * * @param sslCaCert input stream for SSL CA cert * @return ApiClient @@ -339,7 +342,8 @@ public boolean isHostnameVerification() { } /** - * Configure whether to verify hostname when making https requests. Default to true. + * Configure whether to verify hostname when making https requests. + * Default to true. * * @param hostnameVerification True to verify hostname * @return ApiClient @@ -351,7 +355,7 @@ public ApiClient setHostnameVerification(boolean hostnameVerification) { } /** - * Getter for the field keyManagers. + *

Getter for the field keyManagers.

* * @return an array of {@link javax.net.ssl.KeyManager} objects */ @@ -360,8 +364,8 @@ public KeyManager[] getKeyManagers() { } /** - * Configure client keys to use for authorization in an SSL session. Use null to reset to - * default. + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. * * @param managers The KeyManagers to use * @return ApiClient @@ -373,7 +377,7 @@ public ApiClient setKeyManagers(KeyManager[] managers) { } /** - * Getter for the field dateFormat. + *

Getter for the field dateFormat.

* * @return a {@link java.text.DateFormat} object */ @@ -382,7 +386,7 @@ public DateFormat getDateFormat() { } /** - * Setter for the field dateFormat. + *

Setter for the field dateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object * @return a {@link com.thoughtspot.client.ApiClient} object @@ -393,7 +397,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) { } /** - * Set SqlDateFormat. + *

Set SqlDateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object * @return a {@link com.thoughtspot.client.ApiClient} object @@ -404,7 +408,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { } /** - * Set OffsetDateTimeFormat. + *

Set OffsetDateTimeFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link com.thoughtspot.client.ApiClient} object @@ -415,7 +419,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { } /** - * Set LocalDateFormat. + *

Set LocalDateFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link com.thoughtspot.client.ApiClient} object @@ -426,7 +430,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { } /** - * Set LenientOnJson. + *

Set LenientOnJson.

* * @param lenientOnJson a boolean * @return a {@link com.thoughtspot.client.ApiClient} object @@ -457,7 +461,6 @@ public Authentication getAuthentication(String authName) { /** * Helper method to set access token for the first Bearer authentication. - * * @param bearerToken Bearer token */ public void setBearerToken(String bearerToken) { @@ -556,8 +559,7 @@ public void setAccessToken(String accessToken) { * @param region Region * @param service Service to access to */ - public void setAWS4Configuration( - String accessKey, String secretKey, String region, String service) { + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { throw new RuntimeException("No AWS4 authentication configured!"); } @@ -570,12 +572,7 @@ public void setAWS4Configuration( * @param region Region * @param service Service to access to */ - public void setAWS4Configuration( - String accessKey, - String secretKey, - String sessionToken, - String region, - String service) { + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { throw new RuntimeException("No AWS4 authentication configured!"); } @@ -647,12 +644,11 @@ public ApiClient setDebugging(boolean debugging) { } /** - * The path of temporary folder used to store downloaded files from endpoints with file - * response. The default value is null, i.e. using the system's default temporary - * folder. + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. * - * @see createTempFile + * @see createTempFile * @return Temporary folder path */ public String getTempFolderPath() { @@ -680,18 +676,15 @@ public int getConnectTimeout() { } /** - * Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values - * must be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. * * @param connectionTimeout connection timeout in milliseconds * @return Api client */ public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient = - httpClient - .newBuilder() - .connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS) - .build(); + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); return this; } @@ -705,15 +698,15 @@ public int getReadTimeout() { } /** - * Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must - * be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. * * @param readTimeout read timeout in milliseconds * @return Api client */ public ApiClient setReadTimeout(int readTimeout) { - httpClient = - httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); return this; } @@ -727,18 +720,19 @@ public int getWriteTimeout() { } /** - * Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values - * must be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. * * @param writeTimeout connection timeout in milliseconds * @return Api client */ public ApiClient setWriteTimeout(int writeTimeout) { - httpClient = - httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); return this; } + /** * Format the given parameter object into string. * @@ -748,10 +742,8 @@ public ApiClient setWriteTimeout(int writeTimeout) { public String parameterToString(Object param) { if (param == null) { return ""; - } else if (param instanceof Date - || param instanceof OffsetDateTime - || param instanceof LocalDate) { - // Serialize to json string and remove the " enclosing characters + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters String jsonStr = JSON.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { @@ -771,7 +763,7 @@ public String parameterToString(Object param) { /** * Formats the specified query parameter to a list containing a single {@code Pair} object. * - *

Note that {@code value} must not be a collection. + * Note that {@code value} must not be a collection. * * @param name The name of the parameter. * @param value The value of the parameter. @@ -792,7 +784,7 @@ public List parameterToPair(String name, Object value) { /** * Formats the specified collection query parameters to a list of {@code Pair} objects. * - *

Note that the values of each of the returned Pair objects are percent-encoded. + * Note that the values of each of the returned Pair objects are percent-encoded. * * @param collectionFormat The collection format of the parameter. * @param name The name of the parameter. @@ -839,17 +831,17 @@ public List parameterToPairs(String collectionFormat, String name, Collect return params; } - /** - * Formats the specified free-form query parameters to a list of {@code Pair} objects. - * - * @param value The free-form query parameters. - * @return A list of {@code Pair} objects. - */ + /** + * Formats the specified free-form query parameters to a list of {@code Pair} objects. + * + * @param value The free-form query parameters. + * @return A list of {@code Pair} objects. + */ public List freeFormParameterToPairs(Object value) { List params = new ArrayList<>(); // preconditions - if (value == null || !(value instanceof Map)) { + if (value == null || !(value instanceof Map )) { return params; } @@ -863,6 +855,7 @@ public List freeFormParameterToPairs(Object value) { return params; } + /** * Formats the specified collection path parameter to a string value. * @@ -888,7 +881,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio delimiter = "|"; } - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new StringBuilder() ; for (Object item : value) { sb.append(delimiter); sb.append(parameterToString(item)); @@ -898,7 +891,8 @@ public String collectionPathParameterToString(String collectionFormat, Collectio } /** - * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif * * @param filename The filename to be sanitized * @return The sanitized filename @@ -908,10 +902,13 @@ public String sanitizeFilename(String filename) { } /** - * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json - * application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also - * default to JSON - * + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON * @param mime MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ @@ -921,12 +918,13 @@ public boolean isJsonMime(String mime) { } /** - * Select the Accept header's value from the given accepts array: if JSON exists in the given - * array, use it; otherwise use all of them (joining into a string) + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) * * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, null will be returned (not to - * set the Accept header explicitly). + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). */ public String selectHeaderAccept(String[] accepts) { if (accepts.length == 0) { @@ -936,12 +934,13 @@ public String selectHeaderAccept(String[] accepts) { } /** - * Select the Content-Type header's value from the given array: if JSON exists in the given - * array, use it; otherwise use the first one of the array. + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. * * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, returns null. If it - * matches "any", JSON will be used. + * @return The Content-Type header to use. If the given array is empty, + * returns null. If it matches "any", JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { if (contentTypes.length == 0) { @@ -976,15 +975,15 @@ public String escapeString(String str) { } /** - * Deserialize response body to Java object, according to the return type and the Content-Type - * response header. + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. * * @param Type * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws com.thoughtspot.client.ApiException If fail to deserialize response body, i.e. cannot - * read response body or the Content-Type of the response is not supported. + * @throws com.thoughtspot.client.ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") public T deserialize(Response response, Type returnType) throws ApiException { @@ -1006,8 +1005,10 @@ public T deserialize(Response response, Type returnType) throws ApiException String respBody; try { - if (response.body() != null) respBody = response.body().string(); - else respBody = null; + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; } catch (IOException e) { throw new ApiException(e); } @@ -1036,8 +1037,8 @@ public T deserialize(Response response, Type returnType) throws ApiException } /** - * Serialize the given Java object into request body according to the object's class and the - * request Content-Type. + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. * * @param obj The Java object * @param contentType The request Content-Type @@ -1072,8 +1073,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws com.thoughtspot.client.ApiException If fail to read file content from response and - * write to disk + * @throws com.thoughtspot.client.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1121,11 +1121,14 @@ public File prepareDownloadFile(Response response) throws IOException { suffix = filename.substring(pos); } // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) prefix = "download-"; + if (prefix.length() < 3) + prefix = "download-"; } - if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); - else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); } /** @@ -1146,8 +1149,9 @@ public ApiResponse execute(Call call) throws ApiException { * @param returnType The return type used to deserialize HTTP response body * @param The return type corresponding to (same with) returnType * @param call Call - * @return ApiResponse object containing response status, headers and data, which is a Java - * object deserialized from response body and would be null when returnType is null. + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. * @throws com.thoughtspot.client.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { @@ -1182,32 +1186,27 @@ public void executeAsync(Call call, ApiCallback callback) { */ @SuppressWarnings("unchecked") public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue( - new Callback() { - @Override - public void onFailure(Call call, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } - @Override - public void onResponse(Call call, Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } catch (Exception e) { - callback.onFailure( - new ApiException(e), - response.code(), - response.headers().toMultimap()); - return; - } - callback.onSuccess( - result, response.code(), response.headers().toMultimap()); - } - }); + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); } /** @@ -1217,8 +1216,8 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws com.thoughtspot.client.ApiException If the response has an unsuccessful status code - * or fail to deserialize the response body + * @throws com.thoughtspot.client.ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { if (response.isSuccessful()) { @@ -1229,11 +1228,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept try { response.body().close(); } catch (Exception e) { - throw new ApiException( - response.message(), - e, - response.code(), - response.headers().toMultimap()); + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); } } return null; @@ -1246,15 +1241,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept try { respBody = response.body().string(); } catch (IOException e) { - throw new ApiException( - response.message(), - e, - response.code(), - response.headers().toMultimap()); + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); } } - throw new ApiException( - response.message(), response.code(), response.headers().toMultimap(), respBody); + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); } } @@ -1263,8 +1253,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * * @param baseUrl The base URL * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and - * "DELETE" + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @param body The request body object @@ -1276,32 +1265,8 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @return The HTTP call * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object */ - public Call buildCall( - String baseUrl, - String path, - String method, - List queryParams, - List collectionQueryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String[] authNames, - ApiCallback callback) - throws ApiException { - Request request = - buildRequest( - baseUrl, - path, - method, - queryParams, - collectionQueryParams, - body, - headerParams, - cookieParams, - formParams, - authNames, - callback); + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1311,8 +1276,7 @@ public Call buildCall( * * @param baseUrl The base URL * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and - * "DELETE" + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @param body The request body object @@ -1324,19 +1288,7 @@ public Call buildCall( * @return The HTTP request * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object */ - public Request buildRequest( - String baseUrl, - String path, - String method, - List queryParams, - List collectionQueryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String[] authNames, - ApiCallback callback) - throws ApiException { + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); // prepare HTTP request body @@ -1358,9 +1310,7 @@ public Request buildRequest( reqBody = null; } else { // use an empty request body (for POST, PUT and PATCH) - reqBody = - RequestBody.create( - "", contentType == null ? null : MediaType.parse(contentType)); + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); } } else { reqBody = serialize(body, contentType); @@ -1369,18 +1319,9 @@ public Request buildRequest( List updatedQueryParams = new ArrayList<>(queryParams); // update parameters with authentication settings - updateParamsForAuth( - authNames, - updatedQueryParams, - headerParams, - cookieParams, - requestBodyToString(reqBody), - method, - URI.create(url)); - - final Request.Builder reqBuilder = - new Request.Builder() - .url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); + updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); @@ -1409,8 +1350,7 @@ public Request buildRequest( * @param collectionQueryParams The collection query parameters * @return The full URL */ - public String buildUrl( - String baseUrl, String path, List queryParams, List collectionQueryParams) { + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { final StringBuilder url = new StringBuilder(); if (baseUrl != null) { url.append(baseUrl).append(path); @@ -1418,11 +1358,9 @@ public String buildUrl( String baseURL; if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException( - String.format( - "Invalid index %d when selecting the host settings. Must be" - + " less than %d", - serverIndex, servers.size())); + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); } baseURL = servers.get(serverIndex).URL(serverVariables); } else { @@ -1443,9 +1381,7 @@ public String buildUrl( url.append("&"); } String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())) - .append("=") - .append(escapeString(value)); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); } } } @@ -1495,13 +1431,11 @@ public void processHeaderParams(Map headerParams, Request.Builde */ public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader( - "Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } for (Entry param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader( - "Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } } } @@ -1518,15 +1452,8 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param uri URI * @throws com.thoughtspot.client.ApiException If fails to update the parameters */ - public void updateParamsForAuth( - String[] authNames, - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { @@ -1551,8 +1478,8 @@ public RequestBody buildRequestBodyFormEncoding(Map formParams) } /** - * Build a multipart (file uploading) request body with the given form parameters, which could - * contain text fields and file fields. + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. * * @param formParams Form parameters in the form of Map * @return RequestBody @@ -1565,7 +1492,7 @@ public RequestBody buildRequestBodyMultipart(Map formParams) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { List list = (List) param.getValue(); - for (Object item : list) { + for (Object item: list) { if (item instanceof File) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); } else { @@ -1597,29 +1524,24 @@ public String guessContentTypeFromFile(File file) { /** * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. * - * @param mpBuilder MultipartBody.Builder + * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param file The file to add to the Header - */ + */ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = - Headers.of( - "Content-Disposition", - "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); } /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody - * Builder. + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. * * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param obj The complex object to add to the Header */ - private void addPartToMultiPartBuilder( - MultipartBody.Builder mpBuilder, String key, Object obj) { + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); @@ -1638,8 +1560,8 @@ private void addPartToMultiPartBuilder( } /** - * Get network interceptor to add it to the httpClient to track download progress for async - * requests. + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. */ private Interceptor getProgressInterceptor() { return new Interceptor() { @@ -1649,10 +1571,9 @@ public Response intercept(Interceptor.Chain chain) throws IOException { final Response originalResponse = chain.proceed(request); if (request.tag() instanceof ApiCallback) { final ApiCallback callback = (ApiCallback) request.tag(); - return originalResponse - .newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); } return originalResponse; } @@ -1660,37 +1581,33 @@ public Response intercept(Interceptor.Chain chain) throws IOException { } /** - * Apply SSL related settings to httpClient according to the current values of verifyingSsl and - * sslCaCert. + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. */ private void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; if (!verifyingSsl) { - trustManagers = - new TrustManager[] { - new X509TrustManager() { - @Override - public void checkClientTrusted( - java.security.cert.X509Certificate[] chain, String authType) - throws CertificateException {} - - @Override - public void checkServerTrusted( - java.security.cert.X509Certificate[] chain, String authType) - throws CertificateException {} - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[] {}; - } + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { } - }; + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; hostnameVerifier = getHostnameVerifier(false); } else { - TrustManagerFactory trustManagerFactory = - TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); InputStream sslCaCertStream = getSslCaCert(); if (sslCaCertStream == null) { @@ -1698,11 +1615,9 @@ public java.security.cert.X509Certificate[] getAcceptedIssuers() { } else { char[] password = null; // Any password will work. CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = - certificateFactory.generateCertificates(sslCaCertStream); + Collection certificates = certificateFactory.generateCertificates(sslCaCertStream); if (certificates.isEmpty()) { - throw new IllegalArgumentException( - "expected non-empty set of trusted certificates"); + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); } KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; @@ -1718,12 +1633,8 @@ public java.security.cert.X509Certificate[] getAcceptedIssuers() { SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = - httpClient - .newBuilder() - .sslSocketFactory( - sslContext.getSocketFactory(), - (X509TrustManager) trustManagers[0]) + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) .hostnameVerifier(hostnameVerifier) .build(); } catch (GeneralSecurityException e) { @@ -1745,8 +1656,8 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * Returns the appropriate hostname verifier based on verification setting. * * @param enableVerification whether to enable hostname verification - * @return OkHostnameVerifier.INSTANCE if verification is enabled, anonymous HostnameVerifier - * that accepts all hostnames if disabled + * @return OkHostnameVerifier.INSTANCE if verification is enabled, + * anonymous HostnameVerifier that accepts all hostnames if disabled */ private static HostnameVerifier getHostnameVerifier(boolean enableVerification) { if (enableVerification) { @@ -1766,8 +1677,7 @@ public boolean verify(String hostname, SSLSession session) { * * @param requestBody The HTTP request object * @return The string representation of the HTTP request body - * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object into - * a string + * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object into a string */ private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java index fbf382d89..6684114a1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java @@ -11,20 +11,19 @@ import java.util.List; import java.util.Map; import java.util.function.Supplier; + import javax.net.ssl.KeyManager; /** - * Configuration class for the ThoughtSpot client. This class holds various configuration options - * such as base path, bearer token, default headers, cookies, SSL verification, hostname - * verification, and key managers. + * Configuration class for the ThoughtSpot client. + * This class holds various configuration options such as base path, bearer token, + * default headers, cookies, SSL verification, hostname verification, and key managers. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiClientConfiguration { private static final String DEFAULT_BASE_PATH = "https://localhost:443"; - private static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 60000; // 1 minute - private static final int DEFAULT_READ_WRITE_TIMEOUT_MILLIS = 300000; // 5 minutes + private static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 60000; // 1 minute + private static final int DEFAULT_READ_WRITE_TIMEOUT_MILLIS = 300000; // 5 minutes private final String basePath; private final Supplier bearerTokenSupplier; @@ -40,47 +39,23 @@ public class ApiClientConfiguration { private final int writeTimeoutMillis; /** - * Default constructor that initializes the configuration with default values. Sets base path to - * {@link #DEFAULT_BASE_PATH}, connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, and - * read/write timeouts to {@link #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. + * Default constructor that initializes the configuration with default values. + * Sets base path to {@link #DEFAULT_BASE_PATH}, connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, + * and read/write timeouts to {@link #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. */ public ApiClientConfiguration() { - this( - DEFAULT_BASE_PATH, - () -> (String) null, - Collections.emptyMap(), - Collections.emptyMap(), - true, - null, - true, - Collections.emptyList(), - null, - DEFAULT_CONNECT_TIMEOUT_MILLIS, - DEFAULT_READ_WRITE_TIMEOUT_MILLIS, - DEFAULT_READ_WRITE_TIMEOUT_MILLIS); + this(DEFAULT_BASE_PATH, () -> (String) null, Collections.emptyMap(), Collections.emptyMap(), true, null, true, Collections.emptyList(), null, DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_READ_WRITE_TIMEOUT_MILLIS, DEFAULT_READ_WRITE_TIMEOUT_MILLIS); } /** - * Constructor that initializes the configuration with a specified base path. Sets connect - * timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, and read/write timeouts to {@link - * #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. + * Constructor that initializes the configuration with a specified base path. + * Sets connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, + * and read/write timeouts to {@link #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. * * @param basePath The base path for the API. */ public ApiClientConfiguration(String basePath) { - this( - basePath, - () -> (String) null, - Collections.emptyMap(), - Collections.emptyMap(), - true, - null, - true, - Collections.emptyList(), - null, - DEFAULT_CONNECT_TIMEOUT_MILLIS, - DEFAULT_READ_WRITE_TIMEOUT_MILLIS, - DEFAULT_READ_WRITE_TIMEOUT_MILLIS); + this(basePath, () -> (String) null, Collections.emptyMap(), Collections.emptyMap(), true, null, true, Collections.emptyList(), null, DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_READ_WRITE_TIMEOUT_MILLIS, DEFAULT_READ_WRITE_TIMEOUT_MILLIS); } /** @@ -94,14 +69,10 @@ public ApiClientConfiguration(String basePath) { * @param sslCaCert The SSL CA certificate input stream. * @param hostnameVerification Whether to verify hostname when making https requests. * @param keyManagers List of key managers for SSL configuration. - * @param downloadPath The path for downloading files. If null, system's default temporary - * folder will be used. - * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. - * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. - * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. + * @param downloadPath The path for downloading files. If null, system's default temporary folder will be used. + * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. + * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. + * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. */ public ApiClientConfiguration( final String basePath, @@ -115,20 +86,9 @@ public ApiClientConfiguration( final String downloadPath, final int connectTimeoutMillis, final int readTimeoutMillis, - final int writeTimeoutMillis) { - this( - basePath, - () -> bearerToken, - defaultHeaderMap, - defaultCookieMap, - verifyingSsl, - sslCaCert, - hostnameVerification, - keyManagers, - downloadPath, - connectTimeoutMillis, - readTimeoutMillis, - writeTimeoutMillis); + final int writeTimeoutMillis + ) { + this(basePath, () -> bearerToken, defaultHeaderMap, defaultCookieMap, verifyingSsl, sslCaCert, hostnameVerification, keyManagers, downloadPath, connectTimeoutMillis, readTimeoutMillis, writeTimeoutMillis); } /** @@ -142,14 +102,10 @@ public ApiClientConfiguration( * @param sslCaCert The SSL CA certificate input stream. * @param hostnameVerification Whether to verify hostname when making https requests. * @param keyManagers List of key managers for SSL configuration. - * @param downloadPath The path for downloading files. If null, system's default temporary - * folder will be used. - * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. - * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. - * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. + * @param downloadPath The path for downloading files. If null, system's default temporary folder will be used. + * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. + * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. + * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. */ public ApiClientConfiguration( final String basePath, @@ -163,24 +119,22 @@ public ApiClientConfiguration( final String downloadPath, final int connectTimeoutMillis, final int readTimeoutMillis, - final int writeTimeoutMillis) { + final int writeTimeoutMillis + ) { this.basePath = normalizeBasePath(basePath); this.bearerTokenSupplier = bearerTokenSupplier; - this.defaultHeaderMap = - defaultHeaderMap != null - ? Collections.unmodifiableMap(new HashMap<>(defaultHeaderMap)) - : Collections.emptyMap(); - this.defaultCookieMap = - defaultCookieMap != null - ? Collections.unmodifiableMap(new HashMap<>(defaultCookieMap)) - : Collections.emptyMap(); + this.defaultHeaderMap = defaultHeaderMap != null + ? Collections.unmodifiableMap(new HashMap<>(defaultHeaderMap)) + : Collections.emptyMap(); + this.defaultCookieMap = defaultCookieMap != null + ? Collections.unmodifiableMap(new HashMap<>(defaultCookieMap)) + : Collections.emptyMap(); this.verifyingSsl = verifyingSsl; this.sslCaCert = sslCaCert; this.hostnameVerification = hostnameVerification; - this.keyManagers = - keyManagers != null - ? Collections.unmodifiableList(new ArrayList<>(keyManagers)) - : Collections.emptyList(); + this.keyManagers = keyManagers != null + ? Collections.unmodifiableList(new ArrayList<>(keyManagers)) + : Collections.emptyList(); this.downloadPath = downloadPath; this.connectTimeoutMillis = connectTimeoutMillis; this.readTimeoutMillis = readTimeoutMillis; @@ -200,47 +154,65 @@ private static String normalizeBasePath(String basePath) { return basePath.replaceAll("/+$", ""); } - /** @return The base path for the API. */ + /** + * @return The base path for the API. + */ public String getBasePath() { return basePath; } - /** @return The bearer token for authentication. */ + /** + * @return The bearer token for authentication. + */ public String getBearerToken() { return bearerTokenSupplier.get(); } - /** @return The bearer token supplier for authentication. */ + /** + * @return The bearer token supplier for authentication. + */ public Supplier getBearerTokenSupplier() { return bearerTokenSupplier; } - /** @return An unmodifiable map of default headers. */ + /** + * @return An unmodifiable map of default headers. + */ public Map getDefaultHeaderMap() { return defaultHeaderMap; } - /** @return An unmodifiable map of default cookies. */ + /** + * @return An unmodifiable map of default cookies. + */ public Map getDefaultCookieMap() { return defaultCookieMap; } - /** @return Whether SSL verification is enabled. */ + /** + * @return Whether SSL verification is enabled. + */ public boolean isVerifyingSsl() { return verifyingSsl; } - /** @return The SSL CA certificate input stream. */ + /** + * @return The SSL CA certificate input stream. + */ public InputStream getSslCaCert() { return sslCaCert; } - /** @return Whether hostname verification is enabled. */ + /** + * @return Whether hostname verification is enabled. + */ public boolean isHostnameVerification() { return hostnameVerification; } - /** @return An unmodifiable list of key managers. */ + /** + * @return An unmodifiable list of key managers. + */ public List getKeyManagers() { return keyManagers; } @@ -252,50 +224,45 @@ public String getDownloadPath() { return downloadPath; } - /** @return The connection timeout in milliseconds. */ + /** + * @return The connection timeout in milliseconds. + */ public int getConnectTimeoutMillis() { return connectTimeoutMillis; } - /** @return The read timeout in milliseconds. */ + /** + * @return The read timeout in milliseconds. + */ public int getReadTimeoutMillis() { return readTimeoutMillis; } - /** @return The write timeout in milliseconds. */ + /** + * @return The write timeout in milliseconds. + */ public int getWriteTimeoutMillis() { return writeTimeoutMillis; } - /** @return A string representation of the client configuration. */ + /** + * @return A string representation of the client configuration. + */ @Override public String toString() { - return "ApiClientConfiguration{" - + "basePath='" - + basePath - + '\'' - + ", defaultHeaderMap=" - + defaultHeaderMap - + ", defaultCookieMap=" - + defaultCookieMap - + ", verifyingSsl=" - + verifyingSsl - + ", sslCaCert=" - + sslCaCert - + ", hostnameVerification=" - + hostnameVerification - + ", keyManagers=" - + keyManagers - + ", downloadPath='" - + downloadPath - + '\'' - + ", connectTimeoutMillis=" - + connectTimeoutMillis - + ", readTimeoutMillis=" - + readTimeoutMillis - + ", writeTimeoutMillis=" - + writeTimeoutMillis - + '}'; + return "ApiClientConfiguration{" + + "basePath='" + basePath + '\'' + + ", defaultHeaderMap=" + defaultHeaderMap + + ", defaultCookieMap=" + defaultCookieMap + + ", verifyingSsl=" + verifyingSsl + + ", sslCaCert=" + sslCaCert + + ", hostnameVerification=" + hostnameVerification + + ", keyManagers=" + keyManagers + + ", downloadPath='" + downloadPath + '\'' + + ", connectTimeoutMillis=" + connectTimeoutMillis + + ", readTimeoutMillis=" + readTimeoutMillis + + ", writeTimeoutMillis=" + writeTimeoutMillis + + '}'; } /** @@ -307,7 +274,9 @@ public Builder toBuilder() { return new Builder(this); } - /** Builder class for constructing a {@link ApiClientConfiguration} instance. */ + /** + * Builder class for constructing a {@link ApiClientConfiguration} instance. + */ public static class Builder { private String basePath; private Supplier bearerTokenSupplier; @@ -323,8 +292,8 @@ public static class Builder { private int writeTimeoutMillis; /** - * Default constructor that initializes the builder with default values. Sets base path to - * {@link #DEFAULT_BASE_PATH}, connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, + * Default constructor that initializes the builder with default values. + * Sets base path to {@link #DEFAULT_BASE_PATH}, connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, * and read/write timeouts to {@link #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. */ public Builder() { @@ -491,16 +460,14 @@ public Builder keyManager(KeyManager keyManager) { * @return The builder instance. */ public Builder keyManagers(List keyManagers) { - this.keyManagers = - keyManagers != null ? new ArrayList<>(keyManagers) : new ArrayList<>(); + this.keyManagers = keyManagers != null ? new ArrayList<>(keyManagers) : new ArrayList<>(); return this; } /** * Sets the download path for files. * - * @param downloadPath The path for downloading files. If null, system's default temporary - * folder will be used. + * @param downloadPath The path for downloading files. If null, system's default temporary folder will be used. * @return The builder instance. */ public Builder downloadPath(String downloadPath) { @@ -511,8 +478,7 @@ public Builder downloadPath(String downloadPath) { /** * Sets the connection timeout. * - * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and - * {@link Integer#MAX_VALUE}. + * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. * @return The builder instance. */ public Builder connectTimeoutMillis(int connectTimeoutMillis) { @@ -523,8 +489,7 @@ public Builder connectTimeoutMillis(int connectTimeoutMillis) { /** * Sets the read timeout. * - * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. + * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. * @return The builder instance. */ public Builder readTimeoutMillis(int readTimeoutMillis) { @@ -535,8 +500,7 @@ public Builder readTimeoutMillis(int readTimeoutMillis) { /** * Sets the write timeout. * - * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link - * Integer#MAX_VALUE}. + * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link Integer#MAX_VALUE}. * @return The builder instance. */ public Builder writeTimeoutMillis(int writeTimeoutMillis) { @@ -562,7 +526,8 @@ public ApiClientConfiguration build() { downloadPath, connectTimeoutMillis, readTimeoutMillis, - writeTimeoutMillis); + writeTimeoutMillis + ); } } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java index bbc8cccb5..4f80b7b6e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java @@ -4,14 +4,15 @@ package com.thoughtspot.client; -import java.util.List; import java.util.Map; +import java.util.List; + -/** ApiException class. */ +/** + *

ApiException class.

+ */ @SuppressWarnings("serial") -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; @@ -19,11 +20,13 @@ public class ApiException extends Exception { private Map> responseHeaders = null; private String responseBody = null; - /** Constructor for ApiException. */ + /** + *

Constructor for ApiException.

+ */ public ApiException() {} /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param throwable a {@link java.lang.Throwable} object */ @@ -32,7 +35,7 @@ public ApiException(Throwable throwable) { } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param message the error message */ @@ -41,7 +44,7 @@ public ApiException(String message) { } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param message the error message * @param throwable a {@link java.lang.Throwable} object @@ -49,12 +52,7 @@ public ApiException(String message) { * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders, - String responseBody) { + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { super(message, throwable); this.code = code; this.responseHeaders = responseHeaders; @@ -62,55 +60,42 @@ public ApiException( } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param message the error message * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ - public ApiException( - String message, - int code, - Map> responseHeaders, - String responseBody) { + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { this(message, (Throwable) null, code, responseHeaders, responseBody); } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param message the error message * @param throwable a {@link java.lang.Throwable} object * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers */ - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders) { + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { this(message, throwable, code, responseHeaders, null); } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this( - "Response Code: " + code + " Response Body: " + responseBody, - (Throwable) null, - code, - responseHeaders, - responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param code HTTP status code * @param message a {@link java.lang.String} object @@ -121,18 +106,14 @@ public ApiException(int code, String message) { } /** - * Constructor for ApiException. + *

Constructor for ApiException.

* * @param code HTTP status code * @param message the error message * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ - public ApiException( - int code, - String message, - Map> responseHeaders, - String responseBody) { + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { this(code, message); this.responseHeaders = responseHeaders; this.responseBody = responseBody; @@ -171,12 +152,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format( - "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response" - + " headers: %s", - super.getMessage(), - this.getCode(), - this.getResponseBody(), - this.getResponseHeaders()); + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java index 5ab3d1a5c..bc0263899 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java @@ -7,14 +7,16 @@ import java.util.List; import java.util.Map; -/** API response returned by API call. */ +/** + * API response returned by API call. + */ public class ApiResponse { - private final int statusCode; - private final Map> headers; - private final T data; + final private int statusCode; + final private Map> headers; + final private T data; /** - * Constructor for ApiResponse. + *

Constructor for ApiResponse.

* * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response @@ -24,7 +26,7 @@ public ApiResponse(int statusCode, Map> headers) { } /** - * Constructor for ApiResponse. + *

Constructor for ApiResponse.

* * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response @@ -37,7 +39,7 @@ public ApiResponse(int statusCode, Map> headers, T data) { } /** - * Get the status code. + *

Get the status code.

* * @return the status code */ @@ -46,16 +48,16 @@ public int getStatusCode() { } /** - * Get the headers. + *

Get the headers.

* - * @return a {@link java.util.Map} of headers + * @return a {@link java.util.Map} of headers */ public Map> getHeaders() { return headers; } /** - * Get the data. + *

Get the data.

* * @return the data */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java index 0abcbf52e..b38f5ff8a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java @@ -4,17 +4,15 @@ package com.thoughtspot.client; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(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(); /** - * Get the default API client, which would be used when creating API instances without providing - * an API client. + * Get the default API client, which would be used when creating API + * instances without providing an API client. * * @return Default API client */ @@ -23,8 +21,8 @@ public static ApiClient getDefaultApiClient() { } /** - * Set the default API client, which would be used when creating API instances without providing - * an API client. + * Set the default API client, which would be used when creating API + * instances without providing an API client. * * @param apiClient API client */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java b/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java index 3795cdc77..2508466f5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java @@ -4,17 +4,18 @@ package com.thoughtspot.client; -import java.io.IOException; import okhttp3.*; import okio.Buffer; import okio.BufferedSink; import okio.GzipSink; import okio.Okio; +import java.io.IOException; + /** * Encodes request bodies using gzip. * - *

Taken from https://github.com/square/okhttp/issues/350 + * Taken from https://github.com/square/okhttp/issues/350 */ class GzipRequestInterceptor implements Interceptor { @Override @@ -24,14 +25,10 @@ public Response intercept(Chain chain) throws IOException { return chain.proceed(originalRequest); } - Request compressedRequest = - originalRequest - .newBuilder() - .header("Content-Encoding", "gzip") - .method( - originalRequest.method(), - forceContentLength(gzip(originalRequest.body()))) - .build(); + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); return chain.proceed(compressedRequest); } 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..a8783d37b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/JSON.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java @@ -6,13 +6,17 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; import com.google.gson.internal.bind.util.ISO8601Utils; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import okio.ByteString; + import java.io.IOException; import java.io.StringReader; import java.lang.reflect.Type; @@ -23,8 +27,9 @@ import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; +import java.util.Locale; import java.util.Map; -import okio.ByteString; +import java.util.HashMap; /* * A JSON utility class @@ -37,42 +42,37 @@ public class JSON { private static boolean isLenientOnJson = false; private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = - new OffsetDateTimeTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder(); + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; GsonBuilder builder = fireBuilder.createGsonBuilder(); return builder; } - private static String getDiscriminatorValue( - JsonElement readElement, String discriminatorField) { + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { JsonElement element = readElement.getAsJsonObject().get(discriminatorField); if (null == element) { - throw new IllegalArgumentException( - "missing discriminator field: <" + discriminatorField + ">"); + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); } return element.getAsString(); } /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator - * value. + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. * * @param classByDiscriminatorValue The map of discriminator values to Java classes. * @param discriminatorValue The value of the OpenAPI discriminator in the input data. * @return The Java class that implements the OpenAPI schema */ - private static Class getClassByDiscriminator( - Map classByDiscriminatorValue, String discriminatorValue) { + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); if (null == clazz) { - throw new IllegalArgumentException( - "cannot determine model class of name: <" + discriminatorValue + ">"); + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); } return clazz; } @@ -84,729 +84,347 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AIContext.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.APIKey.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.APIKeyInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AccessToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActionConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActionConfigInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActionConfigInputCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActionDetails.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActionDetailsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActionDetailsInputCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ActivateUserRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AgentConversation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AnswerContent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AnswerContextInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AnswerDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AssignChangeAuthorRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AssignTagRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AssociateMetadataInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AssociateMetadataInputCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Authentication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AuthenticationInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Author.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AuthorMetadataTypeInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.AuthorType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.BasicAuth.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.BasicAuthInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CALLBACK.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CALLBACKInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CALLBACKInputMandatory.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CalendarResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ChangeUserPasswordRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Column.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleColumn - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleGroup - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleGroupOperation - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleSourceTable - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleTableInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ColumnSecurityRuleUpdate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CommitBranchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CommitFileType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CommitHistoryResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CommitResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CommiterType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ConnectionConfigurationResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ConnectionConfigurationSearchRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ConnectionInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ContextPayloadV2Input.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Conversation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ConversationSettingsInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ConvertWorksheetToModelRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CopyObjectRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateAgentConversationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateCalendarRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateConfigRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateConnectionConfigurationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateConnectionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateConversationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateCustomActionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateEmailCustomizationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateEmailCustomizationResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateOrgRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateRoleRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateScheduleRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateTagRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateUserGroupRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateUserRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CreateVariableRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CronExpression.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CronExpressionInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.CustomActionMetadataTypeInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DataSource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DataSourceContextInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DataWarehouseObjectInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DataWarehouseObjects.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Database.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DbtSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeactivateUserRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DefaultActionConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DefaultActionConfigInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DefaultActionConfigInputCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DefaultActionConfigSearchInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeleteConfigRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeleteConnectionConfigurationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeleteConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeleteMetadataRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeleteMetadataTypeInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeployCommitRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.DeployResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EntityHeader.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ErrorResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EurekaDecomposeQueryResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EurekaLLMDecomposeQueryResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EurekaLLMSuggestedQuery - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.EurekaRelevantQuestion.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExcludeMetadataListItemInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExportAnswerReportRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExportLiveboardReportRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExportMetadataTMLRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExportMetadataTypeInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExportOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ExternalTableInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FavoriteMetadataInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FavoriteMetadataItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FavoriteObjectOptionsInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchAnswerDataRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchAnswerSqlQueryRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchColumnSecurityRulesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchConnectionDiffStatusResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchLiveboardDataRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchLogsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FilterRules.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ForceLogoutUsersRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Frequency.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.FrequencyInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GenerateCSVRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GenericInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetAsyncImportStatusResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetCustomAccessTokenRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetDataSourceSuggestionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetFullAccessTokenRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetObjectAccessTokenRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetRelevantQuestionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GetTokenResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GroupObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.GroupsImportListInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.HeaderAttributeInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.HeaderUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportEPackAsyncTaskStatus - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportMetadataTMLRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportUser.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportUserGroupsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportUserGroupsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportUserType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportUsersRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ImportUsersResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.InputEurekaNLSRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.InputVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.JWTMetadataObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.JWTParameter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.JWTUserOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.JWTUserOptionsFull.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LBContextInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LiveboardContent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LiveboardDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LiveboardOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LiveboardOptionsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LogResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.LoginRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataAssociationItem - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataContext.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataListItemInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataSearchResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.MetadataSearchSortOptions - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ModelTableList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ObjectIDAndName.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Org.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.OrgInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.OrgResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.OrgType.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ParameterValues.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ParameterizeMetadataRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ParametersListItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ParametersListItemInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PdfOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PdfOptionsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PermissionInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PermissionOfMetadataResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PermissionOfPrincipalsResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PermissionsMetadataTypeInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PngOptionsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PrincipalsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PrincipalsListItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PrincipalsListItemInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PublishMetadataListItem - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.PublishMetadataRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.QueryGetDecomposedQueryRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RecipientDetails.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RecipientDetailsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RegionalSettingsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RepoConfigObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResetUserPasswordRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseActivationURL.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseCopyObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseCustomAction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseFailedEntities.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseFailedEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseIncompleteEntities - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseIncompleteEntity - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponsePostUpgradeFailedEntities - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponsePostUpgradeFailedEntity - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseSchedule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseScheduleRun.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseSuccessfulEntities - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseSuccessfulEntity - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ResponseWorksheetToModelConversion - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RevertCommitRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RevertResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RevertedMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RevokeTokenRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RiseGQLArgWrapper.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RiseSetter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Role.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RoleResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RuntimeFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RuntimeFilters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RuntimeParamOverride.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RuntimeParameters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RuntimeSort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.RuntimeSorts.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ScheduleHistoryRunsOptionsInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SchedulesPdfOptionsInput - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SchemaObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Scope.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchCalendarsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchCommitsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchConfigRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchConnectionResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchCustomActionsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchDataRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchDataResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchEmailCustomizationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchMetadataRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchOrgsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchRoleResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchRolesRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchSchedulesRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchTagsRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchUserGroupsRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchUsersRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SearchVariablesRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SendAgentMessageResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SendAgentMessageStreamingRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SendMessageRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ShareMetadataRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ShareMetadataTypeInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SharePermissionsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SingleAnswerRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SortOption.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SortOptionInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SortOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SortingOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SqlQuery.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SqlQueryResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SystemConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SystemInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.SystemOverrideInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Table.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Tag.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.TagMetadataTypeInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.TemplatePropertiesInputCreate - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.Token.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.TokenAccessScopeObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.TokenValidationResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.URL.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.URLInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.URLInputMandatory.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UnparameterizeMetadataRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UnpublishMetadataRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateCalendarRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateConfigRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateConnectionConfigurationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateConnectionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateConnectionV2Request - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateCustomActionRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateEmailCustomizationRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateMetadataHeaderRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateMetadataObjIdRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateObjIdInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateOrgRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateRoleRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateScheduleRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateSystemConfigRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateTagRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateUserGroupRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateUserRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateVariableRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UpdateVariableValuesRequest - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.User.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UserGroup.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UserGroupResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UserInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UserObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UserParameterOptions.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.UserPrincipal.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ValidateMergeRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.ValidateTokenRequest.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.VariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.VariableValueInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AIContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.APIKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.APIKeyInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AccessToken.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActionConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActionConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActionConfigInputCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActionDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActionDetailsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActionDetailsInputCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ActivateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AgentConversation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AnswerContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AnswerContextInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AnswerDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AssignChangeAuthorRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AssignTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AssociateMetadataInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AssociateMetadataInputCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Authentication.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AuthenticationInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Author.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AuthorMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.AuthorType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.BasicAuth.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.BasicAuthInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CALLBACK.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CALLBACKInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CALLBACKInputMandatory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CalendarResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ChangeUserPasswordRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Column.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRule.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleColumn.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleGroupOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleSourceTable.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleTableInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ColumnSecurityRuleUpdate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CommitBranchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CommitFileType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CommitHistoryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CommitResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CommiterType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CommunicationChannelPreferencesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ConnectionConfigurationResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ConnectionConfigurationSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ConnectionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ContextPayloadV2Input.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Conversation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ConversationSettingsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ConvertWorksheetToModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CopyObjectRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateAgentConversationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateCalendarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateConnectionConfigurationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateConnectionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateConnectionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateConversationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateCustomActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateEmailCustomizationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateEmailCustomizationResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateOrgRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateRoleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateScheduleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateUserGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateVariableRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CreateWebhookConfigurationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CronExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CronExpressionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.CustomActionMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DataSource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DataSourceContextInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DataWarehouseObjectInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DataWarehouseObjects.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Database.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DbtSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeactivateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DefaultActionConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DefaultActionConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DefaultActionConfigInputCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DefaultActionConfigSearchInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteConnectionConfigurationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteConnectionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeployCommitRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.DeployResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EntityHeader.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ErrorResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EurekaDecomposeQueryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EurekaLLMDecomposeQueryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EurekaLLMSuggestedQuery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EurekaRelevantQuestion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EventChannelConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.EventChannelConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExcludeMetadataListItemInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExportAnswerReportRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExportLiveboardReportRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExportMetadataTMLRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExportMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExportOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ExternalTableInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FavoriteMetadataInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FavoriteMetadataItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FavoriteObjectOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchAnswerDataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchAnswerSqlQueryRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchColumnSecurityRulesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchConnectionDiffStatusResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchLiveboardDataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchLogsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FilterRules.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ForceLogoutUsersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Frequency.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.FrequencyInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GenerateCSVRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GenericInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetAsyncImportStatusResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetCustomAccessTokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetDataSourceSuggestionsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetFullAccessTokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetObjectAccessTokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetRelevantQuestionsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GetTokenResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GroupObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.GroupsImportListInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.HeaderAttributeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.HeaderUpdateInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportEPackAsyncTaskStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportMetadataTMLRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportUserGroupsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportUserGroupsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportUserType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportUsersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ImportUsersResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.InputEurekaNLSRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.JWTMetadataObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.JWTParameter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.JWTUserOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.JWTUserOptionsFull.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LBContextInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LiveboardContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LiveboardDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LiveboardOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LiveboardOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LogResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.LoginRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataAssociationItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataListItemInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.MetadataSearchSortOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ModelTableList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.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(new com.thoughtspot.client.model.OrgType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ParameterValues.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ParameterizeMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ParametersListItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ParametersListItemInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PdfOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PdfOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PermissionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PermissionOfMetadataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PermissionOfPrincipalsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PermissionsMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PngOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PrincipalsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PrincipalsListItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PrincipalsListItemInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PublishMetadataListItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.PublishMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.QueryGetDecomposedQueryRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RecipientDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RecipientDetailsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RegionalSettingsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RepoConfigObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResetUserPasswordRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseActivationURL.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseCopyObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseCustomAction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseFailedEntities.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseFailedEntity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseIncompleteEntities.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseIncompleteEntity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponsePostUpgradeFailedEntities.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponsePostUpgradeFailedEntity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseSchedule.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseScheduleRun.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseSuccessfulEntities.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseSuccessfulEntity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ResponseWorksheetToModelConversion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RevertCommitRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RevertResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RevertedMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RevokeTokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RiseGQLArgWrapper.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RiseSetter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Role.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RoleResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RuntimeFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RuntimeFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RuntimeParamOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RuntimeParameters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RuntimeSort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.RuntimeSorts.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ScheduleHistoryRunsOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SchedulesPdfOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SchemaObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Scope.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.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(new com.thoughtspot.client.model.SearchConnectionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchConnectionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchCustomActionsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchDataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchEmailCustomizationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchOrgsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchRoleResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchRolesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchSchedulesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchTagsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchUserGroupsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchUsersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchVariablesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SearchWebhookConfigurationsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SendAgentMessageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SendAgentMessageResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SendAgentMessageStreamingRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SendMessageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ShareMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.ShareMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SharePermissionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SingleAnswerRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SortOption.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SortOptionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SortOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SortingOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SqlQuery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SqlQueryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SystemConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SystemInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.SystemOverrideInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Table.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Tag.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.TagMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.TemplatePropertiesInputCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.Token.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.TokenAccessScopeObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.TokenValidationResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.URL.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.URLInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.URLInputMandatory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UnparameterizeMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UnpublishMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateCalendarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateConnectionConfigurationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateConnectionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateConnectionV2Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateCustomActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateEmailCustomizationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateMetadataHeaderRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateMetadataObjIdRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateObjIdInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateOrgRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateRoleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateScheduleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateSystemConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateUserGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateVariableRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateVariableValuesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UpdateWebhookConfigurationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.User.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UserGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UserGroupResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UserObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UserParameterOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.UserPrincipal.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.thoughtspot.client.model.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.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(); } @@ -845,8 +463,8 @@ public static String serialize(Object obj) { /** * Deserialize the given JSON string to Java object. * - * @param Type - * @param body The JSON string + * @param Type + * @param body The JSON string * @param returnType The type to deserialize into * @return The deserialized Java object */ @@ -855,8 +473,7 @@ public static T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see - // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { @@ -873,7 +490,9 @@ public static T deserialize(String body, Type returnType) { } } - /** Gson TypeAdapter for Byte Array type */ + /** + * Gson TypeAdapter for Byte Array type + */ public static class ByteArrayAdapter extends TypeAdapter { @Override @@ -899,7 +518,9 @@ public byte[] read(JsonReader in) throws IOException { } } - /** Gson TypeAdapter for JSR310 OffsetDateTime type */ + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ public static class OffsetDateTimeTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -934,14 +555,16 @@ public OffsetDateTime read(JsonReader in) throws IOException { default: String date = in.nextString(); if (date.endsWith("+0000")) { - date = date.substring(0, date.length() - 5) + "Z"; + date = date.substring(0, date.length()-5) + "Z"; } return OffsetDateTime.parse(date, formatter); } } } - /** Gson TypeAdapter for JSR310 LocalDate type */ + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ public static class LocalDateTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -989,8 +612,9 @@ public static void setLocalDateFormat(DateTimeFormatter dateFormat) { } /** - * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" - * format will be used (more efficient than SimpleDateFormat). + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). */ public static class SqlDateTypeAdapter extends TypeAdapter { @@ -1033,8 +657,7 @@ public java.sql.Date read(JsonReader in) throws IOException { if (dateFormat != null) { return new java.sql.Date(dateFormat.parse(date).getTime()); } - return new java.sql.Date( - ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); } catch (ParseException e) { throw new JsonParseException(e); } @@ -1043,8 +666,8 @@ public java.sql.Date read(JsonReader in) throws IOException { } /** - * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be - * used. + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. */ public static class DateTypeAdapter extends TypeAdapter { diff --git a/sdks/java/src/main/java/com/thoughtspot/client/Pair.java b/sdks/java/src/main/java/com/thoughtspot/client/Pair.java index eea3e222d..37b28436b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/Pair.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/Pair.java @@ -4,14 +4,12 @@ package com.thoughtspot.client; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Pair { private String name = ""; private String value = ""; - public Pair(String name, String value) { + public Pair (String name, String value) { setName(name); setValue(value); } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java b/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java index 53b13b80d..4c7c0f4df 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java @@ -4,9 +4,11 @@ package com.thoughtspot.client; -import java.io.IOException; import okhttp3.MediaType; import okhttp3.RequestBody; + +import java.io.IOException; + import okio.Buffer; import okio.BufferedSink; import okio.ForwardingSink; @@ -55,8 +57,7 @@ public void write(Buffer source, long byteCount) throws IOException { } bytesWritten += byteCount; - callback.onUploadProgress( - bytesWritten, contentLength, bytesWritten == contentLength); + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); } }; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java b/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java index 970f9ac98..16e7ef698 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java @@ -4,9 +4,11 @@ package com.thoughtspot.client; -import java.io.IOException; import okhttp3.MediaType; import okhttp3.ResponseBody; + +import java.io.IOException; + import okio.Buffer; import okio.BufferedSource; import okio.ForwardingSource; @@ -51,8 +53,7 @@ public long read(Buffer sink, long byteCount) throws IOException { long bytesRead = super.read(sink, byteCount); // read() returns the number of bytes read, or -1 if this source is exhausted. totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress( - totalBytesRead, responseBody.contentLength(), bytesRead == -1); + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); return bytesRead; } }; diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java b/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java index d840ac1f8..a6c128224 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java @@ -6,10 +6,10 @@ import java.util.Map; -/** Representing a Server configuration. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +/** + * Representing a Server configuration. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ServerConfiguration { public String URL; public String description; @@ -18,11 +18,9 @@ public class ServerConfiguration { /** * @param URL A URL to the target host. * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for - * substitution in the server's URL template. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. */ - public ServerConfiguration( - String URL, String description, Map variables) { + public ServerConfiguration(String URL, String description, Map variables) { this.URL = URL; this.description = description; this.variables = variables; @@ -38,21 +36,15 @@ public String URL(Map variables) { String url = this.URL; // go through variables and replace placeholders - for (Map.Entry variable : this.variables.entrySet()) { + for (Map.Entry variable: this.variables.entrySet()) { String name = variable.getKey(); ServerVariable serverVariable = variable.getValue(); String value = serverVariable.defaultValue; if (variables != null && variables.containsKey(name)) { value = variables.get(name); - if (serverVariable.enumValues.size() > 0 - && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException( - "The variable " - + name - + " in the server URL has invalid value " - + value - + "."); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replace("{" + name + "}", value); diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java b/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java index bd78a124f..215e48c70 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java @@ -6,10 +6,10 @@ import java.util.HashSet; -/** Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +/** + * Representing a Server Variable for server URL template substitution. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ServerVariable { public String description; public String defaultValue; @@ -18,8 +18,7 @@ public class ServerVariable { /** * @param description A description for the server variable. * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are - * from a limited set. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. */ public ServerVariable(String description, String defaultValue, HashSet enumValues) { this.description = description; diff --git a/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java b/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java index e5b8997a5..5bf56e5b8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java @@ -7,69 +7,68 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } } + return false; + } - /** - * Join an array of strings with the given separator. - * - *

Note: This might be replaced by utility method from commons-lang or guava someday if one - * of those libraries is added as dependency. - * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); } + return out.toString(); + } - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); } + return out.toString(); + } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java index e177b9564..54e15586b 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 @@ -4,7 +4,6 @@ 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; @@ -12,10 +11,19 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.AgentConversation; import com.thoughtspot.client.model.Conversation; import com.thoughtspot.client.model.CreateAgentConversationRequest; import com.thoughtspot.client.model.CreateConversationRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; @@ -23,19 +31,19 @@ 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; import com.thoughtspot.client.model.SingleAnswerRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class AiApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -94,33 +102,29 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createAgentConversation - * - * @param createAgentConversationRequest (required) + * @param createAgentConversationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call createAgentConversationCall( - CreateAgentConversationRequest createAgentConversationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createAgentConversationCall(CreateAgentConversationRequest createAgentConversationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -137,156 +141,129 @@ public okhttp3.Call createAgentConversationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createAgentConversationValidateBeforeCall( - CreateAgentConversationRequest createAgentConversationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createAgentConversationValidateBeforeCall(CreateAgentConversationRequest createAgentConversationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createAgentConversationRequest' is set if (createAgentConversationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createAgentConversationRequest' when calling" - + " createAgentConversation(Async)"); + throw new ApiException("Missing the required parameter 'createAgentConversationRequest' when calling createAgentConversation(Async)"); } return createAgentConversationCall(createAgentConversationRequest, _callback); + } /** - * Version: 10.13.0.cl or later - * - * @param createAgentConversationRequest (required) + * + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest (required) * @return AgentConversation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public AgentConversation createAgentConversation( - CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { - ApiResponse localVarResp = - createAgentConversationWithHttpInfo(createAgentConversationRequest); + public AgentConversation createAgentConversation(CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + ApiResponse localVarResp = createAgentConversationWithHttpInfo(createAgentConversationRequest); return localVarResp.getData(); } /** - * Version: 10.13.0.cl or later - * - * @param createAgentConversationRequest (required) + * + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest (required) * @return ApiResponse<AgentConversation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse createAgentConversationWithHttpInfo( - CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { - okhttp3.Call localVarCall = - createAgentConversationValidateBeforeCall(createAgentConversationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createAgentConversationWithHttpInfo(CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + okhttp3.Call localVarCall = createAgentConversationValidateBeforeCall(createAgentConversationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.13.0.cl or later - * - * @param createAgentConversationRequest (required) + * (asynchronously) + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call createAgentConversationAsync( - CreateAgentConversationRequest createAgentConversationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createAgentConversationValidateBeforeCall( - createAgentConversationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createAgentConversationAsync(CreateAgentConversationRequest createAgentConversationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAgentConversationValidateBeforeCall(createAgentConversationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConversation - * - * @param createConversationRequest (required) + * @param createConversationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call createConversationCall( - CreateConversationRequest createConversationRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createConversationCall(CreateConversationRequest createConversationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -303,182 +280,129 @@ public okhttp3.Call createConversationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConversationValidateBeforeCall( - CreateConversationRequest createConversationRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConversationValidateBeforeCall(CreateConversationRequest createConversationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConversationRequest' is set if (createConversationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConversationRequest' when calling" - + " createConversation(Async)"); + throw new ApiException("Missing the required parameter 'createConversationRequest' when calling createConversation(Async)"); } return createConversationCall(createConversationRequest, _callback); + } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This - * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot - * support to enable Spotter on your cluster. - * - * @param createConversationRequest (required) + * + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest (required) * @return Conversation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public Conversation createConversation(CreateConversationRequest createConversationRequest) - throws ApiException { - ApiResponse localVarResp = - createConversationWithHttpInfo(createConversationRequest); + public Conversation createConversation(CreateConversationRequest createConversationRequest) throws ApiException { + ApiResponse localVarResp = createConversationWithHttpInfo(createConversationRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This - * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot - * support to enable Spotter on your cluster. - * - * @param createConversationRequest (required) + * + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest (required) * @return ApiResponse<Conversation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse createConversationWithHttpInfo( - CreateConversationRequest createConversationRequest) throws ApiException { - okhttp3.Call localVarCall = - createConversationValidateBeforeCall(createConversationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createConversationWithHttpInfo(CreateConversationRequest createConversationRequest) throws ApiException { + okhttp3.Call localVarCall = createConversationValidateBeforeCall(createConversationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Creates a Conversation object to start an - * AI-driven conversation based on a specific data model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This - * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot - * support to enable Spotter on your cluster. - * - * @param createConversationRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call createConversationAsync( - CreateConversationRequest createConversationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createConversationValidateBeforeCall(createConversationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createConversationAsync(CreateConversationRequest createConversationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createConversationValidateBeforeCall(createConversationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDataSourceSuggestions - * - * @param getDataSourceSuggestionsRequest (required) + * @param getDataSourceSuggestionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call getDataSourceSuggestionsCall( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getDataSourceSuggestionsCall(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -495,192 +419,129 @@ public okhttp3.Call getDataSourceSuggestionsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getDataSourceSuggestionsRequest' is set if (getDataSourceSuggestionsRequest == null) { - throw new ApiException( - "Missing the required parameter 'getDataSourceSuggestionsRequest' when calling" - + " getDataSourceSuggestions(Async)"); + throw new ApiException("Missing the required parameter 'getDataSourceSuggestionsRequest' when calling getDataSourceSuggestions(Async)"); } return getDataSourceSuggestionsCall(getDataSourceSuggestionsRequest, _callback); + } /** - * Version: 10.13.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. - * - * @param getDataSourceSuggestionsRequest (required) + * + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest (required) * @return EurekaDataSourceSuggestionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { - ApiResponse localVarResp = - getDataSourceSuggestionsWithHttpInfo(getDataSourceSuggestionsRequest); + public EurekaDataSourceSuggestionResponse getDataSourceSuggestions(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + ApiResponse localVarResp = getDataSourceSuggestionsWithHttpInfo(getDataSourceSuggestionsRequest); return localVarResp.getData(); } /** - * Version: 10.13.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. - * - * @param getDataSourceSuggestionsRequest (required) + * + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest (required) * @return ApiResponse<EurekaDataSourceSuggestionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse getDataSourceSuggestionsWithHttpInfo( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { - okhttp3.Call localVarCall = - getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse getDataSourceSuggestionsWithHttpInfo(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + okhttp3.Call localVarCall = getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.13.0.cl or later Provides relevant data source recommendations - * for a user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. - * - * @param getDataSourceSuggestionsRequest (required) + * (asynchronously) + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call getDataSourceSuggestionsAsync( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getDataSourceSuggestionsValidateBeforeCall( - getDataSourceSuggestionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call getDataSourceSuggestionsAsync(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRelevantQuestions - * - * @param getRelevantQuestionsRequest (required) + * @param getRelevantQuestionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call getRelevantQuestionsCall( - GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getRelevantQuestionsCall(GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -697,215 +558,131 @@ public okhttp3.Call getRelevantQuestionsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRelevantQuestionsValidateBeforeCall( - GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getRelevantQuestionsValidateBeforeCall(GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getRelevantQuestionsRequest' is set if (getRelevantQuestionsRequest == null) { - throw new ApiException( - "Missing the required parameter 'getRelevantQuestionsRequest' when calling" - + " getRelevantQuestions(Async)"); + throw new ApiException("Missing the required parameter 'getRelevantQuestionsRequest' when calling getRelevantQuestions(Async)"); } return getRelevantQuestionsCall(getRelevantQuestionsRequest, _callback); + } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * - * @param getRelevantQuestionsRequest (required) + * + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest (required) * @return EurekaGetRelevantQuestionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public EurekaGetRelevantQuestionsResponse getRelevantQuestions( - GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { - ApiResponse localVarResp = - getRelevantQuestionsWithHttpInfo(getRelevantQuestionsRequest); + public EurekaGetRelevantQuestionsResponse getRelevantQuestions(GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + ApiResponse localVarResp = getRelevantQuestionsWithHttpInfo(getRelevantQuestionsRequest); return localVarResp.getData(); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * - * @param getRelevantQuestionsRequest (required) + * + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest (required) * @return ApiResponse<EurekaGetRelevantQuestionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse getRelevantQuestionsWithHttpInfo( - GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { - okhttp3.Call localVarCall = - getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse getRelevantQuestionsWithHttpInfo(GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + okhttp3.Call localVarCall = getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.13.0.cl or later Breaks down a user-submitted query into a - * series of analytical sub-questions using relevant contextual metadata. To use this API, the - * user must have at least view-level access to the referenced metadata objects. #### Usage - * guidelines To accurately generate relevant questions, the request must include at least one - * of the following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * - * @param getRelevantQuestionsRequest (required) + * (asynchronously) + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call getRelevantQuestionsAsync( - GetRelevantQuestionsRequest getRelevantQuestionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call getRelevantQuestionsAsync(GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for queryGetDecomposedQuery - * - * @param queryGetDecomposedQueryRequest (required) + * @param queryGetDecomposedQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
* @deprecated */ @Deprecated - public okhttp3.Call queryGetDecomposedQueryCall( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call queryGetDecomposedQueryCall(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -922,167 +699,285 @@ public okhttp3.Call queryGetDecomposedQueryCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'queryGetDecomposedQueryRequest' is set if (queryGetDecomposedQueryRequest == null) { - throw new ApiException( - "Missing the required parameter 'queryGetDecomposedQueryRequest' when calling" - + " queryGetDecomposedQuery(Async)"); + throw new ApiException("Missing the required parameter 'queryGetDecomposedQueryRequest' when calling queryGetDecomposedQuery(Async)"); } return queryGetDecomposedQueryCall(queryGetDecomposedQueryRequest, _callback); + } /** - * Version: 10.7.0.cl or later - * - * @param queryGetDecomposedQueryRequest (required) + * + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest (required) * @return EurekaDecomposeQueryResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
* @deprecated */ @Deprecated - public EurekaDecomposeQueryResponse queryGetDecomposedQuery( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { - ApiResponse localVarResp = - queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); + public EurekaDecomposeQueryResponse queryGetDecomposedQuery(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + ApiResponse localVarResp = queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); return localVarResp.getData(); } /** - * Version: 10.7.0.cl or later - * - * @param queryGetDecomposedQueryRequest (required) + * + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest (required) * @return ApiResponse<EurekaDecomposeQueryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
* @deprecated */ @Deprecated - public ApiResponse queryGetDecomposedQueryWithHttpInfo( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse queryGetDecomposedQueryWithHttpInfo(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + okhttp3.Call localVarCall = queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.7.0.cl or later - * - * @param queryGetDecomposedQueryRequest (required) + * (asynchronously) + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
* @deprecated */ @Deprecated - public okhttp3.Call queryGetDecomposedQueryAsync( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - queryGetDecomposedQueryValidateBeforeCall( - queryGetDecomposedQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call queryGetDecomposedQueryAsync(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for 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 - * - * @param sendAgentMessageStreamingRequest (required) + * @param sendAgentMessageStreamingRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call sendAgentMessageStreamingCall( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call sendAgentMessageStreamingCall(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1099,213 +994,130 @@ public okhttp3.Call sendAgentMessageStreamingCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sendAgentMessageStreamingRequest' is set if (sendAgentMessageStreamingRequest == null) { - throw new ApiException( - "Missing the required parameter 'sendAgentMessageStreamingRequest' when" - + " calling sendAgentMessageStreaming(Async)"); + throw new ApiException("Missing the required parameter 'sendAgentMessageStreamingRequest' when calling sendAgentMessageStreaming(Async)"); } return sendAgentMessageStreamingCall(sendAgentMessageStreamingRequest, _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 Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) - * - * @param sendAgentMessageStreamingRequest (required) + * + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest (required) * @return SendAgentMessageResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public SendAgentMessageResponse sendAgentMessageStreaming( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { - ApiResponse localVarResp = - sendAgentMessageStreamingWithHttpInfo(sendAgentMessageStreamingRequest); + public SendAgentMessageResponse sendAgentMessageStreaming(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + ApiResponse localVarResp = sendAgentMessageStreamingWithHttpInfo(sendAgentMessageStreamingRequest); 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 Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) - * - * @param sendAgentMessageStreamingRequest (required) + * + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest (required) * @return ApiResponse<SendAgentMessageResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse sendAgentMessageStreamingWithHttpInfo( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { - okhttp3.Call localVarCall = - sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse sendAgentMessageStreamingWithHttpInfo(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + okhttp3.Call localVarCall = sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 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 Additionally, user can specify what - * tool can be included `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) - * - * @param sendAgentMessageStreamingRequest (required) + * (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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call sendAgentMessageStreamingAsync( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - sendAgentMessageStreamingValidateBeforeCall( - sendAgentMessageStreamingRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call sendAgentMessageStreamingAsync(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for sendMessage - * * @param conversationIdentifier Unique identifier of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call sendMessageCall( - String conversationIdentifier, - SendMessageRequest sendMessageRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call sendMessageCall(String conversationIdentifier, SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1314,11 +1126,8 @@ public okhttp3.Call sendMessageCall( Object localVarPostBody = sendMessageRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse" - .replace( - "{" + "conversation_identifier" + "}", - localVarApiClient.escapeString(conversationIdentifier.toString())); + String localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse" + .replace("{" + "conversation_identifier" + "}", localVarApiClient.escapeString(conversationIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1326,197 +1135,137 @@ public okhttp3.Call sendMessageCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call sendMessageValidateBeforeCall( - String conversationIdentifier, - SendMessageRequest sendMessageRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call sendMessageValidateBeforeCall(String conversationIdentifier, SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'conversationIdentifier' is set if (conversationIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'conversationIdentifier' when calling" - + " sendMessage(Async)"); + throw new ApiException("Missing the required parameter 'conversationIdentifier' when calling sendMessage(Async)"); } // verify the required parameter 'sendMessageRequest' is set if (sendMessageRequest == null) { - throw new ApiException( - "Missing the required parameter 'sendMessageRequest' when calling" - + " sendMessage(Async)"); + throw new ApiException("Missing the required parameter 'sendMessageRequest' when calling sendMessage(Async)"); } return sendMessageCall(conversationIdentifier, sendMessageRequest, _callback); + } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. - * + * + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @return List<ResponseMessage> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public List sendMessage( - String conversationIdentifier, SendMessageRequest sendMessageRequest) - throws ApiException { - ApiResponse> localVarResp = - sendMessageWithHttpInfo(conversationIdentifier, sendMessageRequest); + public List sendMessage(String conversationIdentifier, SendMessageRequest sendMessageRequest) throws ApiException { + ApiResponse> localVarResp = sendMessageWithHttpInfo(conversationIdentifier, sendMessageRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. - * + * + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @return ApiResponse<List<ResponseMessage>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse> sendMessageWithHttpInfo( - String conversationIdentifier, SendMessageRequest sendMessageRequest) - throws ApiException { - okhttp3.Call localVarCall = - sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> sendMessageWithHttpInfo(String conversationIdentifier, SendMessageRequest sendMessageRequest) throws ApiException { + okhttp3.Call localVarCall = sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing - * conversation within the context of the metadata model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines The API requires you to - * specify the `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. - * + * (asynchronously) + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call sendMessageAsync( - String conversationIdentifier, - SendMessageRequest sendMessageRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - sendMessageValidateBeforeCall( - conversationIdentifier, sendMessageRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call sendMessageAsync(String conversationIdentifier, SendMessageRequest sendMessageRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for singleAnswer - * - * @param singleAnswerRequest (required) + * @param singleAnswerRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call singleAnswerCall( - SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call singleAnswerCall(SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1533,134 +1282,101 @@ public okhttp3.Call singleAnswerCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call singleAnswerValidateBeforeCall( - SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call singleAnswerValidateBeforeCall(SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'singleAnswerRequest' is set if (singleAnswerRequest == null) { - throw new ApiException( - "Missing the required parameter 'singleAnswerRequest' when calling" - + " singleAnswer(Async)"); + throw new ApiException("Missing the required parameter 'singleAnswerRequest' when calling singleAnswer(Async)"); } return singleAnswerCall(singleAnswerRequest, _callback); + } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. - * - * @param singleAnswerRequest (required) + * + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest (required) * @return ResponseMessage - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) - throws ApiException { + public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) throws ApiException { ApiResponse localVarResp = singleAnswerWithHttpInfo(singleAnswerRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. - * - * @param singleAnswerRequest (required) + * + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest (required) * @return ApiResponse<ResponseMessage> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public ApiResponse singleAnswerWithHttpInfo( - SingleAnswerRequest singleAnswerRequest) throws ApiException { + public ApiResponse singleAnswerWithHttpInfo(SingleAnswerRequest singleAnswerRequest) throws ApiException { okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query and returns - * an AI-generated response based on a specified data model. Requires at least view access to - * the metadata object specified in the request. > ###### Note: > * This endpoint is - * currently in Beta. Breaking changes may be introduced before the endpoint is made Generally - * Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to - * enable Spotter on your cluster. - * - * @param singleAnswerRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call singleAnswerAsync( - SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call singleAnswerAsync(SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java index 662a72e79..680bda6cb 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 @@ -4,7 +4,6 @@ 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; @@ -12,7 +11,16 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.AccessToken; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.GetCustomAccessTokenRequest; import com.thoughtspot.client.model.GetFullAccessTokenRequest; import com.thoughtspot.client.model.GetObjectAccessTokenRequest; @@ -23,15 +31,14 @@ import com.thoughtspot.client.model.TokenValidationResponse; import com.thoughtspot.client.model.User; import com.thoughtspot.client.model.ValidateTokenRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class AuthenticationApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -90,30 +97,29 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for getCurrentUserInfo - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getCurrentUserInfoCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -130,59 +136,46 @@ public okhttp3.Call getCurrentUserInfoCall(final ApiCallback _callback) throws A Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCurrentUserInfoValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getCurrentUserInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getCurrentUserInfoCall(_callback); + } /** - * Version: 9.0.0.cl or later Retrieves details of the current user session for the token - * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API - * request. The data returned in the API response varies according to user's privilege and - * object access permissions. - * + * + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public User getCurrentUserInfo() throws ApiException { ApiResponse localVarResp = getCurrentUserInfoWithHttpInfo(); @@ -190,86 +183,76 @@ public User getCurrentUserInfo() throws ApiException { } /** - * Version: 9.0.0.cl or later Retrieves details of the current user session for the token - * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API - * request. The data returned in the API response varies according to user's privilege and - * object access permissions. - * + * + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getCurrentUserInfoWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Retrieves details of the current user session for - * the token provided in the request header. Any ThoughtSpot user can access this endpoint and - * send an API request. The data returned in the API response varies according to user's - * privilege and object access permissions. - * + * (asynchronously) + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getCurrentUserInfoAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getCurrentUserInfoAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCurrentUserToken - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getCurrentUserTokenCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -286,61 +269,46 @@ public okhttp3.Call getCurrentUserTokenCall(final ApiCallback _callback) throws Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCurrentUserTokenValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getCurrentUserTokenValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getCurrentUserTokenCall(_callback); + } /** - * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer - * token provided in the request header. This API endpoint does not create a new token. Instead, - * it returns details about the token, including the token string, creation time, expiration - * time, and the associated user. Use this endpoint to introspect your current session token, - * debug authentication issues, or when a frontend application needs session token details. Any - * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request - * + * + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * @return GetTokenResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public GetTokenResponse getCurrentUserToken() throws ApiException { ApiResponse localVarResp = getCurrentUserTokenWithHttpInfo(); @@ -348,94 +316,77 @@ public GetTokenResponse getCurrentUserToken() throws ApiException { } /** - * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer - * token provided in the request header. This API endpoint does not create a new token. Instead, - * it returns details about the token, including the token string, creation time, expiration - * time, and the associated user. Use this endpoint to introspect your current session token, - * debug authentication issues, or when a frontend application needs session token details. Any - * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request - * + * + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * @return ApiResponse<GetTokenResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getCurrentUserTokenWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.4.0.cl or later Retrieves details of the current session token - * for the bearer token provided in the request header. This API endpoint does not create a new - * token. Instead, it returns details about the token, including the token string, creation - * time, expiration time, and the associated user. Use this endpoint to introspect your current - * session token, debug authentication issues, or when a frontend application needs session - * token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and - * send an API request - * + * (asynchronously) + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getCurrentUserTokenAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getCurrentUserTokenAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCustomAccessToken - * - * @param getCustomAccessTokenRequest (required) + * @param getCustomAccessTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
*/ - public okhttp3.Call getCustomAccessTokenCall( - GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getCustomAccessTokenCall(GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -452,299 +403,133 @@ public okhttp3.Call getCustomAccessTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCustomAccessTokenValidateBeforeCall( - GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getCustomAccessTokenValidateBeforeCall(GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getCustomAccessTokenRequest' is set if (getCustomAccessTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'getCustomAccessTokenRequest' when calling" - + " getCustomAccessToken(Async)"); + throw new ApiException("Missing the required parameter 'getCustomAccessTokenRequest' when calling getCustomAccessToken(Async)"); } return getCustomAccessTokenCall(getCustomAccessTokenRequest, _callback); + } /** - * 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. - * - * @param getCustomAccessTokenRequest (required) + * + * 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. + * @param getCustomAccessTokenRequest (required) * @return AccessToken - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
*/ - public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAccessTokenRequest) - throws ApiException { - ApiResponse localVarResp = - getCustomAccessTokenWithHttpInfo(getCustomAccessTokenRequest); + public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { + ApiResponse localVarResp = getCustomAccessTokenWithHttpInfo(getCustomAccessTokenRequest); return localVarResp.getData(); } /** - * 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. - * - * @param getCustomAccessTokenRequest (required) + * + * 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. + * @param getCustomAccessTokenRequest (required) * @return ApiResponse<AccessToken> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
*/ - public ApiResponse getCustomAccessTokenWithHttpInfo( - GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { - okhttp3.Call localVarCall = - getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse getCustomAccessTokenWithHttpInfo(GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later 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. - * - * @param getCustomAccessTokenRequest (required) + * (asynchronously) + * 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. + * @param getCustomAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
*/ - public okhttp3.Call getCustomAccessTokenAsync( - GetCustomAccessTokenRequest getCustomAccessTokenRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call getCustomAccessTokenAsync(GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getFullAccessToken - * - * @param getFullAccessTokenRequest (required) + * @param getFullAccessTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getFullAccessTokenCall( - GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getFullAccessTokenCall(GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -761,244 +546,133 @@ public okhttp3.Call getFullAccessTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFullAccessTokenValidateBeforeCall( - GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getFullAccessTokenValidateBeforeCall(GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getFullAccessTokenRequest' is set if (getFullAccessTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'getFullAccessTokenRequest' when calling" - + " getFullAccessToken(Async)"); + throw new ApiException("Missing the required parameter 'getFullAccessTokenRequest' when calling getFullAccessToken(Async)"); } return getFullAccessTokenCall(getFullAccessTokenRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in - * ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getFullAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getFullAccessTokenRequest (required) * @return Token - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Token getFullAccessToken(GetFullAccessTokenRequest getFullAccessTokenRequest) - throws ApiException { + public Token getFullAccessToken(GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { ApiResponse localVarResp = getFullAccessTokenWithHttpInfo(getFullAccessTokenRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in - * ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getFullAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getFullAccessTokenRequest (required) * @return ApiResponse<Token> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse getFullAccessTokenWithHttpInfo( - GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { - okhttp3.Call localVarCall = - getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse getFullAccessTokenWithHttpInfo(GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets an authentication token and creates a full - * session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot - * remains valid for 5 mins. You can generate the token for a user by providing a - * `username` and `password`, or by using the cluster’s - * `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getFullAccessTokenRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getFullAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getFullAccessTokenAsync( - GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getFullAccessTokenAsync(GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + okhttp3.Call localVarCall = getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getObjectAccessToken - * - * @param getObjectAccessTokenRequest (required) + * @param getObjectAccessTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getObjectAccessTokenCall( - GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getObjectAccessTokenCall(GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1015,238 +689,133 @@ public okhttp3.Call getObjectAccessTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getObjectAccessTokenValidateBeforeCall( - GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getObjectAccessTokenValidateBeforeCall(GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getObjectAccessTokenRequest' is set if (getObjectAccessTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'getObjectAccessTokenRequest' when calling" - + " getObjectAccessToken(Async)"); + throw new ApiException("Missing the required parameter 'getObjectAccessTokenRequest' when calling getObjectAccessToken(Async)"); } return getObjectAccessTokenCall(getObjectAccessTokenRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific - * metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - * You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getObjectAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getObjectAccessTokenRequest (required) * @return Token - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Token getObjectAccessToken(GetObjectAccessTokenRequest getObjectAccessTokenRequest) - throws ApiException { - ApiResponse localVarResp = - getObjectAccessTokenWithHttpInfo(getObjectAccessTokenRequest); + public Token getObjectAccessToken(GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { + ApiResponse localVarResp = getObjectAccessTokenWithHttpInfo(getObjectAccessTokenRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific - * metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - * You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getObjectAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getObjectAccessTokenRequest (required) * @return ApiResponse<Token> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse getObjectAccessTokenWithHttpInfo( - GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { - okhttp3.Call localVarCall = - getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse getObjectAccessTokenWithHttpInfo(GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets an authentication token that provides access - * to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getObjectAccessTokenRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getObjectAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getObjectAccessTokenAsync( - GetObjectAccessTokenRequest getObjectAccessTokenRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call getObjectAccessTokenAsync(GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for login - * - * @param loginRequest (required) + * @param loginRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1263,98 +832,73 @@ public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _call Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call loginValidateBeforeCall( - LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call loginValidateBeforeCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'loginRequest' is set if (loginRequest == null) { - throw new ApiException( - "Missing the required parameter 'loginRequest' when calling login(Async)"); + throw new ApiException("Missing the required parameter 'loginRequest' when calling login(Async)"); } return loginCall(loginRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic - * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using - * `username` and `password` attributes. On a multi-tenant cluster with - * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. - * - * @param loginRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void login(LoginRequest loginRequest) throws ApiException { loginWithHttpInfo(loginRequest); } /** - * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic - * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using - * `username` and `password` attributes. On a multi-tenant cluster with - * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. - * - * @param loginRequest (required) + * + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws ApiException { okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, null); @@ -1362,33 +906,24 @@ public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws Api } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user - * with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot - * using `username` and `password` attributes. On a multi-tenant cluster - * with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. - * - * @param loginRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1396,30 +931,29 @@ public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback - * Response Details - * Status Code Description Response Headers - * 204 User logout successful. - - * 400 Invalid request. - - * 401 Unauthorized access. - - * 403 Forbidden access. - - * 500 Unexpected error - - * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1436,75 +970,65 @@ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { return logoutCall(_callback); + } /** - * Version: 9.0.0.cl or later Logs out a user from their current session. - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Logs out a user from their current session. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void logout() throws ApiException { logoutWithHttpInfo(); } /** - * Version: 9.0.0.cl or later Logs out a user from their current session. - * + * + * Version: 9.0.0.cl or later Logs out a user from their current session. * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse logoutWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = logoutValidateBeforeCall(null); @@ -1512,22 +1036,21 @@ public ApiResponse logoutWithHttpInfo() throws ApiException { } /** - * (asynchronously) Version: 9.0.0.cl or later Logs out a user from their current session. - * + * (asynchronously) + * Version: 9.0.0.cl or later Logs out a user from their current session. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiException { @@ -1537,33 +1060,30 @@ public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiExc } /** * Build call for revokeToken - * - * @param revokeTokenRequest (required) + * @param revokeTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revokeTokenCall( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call revokeTokenCall(RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1580,130 +1100,98 @@ public okhttp3.Call revokeTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call revokeTokenValidateBeforeCall( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call revokeTokenValidateBeforeCall(RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'revokeTokenRequest' is set if (revokeTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'revokeTokenRequest' when calling" - + " revokeToken(Async)"); + throw new ApiException("Missing the required parameter 'revokeTokenRequest' when calling revokeToken(Async)"); } return revokeTokenCall(revokeTokenRequest, _callback); + } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void revokeToken(RevokeTokenRequest revokeTokenRequest) throws ApiException { revokeTokenWithHttpInfo(revokeTokenRequest); } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) + * + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) - throws ApiException { + public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) throws ApiException { okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Revokes the authentication token issued for - * current user session. The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revokeTokenAsync( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call revokeTokenAsync(RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1711,33 +1199,30 @@ public okhttp3.Call revokeTokenAsync( } /** * Build call for validateToken - * - * @param validateTokenRequest (required) + * @param validateTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call validateTokenCall( - ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call validateTokenCall(ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1754,131 +1239,104 @@ public okhttp3.Call validateTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateTokenValidateBeforeCall( - ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call validateTokenValidateBeforeCall(ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'validateTokenRequest' is set if (validateTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'validateTokenRequest' when calling" - + " validateToken(Async)"); + throw new ApiException("Missing the required parameter 'validateTokenRequest' when calling validateToken(Async)"); } return validateTokenCall(validateTokenRequest, _callback); + } /** - * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. - * If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param validateTokenRequest (required) + * + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest (required) * @return TokenValidationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public TokenValidationResponse validateToken(ValidateTokenRequest validateTokenRequest) - throws ApiException { - ApiResponse localVarResp = - validateTokenWithHttpInfo(validateTokenRequest); + public TokenValidationResponse validateToken(ValidateTokenRequest validateTokenRequest) throws ApiException { + ApiResponse localVarResp = validateTokenWithHttpInfo(validateTokenRequest); return localVarResp.getData(); } /** - * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. - * If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param validateTokenRequest (required) + * + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest (required) * @return ApiResponse<TokenValidationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse validateTokenWithHttpInfo( - ValidateTokenRequest validateTokenRequest) throws ApiException { + public ApiResponse validateTokenWithHttpInfo(ValidateTokenRequest validateTokenRequest) throws ApiException { okhttp3.Call localVarCall = validateTokenValidateBeforeCall(validateTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.12.0.cl or later Validates the authentication token specified in - * the API request. If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param validateTokenRequest (required) + * (asynchronously) + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call validateTokenAsync( - ValidateTokenRequest validateTokenRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - validateTokenValidateBeforeCall(validateTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call validateTokenAsync(ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = validateTokenValidateBeforeCall(validateTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java index ab2867bd3..c7604d71e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java @@ -4,7 +4,6 @@ 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; @@ -12,20 +11,28 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.ConnectionConfigurationResponse; import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ConnectionConfigurationsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -84,34 +91,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for connectionConfigurationSearch - * - * @param connectionConfigurationSearchRequest (required) + * @param connectionConfigurationSearchRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call connectionConfigurationSearchCall( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call connectionConfigurationSearchCall(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -128,191 +131,133 @@ public okhttp3.Call connectionConfigurationSearchCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call connectionConfigurationSearchValidateBeforeCall( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call connectionConfigurationSearchValidateBeforeCall(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionConfigurationSearchRequest' is set if (connectionConfigurationSearchRequest == null) { - throw new ApiException( - "Missing the required parameter 'connectionConfigurationSearchRequest' when" - + " calling connectionConfigurationSearch(Async)"); + throw new ApiException("Missing the required parameter 'connectionConfigurationSearchRequest' when calling connectionConfigurationSearch(Async)"); } return connectionConfigurationSearchCall(connectionConfigurationSearchRequest, _callback); + } /** - * Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. - * - * @param connectionConfigurationSearchRequest (required) + * + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest (required) * @return List<ConnectionConfigurationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List connectionConfigurationSearch( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) - throws ApiException { - ApiResponse> localVarResp = - connectionConfigurationSearchWithHttpInfo(connectionConfigurationSearchRequest); + public List connectionConfigurationSearch(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) throws ApiException { + ApiResponse> localVarResp = connectionConfigurationSearchWithHttpInfo(connectionConfigurationSearchRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. - * - * @param connectionConfigurationSearchRequest (required) + * + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest (required) * @return ApiResponse<List<ConnectionConfigurationResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> - connectionConfigurationSearchWithHttpInfo( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) - throws ApiException { - okhttp3.Call localVarCall = - connectionConfigurationSearchValidateBeforeCall( - connectionConfigurationSearchRequest, null); - Type localVarReturnType = - new TypeToken>() {}.getType(); + public ApiResponse> connectionConfigurationSearchWithHttpInfo(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) throws ApiException { + okhttp3.Call localVarCall = connectionConfigurationSearchValidateBeforeCall(connectionConfigurationSearchRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. - * - * @param connectionConfigurationSearchRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call connectionConfigurationSearchAsync( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - connectionConfigurationSearchValidateBeforeCall( - connectionConfigurationSearchRequest, _callback); - Type localVarReturnType = - new TypeToken>() {}.getType(); + public okhttp3.Call connectionConfigurationSearchAsync(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = connectionConfigurationSearchValidateBeforeCall(connectionConfigurationSearchRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConnectionConfiguration - * - * @param createConnectionConfigurationRequest (required) + * @param createConnectionConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createConnectionConfigurationCall( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createConnectionConfigurationCall(CreateConnectionConfigurationRequest createConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -329,206 +274,133 @@ public okhttp3.Call createConnectionConfigurationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConnectionConfigurationValidateBeforeCall( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConnectionConfigurationValidateBeforeCall(CreateConnectionConfigurationRequest createConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConnectionConfigurationRequest' is set if (createConnectionConfigurationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConnectionConfigurationRequest' when" - + " calling createConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'createConnectionConfigurationRequest' when calling createConnectionConfiguration(Async)"); } return createConnectionConfigurationCall(createConnectionConfigurationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to - * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Usage guidelines * A JSON map of configuration attributes in - * `configuration`. The following example shows the configuration attributes: - * ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. - * - * @param createConnectionConfigurationRequest (required) + * + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. + * @param createConnectionConfigurationRequest (required) * @return ConnectionConfigurationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ConnectionConfigurationResponse createConnectionConfiguration( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest) - throws ApiException { - ApiResponse localVarResp = - createConnectionConfigurationWithHttpInfo(createConnectionConfigurationRequest); + public ConnectionConfigurationResponse createConnectionConfiguration(CreateConnectionConfigurationRequest createConnectionConfigurationRequest) throws ApiException { + ApiResponse localVarResp = createConnectionConfigurationWithHttpInfo(createConnectionConfigurationRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to - * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Usage guidelines * A JSON map of configuration attributes in - * `configuration`. The following example shows the configuration attributes: - * ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. - * - * @param createConnectionConfigurationRequest (required) + * + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. + * @param createConnectionConfigurationRequest (required) * @return ApiResponse<ConnectionConfigurationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createConnectionConfigurationWithHttpInfo( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - createConnectionConfigurationValidateBeforeCall( - createConnectionConfigurationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createConnectionConfigurationWithHttpInfo(CreateConnectionConfigurationRequest createConnectionConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = createConnectionConfigurationValidateBeforeCall(createConnectionConfigurationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Creates an additional configuration to an - * existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage - * data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration - * attributes in `configuration`. The following example shows the configuration - * attributes: ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. - * - * @param createConnectionConfigurationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. + * @param createConnectionConfigurationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createConnectionConfigurationAsync( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createConnectionConfigurationValidateBeforeCall( - createConnectionConfigurationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createConnectionConfigurationAsync(CreateConnectionConfigurationRequest createConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createConnectionConfigurationValidateBeforeCall(createConnectionConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteConnectionConfiguration - * - * @param deleteConnectionConfigurationRequest (required) + * @param deleteConnectionConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConnectionConfigurationCall( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConnectionConfigurationCall(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -545,176 +417,130 @@ public okhttp3.Call deleteConnectionConfigurationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionConfigurationValidateBeforeCall( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteConnectionConfigurationValidateBeforeCall(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteConnectionConfigurationRequest' is set if (deleteConnectionConfigurationRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteConnectionConfigurationRequest' when" - + " calling deleteConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'deleteConnectionConfigurationRequest' when calling deleteConnectionConfiguration(Async)"); } return deleteConnectionConfigurationCall(deleteConnectionConfigurationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * - * @param deleteConnectionConfigurationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void deleteConnectionConfiguration( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) - throws ApiException { + public void deleteConnectionConfiguration(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) throws ApiException { deleteConnectionConfigurationWithHttpInfo(deleteConnectionConfigurationRequest); } /** - * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * - * @param deleteConnectionConfigurationRequest (required) + * + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteConnectionConfigurationWithHttpInfo( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionConfigurationValidateBeforeCall( - deleteConnectionConfigurationRequest, null); + public ApiResponse deleteConnectionConfigurationWithHttpInfo(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = deleteConnectionConfigurationValidateBeforeCall(deleteConnectionConfigurationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Deletes connection configuration objects. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * - * @param deleteConnectionConfigurationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConnectionConfigurationAsync( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteConnectionConfigurationValidateBeforeCall( - deleteConnectionConfigurationRequest, _callback); + public okhttp3.Call deleteConnectionConfigurationAsync(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteConnectionConfigurationValidateBeforeCall(deleteConnectionConfigurationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateConnectionConfiguration - * * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) + * @param updateConnectionConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateConnectionConfigurationCall( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConnectionConfigurationCall(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -723,11 +549,8 @@ public okhttp3.Call updateConnectionConfigurationCall( Object localVarPostBody = updateConnectionConfigurationRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/connection-configurations/{configuration_identifier}/update" - .replace( - "{" + "configuration_identifier" + "}", - localVarApiClient.escapeString(configurationIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update" + .replace("{" + "configuration_identifier" + "}", localVarApiClient.escapeString(configurationIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -735,175 +558,108 @@ public okhttp3.Call updateConnectionConfigurationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConnectionConfigurationValidateBeforeCall( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConnectionConfigurationValidateBeforeCall(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'configurationIdentifier' is set if (configurationIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'configurationIdentifier' when calling" - + " updateConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'configurationIdentifier' when calling updateConnectionConfiguration(Async)"); } // verify the required parameter 'updateConnectionConfigurationRequest' is set if (updateConnectionConfigurationRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateConnectionConfigurationRequest' when" - + " calling updateConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'updateConnectionConfigurationRequest' when calling updateConnectionConfiguration(Async)"); } - return updateConnectionConfigurationCall( - configurationIdentifier, updateConnectionConfigurationRequest, _callback); + return updateConnectionConfigurationCall(configurationIdentifier, updateConnectionConfigurationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Updates a connection configuration object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. - * + * + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateConnectionConfiguration( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) - throws ApiException { - updateConnectionConfigurationWithHttpInfo( - configurationIdentifier, updateConnectionConfigurationRequest); + public void updateConnectionConfiguration(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) throws ApiException { + updateConnectionConfigurationWithHttpInfo(configurationIdentifier, updateConnectionConfigurationRequest); } /** - * Version: 10.12.0.cl or later Updates a connection configuration object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. - * + * + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) + * @param updateConnectionConfigurationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateConnectionConfigurationWithHttpInfo( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateConnectionConfigurationValidateBeforeCall( - configurationIdentifier, updateConnectionConfigurationRequest, null); + public ApiResponse updateConnectionConfigurationWithHttpInfo(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = updateConnectionConfigurationValidateBeforeCall(configurationIdentifier, updateConnectionConfigurationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates a connection configuration object. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. - * + * (asynchronously) + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) + * @param updateConnectionConfigurationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateConnectionConfigurationAsync( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateConnectionConfigurationValidateBeforeCall( - configurationIdentifier, updateConnectionConfigurationRequest, _callback); + public okhttp3.Call updateConnectionConfigurationAsync(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateConnectionConfigurationValidateBeforeCall(configurationIdentifier, updateConnectionConfigurationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java index abdaa072b..abac43dd5 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 @@ -4,7 +4,6 @@ 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; @@ -12,24 +11,32 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateConnectionRequest; import com.thoughtspot.client.model.CreateConnectionResponse; import com.thoughtspot.client.model.DeleteConnectionRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchConnectionDiffStatusResponse; +import java.io.File; import com.thoughtspot.client.model.SearchConnectionRequest; import com.thoughtspot.client.model.SearchConnectionResponse; import com.thoughtspot.client.model.UpdateConnectionRequest; import com.thoughtspot.client.model.UpdateConnectionV2Request; -import java.io.File; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ConnectionsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -88,33 +95,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createConnection - * - * @param createConnectionRequest (required) + * @param createConnectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createConnectionCall( - CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createConnectionCall(CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -131,275 +135,135 @@ public okhttp3.Call createConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConnectionValidateBeforeCall( - CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConnectionValidateBeforeCall(CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConnectionRequest' is set if (createConnectionRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConnectionRequest' when calling" - + " createConnection(Async)"); + throw new ApiException("Missing the required parameter 'createConnectionRequest' when calling createConnection(Async)"); } return createConnectionCall(createConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. - * - * @param createConnectionRequest (required) + * + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * @param createConnectionRequest (required) * @return CreateConnectionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public CreateConnectionResponse createConnection( - CreateConnectionRequest createConnectionRequest) throws ApiException { - ApiResponse localVarResp = - createConnectionWithHttpInfo(createConnectionRequest); + public CreateConnectionResponse createConnection(CreateConnectionRequest createConnectionRequest) throws ApiException { + ApiResponse localVarResp = createConnectionWithHttpInfo(createConnectionRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. - * - * @param createConnectionRequest (required) + * + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * @param createConnectionRequest (required) * @return ApiResponse<CreateConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createConnectionWithHttpInfo( - CreateConnectionRequest createConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - createConnectionValidateBeforeCall(createConnectionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createConnectionWithHttpInfo(CreateConnectionRequest createConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = createConnectionValidateBeforeCall(createConnectionRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Creates a connection to a data warehouse for live - * query services. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. - * - * @param createConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * @param createConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createConnectionAsync( - CreateConnectionRequest createConnectionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createConnectionValidateBeforeCall(createConnectionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createConnectionAsync(CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createConnectionValidateBeforeCall(createConnectionRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteConnection - * - * @param deleteConnectionRequest (required) + * @param deleteConnectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteConnectionCall( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConnectionCall(DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -416,188 +280,136 @@ public okhttp3.Call deleteConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionValidateBeforeCall( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteConnectionValidateBeforeCall(DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteConnectionRequest' is set if (deleteConnectionRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteConnectionRequest' when calling" - + " deleteConnection(Async)"); + throw new ApiException("Missing the required parameter 'deleteConnectionRequest' when calling deleteConnection(Async)"); } return deleteConnectionCall(deleteConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete - * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your - * connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. - * - * @param deleteConnectionRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public void deleteConnection(DeleteConnectionRequest deleteConnectionRequest) - throws ApiException { + public void deleteConnection(DeleteConnectionRequest deleteConnectionRequest) throws ApiException { deleteConnectionWithHttpInfo(deleteConnectionRequest); } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete - * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your - * connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. - * - * @param deleteConnectionRequest (required) + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public ApiResponse deleteConnectionWithHttpInfo( - DeleteConnectionRequest deleteConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionValidateBeforeCall(deleteConnectionRequest, null); + public ApiResponse deleteConnectionWithHttpInfo(DeleteConnectionRequest deleteConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = deleteConnectionValidateBeforeCall(deleteConnectionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and - * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the - * [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to - * delete your connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. - * - * @param deleteConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteConnectionAsync( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConnectionAsync(DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionValidateBeforeCall(deleteConnectionRequest, _callback); + okhttp3.Call localVarCall = deleteConnectionValidateBeforeCall(deleteConnectionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteConnectionV2 - * * @param connectionIdentifier Unique ID or name of the connection. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConnectionV2Call( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteConnectionV2Call(String connectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -606,11 +418,8 @@ public okhttp3.Call deleteConnectionV2Call( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/{connection_identifier}/delete" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -618,167 +427,128 @@ public okhttp3.Call deleteConnectionV2Call( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionV2ValidateBeforeCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteConnectionV2ValidateBeforeCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " deleteConnectionV2(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling deleteConnectionV2(Async)"); } return deleteConnectionV2Call(connectionIdentifier, _callback); + } /** - * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has - * dependent objects, make sure you remove its associations before the delete operation. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * + * + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * @param connectionIdentifier Unique ID or name of the connection. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteConnectionV2(String connectionIdentifier) throws ApiException { deleteConnectionV2WithHttpInfo(connectionIdentifier); } /** - * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has - * dependent objects, make sure you remove its associations before the delete operation. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * + * + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * @param connectionIdentifier Unique ID or name of the connection. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteConnectionV2WithHttpInfo(String connectionIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionV2ValidateBeforeCall(connectionIdentifier, null); + public ApiResponse deleteConnectionV2WithHttpInfo(String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteConnectionV2ValidateBeforeCall(connectionIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a - * connection has dependent objects, make sure you remove its associations before the delete - * operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to - * the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - * + * (asynchronously) + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * @param connectionIdentifier Unique ID or name of the connection. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConnectionV2Async( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteConnectionV2Async(String connectionIdentifier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionV2ValidateBeforeCall(connectionIdentifier, _callback); + okhttp3.Call localVarCall = deleteConnectionV2ValidateBeforeCall(connectionIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for downloadConnectionMetadataChanges - * * @param connectionIdentifier GUID of the connection (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call downloadConnectionMetadataChangesCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConnectionMetadataChangesCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -787,11 +557,8 @@ public okhttp3.Call downloadConnectionMetadataChangesCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -799,179 +566,133 @@ public okhttp3.Call downloadConnectionMetadataChangesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadConnectionMetadataChangesValidateBeforeCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadConnectionMetadataChangesValidateBeforeCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " downloadConnectionMetadataChanges(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling downloadConnectionMetadataChanges(Async)"); } return downloadConnectionMetadataChangesCall(connectionIdentifier, _callback); + } /** - * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and - * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public File downloadConnectionMetadataChanges(String connectionIdentifier) throws ApiException { - ApiResponse localVarResp = - downloadConnectionMetadataChangesWithHttpInfo(connectionIdentifier); + ApiResponse localVarResp = downloadConnectionMetadataChangesWithHttpInfo(connectionIdentifier); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and - * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse downloadConnectionMetadataChangesWithHttpInfo( - String connectionIdentifier) throws ApiException { - okhttp3.Call localVarCall = - downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse downloadConnectionMetadataChangesWithHttpInfo(String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Exports the difference in connection metadata - * between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. - * + * (asynchronously) + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call downloadConnectionMetadataChangesAsync( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConnectionMetadataChangesAsync(String connectionIdentifier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - downloadConnectionMetadataChangesValidateBeforeCall( - connectionIdentifier, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + okhttp3.Call localVarCall = downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchConnectionDiffStatus - * * @param connectionIdentifier GUID of the connection (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchConnectionDiffStatusCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call fetchConnectionDiffStatusCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -980,11 +701,8 @@ public okhttp3.Call fetchConnectionDiffStatusCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -992,185 +710,132 @@ public okhttp3.Call fetchConnectionDiffStatusCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchConnectionDiffStatusValidateBeforeCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call fetchConnectionDiffStatusValidateBeforeCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " fetchConnectionDiffStatus(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling fetchConnectionDiffStatus(Async)"); } return fetchConnectionDiffStatusCall(connectionIdentifier, _callback); + } /** - * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and - * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return FetchConnectionDiffStatusResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(String connectionIdentifier) - throws ApiException { - ApiResponse localVarResp = - fetchConnectionDiffStatusWithHttpInfo(connectionIdentifier); + public FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(String connectionIdentifier) throws ApiException { + ApiResponse localVarResp = fetchConnectionDiffStatusWithHttpInfo(connectionIdentifier); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and - * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return ApiResponse<FetchConnectionDiffStatusResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchConnectionDiffStatusWithHttpInfo( - String connectionIdentifier) throws ApiException { - okhttp3.Call localVarCall = - fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchConnectionDiffStatusWithHttpInfo(String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Validates the difference in connection metadata - * between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. - * + * (asynchronously) + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchConnectionDiffStatusAsync( - String connectionIdentifier, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchConnectionDiffStatusAsync(String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchConnection - * - * @param searchConnectionRequest (required) + * @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 -
+ + + + + + + + +
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 { + public okhttp3.Call searchConnectionCall(SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1187,359 +852,135 @@ public okhttp3.Call searchConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + 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 { + 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)"); + throw new ApiException("Missing the required parameter 'searchConnectionRequest' when calling searchConnection(Async)"); } return searchConnectionCall(searchConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` - * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. - * - * @param searchConnectionRequest (required) + * + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest (required) * @return List<SearchConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchConnection( - SearchConnectionRequest searchConnectionRequest) throws ApiException { - ApiResponse> localVarResp = - searchConnectionWithHttpInfo(searchConnectionRequest); + public List searchConnection(SearchConnectionRequest searchConnectionRequest) throws ApiException { + ApiResponse> localVarResp = searchConnectionWithHttpInfo(searchConnectionRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` - * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. - * - * @param searchConnectionRequest (required) + * + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest (required) * @return ApiResponse<List<SearchConnectionResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchConnectionWithHttpInfo( - SearchConnectionRequest searchConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - searchConnectionValidateBeforeCall(searchConnectionRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> searchConnectionWithHttpInfo(SearchConnectionRequest searchConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = searchConnectionValidateBeforeCall(searchConnectionRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Gets connection objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. - * - * @param searchConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchConnectionAsync( - SearchConnectionRequest searchConnectionRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchConnectionValidateBeforeCall(searchConnectionRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchConnectionAsync(SearchConnectionRequest searchConnectionRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchConnectionValidateBeforeCall(searchConnectionRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateConnection - * - * @param updateConnectionRequest (required) + * @param updateConnectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call updateConnectionCall( - UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConnectionCall(UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1556,204 +997,137 @@ public okhttp3.Call updateConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call updateConnectionValidateBeforeCall( - UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConnectionValidateBeforeCall(UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateConnectionRequest' is set if (updateConnectionRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateConnectionRequest' when calling" - + " updateConnection(Async)"); + throw new ApiException("Missing the required parameter 'updateConnectionRequest' when calling updateConnection(Async)"); } return updateConnectionCall(updateConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update - * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your - * connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. - * - * @param updateConnectionRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public void updateConnection(UpdateConnectionRequest updateConnectionRequest) - throws ApiException { + public void updateConnection(UpdateConnectionRequest updateConnectionRequest) throws ApiException { updateConnectionWithHttpInfo(updateConnectionRequest); } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update - * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your - * connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. - * - * @param updateConnectionRequest (required) + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public ApiResponse updateConnectionWithHttpInfo( - UpdateConnectionRequest updateConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - updateConnectionValidateBeforeCall(updateConnectionRequest, null); + public ApiResponse updateConnectionWithHttpInfo(UpdateConnectionRequest updateConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = updateConnectionValidateBeforeCall(updateConnectionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and - * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the - * [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to - * update your connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. - * - * @param updateConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call updateConnectionAsync( - UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConnectionAsync(UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - updateConnectionValidateBeforeCall(updateConnectionRequest, _callback); + okhttp3.Call localVarCall = updateConnectionValidateBeforeCall(updateConnectionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateConnectionV2 - * * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) + * @param updateConnectionV2Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateConnectionV2Call( - String connectionIdentifier, - UpdateConnectionV2Request updateConnectionV2Request, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConnectionV2Call(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1762,11 +1136,8 @@ public okhttp3.Call updateConnectionV2Call( Object localVarPostBody = updateConnectionV2Request; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/{connection_identifier}/update" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1774,268 +1145,108 @@ public okhttp3.Call updateConnectionV2Call( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConnectionV2ValidateBeforeCall( - String connectionIdentifier, - UpdateConnectionV2Request updateConnectionV2Request, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConnectionV2ValidateBeforeCall(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " updateConnectionV2(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling updateConnectionV2(Async)"); } // verify the required parameter 'updateConnectionV2Request' is set if (updateConnectionV2Request == null) { - throw new ApiException( - "Missing the required parameter 'updateConnectionV2Request' when calling" - + " updateConnectionV2(Async)"); + throw new ApiException("Missing the required parameter 'updateConnectionV2Request' when calling updateConnectionV2(Async)"); } return updateConnectionV2Call(connectionIdentifier, updateConnectionV2Request, _callback); + } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` - * (**Can manage data**) and edit permissions to the connection object, or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. To update a connection object, pass these parameters in your API request: 1. GUID - * of the connection object. 2. If you are updating tables or database schema of a connection - * object: a. Add the updated JSON map of metadata with database, schema, and tables in - * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** - * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must - * explicitly provide the authenticationType property in the payload. If you do not specify - * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A - * JSON map of configuration attributes, database details, and table properties in - * `data_warehouse_config` as shown in the following example: ``` { - * \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateConnectionV2Request (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateConnectionV2( - String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) - throws ApiException { + public void updateConnectionV2(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) throws ApiException { updateConnectionV2WithHttpInfo(connectionIdentifier, updateConnectionV2Request); } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` - * (**Can manage data**) and edit permissions to the connection object, or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. To update a connection object, pass these parameters in your API request: 1. GUID - * of the connection object. 2. If you are updating tables or database schema of a connection - * object: a. Add the updated JSON map of metadata with database, schema, and tables in - * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** - * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must - * explicitly provide the authenticationType property in the payload. If you do not specify - * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A - * JSON map of configuration attributes, database details, and table properties in - * `data_warehouse_config` as shown in the following example: ``` { - * \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) + * @param updateConnectionV2Request (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateConnectionV2WithHttpInfo( - String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) - throws ApiException { - okhttp3.Call localVarCall = - updateConnectionV2ValidateBeforeCall( - connectionIdentifier, updateConnectionV2Request, null); + public ApiResponse updateConnectionV2WithHttpInfo(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) throws ApiException { + okhttp3.Call localVarCall = updateConnectionV2ValidateBeforeCall(connectionIdentifier, updateConnectionV2Request, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.4.0.cl or later Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. **NOTE:** If the `authentication_type` is anything other than - * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. - * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the - * authentication type. * A JSON map of configuration attributes, database details, and table - * properties in `data_warehouse_config` as shown in the following example: - * ``` { \"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\":[ ] } ``` - * + * (asynchronously) + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) + * @param updateConnectionV2Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateConnectionV2Async( - String connectionIdentifier, - UpdateConnectionV2Request updateConnectionV2Request, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateConnectionV2ValidateBeforeCall( - connectionIdentifier, updateConnectionV2Request, _callback); + public okhttp3.Call updateConnectionV2Async(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateConnectionV2ValidateBeforeCall(connectionIdentifier, updateConnectionV2Request, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java index ea8c279d6..5d449c17b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java @@ -4,7 +4,6 @@ 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; @@ -12,19 +11,27 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateCustomActionRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ResponseCustomAction; import com.thoughtspot.client.model.SearchCustomActionsRequest; import com.thoughtspot.client.model.UpdateCustomActionRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class CustomActionApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -83,33 +90,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createCustomAction - * - * @param createCustomActionRequest (required) + * @param createCustomActionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createCustomActionCall( - CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createCustomActionCall(CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -126,203 +130,133 @@ public okhttp3.Call createCustomActionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createCustomActionValidateBeforeCall( - CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createCustomActionValidateBeforeCall(CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCustomActionRequest' is set if (createCustomActionRequest == null) { - throw new ApiException( - "Missing the required parameter 'createCustomActionRequest' when calling" - + " createCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'createCustomActionRequest' when calling createCustomAction(Async)"); } return createCustomActionCall(createCustomActionRequest, _callback); + } /** - * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved - * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. #### Usage Guidelines The API lets you create the following types of custom - * actions: * URL-based action Allows pushing data to an external URL. * Callback action - * Triggers a callback to the host application and initiates a response payload on an embedded - * ThoughtSpot instance. By default, custom actions are visible to only administrator or - * developer users. To make a custom action available to other users, and specify the groups in - * `group_identifiers`. By default, the custom action is set as a _global_ action on - * all visualizations and saved Answers. To assign a custom action to specific Liveboard - * visualization, saved Answer, or Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * - * @param createCustomActionRequest (required) + * + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest (required) * @return ResponseCustomAction - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ResponseCustomAction createCustomAction( - CreateCustomActionRequest createCustomActionRequest) throws ApiException { - ApiResponse localVarResp = - createCustomActionWithHttpInfo(createCustomActionRequest); + public ResponseCustomAction createCustomAction(CreateCustomActionRequest createCustomActionRequest) throws ApiException { + ApiResponse localVarResp = createCustomActionWithHttpInfo(createCustomActionRequest); return localVarResp.getData(); } /** - * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved - * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. #### Usage Guidelines The API lets you create the following types of custom - * actions: * URL-based action Allows pushing data to an external URL. * Callback action - * Triggers a callback to the host application and initiates a response payload on an embedded - * ThoughtSpot instance. By default, custom actions are visible to only administrator or - * developer users. To make a custom action available to other users, and specify the groups in - * `group_identifiers`. By default, the custom action is set as a _global_ action on - * all visualizations and saved Answers. To assign a custom action to specific Liveboard - * visualization, saved Answer, or Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * - * @param createCustomActionRequest (required) + * + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest (required) * @return ApiResponse<ResponseCustomAction> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createCustomActionWithHttpInfo( - CreateCustomActionRequest createCustomActionRequest) throws ApiException { - okhttp3.Call localVarCall = - createCustomActionValidateBeforeCall(createCustomActionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createCustomActionWithHttpInfo(CreateCustomActionRequest createCustomActionRequest) throws ApiException { + okhttp3.Call localVarCall = createCustomActionValidateBeforeCall(createCustomActionRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.6.0.cl or later Creates a custom action that appears as a menu - * action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API lets you create the following types of custom actions: * URL-based action - * Allows pushing data to an external URL. * Callback action Triggers a callback to the host - * application and initiates a response payload on an embedded ThoughtSpot instance. By default, - * custom actions are visible to only administrator or developer users. To make a custom action - * available to other users, and specify the groups in `group_identifiers`. By - * default, the custom action is set as a _global_ action on all visualizations and saved - * Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or - * Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * - * @param createCustomActionRequest (required) + * (asynchronously) + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createCustomActionAsync( - CreateCustomActionRequest createCustomActionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createCustomActionValidateBeforeCall(createCustomActionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createCustomActionAsync(CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCustomActionValidateBeforeCall(createCustomActionRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteCustomAction - * * @param customActionIdentifier Unique ID or name of the custom action. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteCustomActionCall( - String customActionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteCustomActionCall(String customActionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -331,11 +265,8 @@ public okhttp3.Call deleteCustomActionCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete" - .replace( - "{" + "custom_action_identifier" + "}", - localVarApiClient.escapeString(customActionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete" + .replace("{" + "custom_action_identifier" + "}", localVarApiClient.escapeString(customActionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -343,161 +274,128 @@ public okhttp3.Call deleteCustomActionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCustomActionValidateBeforeCall( - String customActionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteCustomActionValidateBeforeCall(String customActionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customActionIdentifier' is set if (customActionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'customActionIdentifier' when calling" - + " deleteCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'customActionIdentifier' when calling deleteCustomAction(Async)"); } return deleteCustomActionCall(customActionIdentifier, _callback); + } /** - * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * + * + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteCustomAction(String customActionIdentifier) throws ApiException { deleteCustomActionWithHttpInfo(customActionIdentifier); } /** - * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * + * + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * @param customActionIdentifier Unique ID or name of the custom action. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteCustomActionWithHttpInfo(String customActionIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteCustomActionValidateBeforeCall(customActionIdentifier, null); + public ApiResponse deleteCustomActionWithHttpInfo(String customActionIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteCustomActionValidateBeforeCall(customActionIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.6.0.cl or later Removes the custom action specified in the API - * request. Requires `DEVELOPER` (**Has Developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. - * + * (asynchronously) + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * @param customActionIdentifier Unique ID or name of the custom action. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteCustomActionAsync( - String customActionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteCustomActionAsync(String customActionIdentifier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteCustomActionValidateBeforeCall(customActionIdentifier, _callback); + okhttp3.Call localVarCall = deleteCustomActionValidateBeforeCall(customActionIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for searchCustomActions - * - * @param searchCustomActionsRequest (required) + * @param searchCustomActionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCustomActionsCall( - SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchCustomActionsCall(SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -514,173 +412,134 @@ public okhttp3.Call searchCustomActionsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCustomActionsValidateBeforeCall( - SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchCustomActionsValidateBeforeCall(SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchCustomActionsRequest' is set if (searchCustomActionsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchCustomActionsRequest' when calling" - + " searchCustomActions(Async)"); + throw new ApiException("Missing the required parameter 'searchCustomActionsRequest' when calling searchCustomActions(Async)"); } return searchCustomActionsCall(searchCustomActionsRequest, _callback); + } /** - * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * - * @param searchCustomActionsRequest (required) + * + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest (required) * @return List<ResponseCustomAction> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchCustomActions( - SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { - ApiResponse> localVarResp = - searchCustomActionsWithHttpInfo(searchCustomActionsRequest); + public List searchCustomActions(SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + ApiResponse> localVarResp = searchCustomActionsWithHttpInfo(searchCustomActionsRequest); return localVarResp.getData(); } /** - * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * - * @param searchCustomActionsRequest (required) + * + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest (required) * @return ApiResponse<List<ResponseCustomAction>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchCustomActionsWithHttpInfo( - SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { - okhttp3.Call localVarCall = - searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> searchCustomActionsWithHttpInfo(SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.6.0.cl or later Gets custom actions configured on the cluster. - * Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * - * @param searchCustomActionsRequest (required) + * (asynchronously) + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCustomActionsAsync( - SearchCustomActionsRequest searchCustomActionsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchCustomActionsAsync(SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateCustomAction - * * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) + * @param updateCustomActionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateCustomActionCall( - String customActionIdentifier, - UpdateCustomActionRequest updateCustomActionRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateCustomActionCall(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -689,11 +548,8 @@ public okhttp3.Call updateCustomActionCall( Object localVarPostBody = updateCustomActionRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update" - .replace( - "{" + "custom_action_identifier" + "}", - localVarApiClient.escapeString(customActionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update" + .replace("{" + "custom_action_identifier" + "}", localVarApiClient.escapeString(customActionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -701,162 +557,108 @@ public okhttp3.Call updateCustomActionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCustomActionValidateBeforeCall( - String customActionIdentifier, - UpdateCustomActionRequest updateCustomActionRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateCustomActionValidateBeforeCall(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customActionIdentifier' is set if (customActionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'customActionIdentifier' when calling" - + " updateCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'customActionIdentifier' when calling updateCustomAction(Async)"); } // verify the required parameter 'updateCustomActionRequest' is set if (updateCustomActionRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateCustomActionRequest' when calling" - + " updateCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'updateCustomActionRequest' when calling updateCustomAction(Async)"); } return updateCustomActionCall(customActionIdentifier, updateCustomActionRequest, _callback); + } /** - * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * + * + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateCustomActionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateCustomAction( - String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) - throws ApiException { + public void updateCustomAction(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) throws ApiException { updateCustomActionWithHttpInfo(customActionIdentifier, updateCustomActionRequest); } /** - * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * + * + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) + * @param updateCustomActionRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateCustomActionWithHttpInfo( - String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateCustomActionValidateBeforeCall( - customActionIdentifier, updateCustomActionRequest, null); + public ApiResponse updateCustomActionWithHttpInfo(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) throws ApiException { + okhttp3.Call localVarCall = updateCustomActionValidateBeforeCall(customActionIdentifier, updateCustomActionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.6.0.cl or later Updates a custom action. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * + * (asynchronously) + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) + * @param updateCustomActionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateCustomActionAsync( - String customActionIdentifier, - UpdateCustomActionRequest updateCustomActionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateCustomActionValidateBeforeCall( - customActionIdentifier, updateCustomActionRequest, _callback); + public okhttp3.Call updateCustomActionAsync(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCustomActionValidateBeforeCall(customActionIdentifier, updateCustomActionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java index dda116379..4f8e77248 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java @@ -4,7 +4,6 @@ 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; @@ -12,20 +11,28 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CalendarResponse; import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.GenerateCSVRequest; import com.thoughtspot.client.model.SearchCalendarsRequest; import com.thoughtspot.client.model.UpdateCalendarRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class CustomCalendarsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -84,33 +91,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createCalendar - * - * @param createCalendarRequest (required) + * @param createCalendarRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createCalendarCall( - CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createCalendarCall(CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -127,306 +131,133 @@ public okhttp3.Call createCalendarCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createCalendarValidateBeforeCall( - CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createCalendarValidateBeforeCall(CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCalendarRequest' is set if (createCalendarRequest == null) { - throw new ApiException( - "Missing the required parameter 'createCalendarRequest' when calling" - + " createCalendar(Async)"); + throw new ApiException("Missing the required parameter 'createCalendarRequest' when calling createCalendar(Async)"); } return createCalendarCall(createCalendarRequest, _callback); + } /** - * Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` - * - * @param createCalendarRequest (required) + * + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest (required) * @return CalendarResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public CalendarResponse createCalendar(CreateCalendarRequest createCalendarRequest) - throws ApiException { - ApiResponse localVarResp = - createCalendarWithHttpInfo(createCalendarRequest); + public CalendarResponse createCalendar(CreateCalendarRequest createCalendarRequest) throws ApiException { + ApiResponse localVarResp = createCalendarWithHttpInfo(createCalendarRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` - * - * @param createCalendarRequest (required) + * + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest (required) * @return ApiResponse<CalendarResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createCalendarWithHttpInfo( - CreateCalendarRequest createCalendarRequest) throws ApiException { + public ApiResponse createCalendarWithHttpInfo(CreateCalendarRequest createCalendarRequest) throws ApiException { okhttp3.Call localVarCall = createCalendarValidateBeforeCall(createCalendarRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` - * - * @param createCalendarRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createCalendarAsync( - CreateCalendarRequest createCalendarRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createCalendarValidateBeforeCall(createCalendarRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createCalendarAsync(CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCalendarValidateBeforeCall(createCalendarRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteCalendar - * * @param calendarIdentifier Unique ID or name of the Calendar. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -435,11 +266,8 @@ public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/calendars/{calendar_identifier}/delete" - .replace( - "{" + "calendar_identifier" + "}", - localVarApiClient.escapeString(calendarIdentifier.toString())); + String localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete" + .replace("{" + "calendar_identifier" + "}", localVarApiClient.escapeString(calendarIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -447,134 +275,97 @@ public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCalendarValidateBeforeCall( - String calendarIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteCalendarValidateBeforeCall(String calendarIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'calendarIdentifier' is set if (calendarIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'calendarIdentifier' when calling" - + " deleteCalendar(Async)"); + throw new ApiException("Missing the required parameter 'calendarIdentifier' when calling deleteCalendar(Async)"); } return deleteCalendarCall(calendarIdentifier, _callback); + } /** - * Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. - * + * + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * @param calendarIdentifier Unique ID or name of the Calendar. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteCalendar(String calendarIdentifier) throws ApiException { deleteCalendarWithHttpInfo(calendarIdentifier); } /** - * Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. - * + * + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * @param calendarIdentifier Unique ID or name of the Calendar. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteCalendarWithHttpInfo(String calendarIdentifier) - throws ApiException { + public ApiResponse deleteCalendarWithHttpInfo(String calendarIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. - * + * (asynchronously) + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * @param calendarIdentifier Unique ID or name of the Calendar. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteCalendarAsync( - String calendarIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteCalendarAsync(String calendarIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -582,33 +373,30 @@ public okhttp3.Call deleteCalendarAsync( } /** * Build call for generateCSV - * - * @param generateCSVRequest (required) + * @param generateCSVRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call generateCSVCall( - GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call generateCSVCall(GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -625,75 +413,53 @@ public okhttp3.Call generateCSVCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call generateCSVValidateBeforeCall( - GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call generateCSVValidateBeforeCall(GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'generateCSVRequest' is set if (generateCSVRequest == null) { - throw new ApiException( - "Missing the required parameter 'generateCSVRequest' when calling" - + " generateCSV(Async)"); + throw new ApiException("Missing the required parameter 'generateCSVRequest' when calling generateCSV(Async)"); } return generateCSVCall(generateCSVRequest, _callback); + } /** - * Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. - * - * @param generateCSVRequest (required) + * + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest (required) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public Object generateCSV(GenerateCSVRequest generateCSVRequest) throws ApiException { ApiResponse localVarResp = generateCSVWithHttpInfo(generateCSVRequest); @@ -701,107 +467,79 @@ public Object generateCSV(GenerateCSVRequest generateCSVRequest) throws ApiExcep } /** - * Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. - * - * @param generateCSVRequest (required) + * + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest (required) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse generateCSVWithHttpInfo(GenerateCSVRequest generateCSVRequest) - throws ApiException { + public ApiResponse generateCSVWithHttpInfo(GenerateCSVRequest generateCSVRequest) throws ApiException { okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. - * - * @param generateCSVRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call generateCSVAsync( - GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call generateCSVAsync(GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchCalendars - * - * @param searchCalendarsRequest (required) + * @param searchCalendarsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCalendarsCall( - SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchCalendarsCall(SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -818,193 +556,134 @@ public okhttp3.Call searchCalendarsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCalendarsValidateBeforeCall( - SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchCalendarsValidateBeforeCall(SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchCalendarsRequest' is set if (searchCalendarsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchCalendarsRequest' when calling" - + " searchCalendars(Async)"); + throw new ApiException("Missing the required parameter 'searchCalendarsRequest' when calling searchCalendars(Async)"); } return searchCalendarsCall(searchCalendarsRequest, _callback); + } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. - * - * @param searchCalendarsRequest (required) + * + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest (required) * @return List<CalendarResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchCalendarsWithHttpInfo(searchCalendarsRequest); + public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + ApiResponse> localVarResp = searchCalendarsWithHttpInfo(searchCalendarsRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. - * - * @param searchCalendarsRequest (required) + * + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest (required) * @return ApiResponse<List<CalendarResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchCalendarsWithHttpInfo( - SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + public ApiResponse> searchCalendarsWithHttpInfo(SearchCalendarsRequest searchCalendarsRequest) throws ApiException { okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. - * - * @param searchCalendarsRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCalendarsAsync( - SearchCalendarsRequest searchCalendarsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchCalendarsAsync(SearchCalendarsRequest searchCalendarsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateCalendar - * * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param updateCalendarRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateCalendarCall( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateCalendarCall(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1013,11 +692,8 @@ public okhttp3.Call updateCalendarCall( Object localVarPostBody = updateCalendarRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/calendars/{calendar_identifier}/update" - .replace( - "{" + "calendar_identifier" + "}", - localVarApiClient.escapeString(calendarIdentifier.toString())); + String localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update" + .replace("{" + "calendar_identifier" + "}", localVarApiClient.escapeString(calendarIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1025,239 +701,108 @@ public okhttp3.Call updateCalendarCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCalendarValidateBeforeCall( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateCalendarValidateBeforeCall(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'calendarIdentifier' is set if (calendarIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'calendarIdentifier' when calling" - + " updateCalendar(Async)"); + throw new ApiException("Missing the required parameter 'calendarIdentifier' when calling updateCalendar(Async)"); } // verify the required parameter 'updateCalendarRequest' is set if (updateCalendarRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateCalendarRequest' when calling" - + " updateCalendar(Async)"); + throw new ApiException("Missing the required parameter 'updateCalendarRequest' when calling updateCalendar(Async)"); } return updateCalendarCall(calendarIdentifier, updateCalendarRequest, _callback); + } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` - * + * + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateCalendarRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateCalendar( - String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) - throws ApiException { + public void updateCalendar(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) throws ApiException { updateCalendarWithHttpInfo(calendarIdentifier, updateCalendarRequest); } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` - * + * + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param updateCalendarRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateCalendarWithHttpInfo( - String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); + public ApiResponse updateCalendarWithHttpInfo(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) throws ApiException { + okhttp3.Call localVarCall = updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` - * + * (asynchronously) + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param updateCalendarRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateCalendarAsync( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateCalendarValidateBeforeCall( - calendarIdentifier, updateCalendarRequest, _callback); + public okhttp3.Call updateCalendarAsync(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java index 88521c355..3d80af66a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java @@ -4,7 +4,6 @@ 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; @@ -12,21 +11,29 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.AnswerDataResponse; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchAnswerDataRequest; import com.thoughtspot.client.model.FetchLiveboardDataRequest; import com.thoughtspot.client.model.LiveboardDataResponse; import com.thoughtspot.client.model.SearchDataRequest; import com.thoughtspot.client.model.SearchDataResponse; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DataApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -85,33 +92,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for fetchAnswerData - * - * @param fetchAnswerDataRequest (required) + * @param fetchAnswerDataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchAnswerDataCall( - FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchAnswerDataCall(FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -128,169 +132,133 @@ public okhttp3.Call fetchAnswerDataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchAnswerDataValidateBeforeCall( - FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchAnswerDataValidateBeforeCall(FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchAnswerDataRequest' is set if (fetchAnswerDataRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchAnswerDataRequest' when calling" - + " fetchAnswerData(Async)"); + throw new ApiException("Missing the required parameter 'fetchAnswerDataRequest' when calling fetchAnswerData(Async)"); } return fetchAnswerDataCall(fetchAnswerDataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to - * the saved Answer. The `record_size` attribute determines the number of records to - * retrieve in an API call. For more information about pagination, record size, and maximum row - * limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). - * - * @param fetchAnswerDataRequest (required) + * + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest (required) * @return AnswerDataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public AnswerDataResponse fetchAnswerData(FetchAnswerDataRequest fetchAnswerDataRequest) - throws ApiException { - ApiResponse localVarResp = - fetchAnswerDataWithHttpInfo(fetchAnswerDataRequest); + public AnswerDataResponse fetchAnswerData(FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { + ApiResponse localVarResp = fetchAnswerDataWithHttpInfo(fetchAnswerDataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to - * the saved Answer. The `record_size` attribute determines the number of records to - * retrieve in an API call. For more information about pagination, record size, and maximum row - * limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). - * - * @param fetchAnswerDataRequest (required) + * + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest (required) * @return ApiResponse<AnswerDataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchAnswerDataWithHttpInfo( - FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { + public ApiResponse fetchAnswerDataWithHttpInfo(FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { okhttp3.Call localVarCall = fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at - * least view access to the saved Answer. The `record_size` attribute determines the - * number of records to retrieve in an API call. For more information about pagination, record - * size, and maximum row limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). - * - * @param fetchAnswerDataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchAnswerDataAsync( - FetchAnswerDataRequest fetchAnswerDataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchAnswerDataAsync(FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchLiveboardData - * - * @param fetchLiveboardDataRequest (required) + * @param fetchLiveboardDataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchLiveboardDataCall( - FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchLiveboardDataCall(FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -307,187 +275,133 @@ public okhttp3.Call fetchLiveboardDataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchLiveboardDataValidateBeforeCall( - FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchLiveboardDataValidateBeforeCall(FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchLiveboardDataRequest' is set if (fetchLiveboardDataRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchLiveboardDataRequest' when calling" - + " fetchLiveboardData(Async)"); + throw new ApiException("Missing the required parameter 'fetchLiveboardDataRequest' when calling fetchLiveboardData(Async)"); } return fetchLiveboardDataCall(fetchLiveboardDataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires - * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the - * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or - * names of the visualizations in the API request. To include unsaved changes in the report, - * pass the `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes. If the new Liveboard - * experience mode, the transient content includes ad hoc changes to visualizations such as - * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard - * data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). - * - * @param fetchLiveboardDataRequest (required) + * + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest (required) * @return LiveboardDataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public LiveboardDataResponse fetchLiveboardData( - FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { - ApiResponse localVarResp = - fetchLiveboardDataWithHttpInfo(fetchLiveboardDataRequest); + public LiveboardDataResponse fetchLiveboardData(FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + ApiResponse localVarResp = fetchLiveboardDataWithHttpInfo(fetchLiveboardDataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires - * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the - * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or - * names of the visualizations in the API request. To include unsaved changes in the report, - * pass the `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes. If the new Liveboard - * experience mode, the transient content includes ad hoc changes to visualizations such as - * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard - * data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). - * - * @param fetchLiveboardDataRequest (required) + * + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest (required) * @return ApiResponse<LiveboardDataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchLiveboardDataWithHttpInfo( - FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchLiveboardDataWithHttpInfo(FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + okhttp3.Call localVarCall = fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets data from a Liveboard object and its - * visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the - * request body, specify the GUID or name of the Liveboard. To get data for specific - * visualizations, add the GUIDs or names of the visualizations in the API request. To include - * unsaved changes in the report, pass the `transient_pinboard_content` script - * generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed - * SDK. Upon successful execution, the API returns the report with unsaved changes. If the new - * Liveboard experience mode, the transient content includes ad hoc changes to visualizations - * such as sorting, toggling of legends, and data drill down. For more information, and see - * [Liveboard data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). - * - * @param fetchLiveboardDataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchLiveboardDataAsync( - FetchLiveboardDataRequest fetchLiveboardDataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchLiveboardDataAsync(FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchData - * - * @param searchDataRequest (required) + * @param searchDataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchDataCall( - SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchDataCall(SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -504,77 +418,53 @@ public okhttp3.Call searchDataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchDataValidateBeforeCall( - SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchDataValidateBeforeCall(SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchDataRequest' is set if (searchDataRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchDataRequest' when calling" - + " searchData(Async)"); + throw new ApiException("Missing the required parameter 'searchDataRequest' when calling searchData(Async)"); } return searchDataCall(searchDataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least - * view access to the data source object (Worksheet or View). #### Usage guidelines To search - * data, specify the data source GUID in `logical_table_identifier`. The data source - * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the - * `query_string` attribute in the API request as shown in the following example: - * ``` { \"query_string\": \"[sales] by [store]\", - * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } - * ``` For more information about the `query_string` format and data - * source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). - * - * @param searchDataRequest (required) + * + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest (required) * @return SearchDataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SearchDataResponse searchData(SearchDataRequest searchDataRequest) throws ApiException { ApiResponse localVarResp = searchDataWithHttpInfo(searchDataRequest); @@ -582,81 +472,50 @@ public SearchDataResponse searchData(SearchDataRequest searchDataRequest) throws } /** - * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least - * view access to the data source object (Worksheet or View). #### Usage guidelines To search - * data, specify the data source GUID in `logical_table_identifier`. The data source - * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the - * `query_string` attribute in the API request as shown in the following example: - * ``` { \"query_string\": \"[sales] by [store]\", - * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } - * ``` For more information about the `query_string` format and data - * source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). - * - * @param searchDataRequest (required) + * + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest (required) * @return ApiResponse<SearchDataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse searchDataWithHttpInfo( - SearchDataRequest searchDataRequest) throws ApiException { + public ApiResponse searchDataWithHttpInfo(SearchDataRequest searchDataRequest) throws ApiException { okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Generates an Answer from a given data source. - * Requires at least view access to the data source object (Worksheet or View). #### Usage - * guidelines To search data, specify the data source GUID in - * `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL - * view. Pass search tokens in the `query_string` attribute in the API request as - * shown in the following example: ``` { \"query_string\": - * \"[sales] by [store]\", \"logical_table_identifier\": - * \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information - * about the `query_string` format and data source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). - * - * @param searchDataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchDataAsync( - SearchDataRequest searchDataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchDataAsync(SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java index 781fdc75f..5865c8f28 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 @@ -4,7 +4,6 @@ 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; @@ -12,17 +11,25 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.DbtSearchResponse; +import com.thoughtspot.client.model.ErrorResponse; import java.io.File; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DbtApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -81,7 +88,6 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for dbtConnection - * * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -91,43 +97,30 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 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 -
+ + + + + + + + +
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 { + 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[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -184,91 +177,45 @@ public okhttp3.Call dbtConnectionCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + 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 { + 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)"); + 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)"); + throw new ApiException("Missing the required parameter 'databaseName' when calling dbtConnection(Async)"); } - return dbtConnectionCall( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); + return dbtConnectionCall(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + } /** - * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. - * + * + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -278,64 +225,28 @@ private okhttp3.Call dbtConnectionValidateBeforeCall( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Object dbtConnection( - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - ApiResponse localVarResp = - dbtConnectionWithHttpInfo( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + public Object dbtConnection(String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + ApiResponse localVarResp = dbtConnectionWithHttpInfo(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. - * + * + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -345,66 +256,29 @@ public Object dbtConnection( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse dbtConnectionWithHttpInfo( - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - okhttp3.Call localVarCall = - dbtConnectionValidateBeforeCall( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse dbtConnectionWithHttpInfo(String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + okhttp3.Call localVarCall = dbtConnectionValidateBeforeCall(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. - * + * (asynchronously) + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -414,85 +288,55 @@ public ApiResponse dbtConnectionWithHttpInfo( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call dbtConnectionAsync( - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - dbtConnectionValidateBeforeCall( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call dbtConnectionAsync(String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = dbtConnectionValidateBeforeCall(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for dbtGenerateSyncTml - * * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call dbtGenerateSyncTmlCall( - String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call dbtGenerateSyncTmlCall(String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -517,202 +361,140 @@ public okhttp3.Call dbtGenerateSyncTmlCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call dbtGenerateSyncTmlValidateBeforeCall( - String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call dbtGenerateSyncTmlValidateBeforeCall(String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " dbtGenerateSyncTml(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling dbtGenerateSyncTml(Async)"); } return dbtGenerateSyncTmlCall(dbtConnectionIdentifier, fileContent, _callback); + } /** - * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s - * and import them to Thoughtspot based on the DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Object dbtGenerateSyncTml(String dbtConnectionIdentifier, File fileContent) - throws ApiException { - ApiResponse localVarResp = - dbtGenerateSyncTmlWithHttpInfo(dbtConnectionIdentifier, fileContent); + public Object dbtGenerateSyncTml(String dbtConnectionIdentifier, File fileContent) throws ApiException { + ApiResponse localVarResp = dbtGenerateSyncTmlWithHttpInfo(dbtConnectionIdentifier, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s - * and import them to Thoughtspot based on the DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse dbtGenerateSyncTmlWithHttpInfo( - String dbtConnectionIdentifier, File fileContent) throws ApiException { - okhttp3.Call localVarCall = - dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse dbtGenerateSyncTmlWithHttpInfo(String dbtConnectionIdentifier, File fileContent) throws ApiException { + okhttp3.Call localVarCall = dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Resynchronize the existing list of models, - * tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * (asynchronously) + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call dbtGenerateSyncTmlAsync( - String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - dbtGenerateSyncTmlValidateBeforeCall( - dbtConnectionIdentifier, fileContent, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call dbtGenerateSyncTmlAsync(String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for dbtGenerateTml - * * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call dbtGenerateTmlCall( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call dbtGenerateTmlCall(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -749,252 +531,154 @@ public okhttp3.Call dbtGenerateTmlCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call dbtGenerateTmlValidateBeforeCall( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call dbtGenerateTmlValidateBeforeCall(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " dbtGenerateTml(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling dbtGenerateTml(Async)"); + } + + // verify the required parameter 'modelTables' is set + if (modelTables == null) { + throw new ApiException("Missing the required parameter 'modelTables' when calling dbtGenerateTml(Async)"); } // verify the required parameter 'importWorksheets' is set if (importWorksheets == null) { - throw new ApiException( - "Missing the required parameter 'importWorksheets' when calling" - + " dbtGenerateTml(Async)"); + throw new ApiException("Missing the required parameter 'importWorksheets' when calling dbtGenerateTml(Async)"); } - return dbtGenerateTmlCall( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent, - _callback); + return dbtGenerateTmlCall(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _callback); + } /** - * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. - * + * + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Object dbtGenerateTml( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent) - throws ApiException { - ApiResponse localVarResp = - dbtGenerateTmlWithHttpInfo( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent); + public Object dbtGenerateTml(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent) throws ApiException { + ApiResponse localVarResp = dbtGenerateTmlWithHttpInfo(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. - * + * + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse dbtGenerateTmlWithHttpInfo( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent) - throws ApiException { - okhttp3.Call localVarCall = - dbtGenerateTmlValidateBeforeCall( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent, - null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse dbtGenerateTmlWithHttpInfo(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent) throws ApiException { + okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Generate required table and worksheet and import - * them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. - * + * (asynchronously) + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call dbtGenerateTmlAsync( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - dbtGenerateTmlValidateBeforeCall( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent, - _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call dbtGenerateTmlAsync(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for dbtSearch - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call dbtSearchCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1011,66 +695,46 @@ public okhttp3.Call dbtSearchCall(final ApiCallback _callback) throws ApiExcepti Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call dbtSearchValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call dbtSearchValidateBeforeCall(final ApiCallback _callback) throws ApiException { return dbtSearchCall(_callback); + } /** - * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, - * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. - * + * + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * @return List<DbtSearchResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List dbtSearch() throws ApiException { ApiResponse> localVarResp = dbtSearchWithHttpInfo(); @@ -1078,103 +742,77 @@ public List dbtSearch() throws ApiException { } /** - * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, - * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. - * + * + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * @return ApiResponse<List<DbtSearchResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse> dbtSearchWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and - * organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. - * + * (asynchronously) + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call dbtSearchAsync(final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call dbtSearchAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteDbtConnection - * * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteDbtConnectionCall( - String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteDbtConnectionCall(String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1183,11 +821,8 @@ public okhttp3.Call deleteDbtConnectionCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete" - .replace( - "{" + "dbt_connection_identifier" + "}", - localVarApiClient.escapeString(dbtConnectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete" + .replace("{" + "dbt_connection_identifier" + "}", localVarApiClient.escapeString(dbtConnectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1195,144 +830,104 @@ public okhttp3.Call deleteDbtConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDbtConnectionValidateBeforeCall( - String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteDbtConnectionValidateBeforeCall(String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " deleteDbtConnection(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling deleteDbtConnection(Async)"); } return deleteDbtConnectionCall(dbtConnectionIdentifier, _callback); + } /** - * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteDbtConnection(String dbtConnectionIdentifier) throws ApiException { deleteDbtConnectionWithHttpInfo(dbtConnectionIdentifier); } /** - * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteDbtConnectionWithHttpInfo(String dbtConnectionIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, null); + public ApiResponse deleteDbtConnectionWithHttpInfo(String dbtConnectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.9.0.cl or later Removes the specified DBT connection object from - * the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based - * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your - * instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * (asynchronously) + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteDbtConnectionAsync( - String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteDbtConnectionAsync(String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, _callback); + okhttp3.Call localVarCall = deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateDbtConnection - * * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -1343,44 +938,30 @@ public okhttp3.Call deleteDbtConnectionAsync( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateDbtConnectionCall( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateDbtConnectionCall(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1441,86 +1022,40 @@ public okhttp3.Call updateDbtConnectionCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateDbtConnectionValidateBeforeCall( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateDbtConnectionValidateBeforeCall(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " updateDbtConnection(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling updateDbtConnection(Async)"); } - return updateDbtConnectionCall( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); + return updateDbtConnectionCall(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + } /** - * Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. - * + * + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -1531,66 +1066,28 @@ private okhttp3.Call updateDbtConnectionValidateBeforeCall( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Object updateDbtConnection( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - ApiResponse localVarResp = - updateDbtConnectionWithHttpInfo( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + public Object updateDbtConnection(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + ApiResponse localVarResp = updateDbtConnectionWithHttpInfo(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. - * + * + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -1601,68 +1098,29 @@ public Object updateDbtConnection( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateDbtConnectionWithHttpInfo( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - okhttp3.Call localVarCall = - updateDbtConnectionValidateBeforeCall( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse updateDbtConnectionWithHttpInfo(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + okhttp3.Call localVarCall = updateDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. - * + * (asynchronously) + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -1673,53 +1131,25 @@ public ApiResponse updateDbtConnectionWithHttpInfo( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateDbtConnectionAsync( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateDbtConnectionValidateBeforeCall( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call updateDbtConnectionAsync(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomisationApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomisationApi.java deleted file mode 100644 index e3753502f..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomisationApi.java +++ /dev/null @@ -1,809 +0,0 @@ -/* - * 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.CreateEmailCustomisationRequest; -import com.thoughtspot.client.model.CreateEmailCustomisationResponse; -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 EmailCustomisationApi { - private ApiClient localVarApiClient; - private ApiClientConfiguration localVarApiClientConfiguration; - private int localHostIndex; - private String localCustomBaseUrl; - - public EmailCustomisationApi() { - this(Configuration.getDefaultApiClient()); - } - - public EmailCustomisationApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public EmailCustomisationApi(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 createEmailCustomisation - * - * @param createEmailCustomisationRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call createEmailCustomisationCall( - CreateEmailCustomisationRequest createEmailCustomisationRequest, - final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createEmailCustomisationRequest; - - // create path and map variables - String localVarPath = "/api/rest/2.0/customization/email"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createEmailCustomisationValidateBeforeCall( - CreateEmailCustomisationRequest createEmailCustomisationRequest, - final ApiCallback _callback) - throws ApiException { - // verify the required parameter 'createEmailCustomisationRequest' is set - if (createEmailCustomisationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createEmailCustomisationRequest' when calling" - + " createEmailCustomisation(Async)"); - } - - return createEmailCustomisationCall(createEmailCustomisationRequest, _callback); - } - - /** - * Version: 10.10.0.cl or later Creates a custom configuration for the email customisation #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines To create a custom confuguration: 1. Pass these parameters in - * your API request. - A JSON map of configuration attributes `template_properties`. - * The following example shows the configuration attribures for a csutom configuration: - * ``` { { \"logoUrl\": \"<logo_url>\", - * \"homeUrl\": \"<home_url>\", \"productName\": - * \"<Company Name in the Mail>\", \"footerAddress\": - * \"<address to be visible in the footer>\", \"ctaButtonBgColor\": - * \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", - * \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": - * <true/false>, \"hideTsVocabularyDefinitions\": <true/false>e, - * \"hideProductName\": <true/false>, \"hideFooterPhone\": - * <true/false>, \"hideFooterAddress\": <true/false>, - * \"hidePrivacyPolicy\": <true/false>, \"hideManageNotification\": - * <true/false>, \"fontfamily\": \"<to maintain a single font in the - * entire email>\" } } ``` - * - * @param createEmailCustomisationRequest (required) - * @return CreateEmailCustomisationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public CreateEmailCustomisationResponse createEmailCustomisation( - CreateEmailCustomisationRequest createEmailCustomisationRequest) throws ApiException { - ApiResponse localVarResp = - createEmailCustomisationWithHttpInfo(createEmailCustomisationRequest); - return localVarResp.getData(); - } - - /** - * Version: 10.10.0.cl or later Creates a custom configuration for the email customisation #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines To create a custom confuguration: 1. Pass these parameters in - * your API request. - A JSON map of configuration attributes `template_properties`. - * The following example shows the configuration attribures for a csutom configuration: - * ``` { { \"logoUrl\": \"<logo_url>\", - * \"homeUrl\": \"<home_url>\", \"productName\": - * \"<Company Name in the Mail>\", \"footerAddress\": - * \"<address to be visible in the footer>\", \"ctaButtonBgColor\": - * \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", - * \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": - * <true/false>, \"hideTsVocabularyDefinitions\": <true/false>e, - * \"hideProductName\": <true/false>, \"hideFooterPhone\": - * <true/false>, \"hideFooterAddress\": <true/false>, - * \"hidePrivacyPolicy\": <true/false>, \"hideManageNotification\": - * <true/false>, \"fontfamily\": \"<to maintain a single font in the - * entire email>\" } } ``` - * - * @param createEmailCustomisationRequest (required) - * @return ApiResponse<CreateEmailCustomisationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse createEmailCustomisationWithHttpInfo( - CreateEmailCustomisationRequest createEmailCustomisationRequest) throws ApiException { - okhttp3.Call localVarCall = - createEmailCustomisationValidateBeforeCall(createEmailCustomisationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) Version: 10.10.0.cl or later Creates a custom configuration for the email - * customisation #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. #### Usage guidelines To create a custom confuguration: 1. Pass - * these parameters in your API request. - A JSON map of configuration attributes - * `template_properties`. The following example shows the configuration attribures for - * a csutom configuration: ``` { { \"logoUrl\": - * \"<logo_url>\", \"homeUrl\": \"<home_url>\", - * \"productName\": \"<Company Name in the Mail>\", - * \"footerAddress\": \"<address to be visible in the footer>\", - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": <true/false>, - * \"hideTsVocabularyDefinitions\": <true/false>e, - * \"hideProductName\": <true/false>, \"hideFooterPhone\": - * <true/false>, \"hideFooterAddress\": <true/false>, - * \"hidePrivacyPolicy\": <true/false>, \"hideManageNotification\": - * <true/false>, \"fontfamily\": \"<to maintain a single font in the - * entire email>\" } } ``` - * - * @param createEmailCustomisationRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call createEmailCustomisationAsync( - CreateEmailCustomisationRequest createEmailCustomisationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createEmailCustomisationValidateBeforeCall( - createEmailCustomisationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteEmailCustomisation - * - * @param templateIdentifier Unique ID or name of the email customization. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteEmailCustomisationCall( - String templateIdentifier, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/email/{template_identifier}/delete" - .replace( - "{" + "template_identifier" + "}", - localVarApiClient.escapeString(templateIdentifier.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteEmailCustomisationValidateBeforeCall( - String templateIdentifier, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'templateIdentifier' is set - if (templateIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'templateIdentifier' when calling" - + " deleteEmailCustomisation(Async)"); - } - - return deleteEmailCustomisationCall(templateIdentifier, _callback); - } - - /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customisation. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines Deletes the configuration available for the cluster/org. Pass - * the `template_identifier` in the API request. Note: `template_identifier` - * can be fetched from search API request. - * - * @param templateIdentifier Unique ID or name of the email customization. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public void deleteEmailCustomisation(String templateIdentifier) throws ApiException { - deleteEmailCustomisationWithHttpInfo(templateIdentifier); - } - - /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customisation. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines Deletes the configuration available for the cluster/org. Pass - * the `template_identifier` in the API request. Note: `template_identifier` - * can be fetched from search API request. - * - * @param templateIdentifier Unique ID or name of the email customization. (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse deleteEmailCustomisationWithHttpInfo(String templateIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteEmailCustomisationValidateBeforeCall(templateIdentifier, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * (asynchronously) Version: 10.10.0.cl or later Deletes the configuration for the email - * customisation. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. #### Usage guidelines Deletes the configuration available for the - * cluster/org. Pass the `template_identifier` in the API request. Note: - * `template_identifier` can be fetched from search API request. - * - * @param templateIdentifier Unique ID or name of the email customization. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteEmailCustomisationAsync( - String templateIdentifier, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = - deleteEmailCustomisationValidateBeforeCall(templateIdentifier, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for searchEmailCustomisation - * - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call searchEmailCustomisationCall(final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api/rest/2.0/customization/email/search"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call searchEmailCustomisationValidateBeforeCall(final ApiCallback _callback) - throws ApiException { - return searchEmailCustomisationCall(_callback); - } - - /** - * Version: 10.10.0.cl or later Search the email customisation configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. #### Usage guidelines To get the list of configurations set in the - * cluster/org. - * - * @return List<CreateEmailCustomisationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public List searchEmailCustomisation() throws ApiException { - ApiResponse> localVarResp = - searchEmailCustomisationWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Version: 10.10.0.cl or later Search the email customisation configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. #### Usage guidelines To get the list of configurations set in the - * cluster/org. - * - * @return ApiResponse<List<CreateEmailCustomisationResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse> - searchEmailCustomisationWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = searchEmailCustomisationValidateBeforeCall(null); - Type localVarReturnType = - new TypeToken>() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) Version: 10.10.0.cl or later Search the email customisation configuration if - * any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has - * developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines To get the list of configurations set in the cluster/org. - * - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call searchEmailCustomisationAsync( - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = searchEmailCustomisationValidateBeforeCall(_callback); - Type localVarReturnType = - new TypeToken>() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for validateEmailCustomisation - * - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call validateEmailCustomisationCall(final ApiCallback _callback) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api/rest/2.0/customization/email/validate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call validateEmailCustomisationValidateBeforeCall(final ApiCallback _callback) - throws ApiException { - return validateEmailCustomisationCall(_callback); - } - - /** - * Version: 10.10.0.cl or later Validates the email customisation configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public void validateEmailCustomisation() throws ApiException { - validateEmailCustomisationWithHttpInfo(); - } - - /** - * Version: 10.10.0.cl or later Validates the email customisation configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. - * - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse validateEmailCustomisationWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = validateEmailCustomisationValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * (asynchronously) Version: 10.10.0.cl or later Validates the email customisation configuration - * if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` - * (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. - * - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call validateEmailCustomisationAsync(final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = validateEmailCustomisationValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java index dc7416e8e..df5dae79a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java @@ -4,7 +4,6 @@ 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; @@ -12,20 +11,28 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateEmailCustomizationRequest; import com.thoughtspot.client.model.CreateEmailCustomizationResponse; import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.SearchEmailCustomizationRequest; import com.thoughtspot.client.model.UpdateEmailCustomizationRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EmailCustomizationApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -84,33 +91,29 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createEmailCustomization - * - * @param createEmailCustomizationRequest (required) + * @param createEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call createEmailCustomizationCall( - CreateEmailCustomizationRequest createEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createEmailCustomizationCall(CreateEmailCustomizationRequest createEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -127,230 +130,131 @@ public okhttp3.Call createEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createEmailCustomizationValidateBeforeCall( - CreateEmailCustomizationRequest createEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createEmailCustomizationValidateBeforeCall(CreateEmailCustomizationRequest createEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createEmailCustomizationRequest' is set if (createEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createEmailCustomizationRequest' when calling" - + " createEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'createEmailCustomizationRequest' when calling createEmailCustomization(Async)"); } return createEmailCustomizationCall(createEmailCustomizationRequest, _callback); + } /** - * Version: 10.10.0.cl or later Creates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To create a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param createEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param createEmailCustomizationRequest (required) * @return CreateEmailCustomizationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public CreateEmailCustomizationResponse createEmailCustomization( - CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { - ApiResponse localVarResp = - createEmailCustomizationWithHttpInfo(createEmailCustomizationRequest); + public CreateEmailCustomizationResponse createEmailCustomization(CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + ApiResponse localVarResp = createEmailCustomizationWithHttpInfo(createEmailCustomizationRequest); return localVarResp.getData(); } /** - * Version: 10.10.0.cl or later Creates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To create a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param createEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param createEmailCustomizationRequest (required) * @return ApiResponse<CreateEmailCustomizationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public ApiResponse createEmailCustomizationWithHttpInfo( - CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { - okhttp3.Call localVarCall = - createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createEmailCustomizationWithHttpInfo(CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.10.0.cl or later Creates a customization configuration for the - * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines To create a custom configuration pass these - * parameters in your API request: - A JSON map of configuration attributes - * `template_properties`. The following example shows a sample set of customization - * configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", - * \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": - * \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : - * \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param createEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param createEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call createEmailCustomizationAsync( - CreateEmailCustomizationRequest createEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createEmailCustomizationValidateBeforeCall( - createEmailCustomizationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createEmailCustomizationAsync(CreateEmailCustomizationRequest createEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteEmailCustomization - * * @param templateIdentifier Unique ID or name of the email customization. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteEmailCustomizationCall( - String templateIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteEmailCustomizationCall(String templateIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -359,11 +263,8 @@ public okhttp3.Call deleteEmailCustomizationCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/email/{template_identifier}/delete" - .replace( - "{" + "template_identifier" + "}", - localVarApiClient.escapeString(templateIdentifier.toString())); + String localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete" + .replace("{" + "template_identifier" + "}", localVarApiClient.escapeString(templateIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -371,72 +272,51 @@ public okhttp3.Call deleteEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call deleteEmailCustomizationValidateBeforeCall( - String templateIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteEmailCustomizationValidateBeforeCall(String templateIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'templateIdentifier' is set if (templateIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'templateIdentifier' when calling" - + " deleteEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'templateIdentifier' when calling deleteEmailCustomization(Async)"); } return deleteEmailCustomizationCall(templateIdentifier, _callback); + } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. - * + * + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * @param templateIdentifier Unique ID or name of the email customization. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated @@ -445,107 +325,79 @@ public void deleteEmailCustomization(String templateIdentifier) throws ApiExcept } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. - * + * + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * @param templateIdentifier Unique ID or name of the email customization. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public ApiResponse deleteEmailCustomizationWithHttpInfo(String templateIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteEmailCustomizationValidateBeforeCall(templateIdentifier, null); + public ApiResponse deleteEmailCustomizationWithHttpInfo(String templateIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteEmailCustomizationValidateBeforeCall(templateIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.10.0.cl or later Deletes the configuration for the email - * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. - * + * (asynchronously) + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * @param templateIdentifier Unique ID or name of the email customization. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteEmailCustomizationAsync( - String templateIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteEmailCustomizationAsync(String templateIdentifier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteEmailCustomizationValidateBeforeCall(templateIdentifier, _callback); + okhttp3.Call localVarCall = deleteEmailCustomizationValidateBeforeCall(templateIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteOrgEmailCustomization - * - * @param deleteOrgEmailCustomizationRequest (required) + * @param deleteOrgEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteOrgEmailCustomizationCall( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteOrgEmailCustomizationCall(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -562,180 +414,128 @@ public okhttp3.Call deleteOrgEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOrgEmailCustomizationValidateBeforeCall( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteOrgEmailCustomizationValidateBeforeCall(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteOrgEmailCustomizationRequest' is set if (deleteOrgEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteOrgEmailCustomizationRequest' when" - + " calling deleteOrgEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'deleteOrgEmailCustomizationRequest' when calling deleteOrgEmailCustomization(Async)"); } return deleteOrgEmailCustomizationCall(deleteOrgEmailCustomizationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` - * from the response. - Use that `org_identifier` as a parameter in this API request. - * - * @param deleteOrgEmailCustomizationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public void deleteOrgEmailCustomization( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) - throws ApiException { + public void deleteOrgEmailCustomization(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) throws ApiException { deleteOrgEmailCustomizationWithHttpInfo(deleteOrgEmailCustomizationRequest); } /** - * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` - * from the response. - Use that `org_identifier` as a parameter in this API request. - * - * @param deleteOrgEmailCustomizationRequest (required) + * + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public ApiResponse deleteOrgEmailCustomizationWithHttpInfo( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) - throws ApiException { - okhttp3.Call localVarCall = - deleteOrgEmailCustomizationValidateBeforeCall( - deleteOrgEmailCustomizationRequest, null); + public ApiResponse deleteOrgEmailCustomizationWithHttpInfo(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = deleteOrgEmailCustomizationValidateBeforeCall(deleteOrgEmailCustomizationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Deletes the configuration for the email - * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines - Call the search API endpoint to get the - * `org_identifier` from the response. - Use that `org_identifier` as a - * parameter in this API request. - * - * @param deleteOrgEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteOrgEmailCustomizationAsync( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteOrgEmailCustomizationValidateBeforeCall( - deleteOrgEmailCustomizationRequest, _callback); + public okhttp3.Call deleteOrgEmailCustomizationAsync(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOrgEmailCustomizationValidateBeforeCall(deleteOrgEmailCustomizationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for searchEmailCustomization - * - * @param searchEmailCustomizationRequest (required) + * @param searchEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call searchEmailCustomizationCall( - SearchEmailCustomizationRequest searchEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchEmailCustomizationCall(SearchEmailCustomizationRequest searchEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -752,178 +552,130 @@ public okhttp3.Call searchEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchEmailCustomizationValidateBeforeCall( - SearchEmailCustomizationRequest searchEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchEmailCustomizationValidateBeforeCall(SearchEmailCustomizationRequest searchEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchEmailCustomizationRequest' is set if (searchEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchEmailCustomizationRequest' when calling" - + " searchEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'searchEmailCustomizationRequest' when calling searchEmailCustomization(Async)"); } return searchEmailCustomizationCall(searchEmailCustomizationRequest, _callback); + } /** - * Version: 10.10.0.cl or later Search the email customization configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * - * @param searchEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest (required) * @return List<CreateEmailCustomizationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public List searchEmailCustomization( - SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { - ApiResponse> localVarResp = - searchEmailCustomizationWithHttpInfo(searchEmailCustomizationRequest); + public List searchEmailCustomization(SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + ApiResponse> localVarResp = searchEmailCustomizationWithHttpInfo(searchEmailCustomizationRequest); return localVarResp.getData(); } /** - * Version: 10.10.0.cl or later Search the email customization configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * - * @param searchEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest (required) * @return ApiResponse<List<CreateEmailCustomizationResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public ApiResponse> searchEmailCustomizationWithHttpInfo( - SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { - okhttp3.Call localVarCall = - searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, null); - Type localVarReturnType = - new TypeToken>() {}.getType(); + public ApiResponse> searchEmailCustomizationWithHttpInfo(SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.10.0.cl or later Search the email customization configuration if - * any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has - * developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * - * @param searchEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call searchEmailCustomizationAsync( - SearchEmailCustomizationRequest searchEmailCustomizationRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchEmailCustomizationValidateBeforeCall( - searchEmailCustomizationRequest, _callback); - Type localVarReturnType = - new TypeToken>() {}.getType(); + public okhttp3.Call searchEmailCustomizationAsync(SearchEmailCustomizationRequest searchEmailCustomizationRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateEmailCustomization - * - * @param updateEmailCustomizationRequest (required) + * @param updateEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call updateEmailCustomizationCall( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateEmailCustomizationCall(UpdateEmailCustomizationRequest updateEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -940,224 +692,127 @@ public okhttp3.Call updateEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateEmailCustomizationValidateBeforeCall( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateEmailCustomizationValidateBeforeCall(UpdateEmailCustomizationRequest updateEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateEmailCustomizationRequest' is set if (updateEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateEmailCustomizationRequest' when calling" - + " updateEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'updateEmailCustomizationRequest' when calling updateEmailCustomization(Async)"); } return updateEmailCustomizationCall(updateEmailCustomizationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Updates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To update a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param updateEmailCustomizationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param updateEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public void updateEmailCustomization( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + public void updateEmailCustomization(UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { updateEmailCustomizationWithHttpInfo(updateEmailCustomizationRequest); } /** - * Version: 10.12.0.cl or later Updates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To update a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param updateEmailCustomizationRequest (required) + * + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param updateEmailCustomizationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public ApiResponse updateEmailCustomizationWithHttpInfo( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { - okhttp3.Call localVarCall = - updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, null); + public ApiResponse updateEmailCustomizationWithHttpInfo(UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates a customization configuration for the - * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines To update a custom configuration pass these - * parameters in your API request: - A JSON map of configuration attributes - * `template_properties`. The following example shows a sample set of customization - * configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", - * \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": - * \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : - * \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param updateEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param updateEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call updateEmailCustomizationAsync( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateEmailCustomizationValidateBeforeCall( - updateEmailCustomizationRequest, _callback); + public okhttp3.Call updateEmailCustomizationAsync(UpdateEmailCustomizationRequest updateEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for validateEmailCustomization - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1174,86 +829,63 @@ public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateEmailCustomizationValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call validateEmailCustomizationValidateBeforeCall(final ApiCallback _callback) throws ApiException { return validateEmailCustomizationCall(_callback); + } /** - * Version: 10.10.0.cl or later Validates the email customization configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ public void validateEmailCustomization() throws ApiException { validateEmailCustomizationWithHttpInfo(); } /** - * Version: 10.10.0.cl or later Validates the email customization configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * + * + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ public ApiResponse validateEmailCustomizationWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(null); @@ -1261,30 +893,22 @@ public ApiResponse validateEmailCustomizationWithHttpInfo() throws ApiExce } /** - * (asynchronously) Version: 10.10.0.cl or later Validates the email customization configuration - * if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` - * (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * + * (asynchronously) + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(_callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java index 53d8d0131..53ab29e7d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java @@ -4,7 +4,6 @@ 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; @@ -12,21 +11,29 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateUserGroupRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ImportUserGroupsRequest; import com.thoughtspot.client.model.ImportUserGroupsResponse; import com.thoughtspot.client.model.SearchUserGroupsRequest; import com.thoughtspot.client.model.UpdateUserGroupRequest; import com.thoughtspot.client.model.UserGroupResponse; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class GroupsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -85,33 +92,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createUserGroup - * - * @param createUserGroupRequest (required) + * @param createUserGroupRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createUserGroupCall( - CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createUserGroupCall(CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -128,183 +132,133 @@ public okhttp3.Call createUserGroupCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUserGroupValidateBeforeCall( - CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createUserGroupValidateBeforeCall(CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createUserGroupRequest' is set if (createUserGroupRequest == null) { - throw new ApiException( - "Missing the required parameter 'createUserGroupRequest' when calling" - + " createUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'createUserGroupRequest' when calling createUserGroup(Async)"); } return createUserGroupCall(createUserGroupRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard - * - * @param createUserGroupRequest (required) + * + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest (required) * @return UserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public UserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - createUserGroupWithHttpInfo(createUserGroupRequest); + public UserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) throws ApiException { + ApiResponse localVarResp = createUserGroupWithHttpInfo(createUserGroupRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard - * - * @param createUserGroupRequest (required) + * + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest (required) * @return ApiResponse<UserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createUserGroupWithHttpInfo( - CreateUserGroupRequest createUserGroupRequest) throws ApiException { + public ApiResponse createUserGroupWithHttpInfo(CreateUserGroupRequest createUserGroupRequest) throws ApiException { okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard - * - * @param createUserGroupRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createUserGroupAsync( - CreateUserGroupRequest createUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createUserGroupAsync(CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteUserGroup - * * @param groupIdentifier GUID or name of the group. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -313,11 +267,8 @@ public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallbac Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/groups/{group_identifier}/delete" - .replace( - "{" + "group_identifier" + "}", - localVarApiClient.escapeString(groupIdentifier.toString())); + String localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete" + .replace("{" + "group_identifier" + "}", localVarApiClient.escapeString(groupIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -325,125 +276,97 @@ public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallbac Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserGroupValidateBeforeCall( - String groupIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserGroupValidateBeforeCall(String groupIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupIdentifier' is set if (groupIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'groupIdentifier' when calling" - + " deleteUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'groupIdentifier' when calling deleteUserGroup(Async)"); } return deleteUserGroupCall(groupIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * @param groupIdentifier GUID or name of the group. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteUserGroup(String groupIdentifier) throws ApiException { deleteUserGroupWithHttpInfo(groupIdentifier); } /** - * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * @param groupIdentifier GUID or name of the group. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteUserGroupWithHttpInfo(String groupIdentifier) - throws ApiException { + public ApiResponse deleteUserGroupWithHttpInfo(String groupIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Removes the specified group object from the - * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * @param groupIdentifier GUID or name of the group. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteUserGroupAsync( - String groupIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserGroupAsync(String groupIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -451,33 +374,30 @@ public okhttp3.Call deleteUserGroupAsync( } /** * Build call for importUserGroups - * - * @param importUserGroupsRequest (required) + * @param importUserGroupsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importUserGroupsCall( - ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call importUserGroupsCall(ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -494,189 +414,133 @@ public okhttp3.Call importUserGroupsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importUserGroupsValidateBeforeCall( - ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importUserGroupsValidateBeforeCall(ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importUserGroupsRequest' is set if (importUserGroupsRequest == null) { - throw new ApiException( - "Missing the required parameter 'importUserGroupsRequest' when calling" - + " importUserGroups(Async)"); + throw new ApiException("Missing the required parameter 'importUserGroupsRequest' when calling importUserGroups(Async)"); } return importUserGroupsCall(importUserGroupsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. During the import operation: * If the specified group is not available in - * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is - * set to `true`, the groups not specified in the API request, excluding administrator - * and system user groups, are deleted. * If the specified groups are already available in - * ThoughtSpot, the object properties of these groups are modified and synchronized as per the - * input data in the API request. A successful API call returns the object that represents the - * changes made in the ThoughtSpot system. - * - * @param importUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest (required) * @return ImportUserGroupsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ImportUserGroupsResponse importUserGroups( - ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { - ApiResponse localVarResp = - importUserGroupsWithHttpInfo(importUserGroupsRequest); + public ImportUserGroupsResponse importUserGroups(ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + ApiResponse localVarResp = importUserGroupsWithHttpInfo(importUserGroupsRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. During the import operation: * If the specified group is not available in - * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is - * set to `true`, the groups not specified in the API request, excluding administrator - * and system user groups, are deleted. * If the specified groups are already available in - * ThoughtSpot, the object properties of these groups are modified and synchronized as per the - * input data in the API request. A successful API call returns the object that represents the - * changes made in the ThoughtSpot system. - * - * @param importUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest (required) * @return ApiResponse<ImportUserGroupsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse importUserGroupsWithHttpInfo( - ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = - importUserGroupsValidateBeforeCall(importUserGroupsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse importUserGroupsWithHttpInfo(ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = importUserGroupsValidateBeforeCall(importUserGroupsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Imports group objects from external databases - * into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the - * import operation: * If the specified group is not available in ThoughtSpot, it will be added - * to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the - * groups not specified in the API request, excluding administrator and system user groups, are - * deleted. * If the specified groups are already available in ThoughtSpot, the object - * properties of these groups are modified and synchronized as per the input data in the API - * request. A successful API call returns the object that represents the changes made in the - * ThoughtSpot system. - * - * @param importUserGroupsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importUserGroupsAsync( - ImportUserGroupsRequest importUserGroupsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - importUserGroupsValidateBeforeCall(importUserGroupsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call importUserGroupsAsync(ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = importUserGroupsValidateBeforeCall(importUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchUserGroups - * - * @param searchUserGroupsRequest (required) + * @param searchUserGroupsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchUserGroupsCall( - SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchUserGroupsCall(SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -693,188 +557,134 @@ public okhttp3.Call searchUserGroupsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUserGroupsValidateBeforeCall( - SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchUserGroupsValidateBeforeCall(SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchUserGroupsRequest' is set if (searchUserGroupsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchUserGroupsRequest' when calling" - + " searchUserGroups(Async)"); + throw new ApiException("Missing the required parameter 'searchUserGroupsRequest' when calling searchUserGroups(Async)"); } return searchUserGroupsCall(searchUserGroupsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To - * get details of a specific user group, specify the user group GUID or name. You can also - * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, - * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. - * Available to all users. Users with `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If - * you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. - * - * @param searchUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest (required) * @return List<UserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchUserGroups(SearchUserGroupsRequest searchUserGroupsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchUserGroupsWithHttpInfo(searchUserGroupsRequest); + public List searchUserGroups(SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { + ApiResponse> localVarResp = searchUserGroupsWithHttpInfo(searchUserGroupsRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To - * get details of a specific user group, specify the user group GUID or name. You can also - * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, - * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. - * Available to all users. Users with `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If - * you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. - * - * @param searchUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest (required) * @return ApiResponse<List<UserGroupResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchUserGroupsWithHttpInfo( - SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = - searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> searchUserGroupsWithHttpInfo(SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of user group objects from the - * ThoughtSpot system. To get details of a specific user group, specify the user group GUID or - * name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, - * sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the - * users in the group. Available to all users. Users with `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: - * If you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. - * - * @param searchUserGroupsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchUserGroupsAsync( - SearchUserGroupsRequest searchUserGroupsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchUserGroupsAsync(SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateUserGroup - * * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) + * @param updateUserGroupRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateUserGroupCall( - String groupIdentifier, - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateUserGroupCall(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -883,11 +693,8 @@ public okhttp3.Call updateUserGroupCall( Object localVarPostBody = updateUserGroupRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/groups/{group_identifier}/update" - .replace( - "{" + "group_identifier" + "}", - localVarApiClient.escapeString(groupIdentifier.toString())); + String localVarPath = "/api/rest/2.0/groups/{group_identifier}/update" + .replace("{" + "group_identifier" + "}", localVarApiClient.escapeString(groupIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -895,161 +702,108 @@ public okhttp3.Call updateUserGroupCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserGroupValidateBeforeCall( - String groupIdentifier, - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateUserGroupValidateBeforeCall(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupIdentifier' is set if (groupIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'groupIdentifier' when calling" - + " updateUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'groupIdentifier' when calling updateUserGroup(Async)"); } // verify the required parameter 'updateUserGroupRequest' is set if (updateUserGroupRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateUserGroupRequest' when calling" - + " updateUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'updateUserGroupRequest' when calling updateUserGroup(Async)"); } return updateUserGroupCall(groupIdentifier, updateUserGroupRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * Supported operations This API endpoint lets you perform the following operations in a single - * API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings - * + * + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateUserGroupRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateUserGroup( - String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) - throws ApiException { + public void updateUserGroup(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) throws ApiException { updateUserGroupWithHttpInfo(groupIdentifier, updateUserGroupRequest); } /** - * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * Supported operations This API endpoint lets you perform the following operations in a single - * API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings - * + * + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) + * @param updateUserGroupRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateUserGroupWithHttpInfo( - String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, null); + public ApiResponse updateUserGroupWithHttpInfo(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) throws ApiException { + okhttp3.Call localVarCall = updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a group object in - * ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) - * privilege is required. #### Supported operations This API endpoint lets you perform the - * following operations in a single API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) + * @param updateUserGroupRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateUserGroupAsync( - String groupIdentifier, - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateUserGroupValidateBeforeCall( - groupIdentifier, updateUserGroupRequest, _callback); + public okhttp3.Call updateUserGroupAsync(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java index eb26c1ebc..934b2f3eb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java @@ -4,7 +4,6 @@ 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; @@ -12,17 +11,25 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchLogsRequest; import com.thoughtspot.client.model.LogResponse; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class LogApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -81,32 +88,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for fetchLogs - * - * @param fetchLogsRequest (required) + * @param fetchLogsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchLogsCall( - FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call fetchLogsCall(FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -123,74 +128,53 @@ public okhttp3.Call fetchLogsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchLogsValidateBeforeCall( - FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call fetchLogsValidateBeforeCall(FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchLogsRequest' is set if (fetchLogsRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchLogsRequest' when calling" - + " fetchLogs(Async)"); + throw new ApiException("Missing the required parameter 'fetchLogsRequest' when calling fetchLogs(Async)"); } return fetchLogsCall(fetchLogsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin - * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are - * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You - * can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). - * - * @param fetchLogsRequest (required) + * + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest (required) * @return List<LogResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List fetchLogs(FetchLogsRequest fetchLogsRequest) throws ApiException { ApiResponse> localVarResp = fetchLogsWithHttpInfo(fetchLogsRequest); @@ -198,75 +182,50 @@ public List fetchLogs(FetchLogsRequest fetchLogsRequest) throws Api } /** - * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin - * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are - * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You - * can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). - * - * @param fetchLogsRequest (required) + * + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest (required) * @return ApiResponse<List<LogResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> fetchLogsWithHttpInfo(FetchLogsRequest fetchLogsRequest) - throws ApiException { + public ApiResponse> fetchLogsWithHttpInfo(FetchLogsRequest fetchLogsRequest) throws ApiException { okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches security audit logs. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges - * are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. - * You can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). - * - * @param fetchLogsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchLogsAsync( - FetchLogsRequest fetchLogsRequest, final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call fetchLogsAsync(FetchLogsRequest fetchLogsRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java index 57cf57bd6..34a268ca6 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 @@ -4,7 +4,6 @@ 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; @@ -12,9 +11,18 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.ConvertWorksheetToModelRequest; import com.thoughtspot.client.model.CopyObjectRequest; import com.thoughtspot.client.model.DeleteMetadataRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest; import com.thoughtspot.client.model.ExportMetadataTMLRequest; import com.thoughtspot.client.model.FetchAnswerSqlQueryRequest; @@ -33,15 +41,14 @@ import com.thoughtspot.client.model.UnparameterizeMetadataRequest; import com.thoughtspot.client.model.UpdateMetadataHeaderRequest; import com.thoughtspot.client.model.UpdateMetadataObjIdRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class MetadataApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -100,34 +107,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for convertWorksheetToModel - * - * @param convertWorksheetToModelRequest (required) + * @param convertWorksheetToModelRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call convertWorksheetToModelCall( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call convertWorksheetToModelCall(ConvertWorksheetToModelRequest convertWorksheetToModelRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -144,260 +147,134 @@ public okhttp3.Call convertWorksheetToModelCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call convertWorksheetToModelValidateBeforeCall( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call convertWorksheetToModelValidateBeforeCall(ConvertWorksheetToModelRequest convertWorksheetToModelRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'convertWorksheetToModelRequest' is set if (convertWorksheetToModelRequest == null) { - throw new ApiException( - "Missing the required parameter 'convertWorksheetToModelRequest' when calling" - + " convertWorksheetToModel(Async)"); + throw new ApiException("Missing the required parameter 'convertWorksheetToModelRequest' when calling convertWorksheetToModel(Async)"); } return convertWorksheetToModelCall(convertWorksheetToModelRequest, _callback); + } /** - * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges - * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can - * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage - * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of - * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - - * Used only when `convert_all` is set to `false`. - Leave empty or omit - * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - - * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from - * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and - * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the - * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the - * system, except those specified in `exclude_worksheet_ids`. - `false`: - * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - - * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a - * preview before applying any changes.Used for validation of conversion. - **Options:** - - * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: - * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## - * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before - * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion - * process by setting `convert_all` to `false` and specifying a small number - * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such - * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` - * - * @param convertWorksheetToModelRequest (required) + * + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest (required) * @return ResponseWorksheetToModelConversion - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ResponseWorksheetToModelConversion convertWorksheetToModel( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { - ApiResponse localVarResp = - convertWorksheetToModelWithHttpInfo(convertWorksheetToModelRequest); + public ResponseWorksheetToModelConversion convertWorksheetToModel(ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + ApiResponse localVarResp = convertWorksheetToModelWithHttpInfo(convertWorksheetToModelRequest); return localVarResp.getData(); } /** - * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges - * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can - * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage - * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of - * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - - * Used only when `convert_all` is set to `false`. - Leave empty or omit - * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - - * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from - * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and - * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the - * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the - * system, except those specified in `exclude_worksheet_ids`. - `false`: - * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - - * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a - * preview before applying any changes.Used for validation of conversion. - **Options:** - - * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: - * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## - * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before - * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion - * process by setting `convert_all` to `false` and specifying a small number - * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such - * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` - * - * @param convertWorksheetToModelRequest (required) + * + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest (required) * @return ApiResponse<ResponseWorksheetToModelConversion> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse convertWorksheetToModelWithHttpInfo( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { - okhttp3.Call localVarCall = - convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse convertWorksheetToModelWithHttpInfo(ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + okhttp3.Call localVarCall = convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- - * ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated - * list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - - * **Usage:** - Used only when `convert_all` is set to `false`. - Leave - * empty or omit when `convert_all` is set to `true`. 2. - * **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying - * Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` - * is set to `true` and specific Worksheets should not be converted. 3. - * **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - - * `true`: Converts all Worksheets in the system, except those specified in - * `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed - * in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to - * apply changes directly to ThoughtSpot or to generate a preview before applying any - * changes.Used for validation of conversion. - **Options:** - `true`: Applies - * conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of - * the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup - * Before Conversion:** Always export metadata as a backup before initiating the conversion - * process 2. **Partial Conversion for Testing:** Test the conversion process by setting - * `convert_all` to `false` and specifying a small number of - * `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as - * Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` - * - * @param convertWorksheetToModelRequest (required) + * (asynchronously) + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call convertWorksheetToModelAsync( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - convertWorksheetToModelValidateBeforeCall( - convertWorksheetToModelRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call convertWorksheetToModelAsync(ConvertWorksheetToModelRequest convertWorksheetToModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for copyObject - * - * @param copyObjectRequest (required) + * @param copyObjectRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
*/ - public okhttp3.Call copyObjectCall( - CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call copyObjectCall(CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -414,68 +291,54 @@ public okhttp3.Call copyObjectCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call copyObjectValidateBeforeCall( - CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call copyObjectValidateBeforeCall(CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'copyObjectRequest' is set if (copyObjectRequest == null) { - throw new ApiException( - "Missing the required parameter 'copyObjectRequest' when calling" - + " copyObject(Async)"); + throw new ApiException("Missing the required parameter 'copyObjectRequest' when calling copyObject(Async)"); } return copyObjectCall(copyObjectRequest, _callback); + } /** - * 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. - * - * @param copyObjectRequest (required) + * + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest (required) * @return ResponseCopyObject - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
*/ public ResponseCopyObject copyObject(CopyObjectRequest copyObjectRequest) throws ApiException { ApiResponse localVarResp = copyObjectWithHttpInfo(copyObjectRequest); @@ -483,95 +346,81 @@ 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 - * request and returns the ID of the new object. - * - * @param copyObjectRequest (required) + * + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest (required) * @return ApiResponse<ResponseCopyObject> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
*/ - public ApiResponse copyObjectWithHttpInfo( - CopyObjectRequest copyObjectRequest) throws ApiException { + public ApiResponse copyObjectWithHttpInfo(CopyObjectRequest copyObjectRequest) throws ApiException { okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (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. - * - * @param copyObjectRequest (required) + * (asynchronously) + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
*/ - public okhttp3.Call copyObjectAsync( - CopyObjectRequest copyObjectRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call copyObjectAsync(CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteMetadata - * - * @param deleteMetadataRequest (required) + * @param deleteMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteMetadataCall( - DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteMetadataCall(DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -588,153 +437,129 @@ public okhttp3.Call deleteMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMetadataValidateBeforeCall( - DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteMetadataValidateBeforeCall(DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteMetadataRequest' is set if (deleteMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteMetadataRequest' when calling" - + " deleteMetadata(Async)"); + throw new ApiException("Missing the required parameter 'deleteMetadataRequest' when calling deleteMetadata(Async)"); } return deleteMetadataCall(deleteMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. - * Requires edit access to the metadata object. - * - * @param deleteMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteMetadata(DeleteMetadataRequest deleteMetadataRequest) throws ApiException { deleteMetadataWithHttpInfo(deleteMetadataRequest); } /** - * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. - * Requires edit access to the metadata object. - * - * @param deleteMetadataRequest (required) + * + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteMetadataWithHttpInfo(DeleteMetadataRequest deleteMetadataRequest) - throws ApiException { + public ApiResponse deleteMetadataWithHttpInfo(DeleteMetadataRequest deleteMetadataRequest) throws ApiException { okhttp3.Call localVarCall = deleteMetadataValidateBeforeCall(deleteMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Removes the specified metadata object from the - * ThoughtSpot system. Requires edit access to the metadata object. - * - * @param deleteMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteMetadataAsync( - DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteMetadataAsync(DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteMetadataValidateBeforeCall(deleteMetadataRequest, _callback); + okhttp3.Call localVarCall = deleteMetadataValidateBeforeCall(deleteMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for exportMetadataTML - * - * @param exportMetadataTMLRequest (required) + * @param exportMetadataTMLRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportMetadataTMLCall( - ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call exportMetadataTMLCall(ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -751,229 +576,133 @@ public okhttp3.Call exportMetadataTMLCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportMetadataTMLValidateBeforeCall( - ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportMetadataTMLValidateBeforeCall(ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportMetadataTMLRequest' is set if (exportMetadataTMLRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportMetadataTMLRequest' when calling" - + " exportMetadataTML(Async)"); + throw new ApiException("Missing the required parameter 'exportMetadataTMLRequest' when calling exportMetadataTML(Async)"); } return exportMetadataTMLCall(exportMetadataTMLRequest, _callback); + } /** - * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. Requires - * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata - * object. #### Usage guidelines * You can export one or several objects by passing metadata - * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard - * or Answer object, you can set `export_associated` to `true` to retrieve - * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object - * within the headers. When `export_associated` is set to `true`, consider - * retrieving one metadata object at a time. * Set `export_fqns` to `true` - * to add FQNs of the referenced objects in the TML content. For example, if you send an API - * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML - * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if - * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when - * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the - * referenced objects manually during the import operation. * To export only the TML of - * feedbacks associated with an object, set the GUID of the object as `identifier`, - * and set the `type` as `FEEDBACK` in the `metadata` array. * To - * export the TML of an object along with the feedbacks associated with it, set the GUID of the - * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). - * - * @param exportMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest (required) * @return List<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List exportMetadataTML(ExportMetadataTMLRequest exportMetadataTMLRequest) - throws ApiException { - ApiResponse> localVarResp = - exportMetadataTMLWithHttpInfo(exportMetadataTMLRequest); + public List exportMetadataTML(ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { + ApiResponse> localVarResp = exportMetadataTMLWithHttpInfo(exportMetadataTMLRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. Requires - * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata - * object. #### Usage guidelines * You can export one or several objects by passing metadata - * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard - * or Answer object, you can set `export_associated` to `true` to retrieve - * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object - * within the headers. When `export_associated` is set to `true`, consider - * retrieving one metadata object at a time. * Set `export_fqns` to `true` - * to add FQNs of the referenced objects in the TML content. For example, if you send an API - * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML - * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if - * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when - * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the - * referenced objects manually during the import operation. * To export only the TML of - * feedbacks associated with an object, set the GUID of the object as `identifier`, - * and set the `type` as `FEEDBACK` in the `metadata` array. * To - * export the TML of an object along with the feedbacks associated with it, set the GUID of the - * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). - * - * @param exportMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest (required) * @return ApiResponse<List<Object>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> exportMetadataTMLWithHttpInfo( - ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { - okhttp3.Call localVarCall = - exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> exportMetadataTMLWithHttpInfo(ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Exports the - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in - * JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at - * least view access to the metadata object. #### Usage guidelines * You can export one or - * several objects by passing metadata object GUIDs in the `metadata` array. * When - * exporting TML content for a Liveboard or Answer object, you can set - * `export_associated` to `true` to retrieve TML content for underlying - * Worksheets, Tables, or Views, including the GUID of each object within the headers. When - * `export_associated` is set to `true`, consider retrieving one metadata - * object at a time. * Set `export_fqns` to `true` to add FQNs of the - * referenced objects in the TML content. For example, if you send an API request to retrieve - * TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of - * the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple - * objects with the same name and you want to eliminate ambiguity when importing TML files into - * ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during - * the import operation. * To export only the TML of feedbacks associated with an object, set - * the GUID of the object as `identifier`, and set the `type` as - * `FEEDBACK` in the `metadata` array. * To export the TML of an object - * along with the feedbacks associated with it, set the GUID of the object as - * `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). - * - * @param exportMetadataTMLRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportMetadataTMLAsync( - ExportMetadataTMLRequest exportMetadataTMLRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call exportMetadataTMLAsync(ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for exportMetadataTMLBatched - * - * @param exportMetadataTMLBatchedRequest (required) + * @param exportMetadataTMLBatchedRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportMetadataTMLBatchedCall( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call exportMetadataTMLBatchedCall(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -990,199 +719,133 @@ public okhttp3.Call exportMetadataTMLBatchedCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportMetadataTMLBatchedValidateBeforeCall( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportMetadataTMLBatchedValidateBeforeCall(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportMetadataTMLBatchedRequest' is set if (exportMetadataTMLBatchedRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportMetadataTMLBatchedRequest' when calling" - + " exportMetadataTMLBatched(Async)"); + throw new ApiException("Missing the required parameter 'exportMetadataTMLBatchedRequest' when calling exportMetadataTMLBatched(Async)"); } return exportMetadataTMLBatchedCall(exportMetadataTMLBatchedRequest, _callback); + } /** - * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. ### **Permissions Required** - * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` - * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for - * `USER`, `GROUP`, and `ROLES` metadata types. - - * `batch_offset` Indicates the starting position within the complete dataset from - * which the API should begin returning objects. Useful for paginating results efficiently. - - * `batch_size` Specifies the number of objects or items to retrieve in a single - * request. Helps control response size for better performance. - `edoc_format` - * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - - * `export_dependent` Specifies whether to include dependent metadata objects in the - * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` - * Indicates whether the export operation applies across all organizations. Useful for - * multi-tenant environments where cross-org exports are required. - * - * @param exportMetadataTMLBatchedRequest (required) + * + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest (required) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Object exportMetadataTMLBatched( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { - ApiResponse localVarResp = - exportMetadataTMLBatchedWithHttpInfo(exportMetadataTMLBatchedRequest); + public Object exportMetadataTMLBatched(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + ApiResponse localVarResp = exportMetadataTMLBatchedWithHttpInfo(exportMetadataTMLBatchedRequest); return localVarResp.getData(); } /** - * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. ### **Permissions Required** - * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` - * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for - * `USER`, `GROUP`, and `ROLES` metadata types. - - * `batch_offset` Indicates the starting position within the complete dataset from - * which the API should begin returning objects. Useful for paginating results efficiently. - - * `batch_size` Specifies the number of objects or items to retrieve in a single - * request. Helps control response size for better performance. - `edoc_format` - * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - - * `export_dependent` Specifies whether to include dependent metadata objects in the - * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` - * Indicates whether the export operation applies across all organizations. Useful for - * multi-tenant environments where cross-org exports are required. - * - * @param exportMetadataTMLBatchedRequest (required) + * + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest (required) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse exportMetadataTMLBatchedWithHttpInfo( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { - okhttp3.Call localVarCall = - exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse exportMetadataTMLBatchedWithHttpInfo(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + okhttp3.Call localVarCall = exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.1.0.cl or later Exports the - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in - * JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can - * manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage - * Guidelines** This API is only applicable for `USER`, `GROUP`, and - * `ROLES` metadata types. - `batch_offset` Indicates the starting position - * within the complete dataset from which the API should begin returning objects. Useful for - * paginating results efficiently. - `batch_size` Specifies the number of objects or - * items to retrieve in a single request. Helps control response size for better performance. - - * `edoc_format` Defines the format of the TML content. The exported metadata can be - * in JSON or YAML format. - `export_dependent` Specifies whether to include dependent - * metadata objects in the export. Ensures related objects are also retrieved if needed. - - * `all_orgs_override` Indicates whether the export operation applies across all - * organizations. Useful for multi-tenant environments where cross-org exports are required. - * - * @param exportMetadataTMLBatchedRequest (required) + * (asynchronously) + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportMetadataTMLBatchedAsync( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportMetadataTMLBatchedValidateBeforeCall( - exportMetadataTMLBatchedRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call exportMetadataTMLBatchedAsync(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchAnswerSqlQuery - * - * @param fetchAnswerSqlQueryRequest (required) + * @param fetchAnswerSqlQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchAnswerSqlQueryCall( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchAnswerSqlQueryCall(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1199,235 +862,133 @@ public okhttp3.Call fetchAnswerSqlQueryCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchAnswerSqlQueryValidateBeforeCall( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchAnswerSqlQueryValidateBeforeCall(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchAnswerSqlQueryRequest' is set if (fetchAnswerSqlQueryRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchAnswerSqlQueryRequest' when calling" - + " fetchAnswerSqlQuery(Async)"); + throw new ApiException("Missing the required parameter 'fetchAnswerSqlQueryRequest' when calling fetchAnswerSqlQuery(Async)"); } return fetchAnswerSqlQueryCall(fetchAnswerSqlQueryRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. - * Requires at least view access to the Answer object. Upon successful execution, the API - * returns the SQL queries for the specified object as shown in this example: ``` - * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` - * - * @param fetchAnswerSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest (required) * @return SqlQueryResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public SqlQueryResponse fetchAnswerSqlQuery( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { - ApiResponse localVarResp = - fetchAnswerSqlQueryWithHttpInfo(fetchAnswerSqlQueryRequest); + public SqlQueryResponse fetchAnswerSqlQuery(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = fetchAnswerSqlQueryWithHttpInfo(fetchAnswerSqlQueryRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. - * Requires at least view access to the Answer object. Upon successful execution, the API - * returns the SQL queries for the specified object as shown in this example: ``` - * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` - * - * @param fetchAnswerSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest (required) * @return ApiResponse<SqlQueryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchAnswerSqlQueryWithHttpInfo( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchAnswerSqlQueryWithHttpInfo(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for an - * Answer object. Requires at least view access to the Answer object. Upon successful execution, - * the API returns the SQL queries for the specified object as shown in this example: - * ``` { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` - * - * @param fetchAnswerSqlQueryRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchAnswerSqlQueryAsync( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchAnswerSqlQueryAsync(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchAsyncImportTaskStatus - * - * @param fetchAsyncImportTaskStatusRequest (required) + * @param fetchAsyncImportTaskStatusRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchAsyncImportTaskStatusCall( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchAsyncImportTaskStatusCall(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1444,188 +1005,133 @@ public okhttp3.Call fetchAsyncImportTaskStatusCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchAsyncImportTaskStatusValidateBeforeCall( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchAsyncImportTaskStatusValidateBeforeCall(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchAsyncImportTaskStatusRequest' is set if (fetchAsyncImportTaskStatusRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchAsyncImportTaskStatusRequest' when" - + " calling fetchAsyncImportTaskStatus(Async)"); + throw new ApiException("Missing the required parameter 'fetchAsyncImportTaskStatusRequest' when calling fetchAsyncImportTaskStatus(Async)"); } return fetchAsyncImportTaskStatusCall(fetchAsyncImportTaskStatusRequest, _callback); + } /** - * Version: 10.4.0.cl or later Gets information about the status of the TML async import task - * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch - * the task details, specify the ID of the TML async import task. Requires access to the task - * ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. - * - * @param fetchAsyncImportTaskStatusRequest (required) + * + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest (required) * @return GetAsyncImportStatusResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public GetAsyncImportStatusResponse fetchAsyncImportTaskStatus( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) - throws ApiException { - ApiResponse localVarResp = - fetchAsyncImportTaskStatusWithHttpInfo(fetchAsyncImportTaskStatusRequest); + public GetAsyncImportStatusResponse fetchAsyncImportTaskStatus(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) throws ApiException { + ApiResponse localVarResp = fetchAsyncImportTaskStatusWithHttpInfo(fetchAsyncImportTaskStatusRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Gets information about the status of the TML async import task - * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch - * the task details, specify the ID of the TML async import task. Requires access to the task - * ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. - * - * @param fetchAsyncImportTaskStatusRequest (required) + * + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest (required) * @return ApiResponse<GetAsyncImportStatusResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchAsyncImportTaskStatusWithHttpInfo( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) - throws ApiException { - okhttp3.Call localVarCall = - fetchAsyncImportTaskStatusValidateBeforeCall( - fetchAsyncImportTaskStatusRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchAsyncImportTaskStatusWithHttpInfo(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) throws ApiException { + okhttp3.Call localVarCall = fetchAsyncImportTaskStatusValidateBeforeCall(fetchAsyncImportTaskStatusRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Gets information about the status of the TML - * async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API - * call. To fetch the task details, specify the ID of the TML async import task. Requires access - * to the task ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. - * - * @param fetchAsyncImportTaskStatusRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchAsyncImportTaskStatusAsync( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchAsyncImportTaskStatusValidateBeforeCall( - fetchAsyncImportTaskStatusRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchAsyncImportTaskStatusAsync(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchAsyncImportTaskStatusValidateBeforeCall(fetchAsyncImportTaskStatusRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchLiveboardSqlQuery - * - * @param fetchLiveboardSqlQueryRequest (required) + * @param fetchLiveboardSqlQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchLiveboardSqlQueryCall( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchLiveboardSqlQueryCall(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1642,225 +1148,133 @@ public okhttp3.Call fetchLiveboardSqlQueryCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchLiveboardSqlQueryValidateBeforeCall( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchLiveboardSqlQueryValidateBeforeCall(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchLiveboardSqlQueryRequest' is set if (fetchLiveboardSqlQueryRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchLiveboardSqlQueryRequest' when calling" - + " fetchLiveboardSqlQuery(Async)"); + throw new ApiException("Missing the required parameter 'fetchLiveboardSqlQueryRequest' when calling fetchLiveboardSqlQuery(Async)"); } return fetchLiveboardSqlQueryCall(fetchLiveboardSqlQueryRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and - * its visualizations. Requires at least view access to the Liveboard object. To get SQL query - * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of - * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon - * successful execution, the API returns the SQL queries for the specified object as shown in - * this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` - * - * @param fetchLiveboardSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest (required) * @return SqlQueryResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public SqlQueryResponse fetchLiveboardSqlQuery( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { - ApiResponse localVarResp = - fetchLiveboardSqlQueryWithHttpInfo(fetchLiveboardSqlQueryRequest); + public SqlQueryResponse fetchLiveboardSqlQuery(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = fetchLiveboardSqlQueryWithHttpInfo(fetchLiveboardSqlQueryRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and - * its visualizations. Requires at least view access to the Liveboard object. To get SQL query - * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of - * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon - * successful execution, the API returns the SQL queries for the specified object as shown in - * this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` - * - * @param fetchLiveboardSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest (required) * @return ApiResponse<SqlQueryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchLiveboardSqlQueryWithHttpInfo( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchLiveboardSqlQueryWithHttpInfo(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for a - * Liveboard object and its visualizations. Requires at least view access to the Liveboard - * object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, - * you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations - * in the Liveboard. Upon successful execution, the API returns the SQL queries for the - * specified object as shown in this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` - * - * @param fetchLiveboardSqlQueryRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchLiveboardSqlQueryAsync( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchLiveboardSqlQueryAsync(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importMetadataTML - * - * @param importMetadataTMLRequest (required) + * @param importMetadataTMLRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importMetadataTMLCall( - ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call importMetadataTMLCall(ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1877,223 +1291,133 @@ public okhttp3.Call importMetadataTMLCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importMetadataTMLValidateBeforeCall( - ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importMetadataTMLValidateBeforeCall(ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importMetadataTMLRequest' is set if (importMetadataTMLRequest == null) { - throw new ApiException( - "Missing the required parameter 'importMetadataTMLRequest' when calling" - + " importMetadataTML(Async)"); + throw new ApiException("Missing the required parameter 'importMetadataTMLRequest' when calling importMetadataTML(Async)"); } return importMetadataTMLCall(importMetadataTMLRequest, _callback); + } /** - * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files - * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). - * - * @param importMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest (required) * @return List<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List importMetadataTML(ImportMetadataTMLRequest importMetadataTMLRequest) - throws ApiException { - ApiResponse> localVarResp = - importMetadataTMLWithHttpInfo(importMetadataTMLRequest); + public List importMetadataTML(ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { + ApiResponse> localVarResp = importMetadataTMLWithHttpInfo(importMetadataTMLRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files - * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). - * - * @param importMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest (required) * @return ApiResponse<List<Object>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> importMetadataTMLWithHttpInfo( - ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { - okhttp3.Call localVarCall = - importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> importMetadataTMLWithHttpInfo(ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Imports - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtsSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). - * - * @param importMetadataTMLRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importMetadataTMLAsync( - ImportMetadataTMLRequest importMetadataTMLRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call importMetadataTMLAsync(ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importMetadataTMLAsync - * - * @param importMetadataTMLAsyncRequest (required) + * @param importMetadataTMLAsyncRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importMetadataTMLAsyncCall( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call importMetadataTMLAsyncCall(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2110,204 +1434,133 @@ public okhttp3.Call importMetadataTMLAsyncCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importMetadataTMLAsyncValidateBeforeCall( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importMetadataTMLAsyncValidateBeforeCall(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importMetadataTMLAsyncRequest' is set if (importMetadataTMLAsyncRequest == null) { - throw new ApiException( - "Missing the required parameter 'importMetadataTMLAsyncRequest' when calling" - + " importMetadataTMLAsync(Async)"); + throw new ApiException("Missing the required parameter 'importMetadataTMLAsyncRequest' when calling importMetadataTMLAsync(Async)"); } return importMetadataTMLAsyncCall(importMetadataTMLAsyncRequest, _callback); + } /** - * Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. - * - * @param importMetadataTMLAsyncRequest (required) + * + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest (required) * @return ImportEPackAsyncTaskStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ImportEPackAsyncTaskStatus importMetadataTMLAsync( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { - ApiResponse localVarResp = - importMetadataTMLAsyncWithHttpInfo(importMetadataTMLAsyncRequest); + public ImportEPackAsyncTaskStatus importMetadataTMLAsync(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + ApiResponse localVarResp = importMetadataTMLAsyncWithHttpInfo(importMetadataTMLAsyncRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. - * - * @param importMetadataTMLAsyncRequest (required) + * + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest (required) * @return ApiResponse<ImportEPackAsyncTaskStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse importMetadataTMLAsyncWithHttpInfo( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { - okhttp3.Call localVarCall = - importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse importMetadataTMLAsyncWithHttpInfo(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + okhttp3.Call localVarCall = importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. - * - * @param importMetadataTMLAsyncRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importMetadataTMLAsyncAsync( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call importMetadataTMLAsyncAsync(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for parameterizeMetadata - * - * @param parameterizeMetadataRequest (required) + * @param parameterizeMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call parameterizeMetadataCall( - ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call parameterizeMetadataCall(ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2324,174 +1577,129 @@ public okhttp3.Call parameterizeMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call parameterizeMetadataValidateBeforeCall( - ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call parameterizeMetadataValidateBeforeCall(ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'parameterizeMetadataRequest' is set if (parameterizeMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'parameterizeMetadataRequest' when calling" - + " parameterizeMetadata(Async)"); + throw new ApiException("Missing the required parameter 'parameterizeMetadataRequest' when calling parameterizeMetadata(Async)"); } return parameterizeMetadataCall(parameterizeMetadataRequest, _callback); + } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. - * - * @param parameterizeMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. + * @param parameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) - throws ApiException { + public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { parameterizeMetadataWithHttpInfo(parameterizeMetadataRequest); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. - * - * @param parameterizeMetadataRequest (required) + * + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. + * @param parameterizeMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse parameterizeMetadataWithHttpInfo( - ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = - parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, null); + public ApiResponse parameterizeMetadataWithHttpInfo(ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows - * parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to - * modify the metadata object. The API endpoint allows parameterizing the following types of - * metadata objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. - * - * @param parameterizeMetadataRequest (required) + * (asynchronously) + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. + * @param parameterizeMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call parameterizeMetadataAsync( - ParameterizeMetadataRequest parameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call parameterizeMetadataAsync(ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, _callback); + okhttp3.Call localVarCall = parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for searchMetadata - * - * @param searchMetadataRequest (required) + * @param searchMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchMetadataCall( - SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchMetadataCall(SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2508,239 +1716,133 @@ public okhttp3.Call searchMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchMetadataValidateBeforeCall( - SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchMetadataValidateBeforeCall(SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchMetadataRequest' is set if (searchMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchMetadataRequest' when calling" - + " searchMetadata(Async)"); + throw new ApiException("Missing the required parameter 'searchMetadataRequest' when calling searchMetadata(Async)"); } return searchMetadataCall(searchMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot - * system. This API endpoint is available to all users who have view access to the object. Users - * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for - * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata - * objects, send the API request without any attributes. - To get metadata objects of a specific - * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as - * `LOGICAL_TABLE`. - To filter metadata objects within type - * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. - * - * @param searchMetadataRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest (required) * @return List<MetadataSearchResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchMetadata(SearchMetadataRequest searchMetadataRequest) - throws ApiException { - ApiResponse> localVarResp = - searchMetadataWithHttpInfo(searchMetadataRequest); + public List searchMetadata(SearchMetadataRequest searchMetadataRequest) throws ApiException { + ApiResponse> localVarResp = searchMetadataWithHttpInfo(searchMetadataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot - * system. This API endpoint is available to all users who have view access to the object. Users - * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for - * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata - * objects, send the API request without any attributes. - To get metadata objects of a specific - * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as - * `LOGICAL_TABLE`. - To filter metadata objects within type - * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. - * - * @param searchMetadataRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest (required) * @return ApiResponse<List<MetadataSearchResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchMetadataWithHttpInfo( - SearchMetadataRequest searchMetadataRequest) throws ApiException { + public ApiResponse> searchMetadataWithHttpInfo(SearchMetadataRequest searchMetadataRequest) throws ApiException { okhttp3.Call localVarCall = searchMetadataValidateBeforeCall(searchMetadataRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of metadata objects available on the - * ThoughtSpot system. This API endpoint is available to all users who have view access to the - * object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can - * view data for all metadata objects, including users and groups. #### Usage guidelines - To - * get all metadata objects, send the API request without any attributes. - To get metadata - * objects of a specific type, set the `type` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within - * type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch - * a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. - * - * @param searchMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchMetadataAsync( - SearchMetadataRequest searchMetadataRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchMetadataValidateBeforeCall(searchMetadataRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchMetadataAsync(SearchMetadataRequest searchMetadataRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchMetadataValidateBeforeCall(searchMetadataRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for unparameterizeMetadata - * - * @param unparameterizeMetadataRequest (required) + * @param unparameterizeMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call unparameterizeMetadataCall( - UnparameterizeMetadataRequest unparameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call unparameterizeMetadataCall(UnparameterizeMetadataRequest unparameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2757,175 +1859,129 @@ public okhttp3.Call unparameterizeMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call unparameterizeMetadataValidateBeforeCall( - UnparameterizeMetadataRequest unparameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call unparameterizeMetadataValidateBeforeCall(UnparameterizeMetadataRequest unparameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'unparameterizeMetadataRequest' is set if (unparameterizeMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'unparameterizeMetadataRequest' when calling" - + " unparameterizeMetadata(Async)"); + throw new ApiException("Missing the required parameter 'unparameterizeMetadataRequest' when calling unparameterizeMetadata(Async)"); } return unparameterizeMetadataCall(unparameterizeMetadataRequest, _callback); + } /** - * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows - * removing parameterization from fields in metadata objects in ThoughtSpot. Requires - * appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. - * - * @param unparameterizeMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. + * @param unparameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void unparameterizeMetadata(UnparameterizeMetadataRequest unparameterizeMetadataRequest) - throws ApiException { + public void unparameterizeMetadata(UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { unparameterizeMetadataWithHttpInfo(unparameterizeMetadataRequest); } /** - * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows - * removing parameterization from fields in metadata objects in ThoughtSpot. Requires - * appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. - * - * @param unparameterizeMetadataRequest (required) + * + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. + * @param unparameterizeMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse unparameterizeMetadataWithHttpInfo( - UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = - unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, null); + public ApiResponse unparameterizeMetadataWithHttpInfo(UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Remove parameterization from fields in metadata objects. Version: 10.9.0.cl - * or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. - * Requires appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. - * - * @param unparameterizeMetadataRequest (required) + * (asynchronously) + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. + * @param unparameterizeMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call unparameterizeMetadataAsync( - UnparameterizeMetadataRequest unparameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call unparameterizeMetadataAsync(UnparameterizeMetadataRequest unparameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, _callback); + okhttp3.Call localVarCall = unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateMetadataHeader - * - * @param updateMetadataHeaderRequest (required) + * @param updateMetadataHeaderRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateMetadataHeaderCall( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateMetadataHeaderCall(UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2942,258 +1998,129 @@ public okhttp3.Call updateMetadataHeaderCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateMetadataHeaderValidateBeforeCall( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateMetadataHeaderValidateBeforeCall(UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateMetadataHeaderRequest' is set if (updateMetadataHeaderRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateMetadataHeaderRequest' when calling" - + " updateMetadataHeader(Async)"); + throw new ApiException("Missing the required parameter 'updateMetadataHeaderRequest' when calling updateMetadataHeader(Async)"); } return updateMetadataHeaderCall(updateMetadataHeaderRequest, _callback); + } /** - * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **headers_update** - **Description:** List of header objects with their - * attributes to be updated. Each object contains a list of attributes to be updated in the - * header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` - * - * @param updateMetadataHeaderRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateMetadataHeader(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) - throws ApiException { + public void updateMetadataHeader(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { updateMetadataHeaderWithHttpInfo(updateMetadataHeaderRequest); } /** - * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **headers_update** - **Description:** List of header objects with their - * attributes to be updated. Each object contains a list of attributes to be updated in the - * header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` - * - * @param updateMetadataHeaderRequest (required) + * + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateMetadataHeaderWithHttpInfo( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { - okhttp3.Call localVarCall = - updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, null); + public ApiResponse updateMetadataHeaderWithHttpInfo(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { + okhttp3.Call localVarCall = updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update header attributes for a given list of header objects. Version: - * 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` - * (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional - * Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## - * Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header - * objects with their attributes to be updated. Each object contains a list of attributes to be - * updated in the header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` - * - * @param updateMetadataHeaderRequest (required) + * (asynchronously) + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateMetadataHeaderAsync( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateMetadataHeaderAsync(UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, _callback); + okhttp3.Call localVarCall = updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateMetadataObjId - * - * @param updateMetadataObjIdRequest (required) + * @param updateMetadataObjIdRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateMetadataObjIdCall( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateMetadataObjIdCall(UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -3210,211 +2137,100 @@ public okhttp3.Call updateMetadataObjIdCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateMetadataObjIdValidateBeforeCall( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateMetadataObjIdValidateBeforeCall(UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateMetadataObjIdRequest' is set if (updateMetadataObjIdRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateMetadataObjIdRequest' when calling" - + " updateMetadataObjId(Async)"); + throw new ApiException("Missing the required parameter 'updateMetadataObjIdRequest' when calling updateMetadataObjId(Async)"); } return updateMetadataObjIdCall(updateMetadataObjIdRequest, _callback); + } /** - * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` - * - * @param updateMetadataObjIdRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateMetadataObjId(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) - throws ApiException { + public void updateMetadataObjId(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { updateMetadataObjIdWithHttpInfo(updateMetadataObjIdRequest); } /** - * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` - * - * @param updateMetadataObjIdRequest (required) + * + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateMetadataObjIdWithHttpInfo( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { - okhttp3.Call localVarCall = - updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, null); + public ApiResponse updateMetadataObjIdWithHttpInfo(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { + okhttp3.Call localVarCall = updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` - * - * @param updateMetadataObjIdRequest (required) + * (asynchronously) + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateMetadataObjIdAsync( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateMetadataObjIdAsync(UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, _callback); + okhttp3.Call localVarCall = updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java index 8733272e5..6f253a333 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java @@ -4,7 +4,6 @@ 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; @@ -12,19 +11,27 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateOrgRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.OrgResponse; import com.thoughtspot.client.model.SearchOrgsRequest; import com.thoughtspot.client.model.UpdateOrgRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class OrgsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -83,32 +90,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createOrg - * - * @param createOrgRequest (required) + * @param createOrgRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createOrgCall( - CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createOrgCall(CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -125,69 +130,53 @@ public okhttp3.Call createOrgCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createOrgValidateBeforeCall( - CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createOrgValidateBeforeCall(CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createOrgRequest' is set if (createOrgRequest == null) { - throw new ApiException( - "Missing the required parameter 'createOrgRequest' when calling" - + " createOrg(Async)"); + throw new ApiException("Missing the required parameter 'createOrgRequest' when calling createOrg(Async)"); } return createOrgCall(createOrgRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. - * - * @param createOrgRequest (required) + * + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest (required) * @return OrgResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public OrgResponse createOrg(CreateOrgRequest createOrgRequest) throws ApiException { ApiResponse localVarResp = createOrgWithHttpInfo(createOrgRequest); @@ -195,96 +184,79 @@ public OrgResponse createOrg(CreateOrgRequest createOrgRequest) throws ApiExcept } /** - * Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. - * - * @param createOrgRequest (required) + * + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest (required) * @return ApiResponse<OrgResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createOrgWithHttpInfo(CreateOrgRequest createOrgRequest) - throws ApiException { + public ApiResponse createOrgWithHttpInfo(CreateOrgRequest createOrgRequest) throws ApiException { okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. - * - * @param createOrgRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createOrgAsync( - CreateOrgRequest createOrgRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createOrgAsync(CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteOrg - * * @param orgIdentifier ID or name of the Org (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -293,11 +265,8 @@ public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/orgs/{org_identifier}/delete" - .replace( - "{" + "org_identifier" + "}", - localVarApiClient.escapeString(orgIdentifier.toString())); + String localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete" + .replace("{" + "org_identifier" + "}", localVarApiClient.escapeString(orgIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -305,96 +274,72 @@ public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOrgValidateBeforeCall( - String orgIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteOrgValidateBeforeCall(String orgIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'orgIdentifier' is set if (orgIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'orgIdentifier' when calling deleteOrg(Async)"); + throw new ApiException("Missing the required parameter 'orgIdentifier' when calling deleteOrg(Async)"); } return deleteOrgCall(orgIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires - * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete - * an Org, all its users and objects created in that Org context are removed. However, if the - * users in the deleted Org also exists in other Orgs, they are removed only from the deleted - * Org. - * + * + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * @param orgIdentifier ID or name of the Org (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteOrg(String orgIdentifier) throws ApiException { deleteOrgWithHttpInfo(orgIdentifier); } /** - * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires - * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete - * an Org, all its users and objects created in that Org context are removed. However, if the - * users in the deleted Org also exists in other Orgs, they are removed only from the deleted - * Org. - * + * + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * @param orgIdentifier ID or name of the Org (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteOrgWithHttpInfo(String orgIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, null); @@ -402,32 +347,24 @@ public ApiResponse deleteOrgWithHttpInfo(String orgIdentifier) throws ApiE } /** - * (asynchronously) Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot - * system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based - * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your - * instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * When you delete an Org, all its users and objects created in that Org context are removed. - * However, if the users in the deleted Org also exists in other Orgs, they are removed only - * from the deleted Org. - * + * (asynchronously) + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * @param orgIdentifier ID or name of the Org (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -435,32 +372,30 @@ public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback } /** * Build call for searchOrgs - * - * @param searchOrgsRequest (required) + * @param searchOrgsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchOrgsCall( - SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchOrgsCall(SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -477,69 +412,53 @@ public okhttp3.Call searchOrgsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchOrgsValidateBeforeCall( - SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchOrgsValidateBeforeCall(SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchOrgsRequest' is set if (searchOrgsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchOrgsRequest' when calling" - + " searchOrgs(Async)"); + throw new ApiException("Missing the required parameter 'searchOrgsRequest' when calling searchOrgs(Async)"); } return searchOrgsCall(searchOrgsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get - * details of a specific Org, specify the Org ID or name. You can also pass parameters such as - * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster - * administration (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * - * @param searchOrgsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest (required) * @return List<OrgResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List searchOrgs(SearchOrgsRequest searchOrgsRequest) throws ApiException { ApiResponse> localVarResp = searchOrgsWithHttpInfo(searchOrgsRequest); @@ -547,98 +466,80 @@ public List searchOrgs(SearchOrgsRequest searchOrgsRequest) throws } /** - * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get - * details of a specific Org, specify the Org ID or name. You can also pass parameters such as - * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster - * administration (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * - * @param searchOrgsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest (required) * @return ApiResponse<List<OrgResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchOrgsWithHttpInfo( - SearchOrgsRequest searchOrgsRequest) throws ApiException { + public ApiResponse> searchOrgsWithHttpInfo(SearchOrgsRequest searchOrgsRequest) throws ApiException { okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot - * system. To get details of a specific Org, specify the Org ID or name. You can also pass - * parameters such as status, visibility, and user identifiers to get a specific list of Orgs. - * Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * - * @param searchOrgsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchOrgsAsync( - SearchOrgsRequest searchOrgsRequest, final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call searchOrgsAsync(SearchOrgsRequest searchOrgsRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateOrg - * * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) + * @param updateOrgRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateOrgCall( - String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateOrgCall(String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -647,11 +548,8 @@ public okhttp3.Call updateOrgCall( Object localVarPostBody = updateOrgRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/orgs/{org_identifier}/update" - .replace( - "{" + "org_identifier" + "}", - localVarApiClient.escapeString(orgIdentifier.toString())); + String localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update" + .replace("{" + "org_identifier" + "}", localVarApiClient.escapeString(orgIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -659,143 +557,108 @@ public okhttp3.Call updateOrgCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateOrgValidateBeforeCall( - String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateOrgValidateBeforeCall(String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'orgIdentifier' is set if (orgIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'orgIdentifier' when calling updateOrg(Async)"); + throw new ApiException("Missing the required parameter 'orgIdentifier' when calling updateOrg(Async)"); } // verify the required parameter 'updateOrgRequest' is set if (updateOrgRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateOrgRequest' when calling" - + " updateOrg(Async)"); + throw new ApiException("Missing the required parameter 'updateOrgRequest' when calling updateOrg(Async)"); } return updateOrgCall(orgIdentifier, updateOrgRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, - * description, and user associations. Requires cluster administration (**Can administer Org**) - * privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * + * + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateOrgRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateOrg(String orgIdentifier, UpdateOrgRequest updateOrgRequest) - throws ApiException { + public void updateOrg(String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { updateOrgWithHttpInfo(orgIdentifier, updateOrgRequest); } /** - * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, - * description, and user associations. Requires cluster administration (**Can administer Org**) - * privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * + * + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) + * @param updateOrgRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateOrgWithHttpInfo( - String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { - okhttp3.Call localVarCall = - updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, null); + public ApiResponse updateOrgWithHttpInfo(String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { + okhttp3.Call localVarCall = updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates an Org object. You can modify Org - * properties such as name, description, and user associations. Requires cluster administration - * (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) + * @param updateOrgRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateOrgAsync( - String orgIdentifier, - UpdateOrgRequest updateOrgRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, _callback); + public okhttp3.Call updateOrgAsync(String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java index b117c233d..0c57908e9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java @@ -4,7 +4,6 @@ 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; @@ -12,18 +11,26 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ExportAnswerReportRequest; import com.thoughtspot.client.model.ExportLiveboardReportRequest; import java.io.File; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ReportsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -82,33 +89,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for exportAnswerReport - * - * @param exportAnswerReportRequest (required) + * @param exportAnswerReportRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportAnswerReportCall( - ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call exportAnswerReportCall(ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -125,180 +129,134 @@ public okhttp3.Call exportAnswerReportCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportAnswerReportValidateBeforeCall( - ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportAnswerReportValidateBeforeCall(ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportAnswerReportRequest' is set if (exportAnswerReportRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportAnswerReportRequest' when calling" - + " exportAnswerReport(Async)"); + throw new ApiException("Missing the required parameter 'exportAnswerReportRequest' when calling exportAnswerReport(Async)"); } return exportAnswerReportCall(exportAnswerReportRequest, _callback); + } /** - * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the - * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. - * #### Usage guidelines In the request body, the GUID or name of the Answer and set - * `file_format`. The default file format is CSV. **NOTE**: * The downloadable file - * returned in API response file is extensionless. Please rename the downloaded file by typing - * in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with - * tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. - * - * @param exportAnswerReportRequest (required) + * + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest (required) * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public File exportAnswerReport(ExportAnswerReportRequest exportAnswerReportRequest) - throws ApiException { + public File exportAnswerReport(ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { ApiResponse localVarResp = exportAnswerReportWithHttpInfo(exportAnswerReportRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the - * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. - * #### Usage guidelines In the request body, the GUID or name of the Answer and set - * `file_format`. The default file format is CSV. **NOTE**: * The downloadable file - * returned in API response file is extensionless. Please rename the downloaded file by typing - * in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with - * tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. - * - * @param exportAnswerReportRequest (required) + * + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest (required) * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse exportAnswerReportWithHttpInfo( - ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { - okhttp3.Call localVarCall = - exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse exportAnswerReportWithHttpInfo(ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { + okhttp3.Call localVarCall = exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Exports an Answer in the given file format. You - * can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access - * to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and - * set `file_format`. The default file format is CSV. **NOTE**: * The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. * HTML rendering is not supported for PDF exports of - * Answers with tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. - * - * @param exportAnswerReportRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportAnswerReportAsync( - ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call exportAnswerReportAsync(ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + okhttp3.Call localVarCall = exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for exportLiveboardReport - * - * @param exportLiveboardReportRequest (required) + * @param exportLiveboardReportRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportLiveboardReportCall( - ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call exportLiveboardReportCall(ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -315,186 +273,105 @@ public okhttp3.Call exportLiveboardReportCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportLiveboardReportValidateBeforeCall( - ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportLiveboardReportValidateBeforeCall(ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportLiveboardReportRequest' is set if (exportLiveboardReportRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportLiveboardReportRequest' when calling" - + " exportLiveboardReport(Async)"); + throw new ApiException("Missing the required parameter 'exportLiveboardReportRequest' when calling exportLiveboardReport(Async)"); } return exportLiveboardReportCall(exportLiveboardReportRequest, _callback); + } /** - * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file - * format. Requires at least view access to the Liveboard. #### Usage guidelines In the request - * body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific - * visualizations, add GUIDs or names of the visualizations. The default `file_format` - * is PDF. For PDF downloads, you can specify additional parameters to customize the page - * orientation and include or exclude the cover page, logo, footer text, and page numbers. - * Similar customization options are also available for PNG output. **NOTE**: The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. - * - * @param exportLiveboardReportRequest (required) + * + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. + * @param exportLiveboardReportRequest (required) * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public File exportLiveboardReport(ExportLiveboardReportRequest exportLiveboardReportRequest) - throws ApiException { - ApiResponse localVarResp = - exportLiveboardReportWithHttpInfo(exportLiveboardReportRequest); + public File exportLiveboardReport(ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { + ApiResponse localVarResp = exportLiveboardReportWithHttpInfo(exportLiveboardReportRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file - * format. Requires at least view access to the Liveboard. #### Usage guidelines In the request - * body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific - * visualizations, add GUIDs or names of the visualizations. The default `file_format` - * is PDF. For PDF downloads, you can specify additional parameters to customize the page - * orientation and include or exclude the cover page, logo, footer text, and page numbers. - * Similar customization options are also available for PNG output. **NOTE**: The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. - * - * @param exportLiveboardReportRequest (required) + * + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. + * @param exportLiveboardReportRequest (required) * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse exportLiveboardReportWithHttpInfo( - ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { - okhttp3.Call localVarCall = - exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse exportLiveboardReportWithHttpInfo(ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { + okhttp3.Call localVarCall = exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF - * or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In - * the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report - * with specific visualizations, add GUIDs or names of the visualizations. The default - * `file_format` is PDF. For PDF downloads, you can specify additional parameters to - * customize the page orientation and include or exclude the cover page, logo, footer text, and - * page numbers. Similar customization options are also available for PNG output. **NOTE**: The - * downloadable file returned in API response file is extensionless. Please rename the - * downloaded file by typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. - * - * @param exportLiveboardReportRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. + * @param exportLiveboardReportRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call exportLiveboardReportAsync( - ExportLiveboardReportRequest exportLiveboardReportRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call exportLiveboardReportAsync(ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java index 63c7d2bb1..6a948c5c9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java @@ -4,7 +4,6 @@ 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; @@ -12,20 +11,28 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateRoleRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.RoleResponse; import com.thoughtspot.client.model.SearchRoleResponse; import com.thoughtspot.client.model.SearchRolesRequest; import com.thoughtspot.client.model.UpdateRoleRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class RolesApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -84,32 +91,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createRole - * - * @param createRoleRequest (required) + * @param createRoleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public okhttp3.Call createRoleCall( - CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createRoleCall(CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -126,67 +131,53 @@ public okhttp3.Call createRoleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createRoleValidateBeforeCall( - CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createRoleValidateBeforeCall(CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createRoleRequest' is set if (createRoleRequest == null) { - throw new ApiException( - "Missing the required parameter 'createRoleRequest' when calling" - + " createRole(Async)"); + throw new ApiException("Missing the required parameter 'createRoleRequest' when calling createRole(Async)"); } return createRoleCall(createRoleRequest, _callback); + } /** - * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param createRoleRequest (required) + * + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest (required) * @return RoleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ public RoleResponse createRole(CreateRoleRequest createRoleRequest) throws ApiException { ApiResponse localVarResp = createRoleWithHttpInfo(createRoleRequest); @@ -194,93 +185,79 @@ public RoleResponse createRole(CreateRoleRequest createRoleRequest) throws ApiEx } /** - * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param createRoleRequest (required) + * + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest (required) * @return ApiResponse<RoleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public ApiResponse createRoleWithHttpInfo(CreateRoleRequest createRoleRequest) - throws ApiException { + public ApiResponse createRoleWithHttpInfo(CreateRoleRequest createRoleRequest) throws ApiException { okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available - * only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param createRoleRequest (required) + * (asynchronously) + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public okhttp3.Call createRoleAsync( - CreateRoleRequest createRoleRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createRoleAsync(CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteRole - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -289,11 +266,8 @@ public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _cal Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/roles/{role_identifier}/delete" - .replace( - "{" + "role_identifier" + "}", - localVarApiClient.escapeString(roleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete" + .replace("{" + "role_identifier" + "}", localVarApiClient.escapeString(roleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -301,93 +275,72 @@ public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _cal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRoleValidateBeforeCall( - String roleIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRoleValidateBeforeCall(String roleIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'roleIdentifier' is set if (roleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'roleIdentifier' when calling" - + " deleteRole(Async)"); + throw new ApiException("Missing the required parameter 'roleIdentifier' when calling deleteRole(Async)"); } return deleteRoleCall(roleIdentifier, _callback); + } /** - * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ public void deleteRole(String roleIdentifier) throws ApiException { deleteRoleWithHttpInfo(roleIdentifier); } /** - * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) + * + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ public ApiResponse deleteRoleWithHttpInfo(String roleIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, null); @@ -395,30 +348,24 @@ public ApiResponse deleteRoleWithHttpInfo(String roleIdentifier) throws Ap } /** - * (asynchronously) Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot - * system. Available only if [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete - * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) + * (asynchronously) + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -426,33 +373,30 @@ public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback - * Response Details - * Status Code Description Response Headers - * 200 Roles search result. - - * 400 Invalid request. - - * 401 Unauthorized access. - - * 403 Forbidden access. - - * 500 Internal error - - * + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public okhttp3.Call searchRolesCall( - SearchRolesRequest searchRolesRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchRolesCall(SearchRolesRequest searchRolesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -469,173 +413,134 @@ public okhttp3.Call searchRolesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchRolesValidateBeforeCall( - SearchRolesRequest searchRolesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchRolesValidateBeforeCall(SearchRolesRequest searchRolesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchRolesRequest' is set if (searchRolesRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchRolesRequest' when calling" - + " searchRoles(Async)"); + throw new ApiException("Missing the required parameter 'searchRolesRequest' when calling searchRoles(Async)"); } return searchRolesCall(searchRolesRequest, _callback); + } /** - * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can - * manage roles**) privilege is required. To get details of a specific Role object, specify the - * GUID or name. You can also filter the API response based on user group and Org identifiers, - * privileges assigned to the Role, and deprecation status. - * - * @param searchRolesRequest (required) + * + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest (required) * @return List<SearchRoleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public List searchRoles(SearchRolesRequest searchRolesRequest) - throws ApiException { - ApiResponse> localVarResp = - searchRolesWithHttpInfo(searchRolesRequest); + public List searchRoles(SearchRolesRequest searchRolesRequest) throws ApiException { + ApiResponse> localVarResp = searchRolesWithHttpInfo(searchRolesRequest); return localVarResp.getData(); } /** - * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can - * manage roles**) privilege is required. To get details of a specific Role object, specify the - * GUID or name. You can also filter the API response based on user group and Org identifiers, - * privileges assigned to the Role, and deprecation status. - * - * @param searchRolesRequest (required) + * + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest (required) * @return ApiResponse<List<SearchRoleResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public ApiResponse> searchRolesWithHttpInfo( - SearchRolesRequest searchRolesRequest) throws ApiException { + public ApiResponse> searchRolesWithHttpInfo(SearchRolesRequest searchRolesRequest) throws ApiException { okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot - * system. Available if [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search - * for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. - * To get details of a specific Role object, specify the GUID or name. You can also filter the - * API response based on user group and Org identifiers, privileges assigned to the Role, and - * deprecation status. - * - * @param searchRolesRequest (required) + * (asynchronously) + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ - public okhttp3.Call searchRolesAsync( - SearchRolesRequest searchRolesRequest, - final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call searchRolesAsync(SearchRolesRequest searchRolesRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateRole - * * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateRoleCall( - String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateRoleCall(String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -644,11 +549,8 @@ public okhttp3.Call updateRoleCall( Object localVarPostBody = updateRoleRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/roles/{role_identifier}/update" - .replace( - "{" + "role_identifier" + "}", - localVarApiClient.escapeString(roleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/roles/{role_identifier}/update" + .replace("{" + "role_identifier" + "}", localVarApiClient.escapeString(roleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -656,146 +558,112 @@ public okhttp3.Call updateRoleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateRoleValidateBeforeCall( - String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateRoleValidateBeforeCall(String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'roleIdentifier' is set if (roleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'roleIdentifier' when calling" - + " updateRole(Async)"); + throw new ApiException("Missing the required parameter 'roleIdentifier' when calling updateRole(Async)"); } // verify the required parameter 'updateRoleRequest' is set if (updateRoleRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateRoleRequest' when calling" - + " updateRole(Async)"); + throw new ApiException("Missing the required parameter 'updateRoleRequest' when calling updateRole(Async)"); } return updateRoleCall(roleIdentifier, updateRoleRequest, _callback); + } /** - * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * + * + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @return RoleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public RoleResponse updateRole(String roleIdentifier, UpdateRoleRequest updateRoleRequest) - throws ApiException { - ApiResponse localVarResp = - updateRoleWithHttpInfo(roleIdentifier, updateRoleRequest); + public RoleResponse updateRole(String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { + ApiResponse localVarResp = updateRoleWithHttpInfo(roleIdentifier, updateRoleRequest); return localVarResp.getData(); } /** - * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * + * + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @return ApiResponse<RoleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateRoleWithHttpInfo( - String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { - okhttp3.Call localVarCall = - updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse updateRoleWithHttpInfo(String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { + okhttp3.Call localVarCall = updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.5.0.cl or later Updates the properties of a Role object. - * Available only if [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update - * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. - * + * (asynchronously) + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateRoleAsync( - String roleIdentifier, - UpdateRoleRequest updateRoleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call updateRoleAsync(String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java index c06687ee3..3d8eba96b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java @@ -4,7 +4,6 @@ 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; @@ -12,19 +11,27 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateScheduleRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ResponseSchedule; import com.thoughtspot.client.model.SearchSchedulesRequest; import com.thoughtspot.client.model.UpdateScheduleRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SchedulesApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -83,33 +90,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createSchedule - * - * @param createScheduleRequest (required) + * @param createScheduleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createScheduleCall( - CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createScheduleCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -126,223 +130,133 @@ public okhttp3.Call createScheduleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createScheduleValidateBeforeCall( - CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createScheduleValidateBeforeCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createScheduleRequest' is set if (createScheduleRequest == null) { - throw new ApiException( - "Missing the required parameter 'createScheduleRequest' when calling" - + " createSchedule(Async)"); + throw new ApiException("Missing the required parameter 'createScheduleRequest' when calling createSchedule(Async)"); } return createScheduleCall(createScheduleRequest, _callback); + } /** - * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at - * least edit access to Liveboards. To create a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). - * - * @param createScheduleRequest (required) + * + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest (required) * @return ResponseSchedule - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ResponseSchedule createSchedule(CreateScheduleRequest createScheduleRequest) - throws ApiException { - ApiResponse localVarResp = - createScheduleWithHttpInfo(createScheduleRequest); + public ResponseSchedule createSchedule(CreateScheduleRequest createScheduleRequest) throws ApiException { + ApiResponse localVarResp = createScheduleWithHttpInfo(createScheduleRequest); return localVarResp.getData(); } /** - * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at - * least edit access to Liveboards. To create a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). - * - * @param createScheduleRequest (required) + * + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest (required) * @return ApiResponse<ResponseSchedule> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createScheduleWithHttpInfo( - CreateScheduleRequest createScheduleRequest) throws ApiException { + public ApiResponse createScheduleWithHttpInfo(CreateScheduleRequest createScheduleRequest) throws ApiException { okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule - * job. Requires at least edit access to Liveboards. To create a schedule on behalf of another - * user, you need `ADMINISTRATION` (**Can administer Org**) or - * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the - * Liveboard. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). - * - * @param createScheduleRequest (required) + * (asynchronously) + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createScheduleAsync( - CreateScheduleRequest createScheduleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createScheduleValidateBeforeCall(createScheduleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call createScheduleAsync(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteSchedule - * * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -351,11 +265,8 @@ public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/schedules/{schedule_identifier}/delete" - .replace( - "{" + "schedule_identifier" + "}", - localVarApiClient.escapeString(scheduleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete" + .replace("{" + "schedule_identifier" + "}", localVarApiClient.escapeString(scheduleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -363,125 +274,97 @@ public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteScheduleValidateBeforeCall( - String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteScheduleValidateBeforeCall(String scheduleIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scheduleIdentifier' is set if (scheduleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'scheduleIdentifier' when calling" - + " deleteSchedule(Async)"); + throw new ApiException("Missing the required parameter 'scheduleIdentifier' when calling deleteSchedule(Async)"); } return deleteScheduleCall(scheduleIdentifier, _callback); + } /** - * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. - * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer - * Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. - * + * + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteSchedule(String scheduleIdentifier) throws ApiException { deleteScheduleWithHttpInfo(scheduleIdentifier); } /** - * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. - * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer - * Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. - * + * + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteScheduleWithHttpInfo(String scheduleIdentifier) - throws ApiException { + public ApiResponse deleteScheduleWithHttpInfo(String scheduleIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled - * Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` - * (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. - * + * (asynchronously) + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteScheduleAsync( - String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteScheduleAsync(String scheduleIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -489,33 +372,30 @@ public okhttp3.Call deleteScheduleAsync( } /** * Build call for searchSchedules - * - * @param searchSchedulesRequest (required) + * @param searchSchedulesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchSchedulesCall( - SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchSchedulesCall(SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -532,173 +412,134 @@ public okhttp3.Call searchSchedulesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchSchedulesValidateBeforeCall( - SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchSchedulesValidateBeforeCall(SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchSchedulesRequest' is set if (searchSchedulesRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchSchedulesRequest' when calling" - + " searchSchedules(Async)"); + throw new ApiException("Missing the required parameter 'searchSchedulesRequest' when calling searchSchedules(Async)"); } return searchSchedulesCall(searchSchedulesRequest, _callback); + } /** - * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a - * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the - * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering - * schedules by parameters other than `metadata`, set `record_size` to - * `-1` and `record_offset` to `0` for accurate results. - * - * @param searchSchedulesRequest (required) + * + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest (required) * @return List<ResponseSchedule> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchSchedules(SearchSchedulesRequest searchSchedulesRequest) - throws ApiException { - ApiResponse> localVarResp = - searchSchedulesWithHttpInfo(searchSchedulesRequest); + public List searchSchedules(SearchSchedulesRequest searchSchedulesRequest) throws ApiException { + ApiResponse> localVarResp = searchSchedulesWithHttpInfo(searchSchedulesRequest); return localVarResp.getData(); } /** - * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a - * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the - * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering - * schedules by parameters other than `metadata`, set `record_size` to - * `-1` and `record_offset` to `0` for accurate results. - * - * @param searchSchedulesRequest (required) + * + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest (required) * @return ApiResponse<List<ResponseSchedule>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchSchedulesWithHttpInfo( - SearchSchedulesRequest searchSchedulesRequest) throws ApiException { + public ApiResponse> searchSchedulesWithHttpInfo(SearchSchedulesRequest searchSchedulesRequest) throws ApiException { okhttp3.Call localVarCall = searchSchedulesValidateBeforeCall(searchSchedulesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs - * configured for a Liveboard. To get details of a specific scheduled job, specify the name or - * GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When - * filtering schedules by parameters other than `metadata`, set - * `record_size` to `-1` and `record_offset` to `0` for - * accurate results. - * - * @param searchSchedulesRequest (required) + * (asynchronously) + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchSchedulesAsync( - SearchSchedulesRequest searchSchedulesRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchSchedulesValidateBeforeCall(searchSchedulesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchSchedulesAsync(SearchSchedulesRequest searchSchedulesRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchSchedulesValidateBeforeCall(searchSchedulesRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSchedule - * * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) + * @param updateScheduleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateScheduleCall( - String scheduleIdentifier, - UpdateScheduleRequest updateScheduleRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateScheduleCall(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -707,11 +548,8 @@ public okhttp3.Call updateScheduleCall( Object localVarPostBody = updateScheduleRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/schedules/{schedule_identifier}/update" - .replace( - "{" + "schedule_identifier" + "}", - localVarApiClient.escapeString(scheduleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update" + .replace("{" + "schedule_identifier" + "}", localVarApiClient.escapeString(scheduleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -719,162 +557,108 @@ public okhttp3.Call updateScheduleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateScheduleValidateBeforeCall( - String scheduleIdentifier, - UpdateScheduleRequest updateScheduleRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateScheduleValidateBeforeCall(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scheduleIdentifier' is set if (scheduleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'scheduleIdentifier' when calling" - + " updateSchedule(Async)"); + throw new ApiException("Missing the required parameter 'scheduleIdentifier' when calling updateSchedule(Async)"); } // verify the required parameter 'updateScheduleRequest' is set if (updateScheduleRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateScheduleRequest' when calling" - + " updateSchedule(Async)"); + throw new ApiException("Missing the required parameter 'updateScheduleRequest' when calling updateSchedule(Async)"); } return updateScheduleCall(scheduleIdentifier, updateScheduleRequest, _callback); + } /** - * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at - * least edit access to Liveboards. To update a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. - * + * + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateScheduleRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateSchedule( - String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) - throws ApiException { + public void updateSchedule(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) throws ApiException { updateScheduleWithHttpInfo(scheduleIdentifier, updateScheduleRequest); } /** - * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at - * least edit access to Liveboards. To update a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. - * + * + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) + * @param updateScheduleRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateScheduleWithHttpInfo( - String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, null); + public ApiResponse updateScheduleWithHttpInfo(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) throws ApiException { + okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard - * job. Requires at least edit access to Liveboards. To update a schedule on behalf of another - * user, you need `ADMINISTRATION` (**Can administer Org**) or - * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the - * Liveboard. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. - * + * (asynchronously) + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) + * @param updateScheduleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateScheduleAsync( - String scheduleIdentifier, - UpdateScheduleRequest updateScheduleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateScheduleValidateBeforeCall( - scheduleIdentifier, updateScheduleRequest, _callback); + public okhttp3.Call updateScheduleAsync(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java index bd3fec020..07e80238a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java @@ -4,7 +4,6 @@ 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; @@ -12,8 +11,17 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.AssignChangeAuthorRequest; import com.thoughtspot.client.model.ColumnSecurityRuleResponse; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchColumnSecurityRulesRequest; import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; @@ -23,15 +31,14 @@ import com.thoughtspot.client.model.ShareMetadataRequest; import com.thoughtspot.client.model.UnpublishMetadataRequest; import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SecurityApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -90,33 +97,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for assignChangeAuthor - * - * @param assignChangeAuthorRequest (required) + * @param assignChangeAuthorRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call assignChangeAuthorCall( - AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call assignChangeAuthorCall(AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -133,166 +137,129 @@ public okhttp3.Call assignChangeAuthorCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call assignChangeAuthorValidateBeforeCall( - AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call assignChangeAuthorValidateBeforeCall(AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assignChangeAuthorRequest' is set if (assignChangeAuthorRequest == null) { - throw new ApiException( - "Missing the required parameter 'assignChangeAuthorRequest' when calling" - + " assignChangeAuthor(Async)"); + throw new ApiException("Missing the required parameter 'assignChangeAuthorRequest' when calling assignChangeAuthor(Async)"); } return assignChangeAuthorCall(assignChangeAuthorRequest, _callback); + } /** - * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to - * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and - * edit access to the objects are required. - * - * @param assignChangeAuthorRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void assignChangeAuthor(AssignChangeAuthorRequest assignChangeAuthorRequest) - throws ApiException { + public void assignChangeAuthor(AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { assignChangeAuthorWithHttpInfo(assignChangeAuthorRequest); } /** - * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to - * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and - * edit access to the objects are required. - * - * @param assignChangeAuthorRequest (required) + * + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse assignChangeAuthorWithHttpInfo( - AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { - okhttp3.Call localVarCall = - assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, null); + public ApiResponse assignChangeAuthorWithHttpInfo(AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { + okhttp3.Call localVarCall = assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Transfers the ownership of one or several objects - * from one user to another. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the - * objects are required. - * - * @param assignChangeAuthorRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call assignChangeAuthorAsync( - AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call assignChangeAuthorAsync(AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, _callback); + okhttp3.Call localVarCall = assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for fetchColumnSecurityRules - * - * @param fetchColumnSecurityRulesRequest (required) + * @param fetchColumnSecurityRulesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
*/ - public okhttp3.Call fetchColumnSecurityRulesCall( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchColumnSecurityRulesCall(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -309,230 +276,133 @@ public okhttp3.Call fetchColumnSecurityRulesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchColumnSecurityRulesValidateBeforeCall( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchColumnSecurityRulesValidateBeforeCall(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchColumnSecurityRulesRequest' is set if (fetchColumnSecurityRulesRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchColumnSecurityRulesRequest' when calling" - + " fetchColumnSecurityRules(Async)"); + throw new ApiException("Missing the required parameter 'fetchColumnSecurityRulesRequest' when calling fetchColumnSecurityRules(Async)"); } return fetchColumnSecurityRulesCall(fetchColumnSecurityRulesRequest, _callback); + } /** - * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API - * endpoint retrieves column-level security rules configured for tables. It returns information - * about which columns are secured and which groups have access to those columns. #### Usage - * guidelines - Provide an array of table identifiers using either `identifier` (GUID - * or name) or `obj_identifier` (object ID) - At least one of `identifier` - * or `obj_identifier` must be provided for each table - The API returns column - * security rules for all specified tables - Users must have appropriate permissions to access - * security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` - * - * @param fetchColumnSecurityRulesRequest (required) + * + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest (required) * @return List<ColumnSecurityRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
*/ - public List fetchColumnSecurityRules( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { - ApiResponse> localVarResp = - fetchColumnSecurityRulesWithHttpInfo(fetchColumnSecurityRulesRequest); + public List fetchColumnSecurityRules(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + ApiResponse> localVarResp = fetchColumnSecurityRulesWithHttpInfo(fetchColumnSecurityRulesRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API - * endpoint retrieves column-level security rules configured for tables. It returns information - * about which columns are secured and which groups have access to those columns. #### Usage - * guidelines - Provide an array of table identifiers using either `identifier` (GUID - * or name) or `obj_identifier` (object ID) - At least one of `identifier` - * or `obj_identifier` must be provided for each table - The API returns column - * security rules for all specified tables - Users must have appropriate permissions to access - * security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` - * - * @param fetchColumnSecurityRulesRequest (required) + * + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest (required) * @return ApiResponse<List<ColumnSecurityRuleResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
*/ - public ApiResponse> fetchColumnSecurityRulesWithHttpInfo( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse> fetchColumnSecurityRulesWithHttpInfo(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Fetches column security rules for specified - * tables. This API endpoint retrieves column-level security rules configured for tables. It - * returns information about which columns are secured and which groups have access to those - * columns. #### Usage guidelines - Provide an array of table identifiers using either - * `identifier` (GUID or name) or `obj_identifier` (object ID) - At least - * one of `identifier` or `obj_identifier` must be provided for each table - - * The API returns column security rules for all specified tables - Users must have appropriate - * permissions to access security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` - * - * @param fetchColumnSecurityRulesRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
*/ - public okhttp3.Call fetchColumnSecurityRulesAsync( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchColumnSecurityRulesValidateBeforeCall( - fetchColumnSecurityRulesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call fetchColumnSecurityRulesAsync(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchPermissionsOfPrincipals - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * @param fetchPermissionsOfPrincipalsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchPermissionsOfPrincipalsCall( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchPermissionsOfPrincipalsCall(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -549,182 +419,133 @@ public okhttp3.Call fetchPermissionsOfPrincipalsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchPermissionsOfPrincipalsValidateBeforeCall( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchPermissionsOfPrincipalsValidateBeforeCall(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchPermissionsOfPrincipalsRequest' is set if (fetchPermissionsOfPrincipalsRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchPermissionsOfPrincipalsRequest' when" - + " calling fetchPermissionsOfPrincipals(Async)"); + throw new ApiException("Missing the required parameter 'fetchPermissionsOfPrincipalsRequest' when calling fetchPermissionsOfPrincipals(Async)"); } return fetchPermissionsOfPrincipalsCall(fetchPermissionsOfPrincipalsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches object permission details for a given principal object - * such as a user and group. Requires view access to the metadata object. #### Usage guidelines - * * To get a list of all metadata objects that a user or group can access, specify the - * `type` and GUID or name of the principal. * To get permission details for a - * specific object, add the `type` and GUID or name of the metadata object to your API - * request. Upon successful execution, the API returns a list of metadata objects and permission - * details for each object. - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest (required) * @return PermissionOfPrincipalsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) - throws ApiException { - ApiResponse localVarResp = - fetchPermissionsOfPrincipalsWithHttpInfo(fetchPermissionsOfPrincipalsRequest); + public PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) throws ApiException { + ApiResponse localVarResp = fetchPermissionsOfPrincipalsWithHttpInfo(fetchPermissionsOfPrincipalsRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches object permission details for a given principal object - * such as a user and group. Requires view access to the metadata object. #### Usage guidelines - * * To get a list of all metadata objects that a user or group can access, specify the - * `type` and GUID or name of the principal. * To get permission details for a - * specific object, add the `type` and GUID or name of the metadata object to your API - * request. Upon successful execution, the API returns a list of metadata objects and permission - * details for each object. - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest (required) * @return ApiResponse<PermissionOfPrincipalsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchPermissionsOfPrincipalsWithHttpInfo( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) - throws ApiException { - okhttp3.Call localVarCall = - fetchPermissionsOfPrincipalsValidateBeforeCall( - fetchPermissionsOfPrincipalsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchPermissionsOfPrincipalsWithHttpInfo(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) throws ApiException { + okhttp3.Call localVarCall = fetchPermissionsOfPrincipalsValidateBeforeCall(fetchPermissionsOfPrincipalsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches object permission details for a given - * principal object such as a user and group. Requires view access to the metadata object. #### - * Usage guidelines * To get a list of all metadata objects that a user or group can access, - * specify the `type` and GUID or name of the principal. * To get permission details - * for a specific object, add the `type` and GUID or name of the metadata object to - * your API request. Upon successful execution, the API returns a list of metadata objects and - * permission details for each object. - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchPermissionsOfPrincipalsAsync( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchPermissionsOfPrincipalsValidateBeforeCall( - fetchPermissionsOfPrincipalsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchPermissionsOfPrincipalsAsync(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchPermissionsOfPrincipalsValidateBeforeCall(fetchPermissionsOfPrincipalsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchPermissionsOnMetadata - * - * @param fetchPermissionsOnMetadataRequest (required) + * @param fetchPermissionsOnMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchPermissionsOnMetadataCall( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call fetchPermissionsOnMetadataCall(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -741,181 +562,133 @@ public okhttp3.Call fetchPermissionsOnMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchPermissionsOnMetadataValidateBeforeCall( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchPermissionsOnMetadataValidateBeforeCall(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchPermissionsOnMetadataRequest' is set if (fetchPermissionsOnMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchPermissionsOnMetadataRequest' when" - + " calling fetchPermissionsOnMetadata(Async)"); + throw new ApiException("Missing the required parameter 'fetchPermissionsOnMetadataRequest' when calling fetchPermissionsOnMetadata(Async)"); } return fetchPermissionsOnMetadataCall(fetchPermissionsOnMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires - * view access to the metadata object. #### Usage guidelines * To fetch a list of users and - * groups for a metadata object, specify `type` and GUID or name of the metadata - * object. * To get permission details for a specific user or group, add `type` and - * GUID or name of the principal object to your API request. Upon successful execution, the API - * returns permission details and principal information for the object specified in the API - * request. - * - * @param fetchPermissionsOnMetadataRequest (required) + * + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest (required) * @return PermissionOfMetadataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public PermissionOfMetadataResponse fetchPermissionsOnMetadata( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) - throws ApiException { - ApiResponse localVarResp = - fetchPermissionsOnMetadataWithHttpInfo(fetchPermissionsOnMetadataRequest); + public PermissionOfMetadataResponse fetchPermissionsOnMetadata(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) throws ApiException { + ApiResponse localVarResp = fetchPermissionsOnMetadataWithHttpInfo(fetchPermissionsOnMetadataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires - * view access to the metadata object. #### Usage guidelines * To fetch a list of users and - * groups for a metadata object, specify `type` and GUID or name of the metadata - * object. * To get permission details for a specific user or group, add `type` and - * GUID or name of the principal object to your API request. Upon successful execution, the API - * returns permission details and principal information for the object specified in the API - * request. - * - * @param fetchPermissionsOnMetadataRequest (required) + * + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest (required) * @return ApiResponse<PermissionOfMetadataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse fetchPermissionsOnMetadataWithHttpInfo( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) - throws ApiException { - okhttp3.Call localVarCall = - fetchPermissionsOnMetadataValidateBeforeCall( - fetchPermissionsOnMetadataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse fetchPermissionsOnMetadataWithHttpInfo(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = fetchPermissionsOnMetadataValidateBeforeCall(fetchPermissionsOnMetadataRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches permission details for a given metadata - * object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list - * of users and groups for a metadata object, specify `type` and GUID or name of the - * metadata object. * To get permission details for a specific user or group, add - * `type` and GUID or name of the principal object to your API request. Upon - * successful execution, the API returns permission details and principal information for the - * object specified in the API request. - * - * @param fetchPermissionsOnMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call fetchPermissionsOnMetadataAsync( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchPermissionsOnMetadataValidateBeforeCall( - fetchPermissionsOnMetadataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call fetchPermissionsOnMetadataAsync(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchPermissionsOnMetadataValidateBeforeCall(fetchPermissionsOnMetadataRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for publishMetadata - * - * @param publishMetadataRequest (required) + * @param publishMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call publishMetadataCall( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call publishMetadataCall(PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -932,162 +705,129 @@ public okhttp3.Call publishMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call publishMetadataValidateBeforeCall( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call publishMetadataValidateBeforeCall(PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'publishMetadataRequest' is set if (publishMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'publishMetadataRequest' when calling" - + " publishMetadata(Async)"); + throw new ApiException("Missing the required parameter 'publishMetadataRequest' when calling publishMetadata(Async)"); } return publishMetadataCall(publishMetadataRequest, _callback); + } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. - * - * @param publishMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throws ApiException { publishMetadataWithHttpInfo(publishMetadataRequest); } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. - * - * @param publishMetadataRequest (required) + * + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse publishMetadataWithHttpInfo( - PublishMetadataRequest publishMetadataRequest) throws ApiException { + public ApiResponse publishMetadataWithHttpInfo(PublishMetadataRequest publishMetadataRequest) throws ApiException { okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.9.0.cl or later Allows publishing metadata objects across - * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint - * allows publishing the following types of metadata objects: * Liveboards * Answers * Logical - * Tables This API will essentially share the objects along with it's dependencies to the - * org admins of the orgs to which it is being published. - * - * @param publishMetadataRequest (required) + * (asynchronously) + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call publishMetadataAsync( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call publishMetadataAsync(PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); + okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for shareMetadata - * - * @param shareMetadataRequest (required) + * @param shareMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call shareMetadataCall( - ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call shareMetadataCall(ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1104,174 +844,129 @@ public okhttp3.Call shareMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call shareMetadataValidateBeforeCall( - ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call shareMetadataValidateBeforeCall(ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'shareMetadataRequest' is set if (shareMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'shareMetadataRequest' when calling" - + " shareMetadata(Async)"); + throw new ApiException("Missing the required parameter 'shareMetadataRequest' when calling shareMetadata(Async)"); } return shareMetadataCall(shareMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and - * groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows - * sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers - * * Worksheets * Views * Connections You can provide `READ_ONLY` or - * `MODIFY` access when sharing an object with another user or group. With - * `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. - * - * @param shareMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + * @param shareMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void shareMetadata(ShareMetadataRequest shareMetadataRequest) throws ApiException { shareMetadataWithHttpInfo(shareMetadataRequest); } /** - * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and - * groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows - * sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers - * * Worksheets * Views * Connections You can provide `READ_ONLY` or - * `MODIFY` access when sharing an object with another user or group. With - * `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. - * - * @param shareMetadataRequest (required) + * + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + * @param shareMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse shareMetadataWithHttpInfo(ShareMetadataRequest shareMetadataRequest) - throws ApiException { + public ApiResponse shareMetadataWithHttpInfo(ShareMetadataRequest shareMetadataRequest) throws ApiException { okhttp3.Call localVarCall = shareMetadataValidateBeforeCall(shareMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Allows sharing one or several metadata objects - * with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API - * endpoint allows sharing only the following types of metadata objects: * Liveboards * - * Visualizations * Answers * Worksheets * Views * Connections You can provide - * `READ_ONLY` or `MODIFY` access when sharing an object with another user - * or group. With `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. - * - * @param shareMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + * @param shareMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call shareMetadataAsync( - ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call shareMetadataAsync(ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - shareMetadataValidateBeforeCall(shareMetadataRequest, _callback); + okhttp3.Call localVarCall = shareMetadataValidateBeforeCall(shareMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for unpublishMetadata - * - * @param unpublishMetadataRequest (required) + * @param unpublishMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call unpublishMetadataCall( - UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call unpublishMetadataCall(UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1288,171 +983,129 @@ public okhttp3.Call unpublishMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call unpublishMetadataValidateBeforeCall( - UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call unpublishMetadataValidateBeforeCall(UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'unpublishMetadataRequest' is set if (unpublishMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'unpublishMetadataRequest' when calling" - + " unpublishMetadata(Async)"); + throw new ApiException("Missing the required parameter 'unpublishMetadataRequest' when calling unpublishMetadata(Async)"); } return unpublishMetadataCall(unpublishMetadataRequest, _callback); + } /** - * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations - * - * @param unpublishMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void unpublishMetadata(UnpublishMetadataRequest unpublishMetadataRequest) - throws ApiException { + public void unpublishMetadata(UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { unpublishMetadataWithHttpInfo(unpublishMetadataRequest); } /** - * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations - * - * @param unpublishMetadataRequest (required) + * + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse unpublishMetadataWithHttpInfo( - UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = - unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, null); + public ApiResponse unpublishMetadataWithHttpInfo(UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.9.0.cl or later Allows unpublishing metadata objects from - * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint - * allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical - * Tables When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations - * - * @param unpublishMetadataRequest (required) + * (asynchronously) + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call unpublishMetadataAsync( - UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call unpublishMetadataAsync(UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, _callback); + okhttp3.Call localVarCall = unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateColumnSecurityRules - * - * @param updateColumnSecurityRulesRequest (required) + * @param updateColumnSecurityRulesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
*/ - public okhttp3.Call updateColumnSecurityRulesCall( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateColumnSecurityRulesCall(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1469,255 +1122,100 @@ public okhttp3.Call updateColumnSecurityRulesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateColumnSecurityRulesValidateBeforeCall( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateColumnSecurityRulesValidateBeforeCall(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateColumnSecurityRulesRequest' is set if (updateColumnSecurityRulesRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateColumnSecurityRulesRequest' when" - + " calling updateColumnSecurityRules(Async)"); + throw new ApiException("Missing the required parameter 'updateColumnSecurityRulesRequest' when calling updateColumnSecurityRules(Async)"); } return updateColumnSecurityRulesCall(updateColumnSecurityRulesRequest, _callback); + } /** - * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified - * tables. This API endpoint allows you to create, update, or delete column-level security rules - * on columns of a table. The operation follows an \"all or none\" policy: if defining - * security rules for any of the provided columns fails, the entire operation will be rolled - * back, and no rules will be created. #### Usage guidelines - Provide table identifier using - * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use - * `clear_csr: true` to remove all column security rules from the table - For each - * column, specify the security rule using `column_security_rules` array - Use - * `is_unsecured: true` to mark a specific column as unprotected - Use - * `group_access` operations to manage group associations: - `ADD`: Add - * groups to the column's access list - `REMOVE`: Remove groups from the - * column's access list - `REPLACE`: Replace all existing groups with the - * specified groups #### Required permissions - `ADMINISTRATION` - Can administer - * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if - * RBAC is enabled) #### Example request ```json { \"identifier\": - * \"table-guid\", \"obj_identifier\": \"table-object-id\", - * \"clear_csr\": false, \"column_security_rules\": [ { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": false, \"group_access\": [ { \"operation\": - * \"ADD\", \"group_identifiers\": [\"hr_group_id\", - * \"hr_group_name\", \"finance_group_id\"] } ] }, { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups - * - * @param updateColumnSecurityRulesRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
*/ - public void updateColumnSecurityRules( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + public void updateColumnSecurityRules(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { updateColumnSecurityRulesWithHttpInfo(updateColumnSecurityRulesRequest); } /** - * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified - * tables. This API endpoint allows you to create, update, or delete column-level security rules - * on columns of a table. The operation follows an \"all or none\" policy: if defining - * security rules for any of the provided columns fails, the entire operation will be rolled - * back, and no rules will be created. #### Usage guidelines - Provide table identifier using - * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use - * `clear_csr: true` to remove all column security rules from the table - For each - * column, specify the security rule using `column_security_rules` array - Use - * `is_unsecured: true` to mark a specific column as unprotected - Use - * `group_access` operations to manage group associations: - `ADD`: Add - * groups to the column's access list - `REMOVE`: Remove groups from the - * column's access list - `REPLACE`: Replace all existing groups with the - * specified groups #### Required permissions - `ADMINISTRATION` - Can administer - * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if - * RBAC is enabled) #### Example request ```json { \"identifier\": - * \"table-guid\", \"obj_identifier\": \"table-object-id\", - * \"clear_csr\": false, \"column_security_rules\": [ { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": false, \"group_access\": [ { \"operation\": - * \"ADD\", \"group_identifiers\": [\"hr_group_id\", - * \"hr_group_name\", \"finance_group_id\"] } ] }, { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups - * - * @param updateColumnSecurityRulesRequest (required) + * + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
*/ - public ApiResponse updateColumnSecurityRulesWithHttpInfo( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { - okhttp3.Call localVarCall = - updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, null); + public ApiResponse updateColumnSecurityRulesWithHttpInfo(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Creates, updates, or deletes column security - * rules for specified tables. This API endpoint allows you to create, update, or delete - * column-level security rules on columns of a table. The operation follows an \"all or - * none\" policy: if defining security rules for any of the provided columns fails, the - * entire operation will be rolled back, and no rules will be created. #### Usage guidelines - - * Provide table identifier using either `identifier` (GUID or name) or - * `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column - * security rules from the table - For each column, specify the security rule using - * `column_security_rules` array - Use `is_unsecured: true` to mark a - * specific column as unprotected - Use `group_access` operations to manage group - * associations: - `ADD`: Add groups to the column's access list - - * `REMOVE`: Remove groups from the column's access list - `REPLACE`: - * Replace all existing groups with the specified groups #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can - * manage worksheet views and tables (if RBAC is enabled) #### Example request - * ```json { \"identifier\": \"table-guid\", - * \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, - * \"column_security_rules\": [ { \"column_identifier\": \"col id or - * col name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"ADD\", \"group_identifiers\": - * [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] - * }, { \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups - * - * @param updateColumnSecurityRulesRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
*/ - public okhttp3.Call updateColumnSecurityRulesAsync( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateColumnSecurityRulesValidateBeforeCall( - updateColumnSecurityRulesRequest, _callback); + public okhttp3.Call updateColumnSecurityRulesAsync(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java index c5b0f0bf5..6011d1fcb 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 @@ -4,7 +4,6 @@ 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; @@ -12,19 +11,30 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.ErrorResponse; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.SystemConfig; import com.thoughtspot.client.model.SystemInfo; import com.thoughtspot.client.model.SystemOverrideInfo; import com.thoughtspot.client.model.UpdateSystemConfigRequest; + import 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SystemApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -81,32 +91,170 @@ 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 - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getSystemConfigCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -123,62 +271,46 @@ public okhttp3.Call getSystemConfigCall(final ApiCallback _callback) throws ApiE Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSystemConfigValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getSystemConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getSystemConfigCall(_callback); + } /** - * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the - * request is successful, the API returns a list configuration settings applied on the cluster. - * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these - * complete configuration settings of the cluster. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return SystemConfig - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SystemConfig getSystemConfig() throws ApiException { ApiResponse localVarResp = getSystemConfigWithHttpInfo(); @@ -186,92 +318,76 @@ public SystemConfig getSystemConfig() throws ApiException { } /** - * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the - * request is successful, the API returns a list configuration settings applied on the cluster. - * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these - * complete configuration settings of the cluster. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return ApiResponse<SystemConfig> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getSystemConfigWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Retrieves the current configuration details of - * the cluster. If the request is successful, the API returns a list configuration settings - * applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) - * privilege to view these complete configuration settings of the cluster. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * (asynchronously) + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getSystemConfigAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getSystemConfigAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSystemInformation - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getSystemInformationCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -288,61 +404,46 @@ public okhttp3.Call getSystemInformationCall(final ApiCallback _callback) throws Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSystemInformationValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getSystemInformationValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getSystemInformationCall(_callback); + } /** - * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time - * zone, deployment environment, date format, and date time format of the cluster. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return SystemInfo - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SystemInfo getSystemInformation() throws ApiException { ApiResponse localVarResp = getSystemInformationWithHttpInfo(); @@ -350,90 +451,76 @@ public SystemInfo getSystemInformation() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time - * zone, deployment environment, date format, and date time format of the cluster. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return ApiResponse<SystemInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getSystemInformationWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets system information such as the release - * version, locale, time zone, deployment environment, date format, and date time format of the - * cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) - * privilege is required. This API does not require any parameters to be passed in the request. - * + * (asynchronously) + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getSystemInformationAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getSystemInformationAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSystemOverrideInfo - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getSystemOverrideInfoCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -450,61 +537,46 @@ public okhttp3.Call getSystemOverrideInfoCall(final ApiCallback _callback) throw Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSystemOverrideInfoValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getSystemOverrideInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getSystemOverrideInfoCall(_callback); + } /** - * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application - * settings**) privilege is required. This API does not require any parameters to be passed in - * the request. - * + * + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * @return SystemOverrideInfo - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SystemOverrideInfo getSystemOverrideInfo() throws ApiException { ApiResponse localVarResp = getSystemOverrideInfoWithHttpInfo(); @@ -512,93 +584,220 @@ public SystemOverrideInfo getSystemOverrideInfo() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application - * settings**) privilege is required. This API does not require any parameters to be passed in - * the request. - * + * + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * @return ApiResponse<SystemOverrideInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getSystemOverrideInfoWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Gets a list of configuration overrides applied on - * the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage - * application settings**) privilege is required. This API does not require any parameters to be - * passed in the request. - * + * (asynchronously) + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCommunicationChannelPreferences + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesCall(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCommunicationChannelPreferencesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCommunicationChannelPreferencesValidateBeforeCall(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchCommunicationChannelPreferencesRequest' is set + if (searchCommunicationChannelPreferencesRequest == null) { + throw new ApiException("Missing the required parameter 'searchCommunicationChannelPreferencesRequest' when calling searchCommunicationChannelPreferences(Async)"); + } + + return searchCommunicationChannelPreferencesCall(searchCommunicationChannelPreferencesRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest (required) + * @return CommunicationChannelPreferencesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest) throws ApiException { + ApiResponse localVarResp = searchCommunicationChannelPreferencesWithHttpInfo(searchCommunicationChannelPreferencesRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest (required) + * @return ApiResponse<CommunicationChannelPreferencesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchCommunicationChannelPreferencesWithHttpInfo(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest) throws ApiException { + okhttp3.Call localVarCall = searchCommunicationChannelPreferencesValidateBeforeCall(searchCommunicationChannelPreferencesRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesAsync(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCommunicationChannelPreferencesValidateBeforeCall(searchCommunicationChannelPreferencesRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSystemConfig - * - * @param updateSystemConfigRequest (required) + * @param updateSystemConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateSystemConfigCall( - UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateSystemConfigCall(UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -615,135 +814,100 @@ public okhttp3.Call updateSystemConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateSystemConfigValidateBeforeCall( - UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateSystemConfigValidateBeforeCall(UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateSystemConfigRequest' is set if (updateSystemConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateSystemConfigRequest' when calling" - + " updateSystemConfig(Async)"); + throw new ApiException("Missing the required parameter 'updateSystemConfigRequest' when calling updateSystemConfig(Async)"); } return updateSystemConfigCall(updateSystemConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send - * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. - * - * @param updateSystemConfigRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateSystemConfig(UpdateSystemConfigRequest updateSystemConfigRequest) - throws ApiException { + public void updateSystemConfig(UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { updateSystemConfigWithHttpInfo(updateSystemConfigRequest); } /** - * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send - * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. - * - * @param updateSystemConfigRequest (required) + * + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateSystemConfigWithHttpInfo( - UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { - okhttp3.Call localVarCall = - updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, null); + public ApiResponse updateSystemConfigWithHttpInfo(UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { + okhttp3.Call localVarCall = updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later Updates the current configuration of the cluster. - * You must send the configuration data in JSON format. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. - * - * @param updateSystemConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateSystemConfigAsync( - UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateSystemConfigAsync(UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, _callback); + okhttp3.Call localVarCall = updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java index cc44be6f0..f7d82df84 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java @@ -4,7 +4,6 @@ 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; @@ -12,20 +11,28 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.AssignTagRequest; import com.thoughtspot.client.model.CreateTagRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.SearchTagsRequest; import com.thoughtspot.client.model.Tag; import com.thoughtspot.client.model.UpdateTagRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class TagsApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -84,32 +91,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for assignTag - * - * @param assignTagRequest (required) + * @param assignTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call assignTagCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call assignTagCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -126,117 +131,98 @@ public okhttp3.Call assignTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call assignTagValidateBeforeCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call assignTagValidateBeforeCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assignTagRequest' is set if (assignTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'assignTagRequest' when calling" - + " assignTag(Async)"); + throw new ApiException("Missing the required parameter 'assignTagRequest' when calling assignTag(Async)"); } return assignTagCall(assignTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. - * Requires edit access to the metadata object. - * - * @param assignTagRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void assignTag(AssignTagRequest assignTagRequest) throws ApiException { assignTagWithHttpInfo(assignTagRequest); } /** - * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. - * Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse assignTagWithHttpInfo(AssignTagRequest assignTagRequest) - throws ApiException { + public ApiResponse assignTagWithHttpInfo(AssignTagRequest assignTagRequest) throws ApiException { okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and - * Worksheets. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call assignTagAsync( - AssignTagRequest assignTagRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call assignTagAsync(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -244,32 +230,30 @@ public okhttp3.Call assignTagAsync( } /** * Build call for createTag - * - * @param createTagRequest (required) + * @param createTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createTagCall( - CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createTagCall(CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -286,70 +270,53 @@ public okhttp3.Call createTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createTagValidateBeforeCall( - CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createTagValidateBeforeCall(CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createTagRequest' is set if (createTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'createTagRequest' when calling" - + " createTag(Async)"); + throw new ApiException("Missing the required parameter 'createTagRequest' when calling createTag(Async)"); } return createTagCall(createTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata - * object. For example, you can create a tag to designate subject areas, such as sales, HR, - * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * - * @param createTagRequest (required) + * + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest (required) * @return Tag - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public Tag createTag(CreateTagRequest createTagRequest) throws ApiException { ApiResponse localVarResp = createTagWithHttpInfo(createTagRequest); @@ -357,98 +324,79 @@ public Tag createTag(CreateTagRequest createTagRequest) throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata - * object. For example, you can create a tag to designate subject areas, such as sales, HR, - * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * - * @param createTagRequest (required) + * + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest (required) * @return ApiResponse<Tag> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createTagWithHttpInfo(CreateTagRequest createTagRequest) - throws ApiException { + public ApiResponse createTagWithHttpInfo(CreateTagRequest createTagRequest) throws ApiException { okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a tag object. Tags are labels that - * identify a metadata object. For example, you can create a tag to designate subject areas, - * such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * - * @param createTagRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createTagAsync( - CreateTagRequest createTagRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createTagAsync(CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteTag - * * @param tagIdentifier Tag identifier Tag name or Tag id. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -457,11 +405,8 @@ public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/tags/{tag_identifier}/delete" - .replace( - "{" + "tag_identifier" + "}", - localVarApiClient.escapeString(tagIdentifier.toString())); + String localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete" + .replace("{" + "tag_identifier" + "}", localVarApiClient.escapeString(tagIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -469,92 +414,72 @@ public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTagValidateBeforeCall( - String tagIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTagValidateBeforeCall(String tagIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tagIdentifier' is set if (tagIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'tagIdentifier' when calling deleteTag(Async)"); + throw new ApiException("Missing the required parameter 'tagIdentifier' when calling deleteTag(Async)"); } return deleteTagCall(tagIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. - * + * + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Tag identifier Tag name or Tag id. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteTag(String tagIdentifier) throws ApiException { deleteTagWithHttpInfo(tagIdentifier); } /** - * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. - * + * + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Tag identifier Tag name or Tag id. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteTagWithHttpInfo(String tagIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, null); @@ -562,30 +487,24 @@ public ApiResponse deleteTagWithHttpInfo(String tagIdentifier) throws ApiE } /** - * (asynchronously) Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required - * to create, edit, and delete tags. - * + * (asynchronously) + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Tag identifier Tag name or Tag id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -593,32 +512,30 @@ public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback } /** * Build call for searchTags - * - * @param searchTagsRequest (required) + * @param searchTagsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchTagsCall( - SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchTagsCall(SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -635,66 +552,53 @@ public okhttp3.Call searchTagsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchTagsValidateBeforeCall( - SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchTagsValidateBeforeCall(SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchTagsRequest' is set if (searchTagsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchTagsRequest' when calling" - + " searchTags(Async)"); + throw new ApiException("Missing the required parameter 'searchTagsRequest' when calling searchTags(Async)"); } return searchTagsCall(searchTagsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To - * get details of a specific tag object, specify the GUID or name. Any authenticated user can - * search for tag objects. - * - * @param searchTagsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest (required) * @return List<Tag> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List searchTags(SearchTagsRequest searchTagsRequest) throws ApiException { ApiResponse> localVarResp = searchTagsWithHttpInfo(searchTagsRequest); @@ -702,90 +606,79 @@ public List searchTags(SearchTagsRequest searchTagsRequest) throws ApiExcep } /** - * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To - * get details of a specific tag object, specify the GUID or name. Any authenticated user can - * search for tag objects. - * - * @param searchTagsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest (required) * @return ApiResponse<List<Tag>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchTagsWithHttpInfo(SearchTagsRequest searchTagsRequest) - throws ApiException { + public ApiResponse> searchTagsWithHttpInfo(SearchTagsRequest searchTagsRequest) throws ApiException { okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of tag objects available on the - * ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any - * authenticated user can search for tag objects. - * - * @param searchTagsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchTagsAsync( - SearchTagsRequest searchTagsRequest, final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call searchTagsAsync(SearchTagsRequest searchTagsRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for unassignTag - * - * @param assignTagRequest (required) + * @param assignTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call unassignTagCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unassignTagCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -802,117 +695,98 @@ public okhttp3.Call unassignTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call unassignTagValidateBeforeCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unassignTagValidateBeforeCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assignTagRequest' is set if (assignTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'assignTagRequest' when calling" - + " unassignTag(Async)"); + throw new ApiException("Missing the required parameter 'assignTagRequest' when calling unassignTag(Async)"); } return unassignTagCall(assignTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or - * Worksheet. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param assignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void unassignTag(AssignTagRequest assignTagRequest) throws ApiException { unassignTagWithHttpInfo(assignTagRequest); } /** - * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or - * Worksheet. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse unassignTagWithHttpInfo(AssignTagRequest assignTagRequest) - throws ApiException { + public ApiResponse unassignTagWithHttpInfo(AssignTagRequest assignTagRequest) throws ApiException { okhttp3.Call localVarCall = unassignTagValidateBeforeCall(assignTagRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, - * Table, or Worksheet. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call unassignTagAsync( - AssignTagRequest assignTagRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call unassignTagAsync(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unassignTagValidateBeforeCall(assignTagRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -920,34 +794,31 @@ public okhttp3.Call unassignTagAsync( } /** * Build call for updateTag - * * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) + * @param updateTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateTagCall( - String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateTagCall(String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -956,11 +827,8 @@ public okhttp3.Call updateTagCall( Object localVarPostBody = updateTagRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/tags/{tag_identifier}/update" - .replace( - "{" + "tag_identifier" + "}", - localVarApiClient.escapeString(tagIdentifier.toString())); + String localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update" + .replace("{" + "tag_identifier" + "}", localVarApiClient.escapeString(tagIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -968,146 +836,108 @@ public okhttp3.Call updateTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateTagValidateBeforeCall( - String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateTagValidateBeforeCall(String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tagIdentifier' is set if (tagIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'tagIdentifier' when calling updateTag(Async)"); + throw new ApiException("Missing the required parameter 'tagIdentifier' when calling updateTag(Async)"); } // verify the required parameter 'updateTagRequest' is set if (updateTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateTagRequest' when calling" - + " updateTag(Async)"); + throw new ApiException("Missing the required parameter 'updateTagRequest' when calling updateTag(Async)"); } return updateTagCall(tagIdentifier, updateTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and - * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * + * + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateTag(String tagIdentifier, UpdateTagRequest updateTagRequest) - throws ApiException { + public void updateTag(String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { updateTagWithHttpInfo(tagIdentifier, updateTagRequest); } /** - * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and - * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * + * + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) + * @param updateTagRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateTagWithHttpInfo( - String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { - okhttp3.Call localVarCall = - updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, null); + public ApiResponse updateTagWithHttpInfo(String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { + okhttp3.Call localVarCall = updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates a tag object. You can modify the - * `name` and `color` properties of a tag object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) + * @param updateTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateTagAsync( - String tagIdentifier, - UpdateTagRequest updateTagRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, _callback); + public okhttp3.Call updateTagAsync(String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java index d234818e3..57d1b687f 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 @@ -4,7 +4,6 @@ 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; @@ -12,6 +11,14 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.AccessToken; import com.thoughtspot.client.model.ActivateUserRequest; import com.thoughtspot.client.model.AgentConversation; @@ -24,6 +31,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 +55,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,8 +63,10 @@ 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.ErrorResponse; import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; @@ -72,6 +84,7 @@ import com.thoughtspot.client.model.FetchLogsRequest; import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; +import java.io.File; import com.thoughtspot.client.model.ForceLogoutUsersRequest; import com.thoughtspot.client.model.GenerateCSVRequest; import com.thoughtspot.client.model.GetAsyncImportStatusResponse; @@ -112,6 +125,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 +142,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,21 +177,23 @@ 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 java.io.File; +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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ThoughtSpotRestApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -234,33 +252,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for activateUser - * - * @param activateUserRequest (required) + * @param activateUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call activateUserCall( - ActivateUserRequest activateUserRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call activateUserCall(ActivateUserRequest activateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -277,72 +292,53 @@ public okhttp3.Call activateUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call activateUserValidateBeforeCall( - ActivateUserRequest activateUserRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call activateUserValidateBeforeCall(ActivateUserRequest activateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'activateUserRequest' is set if (activateUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'activateUserRequest' when calling" - + " activateUser(Async)"); + throw new ApiException("Missing the required parameter 'activateUserRequest' when calling activateUser(Async)"); } return activateUserCall(activateUserRequest, _callback); + } /** - * Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. - * - * @param activateUserRequest (required) + * + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest (required) * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public User activateUser(ActivateUserRequest activateUserRequest) throws ApiException { ApiResponse localVarResp = activateUserWithHttpInfo(activateUserRequest); @@ -350,101 +346,79 @@ public User activateUser(ActivateUserRequest activateUserRequest) throws ApiExce } /** - * Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. - * - * @param activateUserRequest (required) + * + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest (required) * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse activateUserWithHttpInfo(ActivateUserRequest activateUserRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse activateUserWithHttpInfo(ActivateUserRequest activateUserRequest) throws ApiException { okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. - * - * @param activateUserRequest (required) + * (asynchronously) + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call activateUserAsync( - ActivateUserRequest activateUserRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call activateUserAsync(ActivateUserRequest activateUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for assignChangeAuthor - * - * @param assignChangeAuthorRequest (required) + * @param assignChangeAuthorRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call assignChangeAuthorCall( - AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignChangeAuthorCall(AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -461,164 +435,129 @@ public okhttp3.Call assignChangeAuthorCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call assignChangeAuthorValidateBeforeCall( - AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call assignChangeAuthorValidateBeforeCall(AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assignChangeAuthorRequest' is set if (assignChangeAuthorRequest == null) { - throw new ApiException( - "Missing the required parameter 'assignChangeAuthorRequest' when calling" - + " assignChangeAuthor(Async)"); + throw new ApiException("Missing the required parameter 'assignChangeAuthorRequest' when calling assignChangeAuthor(Async)"); } return assignChangeAuthorCall(assignChangeAuthorRequest, _callback); + } /** - * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to - * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and - * edit access to the objects are required. - * - * @param assignChangeAuthorRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void assignChangeAuthor(AssignChangeAuthorRequest assignChangeAuthorRequest) - throws ApiException { + * + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void assignChangeAuthor(AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { assignChangeAuthorWithHttpInfo(assignChangeAuthorRequest); } /** - * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to - * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and - * edit access to the objects are required. - * - * @param assignChangeAuthorRequest (required) + * + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse assignChangeAuthorWithHttpInfo( - AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { - okhttp3.Call localVarCall = - assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse assignChangeAuthorWithHttpInfo(AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { + okhttp3.Call localVarCall = assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Transfers the ownership of one or several objects - * from one user to another. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the - * objects are required. - * - * @param assignChangeAuthorRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call assignChangeAuthorAsync( - AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignChangeAuthorAsync(AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for assignTag - * - * @param assignTagRequest (required) + * @param assignTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call assignTagCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignTagCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -635,117 +574,98 @@ public okhttp3.Call assignTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call assignTagValidateBeforeCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call assignTagValidateBeforeCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assignTagRequest' is set if (assignTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'assignTagRequest' when calling" - + " assignTag(Async)"); + throw new ApiException("Missing the required parameter 'assignTagRequest' when calling assignTag(Async)"); } return assignTagCall(assignTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. - * Requires edit access to the metadata object. - * - * @param assignTagRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void assignTag(AssignTagRequest assignTagRequest) throws ApiException { assignTagWithHttpInfo(assignTagRequest); } /** - * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. - * Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse assignTagWithHttpInfo(AssignTagRequest assignTagRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse assignTagWithHttpInfo(AssignTagRequest assignTagRequest) throws ApiException { okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and - * Worksheets. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call assignTagAsync( - AssignTagRequest assignTagRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignTagAsync(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -753,33 +673,30 @@ public okhttp3.Call assignTagAsync( } /** * Build call for changeUserPassword - * - * @param changeUserPasswordRequest (required) + * @param changeUserPasswordRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call changeUserPasswordCall( - ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call changeUserPasswordCall(ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -796,162 +713,129 @@ public okhttp3.Call changeUserPasswordCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call changeUserPasswordValidateBeforeCall( - ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call changeUserPasswordValidateBeforeCall(ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'changeUserPasswordRequest' is set if (changeUserPasswordRequest == null) { - throw new ApiException( - "Missing the required parameter 'changeUserPasswordRequest' when calling" - + " changeUserPassword(Async)"); + throw new ApiException("Missing the required parameter 'changeUserPasswordRequest' when calling changeUserPassword(Async)"); } return changeUserPasswordCall(changeUserPasswordRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates the current password of the user. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param changeUserPasswordRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void changeUserPassword(ChangeUserPasswordRequest changeUserPasswordRequest) - throws ApiException { + * + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void changeUserPassword(ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { changeUserPasswordWithHttpInfo(changeUserPasswordRequest); } /** - * Version: 9.0.0.cl or later Updates the current password of the user. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param changeUserPasswordRequest (required) + * + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse changeUserPasswordWithHttpInfo( - ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { - okhttp3.Call localVarCall = - changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse changeUserPasswordWithHttpInfo(ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates the current password of the user. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * - * @param changeUserPasswordRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call changeUserPasswordAsync( - ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call changeUserPasswordAsync(ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for commitBranch - * - * @param commitBranchRequest (required) + * @param commitBranchRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call commitBranchCall( - CommitBranchRequest commitBranchRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call commitBranchCall(CommitBranchRequest commitBranchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -968,170 +852,272 @@ public okhttp3.Call commitBranchCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call commitBranchValidateBeforeCall( - CommitBranchRequest commitBranchRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call commitBranchValidateBeforeCall(CommitBranchRequest commitBranchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commitBranchRequest' is set if (commitBranchRequest == null) { - throw new ApiException( - "Missing the required parameter 'commitBranchRequest' when calling" - + " commitBranch(Async)"); + throw new ApiException("Missing the required parameter 'commitBranchRequest' when calling commitBranch(Async)"); } return commitBranchCall(commitBranchRequest, _callback); + } /** - * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured - * on your instance. Requires at least edit access to objects used in the commit operation. - * Before using this endpoint to push your commits: * Enable Git integration on your instance. * - * Make sure the Git repository and branch details are configured on your instance. For more - * information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param commitBranchRequest (required) + * + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest (required) * @return CommitResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public CommitResponse commitBranch(CommitBranchRequest commitBranchRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommitResponse commitBranch(CommitBranchRequest commitBranchRequest) throws ApiException { ApiResponse localVarResp = commitBranchWithHttpInfo(commitBranchRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured - * on your instance. Requires at least edit access to objects used in the commit operation. - * Before using this endpoint to push your commits: * Enable Git integration on your instance. * - * Make sure the Git repository and branch details are configured on your instance. For more - * information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param commitBranchRequest (required) + * + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest (required) * @return ApiResponse<CommitResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse commitBranchWithHttpInfo( - CommitBranchRequest commitBranchRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse commitBranchWithHttpInfo(CommitBranchRequest commitBranchRequest) throws ApiException { okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git - * branch configured on your instance. Requires at least edit access to objects used in the - * commit operation. Before using this endpoint to push your commits: * Enable Git integration - * on your instance. * Make sure the Git repository and branch details are configured on your - * instance. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param commitBranchRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call commitBranchAsync( - CommitBranchRequest commitBranchRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call commitBranchAsync(CommitBranchRequest commitBranchRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); 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 - * - * @param connectionConfigurationSearchRequest (required) + * @param connectionConfigurationSearchRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call connectionConfigurationSearchCall( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call connectionConfigurationSearchCall(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1148,191 +1134,133 @@ public okhttp3.Call connectionConfigurationSearchCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call connectionConfigurationSearchValidateBeforeCall( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call connectionConfigurationSearchValidateBeforeCall(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionConfigurationSearchRequest' is set if (connectionConfigurationSearchRequest == null) { - throw new ApiException( - "Missing the required parameter 'connectionConfigurationSearchRequest' when" - + " calling connectionConfigurationSearch(Async)"); + throw new ApiException("Missing the required parameter 'connectionConfigurationSearchRequest' when calling connectionConfigurationSearch(Async)"); } return connectionConfigurationSearchCall(connectionConfigurationSearchRequest, _callback); + } /** - * Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. - * - * @param connectionConfigurationSearchRequest (required) + * + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest (required) * @return List<ConnectionConfigurationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List connectionConfigurationSearch( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) - throws ApiException { - ApiResponse> localVarResp = - connectionConfigurationSearchWithHttpInfo(connectionConfigurationSearchRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List connectionConfigurationSearch(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) throws ApiException { + ApiResponse> localVarResp = connectionConfigurationSearchWithHttpInfo(connectionConfigurationSearchRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. - * - * @param connectionConfigurationSearchRequest (required) + * + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest (required) * @return ApiResponse<List<ConnectionConfigurationResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> - connectionConfigurationSearchWithHttpInfo( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) - throws ApiException { - okhttp3.Call localVarCall = - connectionConfigurationSearchValidateBeforeCall( - connectionConfigurationSearchRequest, null); - Type localVarReturnType = - new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> connectionConfigurationSearchWithHttpInfo(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) throws ApiException { + okhttp3.Call localVarCall = connectionConfigurationSearchValidateBeforeCall(connectionConfigurationSearchRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. - * - * @param connectionConfigurationSearchRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call connectionConfigurationSearchAsync( - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - connectionConfigurationSearchValidateBeforeCall( - connectionConfigurationSearchRequest, _callback); - Type localVarReturnType = - new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call connectionConfigurationSearchAsync(ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = connectionConfigurationSearchValidateBeforeCall(connectionConfigurationSearchRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for convertWorksheetToModel - * - * @param convertWorksheetToModelRequest (required) + * @param convertWorksheetToModelRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call convertWorksheetToModelCall( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call convertWorksheetToModelCall(ConvertWorksheetToModelRequest convertWorksheetToModelRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1349,260 +1277,134 @@ public okhttp3.Call convertWorksheetToModelCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call convertWorksheetToModelValidateBeforeCall( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call convertWorksheetToModelValidateBeforeCall(ConvertWorksheetToModelRequest convertWorksheetToModelRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'convertWorksheetToModelRequest' is set if (convertWorksheetToModelRequest == null) { - throw new ApiException( - "Missing the required parameter 'convertWorksheetToModelRequest' when calling" - + " convertWorksheetToModel(Async)"); + throw new ApiException("Missing the required parameter 'convertWorksheetToModelRequest' when calling convertWorksheetToModel(Async)"); } return convertWorksheetToModelCall(convertWorksheetToModelRequest, _callback); + } /** - * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges - * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can - * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage - * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of - * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - - * Used only when `convert_all` is set to `false`. - Leave empty or omit - * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - - * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from - * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and - * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the - * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the - * system, except those specified in `exclude_worksheet_ids`. - `false`: - * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - - * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a - * preview before applying any changes.Used for validation of conversion. - **Options:** - - * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: - * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## - * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before - * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion - * process by setting `convert_all` to `false` and specifying a small number - * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such - * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` - * - * @param convertWorksheetToModelRequest (required) + * + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest (required) * @return ResponseWorksheetToModelConversion - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ResponseWorksheetToModelConversion convertWorksheetToModel( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { - ApiResponse localVarResp = - convertWorksheetToModelWithHttpInfo(convertWorksheetToModelRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseWorksheetToModelConversion convertWorksheetToModel(ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + ApiResponse localVarResp = convertWorksheetToModelWithHttpInfo(convertWorksheetToModelRequest); return localVarResp.getData(); } /** - * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges - * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can - * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage - * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of - * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - - * Used only when `convert_all` is set to `false`. - Leave empty or omit - * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - - * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from - * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and - * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the - * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the - * system, except those specified in `exclude_worksheet_ids`. - `false`: - * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - - * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a - * preview before applying any changes.Used for validation of conversion. - **Options:** - - * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: - * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## - * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before - * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion - * process by setting `convert_all` to `false` and specifying a small number - * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such - * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` - * - * @param convertWorksheetToModelRequest (required) + * + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest (required) * @return ApiResponse<ResponseWorksheetToModelConversion> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse convertWorksheetToModelWithHttpInfo( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { - okhttp3.Call localVarCall = - convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse convertWorksheetToModelWithHttpInfo(ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + okhttp3.Call localVarCall = convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- - * ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated - * list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - - * **Usage:** - Used only when `convert_all` is set to `false`. - Leave - * empty or omit when `convert_all` is set to `true`. 2. - * **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying - * Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` - * is set to `true` and specific Worksheets should not be converted. 3. - * **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - - * `true`: Converts all Worksheets in the system, except those specified in - * `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed - * in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to - * apply changes directly to ThoughtSpot or to generate a preview before applying any - * changes.Used for validation of conversion. - **Options:** - `true`: Applies - * conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of - * the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup - * Before Conversion:** Always export metadata as a backup before initiating the conversion - * process 2. **Partial Conversion for Testing:** Test the conversion process by setting - * `convert_all` to `false` and specifying a small number of - * `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as - * Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` - * - * @param convertWorksheetToModelRequest (required) + * (asynchronously) + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call convertWorksheetToModelAsync( - ConvertWorksheetToModelRequest convertWorksheetToModelRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - convertWorksheetToModelValidateBeforeCall( - convertWorksheetToModelRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call convertWorksheetToModelAsync(ConvertWorksheetToModelRequest convertWorksheetToModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for copyObject - * - * @param copyObjectRequest (required) + * @param copyObjectRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
- */ - public okhttp3.Call copyObjectCall( - CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call copyObjectCall(CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1619,68 +1421,54 @@ public okhttp3.Call copyObjectCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call copyObjectValidateBeforeCall( - CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call copyObjectValidateBeforeCall(CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'copyObjectRequest' is set if (copyObjectRequest == null) { - throw new ApiException( - "Missing the required parameter 'copyObjectRequest' when calling" - + " copyObject(Async)"); + throw new ApiException("Missing the required parameter 'copyObjectRequest' when calling copyObject(Async)"); } return copyObjectCall(copyObjectRequest, _callback); + } /** - * 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. - * - * @param copyObjectRequest (required) + * + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest (required) * @return ResponseCopyObject - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
*/ public ResponseCopyObject copyObject(CopyObjectRequest copyObjectRequest) throws ApiException { ApiResponse localVarResp = copyObjectWithHttpInfo(copyObjectRequest); @@ -1688,95 +1476,80 @@ 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 - * request and returns the ID of the new object. - * - * @param copyObjectRequest (required) + * + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest (required) * @return ApiResponse<ResponseCopyObject> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
- */ - public ApiResponse copyObjectWithHttpInfo( - CopyObjectRequest copyObjectRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ApiResponse copyObjectWithHttpInfo(CopyObjectRequest copyObjectRequest) throws ApiException { okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (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. - * - * @param copyObjectRequest (required) + * (asynchronously) + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
- */ - public okhttp3.Call copyObjectAsync( - CopyObjectRequest copyObjectRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call copyObjectAsync(CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createAgentConversation - * - * @param createAgentConversationRequest (required) + * @param createAgentConversationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call createAgentConversationCall( - CreateAgentConversationRequest createAgentConversationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call createAgentConversationCall(CreateAgentConversationRequest createAgentConversationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1793,157 +1566,130 @@ public okhttp3.Call createAgentConversationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createAgentConversationValidateBeforeCall( - CreateAgentConversationRequest createAgentConversationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createAgentConversationValidateBeforeCall(CreateAgentConversationRequest createAgentConversationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createAgentConversationRequest' is set if (createAgentConversationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createAgentConversationRequest' when calling" - + " createAgentConversation(Async)"); + throw new ApiException("Missing the required parameter 'createAgentConversationRequest' when calling createAgentConversation(Async)"); } return createAgentConversationCall(createAgentConversationRequest, _callback); + } /** - * Version: 10.13.0.cl or later - * - * @param createAgentConversationRequest (required) + * + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest (required) * @return AgentConversation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public AgentConversation createAgentConversation( - CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { - ApiResponse localVarResp = - createAgentConversationWithHttpInfo(createAgentConversationRequest); + * @throws ApiException If fail to 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 AgentConversation createAgentConversation(CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + ApiResponse localVarResp = createAgentConversationWithHttpInfo(createAgentConversationRequest); return localVarResp.getData(); } /** - * Version: 10.13.0.cl or later - * - * @param createAgentConversationRequest (required) + * + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest (required) * @return ApiResponse<AgentConversation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse createAgentConversationWithHttpInfo( - CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { - okhttp3.Call localVarCall = - createAgentConversationValidateBeforeCall(createAgentConversationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to 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 createAgentConversationWithHttpInfo(CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + okhttp3.Call localVarCall = createAgentConversationValidateBeforeCall(createAgentConversationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.13.0.cl or later - * - * @param createAgentConversationRequest (required) + * (asynchronously) + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call createAgentConversationAsync( - CreateAgentConversationRequest createAgentConversationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createAgentConversationValidateBeforeCall( - createAgentConversationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException 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 createAgentConversationAsync(CreateAgentConversationRequest createAgentConversationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAgentConversationValidateBeforeCall(createAgentConversationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createCalendar - * - * @param createCalendarRequest (required) + * @param createCalendarRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createCalendarCall( - CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCalendarCall(CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1960,307 +1706,133 @@ public okhttp3.Call createCalendarCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createCalendarValidateBeforeCall( - CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createCalendarValidateBeforeCall(CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCalendarRequest' is set if (createCalendarRequest == null) { - throw new ApiException( - "Missing the required parameter 'createCalendarRequest' when calling" - + " createCalendar(Async)"); + throw new ApiException("Missing the required parameter 'createCalendarRequest' when calling createCalendar(Async)"); } return createCalendarCall(createCalendarRequest, _callback); + } /** - * Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` - * - * @param createCalendarRequest (required) + * + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest (required) * @return CalendarResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public CalendarResponse createCalendar(CreateCalendarRequest createCalendarRequest) - throws ApiException { - ApiResponse localVarResp = - createCalendarWithHttpInfo(createCalendarRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CalendarResponse createCalendar(CreateCalendarRequest createCalendarRequest) throws ApiException { + ApiResponse localVarResp = createCalendarWithHttpInfo(createCalendarRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` - * - * @param createCalendarRequest (required) + * + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest (required) * @return ApiResponse<CalendarResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createCalendarWithHttpInfo( - CreateCalendarRequest createCalendarRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCalendarWithHttpInfo(CreateCalendarRequest createCalendarRequest) throws ApiException { okhttp3.Call localVarCall = createCalendarValidateBeforeCall(createCalendarRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` - * - * @param createCalendarRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createCalendarAsync( - CreateCalendarRequest createCalendarRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createCalendarValidateBeforeCall(createCalendarRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCalendarAsync(CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCalendarValidateBeforeCall(createCalendarRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConfig - * - * @param createConfigRequest (required) + * @param createConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createConfigCall( - CreateConfigRequest createConfigRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConfigCall(CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2277,200 +1849,133 @@ public okhttp3.Call createConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConfigValidateBeforeCall( - CreateConfigRequest createConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConfigValidateBeforeCall(CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConfigRequest' is set if (createConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConfigRequest' when calling" - + " createConfig(Async)"); + throw new ApiException("Missing the required parameter 'createConfigRequest' when calling createConfig(Async)"); } return createConfigCall(createConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot - * development and production environments to the development and production branches of a Git - * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git - * repository, check the following prerequisites: * You have a Git repository. If you are using - * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to - * GitHub. For information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. - * - * @param createConfigRequest (required) + * + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest (required) * @return RepoConfigObject - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public RepoConfigObject createConfig(CreateConfigRequest createConfigRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RepoConfigObject createConfig(CreateConfigRequest createConfigRequest) throws ApiException { ApiResponse localVarResp = createConfigWithHttpInfo(createConfigRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot - * development and production environments to the development and production branches of a Git - * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git - * repository, check the following prerequisites: * You have a Git repository. If you are using - * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to - * GitHub. For information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. - * - * @param createConfigRequest (required) + * + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest (required) * @return ApiResponse<RepoConfigObject> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createConfigWithHttpInfo( - CreateConfigRequest createConfigRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConfigWithHttpInfo(CreateConfigRequest createConfigRequest) throws ApiException { okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a - * Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. You can use this API endpoint to connect your ThoughtSpot development and - * production environments to the development and production branches of a Git repository. - * Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check - * the following prerequisites: * You have a Git repository. If you are using GitHub, make sure - * you have a valid account and an access token to connect ThoughtSpot to GitHub. For - * information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. - * - * @param createConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createConfigAsync( - CreateConfigRequest createConfigRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConfigAsync(CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConnection - * - * @param createConnectionRequest (required) + * @param createConnectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createConnectionCall( - CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionCall(CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2487,273 +1992,133 @@ public okhttp3.Call createConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConnectionValidateBeforeCall( - CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConnectionValidateBeforeCall(CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConnectionRequest' is set if (createConnectionRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConnectionRequest' when calling" - + " createConnection(Async)"); + throw new ApiException("Missing the required parameter 'createConnectionRequest' when calling createConnection(Async)"); } return createConnectionCall(createConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. - * - * @param createConnectionRequest (required) + * + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * @param createConnectionRequest (required) * @return CreateConnectionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public CreateConnectionResponse createConnection( - CreateConnectionRequest createConnectionRequest) throws ApiException { - ApiResponse localVarResp = - createConnectionWithHttpInfo(createConnectionRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CreateConnectionResponse createConnection(CreateConnectionRequest createConnectionRequest) throws ApiException { + ApiResponse localVarResp = createConnectionWithHttpInfo(createConnectionRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. - * - * @param createConnectionRequest (required) + * + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * @param createConnectionRequest (required) * @return ApiResponse<CreateConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createConnectionWithHttpInfo( - CreateConnectionRequest createConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - createConnectionValidateBeforeCall(createConnectionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConnectionWithHttpInfo(CreateConnectionRequest createConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = createConnectionValidateBeforeCall(createConnectionRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Creates a connection to a data warehouse for live - * query services. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. - * - * @param createConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * @param createConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createConnectionAsync( - CreateConnectionRequest createConnectionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createConnectionValidateBeforeCall(createConnectionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionAsync(CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createConnectionValidateBeforeCall(createConnectionRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConnectionConfiguration - * - * @param createConnectionConfigurationRequest (required) + * @param createConnectionConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createConnectionConfigurationCall( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionConfigurationCall(CreateConnectionConfigurationRequest createConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2770,204 +2135,132 @@ public okhttp3.Call createConnectionConfigurationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConnectionConfigurationValidateBeforeCall( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConnectionConfigurationValidateBeforeCall(CreateConnectionConfigurationRequest createConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConnectionConfigurationRequest' is set if (createConnectionConfigurationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConnectionConfigurationRequest' when" - + " calling createConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'createConnectionConfigurationRequest' when calling createConnectionConfiguration(Async)"); } return createConnectionConfigurationCall(createConnectionConfigurationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to - * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Usage guidelines * A JSON map of configuration attributes in - * `configuration`. The following example shows the configuration attributes: - * ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. - * - * @param createConnectionConfigurationRequest (required) + * + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. + * @param createConnectionConfigurationRequest (required) * @return ConnectionConfigurationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ConnectionConfigurationResponse createConnectionConfiguration( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest) - throws ApiException { - ApiResponse localVarResp = - createConnectionConfigurationWithHttpInfo(createConnectionConfigurationRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ConnectionConfigurationResponse createConnectionConfiguration(CreateConnectionConfigurationRequest createConnectionConfigurationRequest) throws ApiException { + ApiResponse localVarResp = createConnectionConfigurationWithHttpInfo(createConnectionConfigurationRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to - * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Usage guidelines * A JSON map of configuration attributes in - * `configuration`. The following example shows the configuration attributes: - * ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. - * - * @param createConnectionConfigurationRequest (required) + * + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. + * @param createConnectionConfigurationRequest (required) * @return ApiResponse<ConnectionConfigurationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createConnectionConfigurationWithHttpInfo( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - createConnectionConfigurationValidateBeforeCall( - createConnectionConfigurationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConnectionConfigurationWithHttpInfo(CreateConnectionConfigurationRequest createConnectionConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = createConnectionConfigurationValidateBeforeCall(createConnectionConfigurationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Creates an additional configuration to an - * existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage - * data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration - * attributes in `configuration`. The following example shows the configuration - * attributes: ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. - * - * @param createConnectionConfigurationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. + * @param createConnectionConfigurationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createConnectionConfigurationAsync( - CreateConnectionConfigurationRequest createConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createConnectionConfigurationValidateBeforeCall( - createConnectionConfigurationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionConfigurationAsync(CreateConnectionConfigurationRequest createConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createConnectionConfigurationValidateBeforeCall(createConnectionConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConversation - * - * @param createConversationRequest (required) + * @param createConversationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call createConversationCall( - CreateConversationRequest createConversationRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call createConversationCall(CreateConversationRequest createConversationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -2984,182 +2277,130 @@ public okhttp3.Call createConversationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConversationValidateBeforeCall( - CreateConversationRequest createConversationRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConversationValidateBeforeCall(CreateConversationRequest createConversationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConversationRequest' is set if (createConversationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConversationRequest' when calling" - + " createConversation(Async)"); + throw new ApiException("Missing the required parameter 'createConversationRequest' when calling createConversation(Async)"); } return createConversationCall(createConversationRequest, _callback); + } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This - * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot - * support to enable Spotter on your cluster. - * - * @param createConversationRequest (required) + * + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest (required) * @return Conversation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public Conversation createConversation(CreateConversationRequest createConversationRequest) - throws ApiException { - ApiResponse localVarResp = - createConversationWithHttpInfo(createConversationRequest); + * @throws ApiException If fail to 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 Conversation createConversation(CreateConversationRequest createConversationRequest) throws ApiException { + ApiResponse localVarResp = createConversationWithHttpInfo(createConversationRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This - * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot - * support to enable Spotter on your cluster. - * - * @param createConversationRequest (required) + * + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest (required) * @return ApiResponse<Conversation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse createConversationWithHttpInfo( - CreateConversationRequest createConversationRequest) throws ApiException { - okhttp3.Call localVarCall = - createConversationValidateBeforeCall(createConversationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to 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 createConversationWithHttpInfo(CreateConversationRequest createConversationRequest) throws ApiException { + okhttp3.Call localVarCall = createConversationValidateBeforeCall(createConversationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Creates a Conversation object to start an - * AI-driven conversation based on a specific data model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This - * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot - * support to enable Spotter on your cluster. - * - * @param createConversationRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call createConversationAsync( - CreateConversationRequest createConversationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createConversationValidateBeforeCall(createConversationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException 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 createConversationAsync(CreateConversationRequest createConversationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createConversationValidateBeforeCall(createConversationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createCustomAction - * - * @param createCustomActionRequest (required) + * @param createCustomActionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createCustomActionCall( - CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCustomActionCall(CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -3176,204 +2417,132 @@ public okhttp3.Call createCustomActionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createCustomActionValidateBeforeCall( - CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createCustomActionValidateBeforeCall(CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCustomActionRequest' is set if (createCustomActionRequest == null) { - throw new ApiException( - "Missing the required parameter 'createCustomActionRequest' when calling" - + " createCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'createCustomActionRequest' when calling createCustomAction(Async)"); } return createCustomActionCall(createCustomActionRequest, _callback); + } /** - * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved - * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. #### Usage Guidelines The API lets you create the following types of custom - * actions: * URL-based action Allows pushing data to an external URL. * Callback action - * Triggers a callback to the host application and initiates a response payload on an embedded - * ThoughtSpot instance. By default, custom actions are visible to only administrator or - * developer users. To make a custom action available to other users, and specify the groups in - * `group_identifiers`. By default, the custom action is set as a _global_ action on - * all visualizations and saved Answers. To assign a custom action to specific Liveboard - * visualization, saved Answer, or Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * - * @param createCustomActionRequest (required) + * + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest (required) * @return ResponseCustomAction - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ResponseCustomAction createCustomAction( - CreateCustomActionRequest createCustomActionRequest) throws ApiException { - ApiResponse localVarResp = - createCustomActionWithHttpInfo(createCustomActionRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseCustomAction createCustomAction(CreateCustomActionRequest createCustomActionRequest) throws ApiException { + ApiResponse localVarResp = createCustomActionWithHttpInfo(createCustomActionRequest); return localVarResp.getData(); } /** - * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved - * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. #### Usage Guidelines The API lets you create the following types of custom - * actions: * URL-based action Allows pushing data to an external URL. * Callback action - * Triggers a callback to the host application and initiates a response payload on an embedded - * ThoughtSpot instance. By default, custom actions are visible to only administrator or - * developer users. To make a custom action available to other users, and specify the groups in - * `group_identifiers`. By default, the custom action is set as a _global_ action on - * all visualizations and saved Answers. To assign a custom action to specific Liveboard - * visualization, saved Answer, or Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * - * @param createCustomActionRequest (required) + * + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest (required) * @return ApiResponse<ResponseCustomAction> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createCustomActionWithHttpInfo( - CreateCustomActionRequest createCustomActionRequest) throws ApiException { - okhttp3.Call localVarCall = - createCustomActionValidateBeforeCall(createCustomActionRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCustomActionWithHttpInfo(CreateCustomActionRequest createCustomActionRequest) throws ApiException { + okhttp3.Call localVarCall = createCustomActionValidateBeforeCall(createCustomActionRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.6.0.cl or later Creates a custom action that appears as a menu - * action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API lets you create the following types of custom actions: * URL-based action - * Allows pushing data to an external URL. * Callback action Triggers a callback to the host - * application and initiates a response payload on an embedded ThoughtSpot instance. By default, - * custom actions are visible to only administrator or developer users. To make a custom action - * available to other users, and specify the groups in `group_identifiers`. By - * default, the custom action is set as a _global_ action on all visualizations and saved - * Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or - * Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * - * @param createCustomActionRequest (required) + * (asynchronously) + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createCustomActionAsync( - CreateCustomActionRequest createCustomActionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createCustomActionValidateBeforeCall(createCustomActionRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCustomActionAsync(CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCustomActionValidateBeforeCall(createCustomActionRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createEmailCustomization - * - * @param createEmailCustomizationRequest (required) + * @param createEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call createEmailCustomizationCall( - CreateEmailCustomizationRequest createEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call createEmailCustomizationCall(CreateEmailCustomizationRequest createEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -3390,228 +2559,130 @@ public okhttp3.Call createEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createEmailCustomizationValidateBeforeCall( - CreateEmailCustomizationRequest createEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createEmailCustomizationValidateBeforeCall(CreateEmailCustomizationRequest createEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createEmailCustomizationRequest' is set if (createEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'createEmailCustomizationRequest' when calling" - + " createEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'createEmailCustomizationRequest' when calling createEmailCustomization(Async)"); } return createEmailCustomizationCall(createEmailCustomizationRequest, _callback); + } /** - * Version: 10.10.0.cl or later Creates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To create a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param createEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param createEmailCustomizationRequest (required) * @return CreateEmailCustomizationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public CreateEmailCustomizationResponse createEmailCustomization( - CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { - ApiResponse localVarResp = - createEmailCustomizationWithHttpInfo(createEmailCustomizationRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public CreateEmailCustomizationResponse createEmailCustomization(CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + ApiResponse localVarResp = createEmailCustomizationWithHttpInfo(createEmailCustomizationRequest); return localVarResp.getData(); } /** - * Version: 10.10.0.cl or later Creates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To create a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param createEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param createEmailCustomizationRequest (required) * @return ApiResponse<CreateEmailCustomizationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse createEmailCustomizationWithHttpInfo( - CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { - okhttp3.Call localVarCall = - createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse createEmailCustomizationWithHttpInfo(CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.10.0.cl or later Creates a customization configuration for the - * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines To create a custom configuration pass these - * parameters in your API request: - A JSON map of configuration attributes - * `template_properties`. The following example shows a sample set of customization - * configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", - * \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": - * \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : - * \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param createEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param createEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call createEmailCustomizationAsync( - CreateEmailCustomizationRequest createEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createEmailCustomizationValidateBeforeCall( - createEmailCustomizationRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call createEmailCustomizationAsync(CreateEmailCustomizationRequest createEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createOrg - * - * @param createOrgRequest (required) + * @param createOrgRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createOrgCall( - CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createOrgCall(CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -3628,69 +2699,53 @@ public okhttp3.Call createOrgCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createOrgValidateBeforeCall( - CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createOrgValidateBeforeCall(CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createOrgRequest' is set if (createOrgRequest == null) { - throw new ApiException( - "Missing the required parameter 'createOrgRequest' when calling" - + " createOrg(Async)"); + throw new ApiException("Missing the required parameter 'createOrgRequest' when calling createOrg(Async)"); } return createOrgCall(createOrgRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. - * - * @param createOrgRequest (required) + * + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest (required) * @return OrgResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public OrgResponse createOrg(CreateOrgRequest createOrgRequest) throws ApiException { ApiResponse localVarResp = createOrgWithHttpInfo(createOrgRequest); @@ -3698,96 +2753,79 @@ public OrgResponse createOrg(CreateOrgRequest createOrgRequest) throws ApiExcept } /** - * Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. - * - * @param createOrgRequest (required) + * + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest (required) * @return ApiResponse<OrgResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createOrgWithHttpInfo(CreateOrgRequest createOrgRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createOrgWithHttpInfo(CreateOrgRequest createOrgRequest) throws ApiException { okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. - * - * @param createOrgRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createOrgAsync( - CreateOrgRequest createOrgRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createOrgAsync(CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createRole - * - * @param createRoleRequest (required) + * @param createRoleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public okhttp3.Call createRoleCall( - CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call createRoleCall(CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -3804,67 +2842,53 @@ public okhttp3.Call createRoleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createRoleValidateBeforeCall( - CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createRoleValidateBeforeCall(CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createRoleRequest' is set if (createRoleRequest == null) { - throw new ApiException( - "Missing the required parameter 'createRoleRequest' when calling" - + " createRole(Async)"); + throw new ApiException("Missing the required parameter 'createRoleRequest' when calling createRole(Async)"); } return createRoleCall(createRoleRequest, _callback); + } /** - * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param createRoleRequest (required) + * + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest (required) * @return RoleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ public RoleResponse createRole(CreateRoleRequest createRoleRequest) throws ApiException { ApiResponse localVarResp = createRoleWithHttpInfo(createRoleRequest); @@ -3872,93 +2896,79 @@ public RoleResponse createRole(CreateRoleRequest createRoleRequest) throws ApiEx } /** - * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param createRoleRequest (required) + * + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest (required) * @return ApiResponse<RoleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public ApiResponse createRoleWithHttpInfo(CreateRoleRequest createRoleRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse createRoleWithHttpInfo(CreateRoleRequest createRoleRequest) throws ApiException { okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available - * only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param createRoleRequest (required) + * (asynchronously) + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public okhttp3.Call createRoleAsync( - CreateRoleRequest createRoleRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call createRoleAsync(CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createSchedule - * - * @param createScheduleRequest (required) + * @param createScheduleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createScheduleCall( - CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createScheduleCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -3975,223 +2985,133 @@ public okhttp3.Call createScheduleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createScheduleValidateBeforeCall( - CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createScheduleValidateBeforeCall(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createScheduleRequest' is set if (createScheduleRequest == null) { - throw new ApiException( - "Missing the required parameter 'createScheduleRequest' when calling" - + " createSchedule(Async)"); + throw new ApiException("Missing the required parameter 'createScheduleRequest' when calling createSchedule(Async)"); } return createScheduleCall(createScheduleRequest, _callback); + } /** - * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at - * least edit access to Liveboards. To create a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). - * - * @param createScheduleRequest (required) + * + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest (required) * @return ResponseSchedule - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ResponseSchedule createSchedule(CreateScheduleRequest createScheduleRequest) - throws ApiException { - ApiResponse localVarResp = - createScheduleWithHttpInfo(createScheduleRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseSchedule createSchedule(CreateScheduleRequest createScheduleRequest) throws ApiException { + ApiResponse localVarResp = createScheduleWithHttpInfo(createScheduleRequest); return localVarResp.getData(); } /** - * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at - * least edit access to Liveboards. To create a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). - * - * @param createScheduleRequest (required) + * + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest (required) * @return ApiResponse<ResponseSchedule> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createScheduleWithHttpInfo( - CreateScheduleRequest createScheduleRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createScheduleWithHttpInfo(CreateScheduleRequest createScheduleRequest) throws ApiException { okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule - * job. Requires at least edit access to Liveboards. To create a schedule on behalf of another - * user, you need `ADMINISTRATION` (**Can administer Org**) or - * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the - * Liveboard. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). - * - * @param createScheduleRequest (required) + * (asynchronously) + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createScheduleAsync( - CreateScheduleRequest createScheduleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createScheduleValidateBeforeCall(createScheduleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createScheduleAsync(CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createTag - * - * @param createTagRequest (required) + * @param createTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createTagCall( - CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createTagCall(CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -4208,70 +3128,53 @@ public okhttp3.Call createTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createTagValidateBeforeCall( - CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createTagValidateBeforeCall(CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createTagRequest' is set if (createTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'createTagRequest' when calling" - + " createTag(Async)"); + throw new ApiException("Missing the required parameter 'createTagRequest' when calling createTag(Async)"); } return createTagCall(createTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata - * object. For example, you can create a tag to designate subject areas, such as sales, HR, - * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * - * @param createTagRequest (required) + * + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest (required) * @return Tag - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public Tag createTag(CreateTagRequest createTagRequest) throws ApiException { ApiResponse localVarResp = createTagWithHttpInfo(createTagRequest); @@ -4279,98 +3182,79 @@ public Tag createTag(CreateTagRequest createTagRequest) throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata - * object. For example, you can create a tag to designate subject areas, such as sales, HR, - * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * - * @param createTagRequest (required) + * + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest (required) * @return ApiResponse<Tag> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createTagWithHttpInfo(CreateTagRequest createTagRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createTagWithHttpInfo(CreateTagRequest createTagRequest) throws ApiException { okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a tag object. Tags are labels that - * identify a metadata object. For example, you can create a tag to designate subject areas, - * such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * - * @param createTagRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createTagAsync( - CreateTagRequest createTagRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createTagAsync(CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createUser - * - * @param createUserRequest (required) + * @param createUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createUserCall( - CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserCall(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -4387,73 +3271,53 @@ public okhttp3.Call createUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUserValidateBeforeCall( - CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createUserValidateBeforeCall(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createUserRequest' is set if (createUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'createUserRequest' when calling" - + " createUser(Async)"); + throw new ApiException("Missing the required parameter 'createUserRequest' when calling createUser(Async)"); } return createUserCall(createUserRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to - * configure several user properties such as email address, account status, share notification - * preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param createUserRequest (required) + * + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest (required) * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public User createUser(CreateUserRequest createUserRequest) throws ApiException { ApiResponse localVarResp = createUserWithHttpInfo(createUserRequest); @@ -4461,105 +3325,79 @@ public User createUser(CreateUserRequest createUserRequest) throws ApiException } /** - * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to - * configure several user properties such as email address, account status, share notification - * preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param createUserRequest (required) + * + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest (required) * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createUserWithHttpInfo(CreateUserRequest createUserRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createUserWithHttpInfo(CreateUserRequest createUserRequest) throws ApiException { okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint - * allows you to configure several user properties such as email address, account status, share - * notification preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param createUserRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createUserAsync( - CreateUserRequest createUserRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserAsync(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createUserGroup - * - * @param createUserGroupRequest (required) + * @param createUserGroupRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createUserGroupCall( - CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserGroupCall(CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -4576,184 +3414,133 @@ public okhttp3.Call createUserGroupCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUserGroupValidateBeforeCall( - CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createUserGroupValidateBeforeCall(CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createUserGroupRequest' is set if (createUserGroupRequest == null) { - throw new ApiException( - "Missing the required parameter 'createUserGroupRequest' when calling" - + " createUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'createUserGroupRequest' when calling createUserGroup(Async)"); } return createUserGroupCall(createUserGroupRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard - * - * @param createUserGroupRequest (required) + * + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest (required) * @return UserGroupResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public UserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) - throws ApiException { - ApiResponse localVarResp = - createUserGroupWithHttpInfo(createUserGroupRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public UserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) throws ApiException { + ApiResponse localVarResp = createUserGroupWithHttpInfo(createUserGroupRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard - * - * @param createUserGroupRequest (required) + * + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest (required) * @return ApiResponse<UserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createUserGroupWithHttpInfo( - CreateUserGroupRequest createUserGroupRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createUserGroupWithHttpInfo(CreateUserGroupRequest createUserGroupRequest) throws ApiException { okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard - * - * @param createUserGroupRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createUserGroupAsync( - CreateUserGroupRequest createUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserGroupAsync(CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createVariable - * - * @param createVariableRequest (required) + * @param createVariableRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createVariableCall( - CreateVariableRequest createVariableRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createVariableCall(CreateVariableRequest createVariableRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -4770,159 +3557,252 @@ public okhttp3.Call createVariableCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createVariableValidateBeforeCall( - CreateVariableRequest createVariableRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createVariableValidateBeforeCall(CreateVariableRequest createVariableRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createVariableRequest' is set if (createVariableRequest == null) { - throw new ApiException( - "Missing the required parameter 'createVariableRequest' when calling" - + " createVariable(Async)"); + throw new ApiException("Missing the required parameter 'createVariableRequest' when calling createVariable(Async)"); } return createVariableCall(createVariableRequest, _callback); + } /** - * Create a variable which can be used for parameterizing metadata objects Version: 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 - * - * @param createVariableRequest (required) + * + * 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 - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Variable createVariable(CreateVariableRequest createVariableRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Variable createVariable(CreateVariableRequest createVariableRequest) throws ApiException { ApiResponse localVarResp = createVariableWithHttpInfo(createVariableRequest); return localVarResp.getData(); } /** - * Create a variable which can be used for parameterizing metadata objects Version: 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 - * - * @param createVariableRequest (required) + * + * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse createVariableWithHttpInfo( - CreateVariableRequest createVariableRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createVariableWithHttpInfo(CreateVariableRequest createVariableRequest) throws ApiException { okhttp3.Call localVarCall = createVariableValidateBeforeCall(createVariableRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createVariableAsync(CreateVariableRequest createVariableRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createVariableValidateBeforeCall(createVariableRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createWebhookConfiguration + * @param createWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationCall(CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createWebhookConfigurationValidateBeforeCall(CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createWebhookConfigurationRequest' is set + if (createWebhookConfigurationRequest == null) { + throw new ApiException("Missing the required parameter 'createWebhookConfigurationRequest' when calling createWebhookConfiguration(Async)"); + } + + return createWebhookConfigurationCall(createWebhookConfigurationRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest (required) + * @return WebhookResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookResponse createWebhookConfiguration(CreateWebhookConfigurationRequest createWebhookConfigurationRequest) throws ApiException { + ApiResponse localVarResp = createWebhookConfigurationWithHttpInfo(createWebhookConfigurationRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest (required) + * @return ApiResponse<WebhookResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createWebhookConfigurationWithHttpInfo(CreateWebhookConfigurationRequest createWebhookConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = createWebhookConfigurationValidateBeforeCall(createWebhookConfigurationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) 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 - * - * @param createVariableRequest (required) + * (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 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call createVariableAsync( - CreateVariableRequest createVariableRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - createVariableValidateBeforeCall(createVariableRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException 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) @@ -4932,43 +3812,30 @@ public okhttp3.Call createVariableAsync( * @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 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 { + + + + + + + + +
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[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -5025,91 +3892,45 @@ public okhttp3.Call dbtConnectionCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + 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 { + 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)"); + throw new ApiException("Missing the required parameter 'connectionName' when calling dbtConnection(Async)"); } // verify the required parameter 'databaseName' is set if (databaseName == null) { - throw new ApiException( - "Missing the required parameter 'databaseName' when calling" - + " dbtConnection(Async)"); - } - - return dbtConnectionCall( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); - } - - /** - * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. - * + throw new ApiException("Missing the required parameter 'databaseName' when calling dbtConnection(Async)"); + } + + return dbtConnectionCall(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + + } + + /** + * + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -5119,64 +3940,28 @@ private okhttp3.Call dbtConnectionValidateBeforeCall( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Object dbtConnection( - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - ApiResponse localVarResp = - dbtConnectionWithHttpInfo( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtConnection(String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + ApiResponse localVarResp = dbtConnectionWithHttpInfo(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. - * + * + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -5186,66 +3971,29 @@ public Object dbtConnection( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse dbtConnectionWithHttpInfo( - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - okhttp3.Call localVarCall = - dbtConnectionValidateBeforeCall( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtConnectionWithHttpInfo(String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + okhttp3.Call localVarCall = dbtConnectionValidateBeforeCall(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. - * + * (asynchronously) + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. (required) * @param databaseName Name of the Database. (required) * @param importType Mention type of Import (optional, default to DBT_CLOUD) @@ -5255,85 +4003,55 @@ public ApiResponse dbtConnectionWithHttpInfo( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call dbtConnectionAsync( - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - dbtConnectionValidateBeforeCall( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtConnectionAsync(String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = dbtConnectionValidateBeforeCall(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for dbtGenerateSyncTml - * * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call dbtGenerateSyncTmlCall( - String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateSyncTmlCall(String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -5358,202 +4076,140 @@ public okhttp3.Call dbtGenerateSyncTmlCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call dbtGenerateSyncTmlValidateBeforeCall( - String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call dbtGenerateSyncTmlValidateBeforeCall(String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " dbtGenerateSyncTml(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling dbtGenerateSyncTml(Async)"); } return dbtGenerateSyncTmlCall(dbtConnectionIdentifier, fileContent, _callback); + } /** - * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s - * and import them to Thoughtspot based on the DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Object dbtGenerateSyncTml(String dbtConnectionIdentifier, File fileContent) - throws ApiException { - ApiResponse localVarResp = - dbtGenerateSyncTmlWithHttpInfo(dbtConnectionIdentifier, fileContent); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtGenerateSyncTml(String dbtConnectionIdentifier, File fileContent) throws ApiException { + ApiResponse localVarResp = dbtGenerateSyncTmlWithHttpInfo(dbtConnectionIdentifier, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s - * and import them to Thoughtspot based on the DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse dbtGenerateSyncTmlWithHttpInfo( - String dbtConnectionIdentifier, File fileContent) throws ApiException { - okhttp3.Call localVarCall = - dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtGenerateSyncTmlWithHttpInfo(String dbtConnectionIdentifier, File fileContent) throws ApiException { + okhttp3.Call localVarCall = dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Resynchronize the existing list of models, - * tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * (asynchronously) + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) - * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field - * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call dbtGenerateSyncTmlAsync( - String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - dbtGenerateSyncTmlValidateBeforeCall( - dbtConnectionIdentifier, fileContent, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateSyncTmlAsync(String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for dbtGenerateTml - * * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call dbtGenerateTmlCall( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateTmlCall(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -5590,252 +4246,154 @@ public okhttp3.Call dbtGenerateTmlCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call dbtGenerateTmlValidateBeforeCall( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call dbtGenerateTmlValidateBeforeCall(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " dbtGenerateTml(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling dbtGenerateTml(Async)"); + } + + // verify the required parameter 'modelTables' is set + if (modelTables == null) { + throw new ApiException("Missing the required parameter 'modelTables' when calling dbtGenerateTml(Async)"); } // verify the required parameter 'importWorksheets' is set if (importWorksheets == null) { - throw new ApiException( - "Missing the required parameter 'importWorksheets' when calling" - + " dbtGenerateTml(Async)"); - } - - return dbtGenerateTmlCall( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent, - _callback); - } - - /** - * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. - * + throw new ApiException("Missing the required parameter 'importWorksheets' when calling dbtGenerateTml(Async)"); + } + + return dbtGenerateTmlCall(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _callback); + + } + + /** + * + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Object dbtGenerateTml( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent) - throws ApiException { - ApiResponse localVarResp = - dbtGenerateTmlWithHttpInfo( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtGenerateTml(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent) throws ApiException { + ApiResponse localVarResp = dbtGenerateTmlWithHttpInfo(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. - * + * + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse dbtGenerateTmlWithHttpInfo( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent) - throws ApiException { - okhttp3.Call localVarCall = - dbtGenerateTmlValidateBeforeCall( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent, - null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtGenerateTmlWithHttpInfo(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent) throws ApiException { + okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Generate required table and worksheet and import - * them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. - * + * (asynchronously) + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: '[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]' (required) * @param importWorksheets Mention the worksheet tmls to import (required) - * @param modelTables List of Models and their respective Tables (optional) - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (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 worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call dbtGenerateTmlAsync( - String dbtConnectionIdentifier, - String importWorksheets, - String modelTables, - String worksheets, - File fileContent, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - dbtGenerateTmlValidateBeforeCall( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent, - _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateTmlAsync(String dbtConnectionIdentifier, String modelTables, String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for dbtSearch - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call dbtSearchCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -5852,66 +4410,46 @@ public okhttp3.Call dbtSearchCall(final ApiCallback _callback) throws ApiExcepti Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call dbtSearchValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call dbtSearchValidateBeforeCall(final ApiCallback _callback) throws ApiException { return dbtSearchCall(_callback); + } /** - * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, - * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. - * + * + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * @return List<DbtSearchResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List dbtSearch() throws ApiException { ApiResponse> localVarResp = dbtSearchWithHttpInfo(); @@ -5919,104 +4457,77 @@ public List dbtSearch() throws ApiException { } /** - * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, - * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. - * + * + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * @return ApiResponse<List<DbtSearchResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse> dbtSearchWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and - * organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. - * + * (asynchronously) + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call dbtSearchAsync(final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtSearchAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deactivateUser - * - * @param deactivateUserRequest (required) + * @param deactivateUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deactivateUserCall( - DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deactivateUserCall(DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -6033,180 +4544,133 @@ public okhttp3.Call deactivateUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deactivateUserValidateBeforeCall( - DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deactivateUserValidateBeforeCall(DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deactivateUserRequest' is set if (deactivateUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'deactivateUserRequest' when calling" - + " deactivateUser(Async)"); + throw new ApiException("Missing the required parameter 'deactivateUserRequest' when calling deactivateUser(Async)"); } return deactivateUserCall(deactivateUserRequest, _callback); + } /** - * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` - * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a - * user account, the API request body must include the following information: - Username or the - * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is - * successful, ThoughtSpot returns the activation URL in the response. The activation URL is - * valid for 14 days and can be used to re-activate the account and reset the password of the - * deactivated account. - * - * @param deactivateUserRequest (required) + * + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest (required) * @return ResponseActivationURL - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ResponseActivationURL deactivateUser(DeactivateUserRequest deactivateUserRequest) - throws ApiException { - ApiResponse localVarResp = - deactivateUserWithHttpInfo(deactivateUserRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseActivationURL deactivateUser(DeactivateUserRequest deactivateUserRequest) throws ApiException { + ApiResponse localVarResp = deactivateUserWithHttpInfo(deactivateUserRequest); return localVarResp.getData(); } /** - * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` - * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a - * user account, the API request body must include the following information: - Username or the - * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is - * successful, ThoughtSpot returns the activation URL in the response. The activation URL is - * valid for 14 days and can be used to re-activate the account and reset the password of the - * deactivated account. - * - * @param deactivateUserRequest (required) + * + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest (required) * @return ApiResponse<ResponseActivationURL> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deactivateUserWithHttpInfo( - DeactivateUserRequest deactivateUserRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deactivateUserWithHttpInfo(DeactivateUserRequest deactivateUserRequest) throws ApiException { okhttp3.Call localVarCall = deactivateUserValidateBeforeCall(deactivateUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.7.0.cl or later Deactivates a user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To - * deactivate a user account, the API request body must include the following information: - - * Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API - * request is successful, ThoughtSpot returns the activation URL in the response. The activation - * URL is valid for 14 days and can be used to re-activate the account and reset the password of - * the deactivated account. - * - * @param deactivateUserRequest (required) + * (asynchronously) + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deactivateUserAsync( - DeactivateUserRequest deactivateUserRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deactivateUserValidateBeforeCall(deactivateUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deactivateUserAsync(DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deactivateUserValidateBeforeCall(deactivateUserRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteCalendar - * * @param calendarIdentifier Unique ID or name of the Calendar. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -6215,11 +4679,8 @@ public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/calendars/{calendar_identifier}/delete" - .replace( - "{" + "calendar_identifier" + "}", - localVarApiClient.escapeString(calendarIdentifier.toString())); + String localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete" + .replace("{" + "calendar_identifier" + "}", localVarApiClient.escapeString(calendarIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6227,134 +4688,97 @@ public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCalendarValidateBeforeCall( - String calendarIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteCalendarValidateBeforeCall(String calendarIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'calendarIdentifier' is set if (calendarIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'calendarIdentifier' when calling" - + " deleteCalendar(Async)"); + throw new ApiException("Missing the required parameter 'calendarIdentifier' when calling deleteCalendar(Async)"); } return deleteCalendarCall(calendarIdentifier, _callback); + } /** - * Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. - * + * + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * @param calendarIdentifier Unique ID or name of the Calendar. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteCalendar(String calendarIdentifier) throws ApiException { deleteCalendarWithHttpInfo(calendarIdentifier); } /** - * Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. - * + * + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * @param calendarIdentifier Unique ID or name of the Calendar. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteCalendarWithHttpInfo(String calendarIdentifier) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteCalendarWithHttpInfo(String calendarIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. - * + * (asynchronously) + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * @param calendarIdentifier Unique ID or name of the Calendar. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteCalendarAsync( - String calendarIdentifier, final ApiCallback _callback) throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCalendarAsync(String calendarIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -6362,33 +4786,30 @@ public okhttp3.Call deleteCalendarAsync( } /** * Build call for deleteConfig - * - * @param deleteConfigRequest (required) + * @param deleteConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteConfigCall( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigCall(DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -6405,128 +4826,98 @@ public okhttp3.Call deleteConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConfigValidateBeforeCall( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteConfigValidateBeforeCall(DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteConfigRequest' is set if (deleteConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteConfigRequest' when calling" - + " deleteConfig(Async)"); + throw new ApiException("Missing the required parameter 'deleteConfigRequest' when calling deleteConfig(Async)"); } return deleteConfigCall(deleteConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param deleteConfigRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteConfig(DeleteConfigRequest deleteConfigRequest) throws ApiException { deleteConfigWithHttpInfo(deleteConfigRequest); } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param deleteConfigRequest (required) + * + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) throws ApiException { okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later Deletes Git repository configuration from your - * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. - * - * @param deleteConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteConfigAsync( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigAsync(DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -6534,36 +4925,32 @@ public okhttp3.Call deleteConfigAsync( } /** * Build call for deleteConnection - * - * @param deleteConnectionRequest (required) + * @param deleteConnectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteConnectionCall( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConnectionCall(DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -6580,190 +4967,136 @@ public okhttp3.Call deleteConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionValidateBeforeCall( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteConnectionValidateBeforeCall(DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteConnectionRequest' is set if (deleteConnectionRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteConnectionRequest' when calling" - + " deleteConnection(Async)"); + throw new ApiException("Missing the required parameter 'deleteConnectionRequest' when calling deleteConnection(Async)"); } return deleteConnectionCall(deleteConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete - * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your - * connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. - * - * @param deleteConnectionRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public void deleteConnection(DeleteConnectionRequest deleteConnectionRequest) - throws ApiException { + public void deleteConnection(DeleteConnectionRequest deleteConnectionRequest) throws ApiException { deleteConnectionWithHttpInfo(deleteConnectionRequest); } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete - * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your - * connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. - * - * @param deleteConnectionRequest (required) + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public ApiResponse deleteConnectionWithHttpInfo( - DeleteConnectionRequest deleteConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionValidateBeforeCall(deleteConnectionRequest, null); + public ApiResponse deleteConnectionWithHttpInfo(DeleteConnectionRequest deleteConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = deleteConnectionValidateBeforeCall(deleteConnectionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and - * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the - * [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to - * delete your connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. - * - * @param deleteConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteConnectionAsync( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConnectionAsync(DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionValidateBeforeCall(deleteConnectionRequest, _callback); + okhttp3.Call localVarCall = deleteConnectionValidateBeforeCall(deleteConnectionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteConnectionConfiguration - * - * @param deleteConnectionConfigurationRequest (required) + * @param deleteConnectionConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteConnectionConfigurationCall( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionConfigurationCall(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -6780,172 +5113,129 @@ public okhttp3.Call deleteConnectionConfigurationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionConfigurationValidateBeforeCall( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteConnectionConfigurationValidateBeforeCall(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteConnectionConfigurationRequest' is set if (deleteConnectionConfigurationRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteConnectionConfigurationRequest' when" - + " calling deleteConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'deleteConnectionConfigurationRequest' when calling deleteConnectionConfiguration(Async)"); } return deleteConnectionConfigurationCall(deleteConnectionConfigurationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * - * @param deleteConnectionConfigurationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void deleteConnectionConfiguration( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) - throws ApiException { + * + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConnectionConfiguration(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) throws ApiException { deleteConnectionConfigurationWithHttpInfo(deleteConnectionConfigurationRequest); } /** - * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * - * @param deleteConnectionConfigurationRequest (required) + * + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteConnectionConfigurationWithHttpInfo( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionConfigurationValidateBeforeCall( - deleteConnectionConfigurationRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConnectionConfigurationWithHttpInfo(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = deleteConnectionConfigurationValidateBeforeCall(deleteConnectionConfigurationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Deletes connection configuration objects. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * - * @param deleteConnectionConfigurationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteConnectionConfigurationAsync( - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteConnectionConfigurationValidateBeforeCall( - deleteConnectionConfigurationRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionConfigurationAsync(DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteConnectionConfigurationValidateBeforeCall(deleteConnectionConfigurationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteConnectionV2 - * * @param connectionIdentifier Unique ID or name of the connection. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteConnectionV2Call( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionV2Call(String connectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -6954,11 +5244,8 @@ public okhttp3.Call deleteConnectionV2Call( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/{connection_identifier}/delete" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6966,167 +5253,128 @@ public okhttp3.Call deleteConnectionV2Call( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionV2ValidateBeforeCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteConnectionV2ValidateBeforeCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " deleteConnectionV2(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling deleteConnectionV2(Async)"); } return deleteConnectionV2Call(connectionIdentifier, _callback); + } /** - * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has - * dependent objects, make sure you remove its associations before the delete operation. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * + * + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * @param connectionIdentifier Unique ID or name of the connection. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteConnectionV2(String connectionIdentifier) throws ApiException { deleteConnectionV2WithHttpInfo(connectionIdentifier); } /** - * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has - * dependent objects, make sure you remove its associations before the delete operation. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. - * + * + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * @param connectionIdentifier Unique ID or name of the connection. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteConnectionV2WithHttpInfo(String connectionIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteConnectionV2ValidateBeforeCall(connectionIdentifier, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConnectionV2WithHttpInfo(String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteConnectionV2ValidateBeforeCall(connectionIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a - * connection has dependent objects, make sure you remove its associations before the delete - * operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to - * the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - * + * (asynchronously) + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * @param connectionIdentifier Unique ID or name of the connection. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteConnectionV2Async( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = - deleteConnectionV2ValidateBeforeCall(connectionIdentifier, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionV2Async(String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteConnectionV2ValidateBeforeCall(connectionIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteCustomAction - * * @param customActionIdentifier Unique ID or name of the custom action. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteCustomActionCall( - String customActionIdentifier, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCustomActionCall(String customActionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -7135,11 +5383,8 @@ public okhttp3.Call deleteCustomActionCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete" - .replace( - "{" + "custom_action_identifier" + "}", - localVarApiClient.escapeString(customActionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete" + .replace("{" + "custom_action_identifier" + "}", localVarApiClient.escapeString(customActionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7147,160 +5392,128 @@ public okhttp3.Call deleteCustomActionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCustomActionValidateBeforeCall( - String customActionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteCustomActionValidateBeforeCall(String customActionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customActionIdentifier' is set if (customActionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'customActionIdentifier' when calling" - + " deleteCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'customActionIdentifier' when calling deleteCustomAction(Async)"); } return deleteCustomActionCall(customActionIdentifier, _callback); + } /** - * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * + * + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteCustomAction(String customActionIdentifier) throws ApiException { deleteCustomActionWithHttpInfo(customActionIdentifier); } /** - * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * + * + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * @param customActionIdentifier Unique ID or name of the custom action. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteCustomActionWithHttpInfo(String customActionIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteCustomActionValidateBeforeCall(customActionIdentifier, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteCustomActionWithHttpInfo(String customActionIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteCustomActionValidateBeforeCall(customActionIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.6.0.cl or later Removes the custom action specified in the API - * request. Requires `DEVELOPER` (**Has Developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. - * + * (asynchronously) + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * @param customActionIdentifier Unique ID or name of the custom action. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteCustomActionAsync( - String customActionIdentifier, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = - deleteCustomActionValidateBeforeCall(customActionIdentifier, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCustomActionAsync(String customActionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCustomActionValidateBeforeCall(customActionIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteDbtConnection - * * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteDbtConnectionCall( - String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteDbtConnectionCall(String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -7309,11 +5522,8 @@ public okhttp3.Call deleteDbtConnectionCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete" - .replace( - "{" + "dbt_connection_identifier" + "}", - localVarApiClient.escapeString(dbtConnectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete" + .replace("{" + "dbt_connection_identifier" + "}", localVarApiClient.escapeString(dbtConnectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7321,171 +5531,129 @@ public okhttp3.Call deleteDbtConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDbtConnectionValidateBeforeCall( - String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteDbtConnectionValidateBeforeCall(String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " deleteDbtConnection(Async)"); + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling deleteDbtConnection(Async)"); } return deleteDbtConnectionCall(dbtConnectionIdentifier, _callback); + } /** - * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteDbtConnection(String dbtConnectionIdentifier) throws ApiException { deleteDbtConnectionWithHttpInfo(dbtConnectionIdentifier); } /** - * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteDbtConnectionWithHttpInfo(String dbtConnectionIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteDbtConnectionWithHttpInfo(String dbtConnectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.9.0.cl or later Removes the specified DBT connection object from - * the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based - * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your - * instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * + * (asynchronously) + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteDbtConnectionAsync( - String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = - deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteDbtConnectionAsync(String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteEmailCustomization - * * @param templateIdentifier Unique ID or name of the email customization. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteEmailCustomizationCall( - String templateIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteEmailCustomizationCall(String templateIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -7494,11 +5662,8 @@ public okhttp3.Call deleteEmailCustomizationCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/email/{template_identifier}/delete" - .replace( - "{" + "template_identifier" + "}", - localVarApiClient.escapeString(templateIdentifier.toString())); + String localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete" + .replace("{" + "template_identifier" + "}", localVarApiClient.escapeString(templateIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7506,72 +5671,51 @@ public okhttp3.Call deleteEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call deleteEmailCustomizationValidateBeforeCall( - String templateIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteEmailCustomizationValidateBeforeCall(String templateIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'templateIdentifier' is set if (templateIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'templateIdentifier' when calling" - + " deleteEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'templateIdentifier' when calling deleteEmailCustomization(Async)"); } return deleteEmailCustomizationCall(templateIdentifier, _callback); + } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. - * + * + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * @param templateIdentifier Unique ID or name of the email customization. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated @@ -7580,106 +5724,79 @@ public void deleteEmailCustomization(String templateIdentifier) throws ApiExcept } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. - * + * + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * @param templateIdentifier Unique ID or name of the email customization. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public ApiResponse deleteEmailCustomizationWithHttpInfo(String templateIdentifier) - throws ApiException { - okhttp3.Call localVarCall = - deleteEmailCustomizationValidateBeforeCall(templateIdentifier, null); + public ApiResponse deleteEmailCustomizationWithHttpInfo(String templateIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteEmailCustomizationValidateBeforeCall(templateIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.10.0.cl or later Deletes the configuration for the email - * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. - * + * (asynchronously) + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * @param templateIdentifier Unique ID or name of the email customization. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- * + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call deleteEmailCustomizationAsync( - String templateIdentifier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteEmailCustomizationAsync(String templateIdentifier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - deleteEmailCustomizationValidateBeforeCall(templateIdentifier, _callback); + okhttp3.Call localVarCall = deleteEmailCustomizationValidateBeforeCall(templateIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteMetadata - * - * @param deleteMetadataRequest (required) + * @param deleteMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteMetadataCall( - DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteMetadataCall(DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -7696,152 +5813,129 @@ public okhttp3.Call deleteMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMetadataValidateBeforeCall( - DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteMetadataValidateBeforeCall(DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteMetadataRequest' is set if (deleteMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteMetadataRequest' when calling" - + " deleteMetadata(Async)"); + throw new ApiException("Missing the required parameter 'deleteMetadataRequest' when calling deleteMetadata(Async)"); } return deleteMetadataCall(deleteMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. - * Requires edit access to the metadata object. - * - * @param deleteMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteMetadata(DeleteMetadataRequest deleteMetadataRequest) throws ApiException { deleteMetadataWithHttpInfo(deleteMetadataRequest); } /** - * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. - * Requires edit access to the metadata object. - * - * @param deleteMetadataRequest (required) + * + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteMetadataWithHttpInfo(DeleteMetadataRequest deleteMetadataRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteMetadataWithHttpInfo(DeleteMetadataRequest deleteMetadataRequest) throws ApiException { okhttp3.Call localVarCall = deleteMetadataValidateBeforeCall(deleteMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Removes the specified metadata object from the - * ThoughtSpot system. Requires edit access to the metadata object. - * - * @param deleteMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteMetadataAsync( - DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteMetadataValidateBeforeCall(deleteMetadataRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteMetadataAsync(DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteMetadataValidateBeforeCall(deleteMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteOrg - * * @param orgIdentifier ID or name of the Org (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -7850,11 +5944,8 @@ public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/orgs/{org_identifier}/delete" - .replace( - "{" + "org_identifier" + "}", - localVarApiClient.escapeString(orgIdentifier.toString())); + String localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete" + .replace("{" + "org_identifier" + "}", localVarApiClient.escapeString(orgIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7862,96 +5953,72 @@ public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOrgValidateBeforeCall( - String orgIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteOrgValidateBeforeCall(String orgIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'orgIdentifier' is set if (orgIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'orgIdentifier' when calling deleteOrg(Async)"); + throw new ApiException("Missing the required parameter 'orgIdentifier' when calling deleteOrg(Async)"); } return deleteOrgCall(orgIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires - * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete - * an Org, all its users and objects created in that Org context are removed. However, if the - * users in the deleted Org also exists in other Orgs, they are removed only from the deleted - * Org. - * + * + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * @param orgIdentifier ID or name of the Org (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteOrg(String orgIdentifier) throws ApiException { deleteOrgWithHttpInfo(orgIdentifier); } /** - * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires - * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete - * an Org, all its users and objects created in that Org context are removed. However, if the - * users in the deleted Org also exists in other Orgs, they are removed only from the deleted - * Org. - * + * + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * @param orgIdentifier ID or name of the Org (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteOrgWithHttpInfo(String orgIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, null); @@ -7959,32 +6026,24 @@ public ApiResponse deleteOrgWithHttpInfo(String orgIdentifier) throws ApiE } /** - * (asynchronously) Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot - * system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based - * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your - * instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * When you delete an Org, all its users and objects created in that Org context are removed. - * However, if the users in the deleted Org also exists in other Orgs, they are removed only - * from the deleted Org. - * + * (asynchronously) + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * @param orgIdentifier ID or name of the Org (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -7992,34 +6051,30 @@ public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback } /** * Build call for deleteOrgEmailCustomization - * - * @param deleteOrgEmailCustomizationRequest (required) + * @param deleteOrgEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteOrgEmailCustomizationCall( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgEmailCustomizationCall(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -8036,180 +6091,129 @@ public okhttp3.Call deleteOrgEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOrgEmailCustomizationValidateBeforeCall( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteOrgEmailCustomizationValidateBeforeCall(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteOrgEmailCustomizationRequest' is set if (deleteOrgEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteOrgEmailCustomizationRequest' when" - + " calling deleteOrgEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'deleteOrgEmailCustomizationRequest' when calling deleteOrgEmailCustomization(Async)"); } return deleteOrgEmailCustomizationCall(deleteOrgEmailCustomizationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` - * from the response. - Use that `org_identifier` as a parameter in this API request. - * - * @param deleteOrgEmailCustomizationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public void deleteOrgEmailCustomization( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) - throws ApiException { + * + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void deleteOrgEmailCustomization(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) throws ApiException { deleteOrgEmailCustomizationWithHttpInfo(deleteOrgEmailCustomizationRequest); } /** - * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` - * from the response. - Use that `org_identifier` as a parameter in this API request. - * - * @param deleteOrgEmailCustomizationRequest (required) + * + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse deleteOrgEmailCustomizationWithHttpInfo( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) - throws ApiException { - okhttp3.Call localVarCall = - deleteOrgEmailCustomizationValidateBeforeCall( - deleteOrgEmailCustomizationRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse deleteOrgEmailCustomizationWithHttpInfo(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = deleteOrgEmailCustomizationValidateBeforeCall(deleteOrgEmailCustomizationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Deletes the configuration for the email - * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines - Call the search API endpoint to get the - * `org_identifier` from the response. - Use that `org_identifier` as a - * parameter in this API request. - * - * @param deleteOrgEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteOrgEmailCustomizationAsync( - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deleteOrgEmailCustomizationValidateBeforeCall( - deleteOrgEmailCustomizationRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgEmailCustomizationAsync(DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOrgEmailCustomizationValidateBeforeCall(deleteOrgEmailCustomizationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteRole - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -8218,11 +6222,8 @@ public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _cal Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/roles/{role_identifier}/delete" - .replace( - "{" + "role_identifier" + "}", - localVarApiClient.escapeString(roleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete" + .replace("{" + "role_identifier" + "}", localVarApiClient.escapeString(roleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8230,93 +6231,72 @@ public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _cal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRoleValidateBeforeCall( - String roleIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRoleValidateBeforeCall(String roleIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'roleIdentifier' is set if (roleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'roleIdentifier' when calling" - + " deleteRole(Async)"); + throw new ApiException("Missing the required parameter 'roleIdentifier' when calling deleteRole(Async)"); } return deleteRoleCall(roleIdentifier, _callback); + } /** - * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ public void deleteRole(String roleIdentifier) throws ApiException { deleteRoleWithHttpInfo(roleIdentifier); } /** - * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) + * + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
*/ public ApiResponse deleteRoleWithHttpInfo(String roleIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, null); @@ -8324,30 +6304,24 @@ public ApiResponse deleteRoleWithHttpInfo(String roleIdentifier) throws Ap } /** - * (asynchronously) Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot - * system. Available only if [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete - * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. - * - * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. - * (required) + * (asynchronously) + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -8355,32 +6329,30 @@ public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback - * Response Details - * Status Code Description Response Headers - * 204 Schedule successfully deleted. - - * 400 Invalid request. - - * 401 Unauthorized access. - - * 403 Forbidden access. - - * 500 Unexpected error - - * - */ - public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -8389,11 +6361,8 @@ public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/schedules/{schedule_identifier}/delete" - .replace( - "{" + "schedule_identifier" + "}", - localVarApiClient.escapeString(scheduleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete" + .replace("{" + "schedule_identifier" + "}", localVarApiClient.escapeString(scheduleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8401,125 +6370,97 @@ public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteScheduleValidateBeforeCall( - String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteScheduleValidateBeforeCall(String scheduleIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scheduleIdentifier' is set if (scheduleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'scheduleIdentifier' when calling" - + " deleteSchedule(Async)"); + throw new ApiException("Missing the required parameter 'scheduleIdentifier' when calling deleteSchedule(Async)"); } return deleteScheduleCall(scheduleIdentifier, _callback); + } /** - * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. - * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer - * Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. - * + * + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteSchedule(String scheduleIdentifier) throws ApiException { deleteScheduleWithHttpInfo(scheduleIdentifier); } /** - * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. - * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer - * Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. - * + * + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteScheduleWithHttpInfo(String scheduleIdentifier) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteScheduleWithHttpInfo(String scheduleIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled - * Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` - * (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. - * + * (asynchronously) + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteScheduleAsync( - String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteScheduleAsync(String scheduleIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -8527,32 +6468,30 @@ public okhttp3.Call deleteScheduleAsync( } /** * Build call for deleteTag - * * @param tagIdentifier Tag identifier Tag name or Tag id. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -8561,11 +6500,8 @@ public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callb Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/tags/{tag_identifier}/delete" - .replace( - "{" + "tag_identifier" + "}", - localVarApiClient.escapeString(tagIdentifier.toString())); + String localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete" + .replace("{" + "tag_identifier" + "}", localVarApiClient.escapeString(tagIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8573,92 +6509,72 @@ public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTagValidateBeforeCall( - String tagIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteTagValidateBeforeCall(String tagIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tagIdentifier' is set if (tagIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'tagIdentifier' when calling deleteTag(Async)"); + throw new ApiException("Missing the required parameter 'tagIdentifier' when calling deleteTag(Async)"); } return deleteTagCall(tagIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. - * + * + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Tag identifier Tag name or Tag id. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteTag(String tagIdentifier) throws ApiException { deleteTagWithHttpInfo(tagIdentifier); } /** - * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. - * + * + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Tag identifier Tag name or Tag id. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteTagWithHttpInfo(String tagIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, null); @@ -8666,30 +6582,24 @@ public ApiResponse deleteTagWithHttpInfo(String tagIdentifier) throws ApiE } /** - * (asynchronously) Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required - * to create, edit, and delete tags. - * + * (asynchronously) + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Tag identifier Tag name or Tag id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -8697,32 +6607,30 @@ public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback } /** * Build call for deleteUser - * * @param userIdentifier GUID / name of the user (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -8731,11 +6639,8 @@ public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _cal Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/users/{user_identifier}/delete" - .replace( - "{" + "user_identifier" + "}", - localVarApiClient.escapeString(userIdentifier.toString())); + String localVarPath = "/api/rest/2.0/users/{user_identifier}/delete" + .replace("{" + "user_identifier" + "}", localVarApiClient.escapeString(userIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8743,99 +6648,72 @@ public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _cal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserValidateBeforeCall( - String userIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserValidateBeforeCall(String userIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userIdentifier' is set if (userIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'userIdentifier' when calling" - + " deleteUser(Async)"); + throw new ApiException("Missing the required parameter 'userIdentifier' when calling deleteUser(Async)"); } return deleteUserCall(userIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove - * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping - * properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteUser(String userIdentifier) throws ApiException { deleteUserWithHttpInfo(userIdentifier); } /** - * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove - * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping - * properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteUserWithHttpInfo(String userIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, null); @@ -8843,33 +6721,24 @@ public ApiResponse deleteUserWithHttpInfo(String userIdentifier) throws Ap } /** - * (asynchronously) Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If - * you want to remove a user from a specific Org but not from ThoughtSpot, update the group and - * Org mapping properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -8877,32 +6746,30 @@ public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback - * Response Details - * Status Code Description Response Headers - * 204 User group successfully deleted. - - * 400 Invalid request. - - * 401 Unauthorized access. - - * 403 Forbidden access. - - * 500 Unexpected error - - * - */ - public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -8911,11 +6778,8 @@ public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallbac Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/groups/{group_identifier}/delete" - .replace( - "{" + "group_identifier" + "}", - localVarApiClient.escapeString(groupIdentifier.toString())); + String localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete" + .replace("{" + "group_identifier" + "}", localVarApiClient.escapeString(groupIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -8923,125 +6787,97 @@ public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallbac Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserGroupValidateBeforeCall( - String groupIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserGroupValidateBeforeCall(String groupIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupIdentifier' is set if (groupIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'groupIdentifier' when calling" - + " deleteUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'groupIdentifier' when calling deleteUserGroup(Async)"); } return deleteUserGroupCall(groupIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * @param groupIdentifier GUID or name of the group. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteUserGroup(String groupIdentifier) throws ApiException { deleteUserGroupWithHttpInfo(groupIdentifier); } /** - * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * @param groupIdentifier GUID or name of the group. (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse deleteUserGroupWithHttpInfo(String groupIdentifier) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteUserGroupWithHttpInfo(String groupIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Removes the specified group object from the - * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * @param groupIdentifier GUID or name of the group. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteUserGroupAsync( - String groupIdentifier, final ApiCallback _callback) throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserGroupAsync(String groupIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -9049,32 +6885,30 @@ public okhttp3.Call deleteUserGroupAsync( } /** * Build call for deleteVariable - * * @param identifier Unique id or name of the variable (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -9083,11 +6917,8 @@ public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _cal Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/template/variables/{identifier}/delete" - .replace( - "{" + "identifier" + "}", - localVarApiClient.escapeString(identifier.toString())); + String localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete" + .replace("{" + "identifier" + "}", localVarApiClient.escapeString(identifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9095,91 +6926,72 @@ public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _cal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVariableValidateBeforeCall( - String identifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVariableValidateBeforeCall(String identifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'identifier' is set if (identifier == null) { - throw new ApiException( - "Missing the required parameter 'identifier' when calling" - + " deleteVariable(Async)"); + throw new ApiException("Missing the required parameter 'identifier' when calling deleteVariable(Async)"); } return deleteVariableCall(identifier, _callback); + } /** - * 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 - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteVariable(String identifier) throws ApiException { deleteVariableWithHttpInfo(identifier); } /** - * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteVariableWithHttpInfo(String identifier) throws ApiException { okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, null); @@ -9187,63 +6999,198 @@ 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 * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for deleteWebhookConfigurations + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsCall(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteWebhookConfigurationsValidateBeforeCall(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'deleteWebhookConfigurationsRequest' is set + if (deleteWebhookConfigurationsRequest == null) { + throw new ApiException("Missing the required parameter 'deleteWebhookConfigurationsRequest' when calling deleteWebhookConfigurations(Async)"); + } + + return deleteWebhookConfigurationsCall(deleteWebhookConfigurationsRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest (required) + * @return WebhookDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookDeleteResponse deleteWebhookConfigurations(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) throws ApiException { + ApiResponse localVarResp = deleteWebhookConfigurationsWithHttpInfo(deleteWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteWebhookConfigurationsWithHttpInfo(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) throws ApiException { + okhttp3.Call localVarCall = deleteWebhookConfigurationsValidateBeforeCall(deleteWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsAsync(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteWebhookConfigurationsValidateBeforeCall(deleteWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for deployCommit - * - * @param deployCommitRequest (required) + * @param 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 { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deployCommitCall(DeployCommitRequest deployCommitRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -9260,170 +7207,133 @@ public okhttp3.Call deployCommitCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deployCommitValidateBeforeCall( - DeployCommitRequest deployCommitRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deployCommitValidateBeforeCall(DeployCommitRequest deployCommitRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deployCommitRequest' is set if (deployCommitRequest == null) { - throw new ApiException( - "Missing the required parameter 'deployCommitRequest' when calling" - + " deployCommit(Async)"); + throw new ApiException("Missing the required parameter 'deployCommitRequest' when calling deployCommit(Async)"); } return deployCommitCall(deployCommitRequest, _callback); + } /** - * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your - * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy - * operation. The API deploys the head of the branch unless a `commit_id` is specified - * in the API request. If the branch name is not defined in the request, the default branch is - * considered for deploying commits. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param deployCommitRequest (required) + * + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest (required) * @return List<DeployResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List deployCommit(DeployCommitRequest deployCommitRequest) - throws ApiException { - ApiResponse> localVarResp = - deployCommitWithHttpInfo(deployCommitRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List deployCommit(DeployCommitRequest deployCommitRequest) throws ApiException { + ApiResponse> localVarResp = deployCommitWithHttpInfo(deployCommitRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your - * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy - * operation. The API deploys the head of the branch unless a `commit_id` is specified - * in the API request. If the branch name is not defined in the request, the default branch is - * considered for deploying commits. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param deployCommitRequest (required) + * + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest (required) * @return ApiResponse<List<DeployResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> deployCommitWithHttpInfo( - DeployCommitRequest deployCommitRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> deployCommitWithHttpInfo(DeployCommitRequest deployCommitRequest) throws ApiException { okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML - * content to your ThoughtSpot instance. Requires at least edit access to the objects used in - * the deploy operation. The API deploys the head of the branch unless a `commit_id` - * is specified in the API request. If the branch name is not defined in the request, the - * default branch is considered for deploying commits. For more information, see [Git - * integration documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param deployCommitRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call deployCommitAsync( - DeployCommitRequest deployCommitRequest, - final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deployCommitAsync(DeployCommitRequest deployCommitRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for downloadConnectionMetadataChanges - * * @param connectionIdentifier GUID of the connection (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call downloadConnectionMetadataChangesCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call downloadConnectionMetadataChangesCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -9432,11 +7342,8 @@ public okhttp3.Call downloadConnectionMetadataChangesCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9444,180 +7351,133 @@ public okhttp3.Call downloadConnectionMetadataChangesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadConnectionMetadataChangesValidateBeforeCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadConnectionMetadataChangesValidateBeforeCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " downloadConnectionMetadataChanges(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling downloadConnectionMetadataChanges(Async)"); } return downloadConnectionMetadataChangesCall(connectionIdentifier, _callback); + } /** - * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and - * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public File downloadConnectionMetadataChanges(String connectionIdentifier) throws ApiException { - ApiResponse localVarResp = - downloadConnectionMetadataChangesWithHttpInfo(connectionIdentifier); + ApiResponse localVarResp = downloadConnectionMetadataChangesWithHttpInfo(connectionIdentifier); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and - * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse downloadConnectionMetadataChangesWithHttpInfo( - String connectionIdentifier) throws ApiException { - okhttp3.Call localVarCall = - downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse downloadConnectionMetadataChangesWithHttpInfo(String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Exports the difference in connection metadata - * between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. - * + * (asynchronously) + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call downloadConnectionMetadataChangesAsync( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = - downloadConnectionMetadataChangesValidateBeforeCall( - connectionIdentifier, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call downloadConnectionMetadataChangesAsync(String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for exportAnswerReport - * - * @param exportAnswerReportRequest (required) + * @param exportAnswerReportRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportAnswerReportCall( - ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportAnswerReportCall(ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -9634,180 +7494,134 @@ public okhttp3.Call exportAnswerReportCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportAnswerReportValidateBeforeCall( - ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportAnswerReportValidateBeforeCall(ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportAnswerReportRequest' is set if (exportAnswerReportRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportAnswerReportRequest' when calling" - + " exportAnswerReport(Async)"); + throw new ApiException("Missing the required parameter 'exportAnswerReportRequest' when calling exportAnswerReport(Async)"); } return exportAnswerReportCall(exportAnswerReportRequest, _callback); + } /** - * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the - * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. - * #### Usage guidelines In the request body, the GUID or name of the Answer and set - * `file_format`. The default file format is CSV. **NOTE**: * The downloadable file - * returned in API response file is extensionless. Please rename the downloaded file by typing - * in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with - * tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. - * - * @param exportAnswerReportRequest (required) + * + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest (required) * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public File exportAnswerReport(ExportAnswerReportRequest exportAnswerReportRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File exportAnswerReport(ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { ApiResponse localVarResp = exportAnswerReportWithHttpInfo(exportAnswerReportRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the - * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. - * #### Usage guidelines In the request body, the GUID or name of the Answer and set - * `file_format`. The default file format is CSV. **NOTE**: * The downloadable file - * returned in API response file is extensionless. Please rename the downloaded file by typing - * in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with - * tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. - * - * @param exportAnswerReportRequest (required) + * + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest (required) * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse exportAnswerReportWithHttpInfo( - ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { - okhttp3.Call localVarCall = - exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportAnswerReportWithHttpInfo(ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { + okhttp3.Call localVarCall = exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Exports an Answer in the given file format. You - * can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access - * to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and - * set `file_format`. The default file format is CSV. **NOTE**: * The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. * HTML rendering is not supported for PDF exports of - * Answers with tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. - * - * @param exportAnswerReportRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportAnswerReportAsync( - ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportAnswerReportAsync(ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for exportLiveboardReport - * - * @param exportLiveboardReportRequest (required) + * @param exportLiveboardReportRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportLiveboardReportCall( - ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportLiveboardReportCall(ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -9824,218 +7638,134 @@ public okhttp3.Call exportLiveboardReportCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportLiveboardReportValidateBeforeCall( - ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportLiveboardReportValidateBeforeCall(ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportLiveboardReportRequest' is set if (exportLiveboardReportRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportLiveboardReportRequest' when calling" - + " exportLiveboardReport(Async)"); + throw new ApiException("Missing the required parameter 'exportLiveboardReportRequest' when calling exportLiveboardReport(Async)"); } return exportLiveboardReportCall(exportLiveboardReportRequest, _callback); + } /** - * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file - * format. Requires at least view access to the Liveboard. #### Usage guidelines In the request - * body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific - * visualizations, add GUIDs or names of the visualizations. The default `file_format` - * is PDF. For PDF downloads, you can specify additional parameters to customize the page - * orientation and include or exclude the cover page, logo, footer text, and page numbers. - * Similar customization options are also available for PNG output. **NOTE**: The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. - * - * @param exportLiveboardReportRequest (required) + * + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. + * @param exportLiveboardReportRequest (required) * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public File exportLiveboardReport(ExportLiveboardReportRequest exportLiveboardReportRequest) - throws ApiException { - ApiResponse localVarResp = - exportLiveboardReportWithHttpInfo(exportLiveboardReportRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File exportLiveboardReport(ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { + ApiResponse localVarResp = exportLiveboardReportWithHttpInfo(exportLiveboardReportRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file - * format. Requires at least view access to the Liveboard. #### Usage guidelines In the request - * body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific - * visualizations, add GUIDs or names of the visualizations. The default `file_format` - * is PDF. For PDF downloads, you can specify additional parameters to customize the page - * orientation and include or exclude the cover page, logo, footer text, and page numbers. - * Similar customization options are also available for PNG output. **NOTE**: The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. - * - * @param exportLiveboardReportRequest (required) + * + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. + * @param exportLiveboardReportRequest (required) * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse exportLiveboardReportWithHttpInfo( - ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { - okhttp3.Call localVarCall = - exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportLiveboardReportWithHttpInfo(ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { + okhttp3.Call localVarCall = exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF - * or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In - * the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report - * with specific visualizations, add GUIDs or names of the visualizations. The default - * `file_format` is PDF. For PDF downloads, you can specify additional parameters to - * customize the page orientation and include or exclude the cover page, logo, footer text, and - * page numbers. Similar customization options are also available for PNG output. **NOTE**: The - * downloadable file returned in API response file is extensionless. Please rename the - * downloaded file by typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. - * - * @param exportLiveboardReportRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. + * @param exportLiveboardReportRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportLiveboardReportAsync( - ExportLiveboardReportRequest exportLiveboardReportRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportLiveboardReportAsync(ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for exportMetadataTML - * - * @param exportMetadataTMLRequest (required) + * @param exportMetadataTMLRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportMetadataTMLCall( - ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLCall(ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -10052,229 +7782,133 @@ public okhttp3.Call exportMetadataTMLCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportMetadataTMLValidateBeforeCall( - ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportMetadataTMLValidateBeforeCall(ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportMetadataTMLRequest' is set if (exportMetadataTMLRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportMetadataTMLRequest' when calling" - + " exportMetadataTML(Async)"); + throw new ApiException("Missing the required parameter 'exportMetadataTMLRequest' when calling exportMetadataTML(Async)"); } return exportMetadataTMLCall(exportMetadataTMLRequest, _callback); + } /** - * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. Requires - * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata - * object. #### Usage guidelines * You can export one or several objects by passing metadata - * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard - * or Answer object, you can set `export_associated` to `true` to retrieve - * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object - * within the headers. When `export_associated` is set to `true`, consider - * retrieving one metadata object at a time. * Set `export_fqns` to `true` - * to add FQNs of the referenced objects in the TML content. For example, if you send an API - * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML - * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if - * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when - * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the - * referenced objects manually during the import operation. * To export only the TML of - * feedbacks associated with an object, set the GUID of the object as `identifier`, - * and set the `type` as `FEEDBACK` in the `metadata` array. * To - * export the TML of an object along with the feedbacks associated with it, set the GUID of the - * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). - * - * @param exportMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest (required) * @return List<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List exportMetadataTML(ExportMetadataTMLRequest exportMetadataTMLRequest) - throws ApiException { - ApiResponse> localVarResp = - exportMetadataTMLWithHttpInfo(exportMetadataTMLRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List exportMetadataTML(ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { + ApiResponse> localVarResp = exportMetadataTMLWithHttpInfo(exportMetadataTMLRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. Requires - * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata - * object. #### Usage guidelines * You can export one or several objects by passing metadata - * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard - * or Answer object, you can set `export_associated` to `true` to retrieve - * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object - * within the headers. When `export_associated` is set to `true`, consider - * retrieving one metadata object at a time. * Set `export_fqns` to `true` - * to add FQNs of the referenced objects in the TML content. For example, if you send an API - * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML - * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if - * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when - * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the - * referenced objects manually during the import operation. * To export only the TML of - * feedbacks associated with an object, set the GUID of the object as `identifier`, - * and set the `type` as `FEEDBACK` in the `metadata` array. * To - * export the TML of an object along with the feedbacks associated with it, set the GUID of the - * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). - * - * @param exportMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest (required) * @return ApiResponse<List<Object>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> exportMetadataTMLWithHttpInfo( - ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { - okhttp3.Call localVarCall = - exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> exportMetadataTMLWithHttpInfo(ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Exports the - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in - * JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at - * least view access to the metadata object. #### Usage guidelines * You can export one or - * several objects by passing metadata object GUIDs in the `metadata` array. * When - * exporting TML content for a Liveboard or Answer object, you can set - * `export_associated` to `true` to retrieve TML content for underlying - * Worksheets, Tables, or Views, including the GUID of each object within the headers. When - * `export_associated` is set to `true`, consider retrieving one metadata - * object at a time. * Set `export_fqns` to `true` to add FQNs of the - * referenced objects in the TML content. For example, if you send an API request to retrieve - * TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of - * the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple - * objects with the same name and you want to eliminate ambiguity when importing TML files into - * ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during - * the import operation. * To export only the TML of feedbacks associated with an object, set - * the GUID of the object as `identifier`, and set the `type` as - * `FEEDBACK` in the `metadata` array. * To export the TML of an object - * along with the feedbacks associated with it, set the GUID of the object as - * `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). - * - * @param exportMetadataTMLRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportMetadataTMLAsync( - ExportMetadataTMLRequest exportMetadataTMLRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLAsync(ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for exportMetadataTMLBatched - * - * @param exportMetadataTMLBatchedRequest (required) + * @param exportMetadataTMLBatchedRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportMetadataTMLBatchedCall( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLBatchedCall(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -10291,199 +7925,133 @@ public okhttp3.Call exportMetadataTMLBatchedCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call exportMetadataTMLBatchedValidateBeforeCall( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call exportMetadataTMLBatchedValidateBeforeCall(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'exportMetadataTMLBatchedRequest' is set if (exportMetadataTMLBatchedRequest == null) { - throw new ApiException( - "Missing the required parameter 'exportMetadataTMLBatchedRequest' when calling" - + " exportMetadataTMLBatched(Async)"); + throw new ApiException("Missing the required parameter 'exportMetadataTMLBatchedRequest' when calling exportMetadataTMLBatched(Async)"); } return exportMetadataTMLBatchedCall(exportMetadataTMLBatchedRequest, _callback); + } /** - * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. ### **Permissions Required** - * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` - * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for - * `USER`, `GROUP`, and `ROLES` metadata types. - - * `batch_offset` Indicates the starting position within the complete dataset from - * which the API should begin returning objects. Useful for paginating results efficiently. - - * `batch_size` Specifies the number of objects or items to retrieve in a single - * request. Helps control response size for better performance. - `edoc_format` - * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - - * `export_dependent` Specifies whether to include dependent metadata objects in the - * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` - * Indicates whether the export operation applies across all organizations. Useful for - * multi-tenant environments where cross-org exports are required. - * - * @param exportMetadataTMLBatchedRequest (required) + * + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest (required) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Object exportMetadataTMLBatched( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { - ApiResponse localVarResp = - exportMetadataTMLBatchedWithHttpInfo(exportMetadataTMLBatchedRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object exportMetadataTMLBatched(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + ApiResponse localVarResp = exportMetadataTMLBatchedWithHttpInfo(exportMetadataTMLBatchedRequest); return localVarResp.getData(); } /** - * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. ### **Permissions Required** - * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` - * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for - * `USER`, `GROUP`, and `ROLES` metadata types. - - * `batch_offset` Indicates the starting position within the complete dataset from - * which the API should begin returning objects. Useful for paginating results efficiently. - - * `batch_size` Specifies the number of objects or items to retrieve in a single - * request. Helps control response size for better performance. - `edoc_format` - * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - - * `export_dependent` Specifies whether to include dependent metadata objects in the - * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` - * Indicates whether the export operation applies across all organizations. Useful for - * multi-tenant environments where cross-org exports are required. - * - * @param exportMetadataTMLBatchedRequest (required) + * + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest (required) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse exportMetadataTMLBatchedWithHttpInfo( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { - okhttp3.Call localVarCall = - exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportMetadataTMLBatchedWithHttpInfo(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + okhttp3.Call localVarCall = exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.1.0.cl or later Exports the - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in - * JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can - * manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage - * Guidelines** This API is only applicable for `USER`, `GROUP`, and - * `ROLES` metadata types. - `batch_offset` Indicates the starting position - * within the complete dataset from which the API should begin returning objects. Useful for - * paginating results efficiently. - `batch_size` Specifies the number of objects or - * items to retrieve in a single request. Helps control response size for better performance. - - * `edoc_format` Defines the format of the TML content. The exported metadata can be - * in JSON or YAML format. - `export_dependent` Specifies whether to include dependent - * metadata objects in the export. Ensures related objects are also retrieved if needed. - - * `all_orgs_override` Indicates whether the export operation applies across all - * organizations. Useful for multi-tenant environments where cross-org exports are required. - * - * @param exportMetadataTMLBatchedRequest (required) + * (asynchronously) + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call exportMetadataTMLBatchedAsync( - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - exportMetadataTMLBatchedValidateBeforeCall( - exportMetadataTMLBatchedRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLBatchedAsync(ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchAnswerData - * - * @param fetchAnswerDataRequest (required) + * @param fetchAnswerDataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchAnswerDataCall( - FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerDataCall(FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -10500,169 +8068,133 @@ public okhttp3.Call fetchAnswerDataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchAnswerDataValidateBeforeCall( - FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchAnswerDataValidateBeforeCall(FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchAnswerDataRequest' is set if (fetchAnswerDataRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchAnswerDataRequest' when calling" - + " fetchAnswerData(Async)"); + throw new ApiException("Missing the required parameter 'fetchAnswerDataRequest' when calling fetchAnswerData(Async)"); } return fetchAnswerDataCall(fetchAnswerDataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to - * the saved Answer. The `record_size` attribute determines the number of records to - * retrieve in an API call. For more information about pagination, record size, and maximum row - * limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). - * - * @param fetchAnswerDataRequest (required) + * + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest (required) * @return AnswerDataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public AnswerDataResponse fetchAnswerData(FetchAnswerDataRequest fetchAnswerDataRequest) - throws ApiException { - ApiResponse localVarResp = - fetchAnswerDataWithHttpInfo(fetchAnswerDataRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public AnswerDataResponse fetchAnswerData(FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { + ApiResponse localVarResp = fetchAnswerDataWithHttpInfo(fetchAnswerDataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to - * the saved Answer. The `record_size` attribute determines the number of records to - * retrieve in an API call. For more information about pagination, record size, and maximum row - * limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). - * - * @param fetchAnswerDataRequest (required) + * + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest (required) * @return ApiResponse<AnswerDataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchAnswerDataWithHttpInfo( - FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAnswerDataWithHttpInfo(FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { okhttp3.Call localVarCall = fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at - * least view access to the saved Answer. The `record_size` attribute determines the - * number of records to retrieve in an API call. For more information about pagination, record - * size, and maximum row limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). - * - * @param fetchAnswerDataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchAnswerDataAsync( - FetchAnswerDataRequest fetchAnswerDataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerDataAsync(FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchAnswerSqlQuery - * - * @param fetchAnswerSqlQueryRequest (required) + * @param fetchAnswerSqlQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchAnswerSqlQueryCall( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerSqlQueryCall(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -10679,235 +8211,133 @@ public okhttp3.Call fetchAnswerSqlQueryCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchAnswerSqlQueryValidateBeforeCall( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchAnswerSqlQueryValidateBeforeCall(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchAnswerSqlQueryRequest' is set if (fetchAnswerSqlQueryRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchAnswerSqlQueryRequest' when calling" - + " fetchAnswerSqlQuery(Async)"); + throw new ApiException("Missing the required parameter 'fetchAnswerSqlQueryRequest' when calling fetchAnswerSqlQuery(Async)"); } return fetchAnswerSqlQueryCall(fetchAnswerSqlQueryRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. - * Requires at least view access to the Answer object. Upon successful execution, the API - * returns the SQL queries for the specified object as shown in this example: ``` - * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` - * - * @param fetchAnswerSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest (required) * @return SqlQueryResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public SqlQueryResponse fetchAnswerSqlQuery( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { - ApiResponse localVarResp = - fetchAnswerSqlQueryWithHttpInfo(fetchAnswerSqlQueryRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SqlQueryResponse fetchAnswerSqlQuery(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = fetchAnswerSqlQueryWithHttpInfo(fetchAnswerSqlQueryRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. - * Requires at least view access to the Answer object. Upon successful execution, the API - * returns the SQL queries for the specified object as shown in this example: ``` - * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` - * - * @param fetchAnswerSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest (required) * @return ApiResponse<SqlQueryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchAnswerSqlQueryWithHttpInfo( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAnswerSqlQueryWithHttpInfo(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for an - * Answer object. Requires at least view access to the Answer object. Upon successful execution, - * the API returns the SQL queries for the specified object as shown in this example: - * ``` { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` - * - * @param fetchAnswerSqlQueryRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchAnswerSqlQueryAsync( - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerSqlQueryAsync(FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchAsyncImportTaskStatus - * - * @param fetchAsyncImportTaskStatusRequest (required) + * @param fetchAsyncImportTaskStatusRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchAsyncImportTaskStatusCall( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAsyncImportTaskStatusCall(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -10924,188 +8354,133 @@ public okhttp3.Call fetchAsyncImportTaskStatusCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchAsyncImportTaskStatusValidateBeforeCall( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchAsyncImportTaskStatusValidateBeforeCall(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchAsyncImportTaskStatusRequest' is set if (fetchAsyncImportTaskStatusRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchAsyncImportTaskStatusRequest' when" - + " calling fetchAsyncImportTaskStatus(Async)"); + throw new ApiException("Missing the required parameter 'fetchAsyncImportTaskStatusRequest' when calling fetchAsyncImportTaskStatus(Async)"); } return fetchAsyncImportTaskStatusCall(fetchAsyncImportTaskStatusRequest, _callback); + } /** - * Version: 10.4.0.cl or later Gets information about the status of the TML async import task - * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch - * the task details, specify the ID of the TML async import task. Requires access to the task - * ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. - * - * @param fetchAsyncImportTaskStatusRequest (required) + * + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest (required) * @return GetAsyncImportStatusResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public GetAsyncImportStatusResponse fetchAsyncImportTaskStatus( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) - throws ApiException { - ApiResponse localVarResp = - fetchAsyncImportTaskStatusWithHttpInfo(fetchAsyncImportTaskStatusRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public GetAsyncImportStatusResponse fetchAsyncImportTaskStatus(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) throws ApiException { + ApiResponse localVarResp = fetchAsyncImportTaskStatusWithHttpInfo(fetchAsyncImportTaskStatusRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Gets information about the status of the TML async import task - * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch - * the task details, specify the ID of the TML async import task. Requires access to the task - * ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. - * - * @param fetchAsyncImportTaskStatusRequest (required) + * + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest (required) * @return ApiResponse<GetAsyncImportStatusResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchAsyncImportTaskStatusWithHttpInfo( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) - throws ApiException { - okhttp3.Call localVarCall = - fetchAsyncImportTaskStatusValidateBeforeCall( - fetchAsyncImportTaskStatusRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAsyncImportTaskStatusWithHttpInfo(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) throws ApiException { + okhttp3.Call localVarCall = fetchAsyncImportTaskStatusValidateBeforeCall(fetchAsyncImportTaskStatusRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Gets information about the status of the TML - * async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API - * call. To fetch the task details, specify the ID of the TML async import task. Requires access - * to the task ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. - * - * @param fetchAsyncImportTaskStatusRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchAsyncImportTaskStatusAsync( - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchAsyncImportTaskStatusValidateBeforeCall( - fetchAsyncImportTaskStatusRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAsyncImportTaskStatusAsync(FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchAsyncImportTaskStatusValidateBeforeCall(fetchAsyncImportTaskStatusRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchColumnSecurityRules - * - * @param fetchColumnSecurityRulesRequest (required) + * @param fetchColumnSecurityRulesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
- */ - public okhttp3.Call fetchColumnSecurityRulesCall( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call fetchColumnSecurityRulesCall(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -11122,228 +8497,133 @@ public okhttp3.Call fetchColumnSecurityRulesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchColumnSecurityRulesValidateBeforeCall( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchColumnSecurityRulesValidateBeforeCall(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchColumnSecurityRulesRequest' is set if (fetchColumnSecurityRulesRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchColumnSecurityRulesRequest' when calling" - + " fetchColumnSecurityRules(Async)"); + throw new ApiException("Missing the required parameter 'fetchColumnSecurityRulesRequest' when calling fetchColumnSecurityRules(Async)"); } return fetchColumnSecurityRulesCall(fetchColumnSecurityRulesRequest, _callback); + } /** - * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API - * endpoint retrieves column-level security rules configured for tables. It returns information - * about which columns are secured and which groups have access to those columns. #### Usage - * guidelines - Provide an array of table identifiers using either `identifier` (GUID - * or name) or `obj_identifier` (object ID) - At least one of `identifier` - * or `obj_identifier` must be provided for each table - The API returns column - * security rules for all specified tables - Users must have appropriate permissions to access - * security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` - * - * @param fetchColumnSecurityRulesRequest (required) + * + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest (required) * @return List<ColumnSecurityRuleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
- */ - public List fetchColumnSecurityRules( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { - ApiResponse> localVarResp = - fetchColumnSecurityRulesWithHttpInfo(fetchColumnSecurityRulesRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public List fetchColumnSecurityRules(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + ApiResponse> localVarResp = fetchColumnSecurityRulesWithHttpInfo(fetchColumnSecurityRulesRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API - * endpoint retrieves column-level security rules configured for tables. It returns information - * about which columns are secured and which groups have access to those columns. #### Usage - * guidelines - Provide an array of table identifiers using either `identifier` (GUID - * or name) or `obj_identifier` (object ID) - At least one of `identifier` - * or `obj_identifier` must be provided for each table - The API returns column - * security rules for all specified tables - Users must have appropriate permissions to access - * security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` - * - * @param fetchColumnSecurityRulesRequest (required) + * + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest (required) * @return ApiResponse<List<ColumnSecurityRuleResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
- */ - public ApiResponse> fetchColumnSecurityRulesWithHttpInfo( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public ApiResponse> fetchColumnSecurityRulesWithHttpInfo(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Fetches column security rules for specified - * tables. This API endpoint retrieves column-level security rules configured for tables. It - * returns information about which columns are secured and which groups have access to those - * columns. #### Usage guidelines - Provide an array of table identifiers using either - * `identifier` (GUID or name) or `obj_identifier` (object ID) - At least - * one of `identifier` or `obj_identifier` must be provided for each table - - * The API returns column security rules for all specified tables - Users must have appropriate - * permissions to access security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` - * - * @param fetchColumnSecurityRulesRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
- */ - public okhttp3.Call fetchColumnSecurityRulesAsync( - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchColumnSecurityRulesValidateBeforeCall( - fetchColumnSecurityRulesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call fetchColumnSecurityRulesAsync(FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchConnectionDiffStatus - * * @param connectionIdentifier GUID of the connection (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchConnectionDiffStatusCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchConnectionDiffStatusCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -11352,11 +8632,8 @@ public okhttp3.Call fetchConnectionDiffStatusCall( Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -11364,185 +8641,132 @@ public okhttp3.Call fetchConnectionDiffStatusCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchConnectionDiffStatusValidateBeforeCall( - String connectionIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call fetchConnectionDiffStatusValidateBeforeCall(String connectionIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " fetchConnectionDiffStatus(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling fetchConnectionDiffStatus(Async)"); } return fetchConnectionDiffStatusCall(connectionIdentifier, _callback); + } /** - * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and - * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return FetchConnectionDiffStatusResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(String connectionIdentifier) - throws ApiException { - ApiResponse localVarResp = - fetchConnectionDiffStatusWithHttpInfo(connectionIdentifier); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(String connectionIdentifier) throws ApiException { + ApiResponse localVarResp = fetchConnectionDiffStatusWithHttpInfo(connectionIdentifier); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and - * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. - * + * + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @return ApiResponse<FetchConnectionDiffStatusResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchConnectionDiffStatusWithHttpInfo( - String connectionIdentifier) throws ApiException { - okhttp3.Call localVarCall = - fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchConnectionDiffStatusWithHttpInfo(String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Validates the difference in connection metadata - * between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. - * + * (asynchronously) + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * @param connectionIdentifier GUID of the connection (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchConnectionDiffStatusAsync( - String connectionIdentifier, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchConnectionDiffStatusAsync(String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchLiveboardData - * - * @param fetchLiveboardDataRequest (required) + * @param fetchLiveboardDataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchLiveboardDataCall( - FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardDataCall(FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -11559,189 +8783,133 @@ public okhttp3.Call fetchLiveboardDataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchLiveboardDataValidateBeforeCall( - FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchLiveboardDataValidateBeforeCall(FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchLiveboardDataRequest' is set if (fetchLiveboardDataRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchLiveboardDataRequest' when calling" - + " fetchLiveboardData(Async)"); + throw new ApiException("Missing the required parameter 'fetchLiveboardDataRequest' when calling fetchLiveboardData(Async)"); } return fetchLiveboardDataCall(fetchLiveboardDataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires - * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the - * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or - * names of the visualizations in the API request. To include unsaved changes in the report, - * pass the `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes. If the new Liveboard - * experience mode, the transient content includes ad hoc changes to visualizations such as - * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard - * data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). - * - * @param fetchLiveboardDataRequest (required) + * + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest (required) * @return LiveboardDataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public LiveboardDataResponse fetchLiveboardData( - FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { - ApiResponse localVarResp = - fetchLiveboardDataWithHttpInfo(fetchLiveboardDataRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public LiveboardDataResponse fetchLiveboardData(FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + ApiResponse localVarResp = fetchLiveboardDataWithHttpInfo(fetchLiveboardDataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires - * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the - * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or - * names of the visualizations in the API request. To include unsaved changes in the report, - * pass the `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes. If the new Liveboard - * experience mode, the transient content includes ad hoc changes to visualizations such as - * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard - * data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). - * - * @param fetchLiveboardDataRequest (required) + * + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest (required) * @return ApiResponse<LiveboardDataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchLiveboardDataWithHttpInfo( - FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchLiveboardDataWithHttpInfo(FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + okhttp3.Call localVarCall = fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets data from a Liveboard object and its - * visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the - * request body, specify the GUID or name of the Liveboard. To get data for specific - * visualizations, add the GUIDs or names of the visualizations in the API request. To include - * unsaved changes in the report, pass the `transient_pinboard_content` script - * generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed - * SDK. Upon successful execution, the API returns the report with unsaved changes. If the new - * Liveboard experience mode, the transient content includes ad hoc changes to visualizations - * such as sorting, toggling of legends, and data drill down. For more information, and see - * [Liveboard data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). - * - * @param fetchLiveboardDataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchLiveboardDataAsync( - FetchLiveboardDataRequest fetchLiveboardDataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardDataAsync(FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchLiveboardSqlQuery - * - * @param fetchLiveboardSqlQueryRequest (required) + * @param fetchLiveboardSqlQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchLiveboardSqlQueryCall( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardSqlQueryCall(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -11758,224 +8926,133 @@ public okhttp3.Call fetchLiveboardSqlQueryCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchLiveboardSqlQueryValidateBeforeCall( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchLiveboardSqlQueryValidateBeforeCall(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchLiveboardSqlQueryRequest' is set if (fetchLiveboardSqlQueryRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchLiveboardSqlQueryRequest' when calling" - + " fetchLiveboardSqlQuery(Async)"); + throw new ApiException("Missing the required parameter 'fetchLiveboardSqlQueryRequest' when calling fetchLiveboardSqlQuery(Async)"); } return fetchLiveboardSqlQueryCall(fetchLiveboardSqlQueryRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and - * its visualizations. Requires at least view access to the Liveboard object. To get SQL query - * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of - * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon - * successful execution, the API returns the SQL queries for the specified object as shown in - * this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` - * - * @param fetchLiveboardSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest (required) * @return SqlQueryResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public SqlQueryResponse fetchLiveboardSqlQuery( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { - ApiResponse localVarResp = - fetchLiveboardSqlQueryWithHttpInfo(fetchLiveboardSqlQueryRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SqlQueryResponse fetchLiveboardSqlQuery(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = fetchLiveboardSqlQueryWithHttpInfo(fetchLiveboardSqlQueryRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and - * its visualizations. Requires at least view access to the Liveboard object. To get SQL query - * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of - * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon - * successful execution, the API returns the SQL queries for the specified object as shown in - * this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` - * - * @param fetchLiveboardSqlQueryRequest (required) + * + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest (required) * @return ApiResponse<SqlQueryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchLiveboardSqlQueryWithHttpInfo( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchLiveboardSqlQueryWithHttpInfo(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for a - * Liveboard object and its visualizations. Requires at least view access to the Liveboard - * object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, - * you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations - * in the Liveboard. Upon successful execution, the API returns the SQL queries for the - * specified object as shown in this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` - * - * @param fetchLiveboardSqlQueryRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchLiveboardSqlQueryAsync( - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardSqlQueryAsync(FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchLogs - * - * @param fetchLogsRequest (required) + * @param fetchLogsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchLogsCall( - FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLogsCall(FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -11992,74 +9069,53 @@ public okhttp3.Call fetchLogsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchLogsValidateBeforeCall( - FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call fetchLogsValidateBeforeCall(FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchLogsRequest' is set if (fetchLogsRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchLogsRequest' when calling" - + " fetchLogs(Async)"); + throw new ApiException("Missing the required parameter 'fetchLogsRequest' when calling fetchLogs(Async)"); } return fetchLogsCall(fetchLogsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin - * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are - * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You - * can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). - * - * @param fetchLogsRequest (required) + * + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest (required) * @return List<LogResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List fetchLogs(FetchLogsRequest fetchLogsRequest) throws ApiException { ApiResponse> localVarResp = fetchLogsWithHttpInfo(fetchLogsRequest); @@ -12067,108 +9123,79 @@ public List fetchLogs(FetchLogsRequest fetchLogsRequest) throws Api } /** - * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin - * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are - * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You - * can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). - * - * @param fetchLogsRequest (required) + * + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest (required) * @return ApiResponse<List<LogResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> fetchLogsWithHttpInfo(FetchLogsRequest fetchLogsRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> fetchLogsWithHttpInfo(FetchLogsRequest fetchLogsRequest) throws ApiException { okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches security audit logs. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges - * are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. - * You can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). - * - * @param fetchLogsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchLogsAsync( - FetchLogsRequest fetchLogsRequest, final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLogsAsync(FetchLogsRequest fetchLogsRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchPermissionsOfPrincipals - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * @param fetchPermissionsOfPrincipalsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchPermissionsOfPrincipalsCall( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOfPrincipalsCall(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -12185,182 +9212,133 @@ public okhttp3.Call fetchPermissionsOfPrincipalsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchPermissionsOfPrincipalsValidateBeforeCall( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchPermissionsOfPrincipalsValidateBeforeCall(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchPermissionsOfPrincipalsRequest' is set if (fetchPermissionsOfPrincipalsRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchPermissionsOfPrincipalsRequest' when" - + " calling fetchPermissionsOfPrincipals(Async)"); + throw new ApiException("Missing the required parameter 'fetchPermissionsOfPrincipalsRequest' when calling fetchPermissionsOfPrincipals(Async)"); } return fetchPermissionsOfPrincipalsCall(fetchPermissionsOfPrincipalsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches object permission details for a given principal object - * such as a user and group. Requires view access to the metadata object. #### Usage guidelines - * * To get a list of all metadata objects that a user or group can access, specify the - * `type` and GUID or name of the principal. * To get permission details for a - * specific object, add the `type` and GUID or name of the metadata object to your API - * request. Upon successful execution, the API returns a list of metadata objects and permission - * details for each object. - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest (required) * @return PermissionOfPrincipalsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) - throws ApiException { - ApiResponse localVarResp = - fetchPermissionsOfPrincipalsWithHttpInfo(fetchPermissionsOfPrincipalsRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) throws ApiException { + ApiResponse localVarResp = fetchPermissionsOfPrincipalsWithHttpInfo(fetchPermissionsOfPrincipalsRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches object permission details for a given principal object - * such as a user and group. Requires view access to the metadata object. #### Usage guidelines - * * To get a list of all metadata objects that a user or group can access, specify the - * `type` and GUID or name of the principal. * To get permission details for a - * specific object, add the `type` and GUID or name of the metadata object to your API - * request. Upon successful execution, the API returns a list of metadata objects and permission - * details for each object. - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest (required) * @return ApiResponse<PermissionOfPrincipalsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchPermissionsOfPrincipalsWithHttpInfo( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) - throws ApiException { - okhttp3.Call localVarCall = - fetchPermissionsOfPrincipalsValidateBeforeCall( - fetchPermissionsOfPrincipalsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchPermissionsOfPrincipalsWithHttpInfo(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) throws ApiException { + okhttp3.Call localVarCall = fetchPermissionsOfPrincipalsValidateBeforeCall(fetchPermissionsOfPrincipalsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches object permission details for a given - * principal object such as a user and group. Requires view access to the metadata object. #### - * Usage guidelines * To get a list of all metadata objects that a user or group can access, - * specify the `type` and GUID or name of the principal. * To get permission details - * for a specific object, add the `type` and GUID or name of the metadata object to - * your API request. Upon successful execution, the API returns a list of metadata objects and - * permission details for each object. - * - * @param fetchPermissionsOfPrincipalsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchPermissionsOfPrincipalsAsync( - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchPermissionsOfPrincipalsValidateBeforeCall( - fetchPermissionsOfPrincipalsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOfPrincipalsAsync(FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchPermissionsOfPrincipalsValidateBeforeCall(fetchPermissionsOfPrincipalsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for fetchPermissionsOnMetadata - * - * @param fetchPermissionsOnMetadataRequest (required) + * @param fetchPermissionsOnMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchPermissionsOnMetadataCall( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOnMetadataCall(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -12377,181 +9355,133 @@ public okhttp3.Call fetchPermissionsOnMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call fetchPermissionsOnMetadataValidateBeforeCall( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call fetchPermissionsOnMetadataValidateBeforeCall(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fetchPermissionsOnMetadataRequest' is set if (fetchPermissionsOnMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'fetchPermissionsOnMetadataRequest' when" - + " calling fetchPermissionsOnMetadata(Async)"); + throw new ApiException("Missing the required parameter 'fetchPermissionsOnMetadataRequest' when calling fetchPermissionsOnMetadata(Async)"); } return fetchPermissionsOnMetadataCall(fetchPermissionsOnMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires - * view access to the metadata object. #### Usage guidelines * To fetch a list of users and - * groups for a metadata object, specify `type` and GUID or name of the metadata - * object. * To get permission details for a specific user or group, add `type` and - * GUID or name of the principal object to your API request. Upon successful execution, the API - * returns permission details and principal information for the object specified in the API - * request. - * - * @param fetchPermissionsOnMetadataRequest (required) + * + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest (required) * @return PermissionOfMetadataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public PermissionOfMetadataResponse fetchPermissionsOnMetadata( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) - throws ApiException { - ApiResponse localVarResp = - fetchPermissionsOnMetadataWithHttpInfo(fetchPermissionsOnMetadataRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public PermissionOfMetadataResponse fetchPermissionsOnMetadata(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) throws ApiException { + ApiResponse localVarResp = fetchPermissionsOnMetadataWithHttpInfo(fetchPermissionsOnMetadataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires - * view access to the metadata object. #### Usage guidelines * To fetch a list of users and - * groups for a metadata object, specify `type` and GUID or name of the metadata - * object. * To get permission details for a specific user or group, add `type` and - * GUID or name of the principal object to your API request. Upon successful execution, the API - * returns permission details and principal information for the object specified in the API - * request. - * - * @param fetchPermissionsOnMetadataRequest (required) + * + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest (required) * @return ApiResponse<PermissionOfMetadataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse fetchPermissionsOnMetadataWithHttpInfo( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) - throws ApiException { - okhttp3.Call localVarCall = - fetchPermissionsOnMetadataValidateBeforeCall( - fetchPermissionsOnMetadataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchPermissionsOnMetadataWithHttpInfo(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = fetchPermissionsOnMetadataValidateBeforeCall(fetchPermissionsOnMetadataRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Fetches permission details for a given metadata - * object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list - * of users and groups for a metadata object, specify `type` and GUID or name of the - * metadata object. * To get permission details for a specific user or group, add - * `type` and GUID or name of the principal object to your API request. Upon - * successful execution, the API returns permission details and principal information for the - * object specified in the API request. - * - * @param fetchPermissionsOnMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call fetchPermissionsOnMetadataAsync( - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - fetchPermissionsOnMetadataValidateBeforeCall( - fetchPermissionsOnMetadataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOnMetadataAsync(FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchPermissionsOnMetadataValidateBeforeCall(fetchPermissionsOnMetadataRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for forceLogoutUsers - * - * @param forceLogoutUsersRequest (required) + * @param forceLogoutUsersRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call forceLogoutUsersCall( - ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call forceLogoutUsersCall(ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -12568,170 +9498,129 @@ public okhttp3.Call forceLogoutUsersCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call forceLogoutUsersValidateBeforeCall( - ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call forceLogoutUsersValidateBeforeCall(ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'forceLogoutUsersRequest' is set if (forceLogoutUsersRequest == null) { - throw new ApiException( - "Missing the required parameter 'forceLogoutUsersRequest' when calling" - + " forceLogoutUsers(Async)"); + throw new ApiException("Missing the required parameter 'forceLogoutUsersRequest' when calling forceLogoutUsers(Async)"); } return forceLogoutUsersCall(forceLogoutUsersRequest, _callback); + } /** - * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with - * caution as it may invalidate active user sessions and force users to re-login. Make sure you - * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on - * your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param forceLogoutUsersRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void forceLogoutUsers(ForceLogoutUsersRequest forceLogoutUsersRequest) - throws ApiException { + * + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void forceLogoutUsers(ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { forceLogoutUsersWithHttpInfo(forceLogoutUsersRequest); } /** - * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with - * caution as it may invalidate active user sessions and force users to re-login. Make sure you - * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on - * your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param forceLogoutUsersRequest (required) + * + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse forceLogoutUsersWithHttpInfo( - ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { - okhttp3.Call localVarCall = - forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse forceLogoutUsersWithHttpInfo(ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { + okhttp3.Call localVarCall = forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Enforces logout on current user sessions. Use - * this API with caution as it may invalidate active user sessions and force users to re-login. - * Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all - * user sessions on your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param forceLogoutUsersRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call forceLogoutUsersAsync( - ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call forceLogoutUsersAsync(ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for generateCSV - * - * @param generateCSVRequest (required) + * @param generateCSVRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call generateCSVCall( - GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call generateCSVCall(GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -12748,75 +9637,53 @@ public okhttp3.Call generateCSVCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call generateCSVValidateBeforeCall( - GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call generateCSVValidateBeforeCall(GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'generateCSVRequest' is set if (generateCSVRequest == null) { - throw new ApiException( - "Missing the required parameter 'generateCSVRequest' when calling" - + " generateCSV(Async)"); + throw new ApiException("Missing the required parameter 'generateCSVRequest' when calling generateCSV(Async)"); } return generateCSVCall(generateCSVRequest, _callback); + } /** - * Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. - * - * @param generateCSVRequest (required) + * + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest (required) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public Object generateCSV(GenerateCSVRequest generateCSVRequest) throws ApiException { ApiResponse localVarResp = generateCSVWithHttpInfo(generateCSVRequest); @@ -12824,104 +9691,78 @@ public Object generateCSV(GenerateCSVRequest generateCSVRequest) throws ApiExcep } /** - * Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. - * - * @param generateCSVRequest (required) + * + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest (required) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse generateCSVWithHttpInfo(GenerateCSVRequest generateCSVRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse generateCSVWithHttpInfo(GenerateCSVRequest generateCSVRequest) throws ApiException { okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. - * - * @param generateCSVRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call generateCSVAsync( - GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call generateCSVAsync(GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCurrentUserInfo - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getCurrentUserInfoCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -12938,59 +9779,46 @@ public okhttp3.Call getCurrentUserInfoCall(final ApiCallback _callback) throws A Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCurrentUserInfoValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getCurrentUserInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getCurrentUserInfoCall(_callback); + } /** - * Version: 9.0.0.cl or later Retrieves details of the current user session for the token - * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API - * request. The data returned in the API response varies according to user's privilege and - * object access permissions. - * + * + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public User getCurrentUserInfo() throws ApiException { ApiResponse localVarResp = getCurrentUserInfoWithHttpInfo(); @@ -12998,86 +9826,76 @@ public User getCurrentUserInfo() throws ApiException { } /** - * Version: 9.0.0.cl or later Retrieves details of the current user session for the token - * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API - * request. The data returned in the API response varies according to user's privilege and - * object access permissions. - * + * + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getCurrentUserInfoWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Retrieves details of the current user session for - * the token provided in the request header. Any ThoughtSpot user can access this endpoint and - * send an API request. The data returned in the API response varies according to user's - * privilege and object access permissions. - * + * (asynchronously) + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getCurrentUserInfoAsync(final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserInfoAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCurrentUserToken - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getCurrentUserTokenCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -13094,61 +9912,46 @@ public okhttp3.Call getCurrentUserTokenCall(final ApiCallback _callback) throws Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCurrentUserTokenValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getCurrentUserTokenValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getCurrentUserTokenCall(_callback); + } /** - * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer - * token provided in the request header. This API endpoint does not create a new token. Instead, - * it returns details about the token, including the token string, creation time, expiration - * time, and the associated user. Use this endpoint to introspect your current session token, - * debug authentication issues, or when a frontend application needs session token details. Any - * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request - * + * + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * @return GetTokenResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public GetTokenResponse getCurrentUserToken() throws ApiException { ApiResponse localVarResp = getCurrentUserTokenWithHttpInfo(); @@ -13156,94 +9959,77 @@ public GetTokenResponse getCurrentUserToken() throws ApiException { } /** - * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer - * token provided in the request header. This API endpoint does not create a new token. Instead, - * it returns details about the token, including the token string, creation time, expiration - * time, and the associated user. Use this endpoint to introspect your current session token, - * debug authentication issues, or when a frontend application needs session token details. Any - * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request - * + * + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * @return ApiResponse<GetTokenResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getCurrentUserTokenWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.4.0.cl or later Retrieves details of the current session token - * for the bearer token provided in the request header. This API endpoint does not create a new - * token. Instead, it returns details about the token, including the token string, creation - * time, expiration time, and the associated user. Use this endpoint to introspect your current - * session token, debug authentication issues, or when a frontend application needs session - * token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and - * send an API request - * + * (asynchronously) + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getCurrentUserTokenAsync(final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserTokenAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCustomAccessToken - * - * @param getCustomAccessTokenRequest (required) + * @param getCustomAccessTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
- */ - public okhttp3.Call getCustomAccessTokenCall( - GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public okhttp3.Call getCustomAccessTokenCall(GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -13260,299 +10046,132 @@ public okhttp3.Call getCustomAccessTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCustomAccessTokenValidateBeforeCall( - GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getCustomAccessTokenValidateBeforeCall(GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getCustomAccessTokenRequest' is set if (getCustomAccessTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'getCustomAccessTokenRequest' when calling" - + " getCustomAccessToken(Async)"); + throw new ApiException("Missing the required parameter 'getCustomAccessTokenRequest' when calling getCustomAccessToken(Async)"); } return getCustomAccessTokenCall(getCustomAccessTokenRequest, _callback); + } /** - * 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. - * - * @param getCustomAccessTokenRequest (required) + * + * 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. + * @param getCustomAccessTokenRequest (required) * @return AccessToken - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
- */ - public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAccessTokenRequest) - throws ApiException { - ApiResponse localVarResp = - getCustomAccessTokenWithHttpInfo(getCustomAccessTokenRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { + ApiResponse localVarResp = getCustomAccessTokenWithHttpInfo(getCustomAccessTokenRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later 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. - * - * @param getCustomAccessTokenRequest (required) + * + * 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. + * @param getCustomAccessTokenRequest (required) * @return ApiResponse<AccessToken> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
- */ - public ApiResponse getCustomAccessTokenWithHttpInfo( - GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { - okhttp3.Call localVarCall = - getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public ApiResponse getCustomAccessTokenWithHttpInfo(GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later 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. - * - * @param getCustomAccessTokenRequest (required) + * (asynchronously) + * 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. + * @param getCustomAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
- */ - public okhttp3.Call getCustomAccessTokenAsync( - GetCustomAccessTokenRequest getCustomAccessTokenRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public okhttp3.Call getCustomAccessTokenAsync(GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDataSourceSuggestions - * - * @param getDataSourceSuggestionsRequest (required) + * @param getDataSourceSuggestionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call getDataSourceSuggestionsCall( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call getDataSourceSuggestionsCall(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -13569,193 +10188,130 @@ public okhttp3.Call getDataSourceSuggestionsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getDataSourceSuggestionsRequest' is set if (getDataSourceSuggestionsRequest == null) { - throw new ApiException( - "Missing the required parameter 'getDataSourceSuggestionsRequest' when calling" - + " getDataSourceSuggestions(Async)"); + throw new ApiException("Missing the required parameter 'getDataSourceSuggestionsRequest' when calling getDataSourceSuggestions(Async)"); } return getDataSourceSuggestionsCall(getDataSourceSuggestionsRequest, _callback); + } /** - * Version: 10.13.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. - * - * @param getDataSourceSuggestionsRequest (required) + * + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest (required) * @return EurekaDataSourceSuggestionResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { - ApiResponse localVarResp = - getDataSourceSuggestionsWithHttpInfo(getDataSourceSuggestionsRequest); + * @throws ApiException If fail to 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 EurekaDataSourceSuggestionResponse getDataSourceSuggestions(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + ApiResponse localVarResp = getDataSourceSuggestionsWithHttpInfo(getDataSourceSuggestionsRequest); return localVarResp.getData(); } /** - * Version: 10.13.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. - * - * @param getDataSourceSuggestionsRequest (required) + * + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest (required) * @return ApiResponse<EurekaDataSourceSuggestionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse getDataSourceSuggestionsWithHttpInfo( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { - okhttp3.Call localVarCall = - getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to 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 getDataSourceSuggestionsWithHttpInfo(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + okhttp3.Call localVarCall = getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.13.0.cl or later Provides relevant data source recommendations - * for a user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. - * - * @param getDataSourceSuggestionsRequest (required) + * (asynchronously) + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call getDataSourceSuggestionsAsync( - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getDataSourceSuggestionsValidateBeforeCall( - getDataSourceSuggestionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException 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 getDataSourceSuggestionsAsync(GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getFullAccessToken - * - * @param getFullAccessTokenRequest (required) + * @param getFullAccessTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getFullAccessTokenCall( - GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getFullAccessTokenCall(GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -13772,244 +10328,133 @@ public okhttp3.Call getFullAccessTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFullAccessTokenValidateBeforeCall( - GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getFullAccessTokenValidateBeforeCall(GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getFullAccessTokenRequest' is set if (getFullAccessTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'getFullAccessTokenRequest' when calling" - + " getFullAccessToken(Async)"); + throw new ApiException("Missing the required parameter 'getFullAccessTokenRequest' when calling getFullAccessToken(Async)"); } return getFullAccessTokenCall(getFullAccessTokenRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in - * ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getFullAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getFullAccessTokenRequest (required) * @return Token - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Token getFullAccessToken(GetFullAccessTokenRequest getFullAccessTokenRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Token getFullAccessToken(GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { ApiResponse localVarResp = getFullAccessTokenWithHttpInfo(getFullAccessTokenRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in - * ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getFullAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getFullAccessTokenRequest (required) * @return ApiResponse<Token> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse getFullAccessTokenWithHttpInfo( - GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { - okhttp3.Call localVarCall = - getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getFullAccessTokenWithHttpInfo(GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets an authentication token and creates a full - * session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot - * remains valid for 5 mins. You can generate the token for a user by providing a - * `username` and `password`, or by using the cluster’s - * `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getFullAccessTokenRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getFullAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getFullAccessTokenAsync( - GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getFullAccessTokenAsync(GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getObjectAccessToken - * - * @param getObjectAccessTokenRequest (required) + * @param getObjectAccessTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getObjectAccessTokenCall( - GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getObjectAccessTokenCall(GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -14026,238 +10471,132 @@ public okhttp3.Call getObjectAccessTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getObjectAccessTokenValidateBeforeCall( - GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getObjectAccessTokenValidateBeforeCall(GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getObjectAccessTokenRequest' is set if (getObjectAccessTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'getObjectAccessTokenRequest' when calling" - + " getObjectAccessToken(Async)"); + throw new ApiException("Missing the required parameter 'getObjectAccessTokenRequest' when calling getObjectAccessToken(Async)"); } return getObjectAccessTokenCall(getObjectAccessTokenRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific - * metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - * You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getObjectAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getObjectAccessTokenRequest (required) * @return Token - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Token getObjectAccessToken(GetObjectAccessTokenRequest getObjectAccessTokenRequest) - throws ApiException { - ApiResponse localVarResp = - getObjectAccessTokenWithHttpInfo(getObjectAccessTokenRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Token getObjectAccessToken(GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { + ApiResponse localVarResp = getObjectAccessTokenWithHttpInfo(getObjectAccessTokenRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific - * metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - * You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getObjectAccessTokenRequest (required) + * + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getObjectAccessTokenRequest (required) * @return ApiResponse<Token> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse getObjectAccessTokenWithHttpInfo( - GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { - okhttp3.Call localVarCall = - getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getObjectAccessTokenWithHttpInfo(GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets an authentication token that provides access - * to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. - * - * @param getObjectAccessTokenRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + * @param getObjectAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getObjectAccessTokenAsync( - GetObjectAccessTokenRequest getObjectAccessTokenRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getObjectAccessTokenAsync(GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRelevantQuestions - * - * @param getRelevantQuestionsRequest (required) + * @param getRelevantQuestionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call getRelevantQuestionsCall( - GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call getRelevantQuestionsCall(GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -14274,209 +10613,129 @@ public okhttp3.Call getRelevantQuestionsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRelevantQuestionsValidateBeforeCall( - GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getRelevantQuestionsValidateBeforeCall(GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'getRelevantQuestionsRequest' is set if (getRelevantQuestionsRequest == null) { - throw new ApiException( - "Missing the required parameter 'getRelevantQuestionsRequest' when calling" - + " getRelevantQuestions(Async)"); + throw new ApiException("Missing the required parameter 'getRelevantQuestionsRequest' when calling getRelevantQuestions(Async)"); } return getRelevantQuestionsCall(getRelevantQuestionsRequest, _callback); + } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * - * @param getRelevantQuestionsRequest (required) + * + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest (required) * @return EurekaGetRelevantQuestionsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public EurekaGetRelevantQuestionsResponse getRelevantQuestions( - GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { - ApiResponse localVarResp = - getRelevantQuestionsWithHttpInfo(getRelevantQuestionsRequest); + * @throws ApiException If fail to 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 EurekaGetRelevantQuestionsResponse getRelevantQuestions(GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + ApiResponse localVarResp = getRelevantQuestionsWithHttpInfo(getRelevantQuestionsRequest); return localVarResp.getData(); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * - * @param getRelevantQuestionsRequest (required) + * + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest (required) * @return ApiResponse<EurekaGetRelevantQuestionsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse getRelevantQuestionsWithHttpInfo( - GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { - okhttp3.Call localVarCall = - getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to 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 getRelevantQuestionsWithHttpInfo(GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + okhttp3.Call localVarCall = getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.13.0.cl or later Breaks down a user-submitted query into a - * series of analytical sub-questions using relevant contextual metadata. To use this API, the - * user must have at least view-level access to the referenced metadata objects. #### Usage - * guidelines To accurately generate relevant questions, the request must include at least one - * of the following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * - * @param getRelevantQuestionsRequest (required) + * (asynchronously) + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call getRelevantQuestionsAsync( - GetRelevantQuestionsRequest getRelevantQuestionsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException 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 getRelevantQuestionsAsync(GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSystemConfig - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getSystemConfigCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -14493,62 +10752,46 @@ public okhttp3.Call getSystemConfigCall(final ApiCallback _callback) throws ApiE Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSystemConfigValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getSystemConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getSystemConfigCall(_callback); + } /** - * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the - * request is successful, the API returns a list configuration settings applied on the cluster. - * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these - * complete configuration settings of the cluster. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return SystemConfig - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SystemConfig getSystemConfig() throws ApiException { ApiResponse localVarResp = getSystemConfigWithHttpInfo(); @@ -14556,92 +10799,76 @@ public SystemConfig getSystemConfig() throws ApiException { } /** - * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the - * request is successful, the API returns a list configuration settings applied on the cluster. - * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these - * complete configuration settings of the cluster. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return ApiResponse<SystemConfig> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getSystemConfigWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Retrieves the current configuration details of - * the cluster. If the request is successful, the API returns a list configuration settings - * applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) - * privilege to view these complete configuration settings of the cluster. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * (asynchronously) + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getSystemConfigAsync(final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemConfigAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSystemInformation - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getSystemInformationCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -14658,61 +10885,46 @@ public okhttp3.Call getSystemInformationCall(final ApiCallback _callback) throws Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSystemInformationValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getSystemInformationValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getSystemInformationCall(_callback); + } /** - * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time - * zone, deployment environment, date format, and date time format of the cluster. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return SystemInfo - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SystemInfo getSystemInformation() throws ApiException { ApiResponse localVarResp = getSystemInformationWithHttpInfo(); @@ -14720,90 +10932,76 @@ public SystemInfo getSystemInformation() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time - * zone, deployment environment, date format, and date time format of the cluster. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. - * + * + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @return ApiResponse<SystemInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getSystemInformationWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets system information such as the release - * version, locale, time zone, deployment environment, date format, and date time format of the - * cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) - * privilege is required. This API does not require any parameters to be passed in the request. - * + * (asynchronously) + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getSystemInformationAsync(final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemInformationAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSystemOverrideInfo - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call getSystemOverrideInfoCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -14820,61 +11018,46 @@ public okhttp3.Call getSystemOverrideInfoCall(final ApiCallback _callback) throw Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSystemOverrideInfoValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call getSystemOverrideInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getSystemOverrideInfoCall(_callback); + } /** - * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application - * settings**) privilege is required. This API does not require any parameters to be passed in - * the request. - * + * + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * @return SystemOverrideInfo - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SystemOverrideInfo getSystemOverrideInfo() throws ApiException { ApiResponse localVarResp = getSystemOverrideInfoWithHttpInfo(); @@ -14882,93 +11065,77 @@ public SystemOverrideInfo getSystemOverrideInfo() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application - * settings**) privilege is required. This API does not require any parameters to be passed in - * the request. - * + * + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * @return ApiResponse<SystemOverrideInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse getSystemOverrideInfoWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Gets a list of configuration overrides applied on - * the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage - * application settings**) privilege is required. This API does not require any parameters to be - * passed in the request. - * + * (asynchronously) + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importMetadataTML - * - * @param importMetadataTMLRequest (required) + * @param importMetadataTMLRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importMetadataTMLCall( - ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLCall(ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -14985,223 +11152,133 @@ public okhttp3.Call importMetadataTMLCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importMetadataTMLValidateBeforeCall( - ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importMetadataTMLValidateBeforeCall(ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importMetadataTMLRequest' is set if (importMetadataTMLRequest == null) { - throw new ApiException( - "Missing the required parameter 'importMetadataTMLRequest' when calling" - + " importMetadataTML(Async)"); + throw new ApiException("Missing the required parameter 'importMetadataTMLRequest' when calling importMetadataTML(Async)"); } return importMetadataTMLCall(importMetadataTMLRequest, _callback); + } /** - * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files - * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). - * - * @param importMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest (required) * @return List<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List importMetadataTML(ImportMetadataTMLRequest importMetadataTMLRequest) - throws ApiException { - ApiResponse> localVarResp = - importMetadataTMLWithHttpInfo(importMetadataTMLRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List importMetadataTML(ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { + ApiResponse> localVarResp = importMetadataTMLWithHttpInfo(importMetadataTMLRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files - * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). - * - * @param importMetadataTMLRequest (required) + * + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest (required) * @return ApiResponse<List<Object>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> importMetadataTMLWithHttpInfo( - ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { - okhttp3.Call localVarCall = - importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> importMetadataTMLWithHttpInfo(ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Imports - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtsSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). - * - * @param importMetadataTMLRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importMetadataTMLAsync( - ImportMetadataTMLRequest importMetadataTMLRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsync(ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importMetadataTMLAsync - * - * @param importMetadataTMLAsyncRequest (required) + * @param importMetadataTMLAsyncRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importMetadataTMLAsyncCall( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsyncCall(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -15218,204 +11295,133 @@ public okhttp3.Call importMetadataTMLAsyncCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importMetadataTMLAsyncValidateBeforeCall( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importMetadataTMLAsyncValidateBeforeCall(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importMetadataTMLAsyncRequest' is set if (importMetadataTMLAsyncRequest == null) { - throw new ApiException( - "Missing the required parameter 'importMetadataTMLAsyncRequest' when calling" - + " importMetadataTMLAsync(Async)"); + throw new ApiException("Missing the required parameter 'importMetadataTMLAsyncRequest' when calling importMetadataTMLAsync(Async)"); } return importMetadataTMLAsyncCall(importMetadataTMLAsyncRequest, _callback); + } /** - * Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. - * - * @param importMetadataTMLAsyncRequest (required) + * + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest (required) * @return ImportEPackAsyncTaskStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ImportEPackAsyncTaskStatus importMetadataTMLAsync( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { - ApiResponse localVarResp = - importMetadataTMLAsyncWithHttpInfo(importMetadataTMLAsyncRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportEPackAsyncTaskStatus importMetadataTMLAsync(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + ApiResponse localVarResp = importMetadataTMLAsyncWithHttpInfo(importMetadataTMLAsyncRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. - * - * @param importMetadataTMLAsyncRequest (required) + * + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest (required) * @return ApiResponse<ImportEPackAsyncTaskStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse importMetadataTMLAsyncWithHttpInfo( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { - okhttp3.Call localVarCall = - importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importMetadataTMLAsyncWithHttpInfo(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + okhttp3.Call localVarCall = importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. - * - * @param importMetadataTMLAsyncRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importMetadataTMLAsyncAsync( - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsyncAsync(ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importUserGroups - * - * @param importUserGroupsRequest (required) + * @param importUserGroupsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importUserGroupsCall( - ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUserGroupsCall(ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -15432,189 +11438,133 @@ public okhttp3.Call importUserGroupsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importUserGroupsValidateBeforeCall( - ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importUserGroupsValidateBeforeCall(ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importUserGroupsRequest' is set if (importUserGroupsRequest == null) { - throw new ApiException( - "Missing the required parameter 'importUserGroupsRequest' when calling" - + " importUserGroups(Async)"); + throw new ApiException("Missing the required parameter 'importUserGroupsRequest' when calling importUserGroups(Async)"); } return importUserGroupsCall(importUserGroupsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. During the import operation: * If the specified group is not available in - * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is - * set to `true`, the groups not specified in the API request, excluding administrator - * and system user groups, are deleted. * If the specified groups are already available in - * ThoughtSpot, the object properties of these groups are modified and synchronized as per the - * input data in the API request. A successful API call returns the object that represents the - * changes made in the ThoughtSpot system. - * - * @param importUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest (required) * @return ImportUserGroupsResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ImportUserGroupsResponse importUserGroups( - ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { - ApiResponse localVarResp = - importUserGroupsWithHttpInfo(importUserGroupsRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportUserGroupsResponse importUserGroups(ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + ApiResponse localVarResp = importUserGroupsWithHttpInfo(importUserGroupsRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. During the import operation: * If the specified group is not available in - * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is - * set to `true`, the groups not specified in the API request, excluding administrator - * and system user groups, are deleted. * If the specified groups are already available in - * ThoughtSpot, the object properties of these groups are modified and synchronized as per the - * input data in the API request. A successful API call returns the object that represents the - * changes made in the ThoughtSpot system. - * - * @param importUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest (required) * @return ApiResponse<ImportUserGroupsResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse importUserGroupsWithHttpInfo( - ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = - importUserGroupsValidateBeforeCall(importUserGroupsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importUserGroupsWithHttpInfo(ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = importUserGroupsValidateBeforeCall(importUserGroupsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Imports group objects from external databases - * into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the - * import operation: * If the specified group is not available in ThoughtSpot, it will be added - * to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the - * groups not specified in the API request, excluding administrator and system user groups, are - * deleted. * If the specified groups are already available in ThoughtSpot, the object - * properties of these groups are modified and synchronized as per the input data in the API - * request. A successful API call returns the object that represents the changes made in the - * ThoughtSpot system. - * - * @param importUserGroupsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importUserGroupsAsync( - ImportUserGroupsRequest importUserGroupsRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - importUserGroupsValidateBeforeCall(importUserGroupsRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUserGroupsAsync(ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = importUserGroupsValidateBeforeCall(importUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importUsers - * - * @param importUsersRequest (required) + * @param importUsersRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importUsersCall( - ImportUsersRequest importUsersRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUsersCall(ImportUsersRequest importUsersRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -15631,189 +11581,133 @@ public okhttp3.Call importUsersCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importUsersValidateBeforeCall( - ImportUsersRequest importUsersRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importUsersValidateBeforeCall(ImportUsersRequest importUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importUsersRequest' is set if (importUsersRequest == null) { - throw new ApiException( - "Missing the required parameter 'importUsersRequest' when calling" - + " importUsers(Async)"); + throw new ApiException("Missing the required parameter 'importUsersRequest' when calling importUsers(Async)"); } return importUsersCall(importUsersRequest, _callback); + } /** - * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During - * the user import operation: * If the specified users are not available in ThoughtSpot, the - * users are created and assigned a default password. Defining a `default_password` in - * the API request is optional. * If `delete_unspecified_users` is set to - * `true`, the users not specified in the API request, excluding the - * `tsadmin`, `guest`, `system` and `su` users, are - * deleted. * If the specified user objects are already available in ThoughtSpot, the object - * properties are updated and synchronized as per the input data in the API request. A - * successful API call returns the object that represents the changes made in the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * - * @param importUsersRequest (required) + * + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest (required) * @return ImportUsersResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ImportUsersResponse importUsers(ImportUsersRequest importUsersRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportUsersResponse importUsers(ImportUsersRequest importUsersRequest) throws ApiException { ApiResponse localVarResp = importUsersWithHttpInfo(importUsersRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During - * the user import operation: * If the specified users are not available in ThoughtSpot, the - * users are created and assigned a default password. Defining a `default_password` in - * the API request is optional. * If `delete_unspecified_users` is set to - * `true`, the users not specified in the API request, excluding the - * `tsadmin`, `guest`, `system` and `su` users, are - * deleted. * If the specified user objects are already available in ThoughtSpot, the object - * properties are updated and synchronized as per the input data in the API request. A - * successful API call returns the object that represents the changes made in the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * - * @param importUsersRequest (required) + * + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest (required) * @return ApiResponse<ImportUsersResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse importUsersWithHttpInfo( - ImportUsersRequest importUsersRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importUsersWithHttpInfo(ImportUsersRequest importUsersRequest) throws ApiException { okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Imports user data from external databases into - * ThoughtSpot. During the user import operation: * If the specified users are not available in - * ThoughtSpot, the users are created and assigned a default password. Defining a - * `default_password` in the API request is optional. * If - * `delete_unspecified_users` is set to `true`, the users not specified in - * the API request, excluding the `tsadmin`, `guest`, `system` and - * `su` users, are deleted. * If the specified user objects are already available in - * ThoughtSpot, the object properties are updated and synchronized as per the input data in the - * API request. A successful API call returns the object that represents the changes made in the - * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param importUsersRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call importUsersAsync( - ImportUsersRequest importUsersRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUsersAsync(ImportUsersRequest importUsersRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for login - * - * @param loginRequest (required) + * @param loginRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -15830,98 +11724,73 @@ public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _call Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call loginValidateBeforeCall( - LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call loginValidateBeforeCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'loginRequest' is set if (loginRequest == null) { - throw new ApiException( - "Missing the required parameter 'loginRequest' when calling login(Async)"); + throw new ApiException("Missing the required parameter 'loginRequest' when calling login(Async)"); } return loginCall(loginRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic - * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using - * `username` and `password` attributes. On a multi-tenant cluster with - * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. - * - * @param loginRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void login(LoginRequest loginRequest) throws ApiException { loginWithHttpInfo(loginRequest); } /** - * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic - * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using - * `username` and `password` attributes. On a multi-tenant cluster with - * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. - * - * @param loginRequest (required) + * + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws ApiException { okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, null); @@ -15929,33 +11798,24 @@ public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws Api } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user - * with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot - * using `username` and `password` attributes. On a multi-tenant cluster - * with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. - * - * @param loginRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -15963,30 +11823,29 @@ public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback - * Response Details - * Status Code Description Response Headers - * 204 User logout successful. - - * 400 Invalid request. - - * 401 Unauthorized access. - - * 403 Forbidden access. - - * 500 Unexpected error - - * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -16003,75 +11862,65 @@ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { return logoutCall(_callback); + } /** - * Version: 9.0.0.cl or later Logs out a user from their current session. - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Logs out a user from their current session. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void logout() throws ApiException { logoutWithHttpInfo(); } /** - * Version: 9.0.0.cl or later Logs out a user from their current session. - * + * + * Version: 9.0.0.cl or later Logs out a user from their current session. * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse logoutWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = logoutValidateBeforeCall(null); @@ -16079,22 +11928,21 @@ public ApiResponse logoutWithHttpInfo() throws ApiException { } /** - * (asynchronously) Version: 9.0.0.cl or later Logs out a user from their current session. - * + * (asynchronously) + * Version: 9.0.0.cl or later Logs out a user from their current session. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiException { @@ -16104,33 +11952,30 @@ public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiExc } /** * Build call for parameterizeMetadata - * - * @param parameterizeMetadataRequest (required) + * @param parameterizeMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call parameterizeMetadataCall( - ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataCall(ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -16147,174 +11992,129 @@ public okhttp3.Call parameterizeMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call parameterizeMetadataValidateBeforeCall( - ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call parameterizeMetadataValidateBeforeCall(ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'parameterizeMetadataRequest' is set if (parameterizeMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'parameterizeMetadataRequest' when calling" - + " parameterizeMetadata(Async)"); + throw new ApiException("Missing the required parameter 'parameterizeMetadataRequest' when calling parameterizeMetadata(Async)"); } return parameterizeMetadataCall(parameterizeMetadataRequest, _callback); + } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. - * - * @param parameterizeMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) - throws ApiException { + * + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. + * @param parameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { parameterizeMetadataWithHttpInfo(parameterizeMetadataRequest); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. - * - * @param parameterizeMetadataRequest (required) + * + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. + * @param parameterizeMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse parameterizeMetadataWithHttpInfo( - ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = - parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse parameterizeMetadataWithHttpInfo(ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows - * parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to - * modify the metadata object. The API endpoint allows parameterizing the following types of - * metadata objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. - * - * @param parameterizeMetadataRequest (required) + * (asynchronously) + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. + * @param parameterizeMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call parameterizeMetadataAsync( - ParameterizeMetadataRequest parameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataAsync(ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for publishMetadata - * - * @param publishMetadataRequest (required) + * @param publishMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call publishMetadataCall( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call publishMetadataCall(PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -16331,165 +12131,130 @@ public okhttp3.Call publishMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call publishMetadataValidateBeforeCall( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call publishMetadataValidateBeforeCall(PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'publishMetadataRequest' is set if (publishMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'publishMetadataRequest' when calling" - + " publishMetadata(Async)"); + throw new ApiException("Missing the required parameter 'publishMetadataRequest' when calling publishMetadata(Async)"); } return publishMetadataCall(publishMetadataRequest, _callback); + } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. - * - * @param publishMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throws ApiException { publishMetadataWithHttpInfo(publishMetadataRequest); } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. - * - * @param publishMetadataRequest (required) + * + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse publishMetadataWithHttpInfo( - PublishMetadataRequest publishMetadataRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse publishMetadataWithHttpInfo(PublishMetadataRequest publishMetadataRequest) throws ApiException { okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.9.0.cl or later Allows publishing metadata objects across - * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint - * allows publishing the following types of metadata objects: * Liveboards * Answers * Logical - * Tables This API will essentially share the objects along with it's dependencies to the - * org admins of the orgs to which it is being published. - * - * @param publishMetadataRequest (required) + * (asynchronously) + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call publishMetadataAsync( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call publishMetadataAsync(PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for queryGetDecomposedQuery - * - * @param queryGetDecomposedQueryRequest (required) + * @param queryGetDecomposedQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- * + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
* @deprecated */ @Deprecated - public okhttp3.Call queryGetDecomposedQueryCall( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call queryGetDecomposedQueryCall(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -16506,167 +12271,137 @@ public okhttp3.Call queryGetDecomposedQueryCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'queryGetDecomposedQueryRequest' is set if (queryGetDecomposedQueryRequest == null) { - throw new ApiException( - "Missing the required parameter 'queryGetDecomposedQueryRequest' when calling" - + " queryGetDecomposedQuery(Async)"); + throw new ApiException("Missing the required parameter 'queryGetDecomposedQueryRequest' when calling queryGetDecomposedQuery(Async)"); } return queryGetDecomposedQueryCall(queryGetDecomposedQueryRequest, _callback); + } /** - * Version: 10.7.0.cl or later - * - * @param queryGetDecomposedQueryRequest (required) + * + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest (required) * @return EurekaDecomposeQueryResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- * + * @throws ApiException If fail to 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 -
* @deprecated */ @Deprecated - public EurekaDecomposeQueryResponse queryGetDecomposedQuery( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { - ApiResponse localVarResp = - queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); + public EurekaDecomposeQueryResponse queryGetDecomposedQuery(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + ApiResponse localVarResp = queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); return localVarResp.getData(); } /** - * Version: 10.7.0.cl or later - * - * @param queryGetDecomposedQueryRequest (required) + * + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest (required) * @return ApiResponse<EurekaDecomposeQueryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- * + * @throws ApiException If fail to 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 -
* @deprecated */ @Deprecated - public ApiResponse queryGetDecomposedQueryWithHttpInfo( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse queryGetDecomposedQueryWithHttpInfo(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + okhttp3.Call localVarCall = queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.7.0.cl or later - * - * @param queryGetDecomposedQueryRequest (required) + * (asynchronously) + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- * + * @throws ApiException 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 -
* @deprecated */ @Deprecated - public okhttp3.Call queryGetDecomposedQueryAsync( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - queryGetDecomposedQueryValidateBeforeCall( - queryGetDecomposedQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call queryGetDecomposedQueryAsync(QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for resetUserPassword - * - * @param resetUserPasswordRequest (required) + * @param resetUserPasswordRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call resetUserPasswordCall( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordCall(ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -16683,165 +12418,130 @@ public okhttp3.Call resetUserPasswordCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call resetUserPasswordValidateBeforeCall( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call resetUserPasswordValidateBeforeCall(ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'resetUserPasswordRequest' is set if (resetUserPasswordRequest == null) { - throw new ApiException( - "Missing the required parameter 'resetUserPasswordRequest' when calling" - + " resetUserPassword(Async)"); + throw new ApiException("Missing the required parameter 'resetUserPasswordRequest' when calling resetUserPassword(Async)"); } return resetUserPasswordCall(resetUserPasswordRequest, _callback); + } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) - throws ApiException { + * + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { resetUserPasswordWithHttpInfo(resetUserPasswordRequest); } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) + * + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse resetUserPasswordWithHttpInfo( - ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { - okhttp3.Call localVarCall = - resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse resetUserPasswordWithHttpInfo(ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Resets the password of a user account. - * Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call resetUserPasswordAsync( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordAsync(ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for revertCommit - * * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call revertCommitCall( - String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitCall(String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -16850,11 +12550,8 @@ public okhttp3.Call revertCommitCall( Object localVarPostBody = revertCommitRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" - .replace( - "{" + "commit_id" + "}", - localVarApiClient.escapeString(commitId.toString())); + String localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" + .replace("{" + "commit_id" + "}", localVarApiClient.escapeString(commitId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -16862,186 +12559,141 @@ public okhttp3.Call revertCommitCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call revertCommitValidateBeforeCall( - String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call revertCommitValidateBeforeCall(String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commitId' is set if (commitId == null) { - throw new ApiException( - "Missing the required parameter 'commitId' when calling revertCommit(Async)"); + throw new ApiException("Missing the required parameter 'commitId' when calling revertCommit(Async)"); } // verify the required parameter 'revertCommitRequest' is set if (revertCommitRequest == null) { - throw new ApiException( - "Missing the required parameter 'revertCommitRequest' when calling" - + " revertCommit(Async)"); + throw new ApiException("Missing the required parameter 'revertCommitRequest' when calling revertCommit(Async)"); } return revertCommitCall(commitId, revertCommitRequest, _callback); + } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * + * + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @return RevertResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) - throws ApiException { - ApiResponse localVarResp = - revertCommitWithHttpInfo(commitId, revertCommitRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + ApiResponse localVarResp = revertCommitWithHttpInfo(commitId, revertCommitRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * + * + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @return ApiResponse<RevertResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse revertCommitWithHttpInfo( - String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { - okhttp3.Call localVarCall = - revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revertCommitWithHttpInfo(String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + okhttp3.Call localVarCall = revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Reverts TML objects to a previous commit - * specified in the API request. Requires at least edit access to objects. In the API request, - * specify the `commit_id`. If the branch name is not specified in the request, the - * API will consider the default branch configured on your instance. By default, the API reverts - * all objects. If the revert operation fails for one of the objects provided in the commit, the - * API returns an error and does not revert any object. For more information, see [Git - * integration documentation](https://developers.thoughtspot.com/docs/git-integration). - * + * (asynchronously) + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call revertCommitAsync( - String commitId, - RevertCommitRequest revertCommitRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitAsync(String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for revokeToken - * - * @param revokeTokenRequest (required) + * @param revokeTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call revokeTokenCall( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenCall(RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -17058,130 +12710,98 @@ public okhttp3.Call revokeTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call revokeTokenValidateBeforeCall( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call revokeTokenValidateBeforeCall(RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'revokeTokenRequest' is set if (revokeTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'revokeTokenRequest' when calling" - + " revokeToken(Async)"); + throw new ApiException("Missing the required parameter 'revokeTokenRequest' when calling revokeToken(Async)"); } return revokeTokenCall(revokeTokenRequest, _callback); + } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void revokeToken(RevokeTokenRequest revokeTokenRequest) throws ApiException { revokeTokenWithHttpInfo(revokeTokenRequest); } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) + * + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) throws ApiException { okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Revokes the authentication token issued for - * current user session. The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call revokeTokenAsync( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenAsync(RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -17189,33 +12809,30 @@ public okhttp3.Call revokeTokenAsync( } /** * Build call for searchCalendars - * - * @param searchCalendarsRequest (required) + * @param searchCalendarsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchCalendarsCall( - SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCalendarsCall(SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -17232,190 +12849,133 @@ public okhttp3.Call searchCalendarsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCalendarsValidateBeforeCall( - SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchCalendarsValidateBeforeCall(SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchCalendarsRequest' is set if (searchCalendarsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchCalendarsRequest' when calling" - + " searchCalendars(Async)"); + throw new ApiException("Missing the required parameter 'searchCalendarsRequest' when calling searchCalendars(Async)"); } return searchCalendarsCall(searchCalendarsRequest, _callback); + } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. - * - * @param searchCalendarsRequest (required) + * + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest (required) * @return List<CalendarResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchCalendarsWithHttpInfo(searchCalendarsRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + ApiResponse> localVarResp = searchCalendarsWithHttpInfo(searchCalendarsRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. - * - * @param searchCalendarsRequest (required) + * + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest (required) * @return ApiResponse<List<CalendarResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchCalendarsWithHttpInfo( - SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCalendarsWithHttpInfo(SearchCalendarsRequest searchCalendarsRequest) throws ApiException { okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. - * - * @param searchCalendarsRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchCalendarsAsync( - SearchCalendarsRequest searchCalendarsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCalendarsAsync(SearchCalendarsRequest searchCalendarsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchCommits - * - * @param searchCommitsRequest (required) + * @param searchCommitsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchCommitsCall( - SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommitsCall(SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -17432,169 +12992,276 @@ public okhttp3.Call searchCommitsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCommitsValidateBeforeCall( - SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchCommitsValidateBeforeCall(SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchCommitsRequest' is set if (searchCommitsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchCommitsRequest' when calling" - + " searchCommits(Async)"); + throw new ApiException("Missing the required parameter 'searchCommitsRequest' when calling searchCommits(Async)"); } return searchCommitsCall(searchCommitsRequest, _callback); + } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param searchCommitsRequest (required) + * + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest (required) * @return List<CommitHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchCommits(SearchCommitsRequest searchCommitsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchCommitsWithHttpInfo(searchCommitsRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCommits(SearchCommitsRequest searchCommitsRequest) throws ApiException { + ApiResponse> localVarResp = searchCommitsWithHttpInfo(searchCommitsRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param searchCommitsRequest (required) + * + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest (required) * @return ApiResponse<List<CommitHistoryResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchCommitsWithHttpInfo( - SearchCommitsRequest searchCommitsRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCommitsWithHttpInfo(SearchCommitsRequest searchCommitsRequest) throws ApiException { okhttp3.Call localVarCall = searchCommitsValidateBeforeCall(searchCommitsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommitsAsync(SearchCommitsRequest searchCommitsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCommitsValidateBeforeCall(searchCommitsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCommunicationChannelPreferences + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesCall(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCommunicationChannelPreferencesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCommunicationChannelPreferencesValidateBeforeCall(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchCommunicationChannelPreferencesRequest' is set + if (searchCommunicationChannelPreferencesRequest == null) { + throw new ApiException("Missing the required parameter 'searchCommunicationChannelPreferencesRequest' when calling searchCommunicationChannelPreferences(Async)"); + } + + return searchCommunicationChannelPreferencesCall(searchCommunicationChannelPreferencesRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest (required) + * @return CommunicationChannelPreferencesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest) throws ApiException { + ApiResponse localVarResp = searchCommunicationChannelPreferencesWithHttpInfo(searchCommunicationChannelPreferencesRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest (required) + * @return ApiResponse<CommunicationChannelPreferencesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchCommunicationChannelPreferencesWithHttpInfo(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest) throws ApiException { + okhttp3.Call localVarCall = searchCommunicationChannelPreferencesValidateBeforeCall(searchCommunicationChannelPreferencesRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Gets a list of commits for a given metadata - * object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based - * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your - * instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage - * data models**) privilege and edit access to the metadata objects. - * - * @param searchCommitsRequest (required) + * (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 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchCommitsAsync( - SearchCommitsRequest searchCommitsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchCommitsValidateBeforeCall(searchCommitsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesAsync(SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCommunicationChannelPreferencesValidateBeforeCall(searchCommunicationChannelPreferencesRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchConfig - * - * @param searchConfigRequest (required) + * @param searchConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchConfigCall( - SearchConfigRequest searchConfigRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConfigCall(SearchConfigRequest searchConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -17611,169 +13278,133 @@ public okhttp3.Call searchConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchConfigValidateBeforeCall( - SearchConfigRequest searchConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchConfigValidateBeforeCall(SearchConfigRequest searchConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchConfigRequest' is set if (searchConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchConfigRequest' when calling" - + " searchConfig(Async)"); + throw new ApiException("Missing the required parameter 'searchConfigRequest' when calling searchConfig(Async)"); } return searchConfigCall(searchConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param searchConfigRequest (required) + * + * 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); + * @throws ApiException If fail to 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) + * + * 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 { + * @throws ApiException If fail to 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(); + 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) + * (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 { + * @throws ApiException 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(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchConnection - * - * @param searchConnectionRequest (required) + * @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 { + + + + + + + + +
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[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -17790,356 +13421,133 @@ public okhttp3.Call searchConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + 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 { + 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)"); + throw new ApiException("Missing the required parameter 'searchConnectionRequest' when calling searchConnection(Async)"); } return searchConnectionCall(searchConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` - * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. - * - * @param searchConnectionRequest (required) + * + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest (required) * @return List<SearchConnectionResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchConnection( - SearchConnectionRequest searchConnectionRequest) throws ApiException { - ApiResponse> localVarResp = - searchConnectionWithHttpInfo(searchConnectionRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchConnection(SearchConnectionRequest searchConnectionRequest) throws ApiException { + ApiResponse> localVarResp = searchConnectionWithHttpInfo(searchConnectionRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` - * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. - * - * @param searchConnectionRequest (required) + * + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest (required) * @return ApiResponse<List<SearchConnectionResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchConnectionWithHttpInfo( - SearchConnectionRequest searchConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - searchConnectionValidateBeforeCall(searchConnectionRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchConnectionWithHttpInfo(SearchConnectionRequest searchConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = searchConnectionValidateBeforeCall(searchConnectionRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Gets connection objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. - * - * @param searchConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchConnectionAsync( - SearchConnectionRequest searchConnectionRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchConnectionValidateBeforeCall(searchConnectionRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConnectionAsync(SearchConnectionRequest searchConnectionRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchConnectionValidateBeforeCall(searchConnectionRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchCustomActions - * - * @param searchCustomActionsRequest (required) + * @param searchCustomActionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchCustomActionsCall( - SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCustomActionsCall(SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -18156,169 +13564,133 @@ public okhttp3.Call searchCustomActionsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCustomActionsValidateBeforeCall( - SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchCustomActionsValidateBeforeCall(SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchCustomActionsRequest' is set if (searchCustomActionsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchCustomActionsRequest' when calling" - + " searchCustomActions(Async)"); + throw new ApiException("Missing the required parameter 'searchCustomActionsRequest' when calling searchCustomActions(Async)"); } return searchCustomActionsCall(searchCustomActionsRequest, _callback); + } /** - * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * - * @param searchCustomActionsRequest (required) + * + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest (required) * @return List<ResponseCustomAction> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchCustomActions( - SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { - ApiResponse> localVarResp = - searchCustomActionsWithHttpInfo(searchCustomActionsRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCustomActions(SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + ApiResponse> localVarResp = searchCustomActionsWithHttpInfo(searchCustomActionsRequest); return localVarResp.getData(); } /** - * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * - * @param searchCustomActionsRequest (required) + * + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest (required) * @return ApiResponse<List<ResponseCustomAction>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchCustomActionsWithHttpInfo( - SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { - okhttp3.Call localVarCall = - searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCustomActionsWithHttpInfo(SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.6.0.cl or later Gets custom actions configured on the cluster. - * Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. - * - * @param searchCustomActionsRequest (required) + * (asynchronously) + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchCustomActionsAsync( - SearchCustomActionsRequest searchCustomActionsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCustomActionsAsync(SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchData - * - * @param searchDataRequest (required) + * @param searchDataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchDataCall( - SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchDataCall(SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -18335,77 +13707,53 @@ public okhttp3.Call searchDataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchDataValidateBeforeCall( - SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchDataValidateBeforeCall(SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchDataRequest' is set if (searchDataRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchDataRequest' when calling" - + " searchData(Async)"); + throw new ApiException("Missing the required parameter 'searchDataRequest' when calling searchData(Async)"); } return searchDataCall(searchDataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least - * view access to the data source object (Worksheet or View). #### Usage guidelines To search - * data, specify the data source GUID in `logical_table_identifier`. The data source - * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the - * `query_string` attribute in the API request as shown in the following example: - * ``` { \"query_string\": \"[sales] by [store]\", - * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } - * ``` For more information about the `query_string` format and data - * source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). - * - * @param searchDataRequest (required) + * + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest (required) * @return SearchDataResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public SearchDataResponse searchData(SearchDataRequest searchDataRequest) throws ApiException { ApiResponse localVarResp = searchDataWithHttpInfo(searchDataRequest); @@ -18413,113 +13761,78 @@ public SearchDataResponse searchData(SearchDataRequest searchDataRequest) throws } /** - * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least - * view access to the data source object (Worksheet or View). #### Usage guidelines To search - * data, specify the data source GUID in `logical_table_identifier`. The data source - * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the - * `query_string` attribute in the API request as shown in the following example: - * ``` { \"query_string\": \"[sales] by [store]\", - * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } - * ``` For more information about the `query_string` format and data - * source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). - * - * @param searchDataRequest (required) + * + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest (required) * @return ApiResponse<SearchDataResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse searchDataWithHttpInfo( - SearchDataRequest searchDataRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchDataWithHttpInfo(SearchDataRequest searchDataRequest) throws ApiException { okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Generates an Answer from a given data source. - * Requires at least view access to the data source object (Worksheet or View). #### Usage - * guidelines To search data, specify the data source GUID in - * `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL - * view. Pass search tokens in the `query_string` attribute in the API request as - * shown in the following example: ``` { \"query_string\": - * \"[sales] by [store]\", \"logical_table_identifier\": - * \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information - * about the `query_string` format and data source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). - * - * @param searchDataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchDataAsync( - SearchDataRequest searchDataRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchDataAsync(SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchEmailCustomization - * - * @param searchEmailCustomizationRequest (required) + * @param searchEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call searchEmailCustomizationCall( - SearchEmailCustomizationRequest searchEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchEmailCustomizationCall(SearchEmailCustomizationRequest searchEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -18536,177 +13849,130 @@ public okhttp3.Call searchEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchEmailCustomizationValidateBeforeCall( - SearchEmailCustomizationRequest searchEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchEmailCustomizationValidateBeforeCall(SearchEmailCustomizationRequest searchEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchEmailCustomizationRequest' is set if (searchEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchEmailCustomizationRequest' when calling" - + " searchEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'searchEmailCustomizationRequest' when calling searchEmailCustomization(Async)"); } return searchEmailCustomizationCall(searchEmailCustomizationRequest, _callback); + } /** - * Version: 10.10.0.cl or later Search the email customization configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * - * @param searchEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest (required) * @return List<CreateEmailCustomizationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public List searchEmailCustomization( - SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { - ApiResponse> localVarResp = - searchEmailCustomizationWithHttpInfo(searchEmailCustomizationRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public List searchEmailCustomization(SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + ApiResponse> localVarResp = searchEmailCustomizationWithHttpInfo(searchEmailCustomizationRequest); return localVarResp.getData(); } /** - * Version: 10.10.0.cl or later Search the email customization configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * - * @param searchEmailCustomizationRequest (required) + * + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest (required) * @return ApiResponse<List<CreateEmailCustomizationResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse> searchEmailCustomizationWithHttpInfo( - SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { - okhttp3.Call localVarCall = - searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, null); - Type localVarReturnType = - new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse> searchEmailCustomizationWithHttpInfo(SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.10.0.cl or later Search the email customization configuration if - * any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has - * developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * - * @param searchEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call searchEmailCustomizationAsync( - SearchEmailCustomizationRequest searchEmailCustomizationRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchEmailCustomizationValidateBeforeCall( - searchEmailCustomizationRequest, _callback); - Type localVarReturnType = - new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchEmailCustomizationAsync(SearchEmailCustomizationRequest searchEmailCustomizationRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchMetadata - * - * @param searchMetadataRequest (required) + * @param searchMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchMetadataCall( - SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchMetadataCall(SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -18723,237 +13989,133 @@ public okhttp3.Call searchMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchMetadataValidateBeforeCall( - SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchMetadataValidateBeforeCall(SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchMetadataRequest' is set if (searchMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchMetadataRequest' when calling" - + " searchMetadata(Async)"); + throw new ApiException("Missing the required parameter 'searchMetadataRequest' when calling searchMetadata(Async)"); } return searchMetadataCall(searchMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot - * system. This API endpoint is available to all users who have view access to the object. Users - * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for - * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata - * objects, send the API request without any attributes. - To get metadata objects of a specific - * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as - * `LOGICAL_TABLE`. - To filter metadata objects within type - * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. - * - * @param searchMetadataRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest (required) * @return List<MetadataSearchResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchMetadata(SearchMetadataRequest searchMetadataRequest) - throws ApiException { - ApiResponse> localVarResp = - searchMetadataWithHttpInfo(searchMetadataRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchMetadata(SearchMetadataRequest searchMetadataRequest) throws ApiException { + ApiResponse> localVarResp = searchMetadataWithHttpInfo(searchMetadataRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot - * system. This API endpoint is available to all users who have view access to the object. Users - * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for - * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata - * objects, send the API request without any attributes. - To get metadata objects of a specific - * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as - * `LOGICAL_TABLE`. - To filter metadata objects within type - * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. - * - * @param searchMetadataRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest (required) * @return ApiResponse<List<MetadataSearchResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchMetadataWithHttpInfo( - SearchMetadataRequest searchMetadataRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchMetadataWithHttpInfo(SearchMetadataRequest searchMetadataRequest) throws ApiException { okhttp3.Call localVarCall = searchMetadataValidateBeforeCall(searchMetadataRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of metadata objects available on the - * ThoughtSpot system. This API endpoint is available to all users who have view access to the - * object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can - * view data for all metadata objects, including users and groups. #### Usage guidelines - To - * get all metadata objects, send the API request without any attributes. - To get metadata - * objects of a specific type, set the `type` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within - * type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch - * a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. - * - * @param searchMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchMetadataAsync( - SearchMetadataRequest searchMetadataRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchMetadataValidateBeforeCall(searchMetadataRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchMetadataAsync(SearchMetadataRequest searchMetadataRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchMetadataValidateBeforeCall(searchMetadataRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchOrgs - * - * @param searchOrgsRequest (required) + * @param searchOrgsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchOrgsCall( - SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchOrgsCall(SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -18970,69 +14132,53 @@ public okhttp3.Call searchOrgsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchOrgsValidateBeforeCall( - SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchOrgsValidateBeforeCall(SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchOrgsRequest' is set if (searchOrgsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchOrgsRequest' when calling" - + " searchOrgs(Async)"); + throw new ApiException("Missing the required parameter 'searchOrgsRequest' when calling searchOrgs(Async)"); } return searchOrgsCall(searchOrgsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get - * details of a specific Org, specify the Org ID or name. You can also pass parameters such as - * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster - * administration (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * - * @param searchOrgsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest (required) * @return List<OrgResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List searchOrgs(SearchOrgsRequest searchOrgsRequest) throws ApiException { ApiResponse> localVarResp = searchOrgsWithHttpInfo(searchOrgsRequest); @@ -19040,97 +14186,79 @@ public List searchOrgs(SearchOrgsRequest searchOrgsRequest) throws } /** - * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get - * details of a specific Org, specify the Org ID or name. You can also pass parameters such as - * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster - * administration (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * - * @param searchOrgsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest (required) * @return ApiResponse<List<OrgResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchOrgsWithHttpInfo( - SearchOrgsRequest searchOrgsRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchOrgsWithHttpInfo(SearchOrgsRequest searchOrgsRequest) throws ApiException { okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot - * system. To get details of a specific Org, specify the Org ID or name. You can also pass - * parameters such as status, visibility, and user identifiers to get a specific list of Orgs. - * Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * - * @param searchOrgsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchOrgsAsync( - SearchOrgsRequest searchOrgsRequest, final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchOrgsAsync(SearchOrgsRequest searchOrgsRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchRoles - * - * @param searchRolesRequest (required) + * @param searchRolesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public okhttp3.Call searchRolesCall( - SearchRolesRequest searchRolesRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call searchRolesCall(SearchRolesRequest searchRolesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -19147,172 +14275,133 @@ public okhttp3.Call searchRolesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchRolesValidateBeforeCall( - SearchRolesRequest searchRolesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchRolesValidateBeforeCall(SearchRolesRequest searchRolesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchRolesRequest' is set if (searchRolesRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchRolesRequest' when calling" - + " searchRoles(Async)"); + throw new ApiException("Missing the required parameter 'searchRolesRequest' when calling searchRoles(Async)"); } return searchRolesCall(searchRolesRequest, _callback); + } /** - * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can - * manage roles**) privilege is required. To get details of a specific Role object, specify the - * GUID or name. You can also filter the API response based on user group and Org identifiers, - * privileges assigned to the Role, and deprecation status. - * - * @param searchRolesRequest (required) + * + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest (required) * @return List<SearchRoleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public List searchRoles(SearchRolesRequest searchRolesRequest) - throws ApiException { - ApiResponse> localVarResp = - searchRolesWithHttpInfo(searchRolesRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public List searchRoles(SearchRolesRequest searchRolesRequest) throws ApiException { + ApiResponse> localVarResp = searchRolesWithHttpInfo(searchRolesRequest); return localVarResp.getData(); } /** - * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can - * manage roles**) privilege is required. To get details of a specific Role object, specify the - * GUID or name. You can also filter the API response based on user group and Org identifiers, - * privileges assigned to the Role, and deprecation status. - * - * @param searchRolesRequest (required) + * + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest (required) * @return ApiResponse<List<SearchRoleResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public ApiResponse> searchRolesWithHttpInfo( - SearchRolesRequest searchRolesRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse> searchRolesWithHttpInfo(SearchRolesRequest searchRolesRequest) throws ApiException { okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot - * system. Available if [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search - * for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. - * To get details of a specific Role object, specify the GUID or name. You can also filter the - * API response based on user group and Org identifiers, privileges assigned to the Role, and - * deprecation status. - * - * @param searchRolesRequest (required) + * (asynchronously) + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
- */ - public okhttp3.Call searchRolesAsync( - SearchRolesRequest searchRolesRequest, - final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call searchRolesAsync(SearchRolesRequest searchRolesRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchSchedules - * - * @param searchSchedulesRequest (required) + * @param searchSchedulesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchSchedulesCall( - SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSchedulesCall(SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -19329,169 +14418,133 @@ public okhttp3.Call searchSchedulesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchSchedulesValidateBeforeCall( - SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchSchedulesValidateBeforeCall(SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchSchedulesRequest' is set if (searchSchedulesRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchSchedulesRequest' when calling" - + " searchSchedules(Async)"); + throw new ApiException("Missing the required parameter 'searchSchedulesRequest' when calling searchSchedules(Async)"); } return searchSchedulesCall(searchSchedulesRequest, _callback); + } /** - * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a - * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the - * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering - * schedules by parameters other than `metadata`, set `record_size` to - * `-1` and `record_offset` to `0` for accurate results. - * - * @param searchSchedulesRequest (required) + * + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest (required) * @return List<ResponseSchedule> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchSchedules(SearchSchedulesRequest searchSchedulesRequest) - throws ApiException { - ApiResponse> localVarResp = - searchSchedulesWithHttpInfo(searchSchedulesRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchSchedules(SearchSchedulesRequest searchSchedulesRequest) throws ApiException { + ApiResponse> localVarResp = searchSchedulesWithHttpInfo(searchSchedulesRequest); return localVarResp.getData(); } /** - * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a - * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the - * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering - * schedules by parameters other than `metadata`, set `record_size` to - * `-1` and `record_offset` to `0` for accurate results. - * - * @param searchSchedulesRequest (required) + * + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest (required) * @return ApiResponse<List<ResponseSchedule>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchSchedulesWithHttpInfo( - SearchSchedulesRequest searchSchedulesRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchSchedulesWithHttpInfo(SearchSchedulesRequest searchSchedulesRequest) throws ApiException { okhttp3.Call localVarCall = searchSchedulesValidateBeforeCall(searchSchedulesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs - * configured for a Liveboard. To get details of a specific scheduled job, specify the name or - * GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When - * filtering schedules by parameters other than `metadata`, set - * `record_size` to `-1` and `record_offset` to `0` for - * accurate results. - * - * @param searchSchedulesRequest (required) + * (asynchronously) + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchSchedulesAsync( - SearchSchedulesRequest searchSchedulesRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchSchedulesValidateBeforeCall(searchSchedulesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSchedulesAsync(SearchSchedulesRequest searchSchedulesRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchSchedulesValidateBeforeCall(searchSchedulesRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchTags - * - * @param searchTagsRequest (required) + * @param searchTagsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchTagsCall( - SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchTagsCall(SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -19508,66 +14561,53 @@ public okhttp3.Call searchTagsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchTagsValidateBeforeCall( - SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchTagsValidateBeforeCall(SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchTagsRequest' is set if (searchTagsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchTagsRequest' when calling" - + " searchTags(Async)"); + throw new ApiException("Missing the required parameter 'searchTagsRequest' when calling searchTags(Async)"); } return searchTagsCall(searchTagsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To - * get details of a specific tag object, specify the GUID or name. Any authenticated user can - * search for tag objects. - * - * @param searchTagsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest (required) * @return List<Tag> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List searchTags(SearchTagsRequest searchTagsRequest) throws ApiException { ApiResponse> localVarResp = searchTagsWithHttpInfo(searchTagsRequest); @@ -19575,91 +14615,79 @@ public List searchTags(SearchTagsRequest searchTagsRequest) throws ApiExcep } /** - * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To - * get details of a specific tag object, specify the GUID or name. Any authenticated user can - * search for tag objects. - * - * @param searchTagsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest (required) * @return ApiResponse<List<Tag>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchTagsWithHttpInfo(SearchTagsRequest searchTagsRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchTagsWithHttpInfo(SearchTagsRequest searchTagsRequest) throws ApiException { okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of tag objects available on the - * ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any - * authenticated user can search for tag objects. - * - * @param searchTagsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchTagsAsync( - SearchTagsRequest searchTagsRequest, final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchTagsAsync(SearchTagsRequest searchTagsRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchUserGroups - * - * @param searchUserGroupsRequest (required) + * @param searchUserGroupsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchUserGroupsCall( - SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUserGroupsCall(SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -19676,185 +14704,133 @@ public okhttp3.Call searchUserGroupsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUserGroupsValidateBeforeCall( - SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchUserGroupsValidateBeforeCall(SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchUserGroupsRequest' is set if (searchUserGroupsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchUserGroupsRequest' when calling" - + " searchUserGroups(Async)"); + throw new ApiException("Missing the required parameter 'searchUserGroupsRequest' when calling searchUserGroups(Async)"); } return searchUserGroupsCall(searchUserGroupsRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To - * get details of a specific user group, specify the user group GUID or name. You can also - * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, - * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. - * Available to all users. Users with `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If - * you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. - * - * @param searchUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest (required) * @return List<UserGroupResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchUserGroups(SearchUserGroupsRequest searchUserGroupsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchUserGroupsWithHttpInfo(searchUserGroupsRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchUserGroups(SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { + ApiResponse> localVarResp = searchUserGroupsWithHttpInfo(searchUserGroupsRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To - * get details of a specific user group, specify the user group GUID or name. You can also - * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, - * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. - * Available to all users. Users with `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If - * you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. - * - * @param searchUserGroupsRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest (required) * @return ApiResponse<List<UserGroupResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchUserGroupsWithHttpInfo( - SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { - okhttp3.Call localVarCall = - searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchUserGroupsWithHttpInfo(SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of user group objects from the - * ThoughtSpot system. To get details of a specific user group, specify the user group GUID or - * name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, - * sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the - * users in the group. Available to all users. Users with `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: - * If you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. - * - * @param searchUserGroupsRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchUserGroupsAsync( - SearchUserGroupsRequest searchUserGroupsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUserGroupsAsync(SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchUsers - * - * @param searchUsersRequest (required) + * @param searchUsersRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchUsersCall( - SearchUsersRequest searchUsersRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUsersCall(SearchUsersRequest searchUsersRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -19871,75 +14847,53 @@ public okhttp3.Call searchUsersCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUsersValidateBeforeCall( - SearchUsersRequest searchUsersRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchUsersValidateBeforeCall(SearchUsersRequest searchUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchUsersRequest' is set if (searchUsersRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchUsersRequest' when calling" - + " searchUsers(Async)"); + throw new ApiException("Missing the required parameter 'searchUsersRequest' when calling searchUsers(Async)"); } return searchUsersCall(searchUsersRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get - * details of a specific user, specify the user GUID or name. You can also filter the API - * response based on groups, Org ID, user visibility, account status, user type, and user - * preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. - * - * @param searchUsersRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest (required) * @return List<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List searchUsers(SearchUsersRequest searchUsersRequest) throws ApiException { ApiResponse> localVarResp = searchUsersWithHttpInfo(searchUsersRequest); @@ -19947,107 +14901,79 @@ public List searchUsers(SearchUsersRequest searchUsersRequest) throws ApiE } /** - * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get - * details of a specific user, specify the user GUID or name. You can also filter the API - * response based on groups, Org ID, user visibility, account status, user type, and user - * preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. - * - * @param searchUsersRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest (required) * @return ApiResponse<List<User>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchUsersWithHttpInfo(SearchUsersRequest searchUsersRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchUsersWithHttpInfo(SearchUsersRequest searchUsersRequest) throws ApiException { okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot - * system. To get details of a specific user, specify the user GUID or name. You can also filter - * the API response based on groups, Org ID, user visibility, account status, user type, and - * user preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. - * - * @param searchUsersRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchUsersAsync( - SearchUsersRequest searchUsersRequest, final ApiCallback> _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUsersAsync(SearchUsersRequest searchUsersRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchVariables - * - * @param searchVariablesRequest (required) + * @param searchVariablesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call searchVariablesCall( - SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchVariablesCall(SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -20064,185 +14990,142 @@ public okhttp3.Call searchVariablesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchVariablesValidateBeforeCall( - SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchVariablesValidateBeforeCall(SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchVariablesRequest' is set if (searchVariablesRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchVariablesRequest' when calling" - + " searchVariables(Async)"); + throw new ApiException("Missing the required parameter 'searchVariablesRequest' when calling searchVariables(Async)"); } return searchVariablesCall(searchVariablesRequest, _callback); + } /** - * 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 - * - * @param searchVariablesRequest (required) + * + * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List searchVariables(SearchVariablesRequest searchVariablesRequest) - throws ApiException { - ApiResponse> localVarResp = - searchVariablesWithHttpInfo(searchVariablesRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchVariables(SearchVariablesRequest searchVariablesRequest) throws ApiException { + ApiResponse> localVarResp = searchVariablesWithHttpInfo(searchVariablesRequest); return localVarResp.getData(); } /** - * Search variables Version: 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 - * - * @param searchVariablesRequest (required) + * + * 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>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> searchVariablesWithHttpInfo( - SearchVariablesRequest searchVariablesRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchVariablesWithHttpInfo(SearchVariablesRequest searchVariablesRequest) throws ApiException { okhttp3.Call localVarCall = searchVariablesValidateBeforeCall(searchVariablesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (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 - * - * @param searchVariablesRequest (required) + * (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(); + * @throws ApiException 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 sendAgentMessageStreaming - * - * @param sendAgentMessageStreamingRequest (required) + * 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 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call sendAgentMessageStreamingCall( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
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[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } - Object localVarPostBody = sendAgentMessageStreamingRequest; + Object localVarPostBody = searchWebhookConfigurationsRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + String localVarPath = "/api/rest/2.0/webhooks/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -20250,213 +15133,421 @@ public okhttp3.Call sendAgentMessageStreamingCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, - final ApiCallback _callback) - throws ApiException { - // verify the required parameter 'sendAgentMessageStreamingRequest' is set + 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 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 + * @param sendAgentMessageStreamingRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentMessageStreamingCall(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentMessageStreamingRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'sendAgentMessageStreamingRequest' is set if (sendAgentMessageStreamingRequest == null) { - throw new ApiException( - "Missing the required parameter 'sendAgentMessageStreamingRequest' when" - + " calling sendAgentMessageStreaming(Async)"); + throw new ApiException("Missing the required parameter 'sendAgentMessageStreamingRequest' when calling sendAgentMessageStreaming(Async)"); } return sendAgentMessageStreamingCall(sendAgentMessageStreamingRequest, _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 Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) - * - * @param sendAgentMessageStreamingRequest (required) + * + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest (required) * @return SendAgentMessageResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public SendAgentMessageResponse sendAgentMessageStreaming( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { - ApiResponse localVarResp = - sendAgentMessageStreamingWithHttpInfo(sendAgentMessageStreamingRequest); + * @throws ApiException If fail to 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 SendAgentMessageResponse sendAgentMessageStreaming(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + ApiResponse localVarResp = sendAgentMessageStreamingWithHttpInfo(sendAgentMessageStreamingRequest); 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 Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) - * - * @param sendAgentMessageStreamingRequest (required) + * + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest (required) * @return ApiResponse<SendAgentMessageResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse sendAgentMessageStreamingWithHttpInfo( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { - okhttp3.Call localVarCall = - sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to 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 sendAgentMessageStreamingWithHttpInfo(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + okhttp3.Call localVarCall = sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, 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 Additionally, user can specify what - * tool can be included `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) - * - * @param sendAgentMessageStreamingRequest (required) + * (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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call sendAgentMessageStreamingAsync( - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - sendAgentMessageStreamingValidateBeforeCall( - sendAgentMessageStreamingRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException 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 sendAgentMessageStreamingAsync(SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for sendMessage - * * @param conversationIdentifier Unique identifier of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call sendMessageCall( - String conversationIdentifier, - SendMessageRequest sendMessageRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call sendMessageCall(String conversationIdentifier, SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -20465,11 +15556,8 @@ public okhttp3.Call sendMessageCall( Object localVarPostBody = sendMessageRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse" - .replace( - "{" + "conversation_identifier" + "}", - localVarApiClient.escapeString(conversationIdentifier.toString())); + String localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse" + .replace("{" + "conversation_identifier" + "}", localVarApiClient.escapeString(conversationIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -20477,198 +15565,138 @@ public okhttp3.Call sendMessageCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call sendMessageValidateBeforeCall( - String conversationIdentifier, - SendMessageRequest sendMessageRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call sendMessageValidateBeforeCall(String conversationIdentifier, SendMessageRequest sendMessageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'conversationIdentifier' is set if (conversationIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'conversationIdentifier' when calling" - + " sendMessage(Async)"); + throw new ApiException("Missing the required parameter 'conversationIdentifier' when calling sendMessage(Async)"); } // verify the required parameter 'sendMessageRequest' is set if (sendMessageRequest == null) { - throw new ApiException( - "Missing the required parameter 'sendMessageRequest' when calling" - + " sendMessage(Async)"); + throw new ApiException("Missing the required parameter 'sendMessageRequest' when calling sendMessage(Async)"); } return sendMessageCall(conversationIdentifier, sendMessageRequest, _callback); + } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. - * + * + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @return List<ResponseMessage> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public List sendMessage( - String conversationIdentifier, SendMessageRequest sendMessageRequest) - throws ApiException { - ApiResponse> localVarResp = - sendMessageWithHttpInfo(conversationIdentifier, sendMessageRequest); + * @throws ApiException If fail to 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 List sendMessage(String conversationIdentifier, SendMessageRequest sendMessageRequest) throws ApiException { + ApiResponse> localVarResp = sendMessageWithHttpInfo(conversationIdentifier, sendMessageRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. - * + * + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @return ApiResponse<List<ResponseMessage>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse> sendMessageWithHttpInfo( - String conversationIdentifier, SendMessageRequest sendMessageRequest) - throws ApiException { - okhttp3.Call localVarCall = - sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to 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> sendMessageWithHttpInfo(String conversationIdentifier, SendMessageRequest sendMessageRequest) throws ApiException { + okhttp3.Call localVarCall = sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing - * conversation within the context of the metadata model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines The API requires you to - * specify the `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. - * + * (asynchronously) + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. (required) - * @param sendMessageRequest (required) + * @param sendMessageRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call sendMessageAsync( - String conversationIdentifier, - SendMessageRequest sendMessageRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - sendMessageValidateBeforeCall( - conversationIdentifier, sendMessageRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException 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 sendMessageAsync(String conversationIdentifier, SendMessageRequest sendMessageRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for shareMetadata - * - * @param shareMetadataRequest (required) + * @param shareMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call shareMetadataCall( - ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call shareMetadataCall(ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -20685,173 +15713,128 @@ public okhttp3.Call shareMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call shareMetadataValidateBeforeCall( - ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call shareMetadataValidateBeforeCall(ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'shareMetadataRequest' is set if (shareMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'shareMetadataRequest' when calling" - + " shareMetadata(Async)"); + throw new ApiException("Missing the required parameter 'shareMetadataRequest' when calling shareMetadata(Async)"); } return shareMetadataCall(shareMetadataRequest, _callback); + } /** - * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and - * groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows - * sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers - * * Worksheets * Views * Connections You can provide `READ_ONLY` or - * `MODIFY` access when sharing an object with another user or group. With - * `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. - * - * @param shareMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + * @param shareMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void shareMetadata(ShareMetadataRequest shareMetadataRequest) throws ApiException { shareMetadataWithHttpInfo(shareMetadataRequest); } /** - * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and - * groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows - * sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers - * * Worksheets * Views * Connections You can provide `READ_ONLY` or - * `MODIFY` access when sharing an object with another user or group. With - * `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. - * - * @param shareMetadataRequest (required) + * + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + * @param shareMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse shareMetadataWithHttpInfo(ShareMetadataRequest shareMetadataRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse shareMetadataWithHttpInfo(ShareMetadataRequest shareMetadataRequest) throws ApiException { okhttp3.Call localVarCall = shareMetadataValidateBeforeCall(shareMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Allows sharing one or several metadata objects - * with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API - * endpoint allows sharing only the following types of metadata objects: * Liveboards * - * Visualizations * Answers * Worksheets * Views * Connections You can provide - * `READ_ONLY` or `MODIFY` access when sharing an object with another user - * or group. With `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. - * - * @param shareMetadataRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + * @param shareMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call shareMetadataAsync( - ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - shareMetadataValidateBeforeCall(shareMetadataRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call shareMetadataAsync(ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = shareMetadataValidateBeforeCall(shareMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for singleAnswer - * - * @param singleAnswerRequest (required) + * @param singleAnswerRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call singleAnswerCall( - SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
+ */ + public okhttp3.Call singleAnswerCall(SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -20868,165 +15851,130 @@ public okhttp3.Call singleAnswerCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call singleAnswerValidateBeforeCall( - SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call singleAnswerValidateBeforeCall(SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'singleAnswerRequest' is set if (singleAnswerRequest == null) { - throw new ApiException( - "Missing the required parameter 'singleAnswerRequest' when calling" - + " singleAnswer(Async)"); + throw new ApiException("Missing the required parameter 'singleAnswerRequest' when calling singleAnswer(Async)"); } return singleAnswerCall(singleAnswerRequest, _callback); + } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. - * - * @param singleAnswerRequest (required) + * + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest (required) * @return ResponseMessage - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) - throws ApiException { + * @throws ApiException If fail to 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 ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) throws ApiException { ApiResponse localVarResp = singleAnswerWithHttpInfo(singleAnswerRequest); return localVarResp.getData(); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. - * - * @param singleAnswerRequest (required) + * + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest (required) * @return ApiResponse<ResponseMessage> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public ApiResponse singleAnswerWithHttpInfo( - SingleAnswerRequest singleAnswerRequest) throws ApiException { + * @throws ApiException If fail to 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 singleAnswerWithHttpInfo(SingleAnswerRequest singleAnswerRequest) throws ApiException { okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query and returns - * an AI-generated response based on a specified data model. Requires at least view access to - * the metadata object specified in the request. > ###### Note: > * This endpoint is - * currently in Beta. Breaking changes may be introduced before the endpoint is made Generally - * Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to - * enable Spotter on your cluster. - * - * @param singleAnswerRequest (required) + * (asynchronously) + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
- */ - public okhttp3.Call singleAnswerAsync( - SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException 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 singleAnswerAsync(SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for unassignTag - * - * @param assignTagRequest (required) + * @param assignTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call unassignTagCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unassignTagCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -21043,117 +15991,98 @@ public okhttp3.Call unassignTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call unassignTagValidateBeforeCall( - AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unassignTagValidateBeforeCall(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assignTagRequest' is set if (assignTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'assignTagRequest' when calling" - + " unassignTag(Async)"); + throw new ApiException("Missing the required parameter 'assignTagRequest' when calling unassignTag(Async)"); } return unassignTagCall(assignTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or - * Worksheet. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param assignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void unassignTag(AssignTagRequest assignTagRequest) throws ApiException { unassignTagWithHttpInfo(assignTagRequest); } /** - * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or - * Worksheet. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse unassignTagWithHttpInfo(AssignTagRequest assignTagRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unassignTagWithHttpInfo(AssignTagRequest assignTagRequest) throws ApiException { okhttp3.Call localVarCall = unassignTagValidateBeforeCall(assignTagRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, - * Table, or Worksheet. Requires edit access to the metadata object. - * - * @param assignTagRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param assignTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call unassignTagAsync( - AssignTagRequest assignTagRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unassignTagAsync(AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unassignTagValidateBeforeCall(assignTagRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -21161,34 +16090,30 @@ public okhttp3.Call unassignTagAsync( } /** * Build call for unparameterizeMetadata - * - * @param unparameterizeMetadataRequest (required) + * @param unparameterizeMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call unparameterizeMetadataCall( - UnparameterizeMetadataRequest unparameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unparameterizeMetadataCall(UnparameterizeMetadataRequest unparameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -21205,175 +16130,129 @@ public okhttp3.Call unparameterizeMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call unparameterizeMetadataValidateBeforeCall( - UnparameterizeMetadataRequest unparameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call unparameterizeMetadataValidateBeforeCall(UnparameterizeMetadataRequest unparameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'unparameterizeMetadataRequest' is set if (unparameterizeMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'unparameterizeMetadataRequest' when calling" - + " unparameterizeMetadata(Async)"); + throw new ApiException("Missing the required parameter 'unparameterizeMetadataRequest' when calling unparameterizeMetadata(Async)"); } return unparameterizeMetadataCall(unparameterizeMetadataRequest, _callback); + } /** - * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows - * removing parameterization from fields in metadata objects in ThoughtSpot. Requires - * appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. - * - * @param unparameterizeMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void unparameterizeMetadata(UnparameterizeMetadataRequest unparameterizeMetadataRequest) - throws ApiException { + * + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. + * @param unparameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unparameterizeMetadata(UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { unparameterizeMetadataWithHttpInfo(unparameterizeMetadataRequest); } /** - * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows - * removing parameterization from fields in metadata objects in ThoughtSpot. Requires - * appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. - * - * @param unparameterizeMetadataRequest (required) + * + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. + * @param unparameterizeMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse unparameterizeMetadataWithHttpInfo( - UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = - unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unparameterizeMetadataWithHttpInfo(UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Remove parameterization from fields in metadata objects. Version: 10.9.0.cl - * or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. - * Requires appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. - * - * @param unparameterizeMetadataRequest (required) + * (asynchronously) + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. + * @param unparameterizeMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call unparameterizeMetadataAsync( - UnparameterizeMetadataRequest unparameterizeMetadataRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unparameterizeMetadataAsync(UnparameterizeMetadataRequest unparameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for unpublishMetadata - * - * @param unpublishMetadataRequest (required) + * @param unpublishMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call unpublishMetadataCall( - UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unpublishMetadataCall(UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -21390,173 +16269,130 @@ public okhttp3.Call unpublishMetadataCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call unpublishMetadataValidateBeforeCall( - UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call unpublishMetadataValidateBeforeCall(UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'unpublishMetadataRequest' is set if (unpublishMetadataRequest == null) { - throw new ApiException( - "Missing the required parameter 'unpublishMetadataRequest' when calling" - + " unpublishMetadata(Async)"); + throw new ApiException("Missing the required parameter 'unpublishMetadataRequest' when calling unpublishMetadata(Async)"); } return unpublishMetadataCall(unpublishMetadataRequest, _callback); + } /** - * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations - * - * @param unpublishMetadataRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void unpublishMetadata(UnpublishMetadataRequest unpublishMetadataRequest) - throws ApiException { + * + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unpublishMetadata(UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { unpublishMetadataWithHttpInfo(unpublishMetadataRequest); } /** - * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations - * - * @param unpublishMetadataRequest (required) + * + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse unpublishMetadataWithHttpInfo( - UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = - unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unpublishMetadataWithHttpInfo(UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.9.0.cl or later Allows unpublishing metadata objects from - * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint - * allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical - * Tables When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations - * - * @param unpublishMetadataRequest (required) + * (asynchronously) + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call unpublishMetadataAsync( - UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unpublishMetadataAsync(UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateCalendar - * * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param updateCalendarRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateCalendarCall( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarCall(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -21565,11 +16401,8 @@ public okhttp3.Call updateCalendarCall( Object localVarPostBody = updateCalendarRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/calendars/{calendar_identifier}/update" - .replace( - "{" + "calendar_identifier" + "}", - localVarApiClient.escapeString(calendarIdentifier.toString())); + String localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update" + .replace("{" + "calendar_identifier" + "}", localVarApiClient.escapeString(calendarIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -21577,272 +16410,137 @@ public okhttp3.Call updateCalendarCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCalendarValidateBeforeCall( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateCalendarValidateBeforeCall(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'calendarIdentifier' is set if (calendarIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'calendarIdentifier' when calling" - + " updateCalendar(Async)"); + throw new ApiException("Missing the required parameter 'calendarIdentifier' when calling updateCalendar(Async)"); } // verify the required parameter 'updateCalendarRequest' is set if (updateCalendarRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateCalendarRequest' when calling" - + " updateCalendar(Async)"); + throw new ApiException("Missing the required parameter 'updateCalendarRequest' when calling updateCalendar(Async)"); } return updateCalendarCall(calendarIdentifier, updateCalendarRequest, _callback); + } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` - * + * + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateCalendar( - String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) - throws ApiException { + * @param updateCalendarRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCalendar(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) throws ApiException { updateCalendarWithHttpInfo(calendarIdentifier, updateCalendarRequest); } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` - * + * + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param updateCalendarRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateCalendarWithHttpInfo( - String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCalendarWithHttpInfo(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) throws ApiException { + okhttp3.Call localVarCall = updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` - * + * (asynchronously) + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param updateCalendarRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateCalendarAsync( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateCalendarValidateBeforeCall( - calendarIdentifier, updateCalendarRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarAsync(String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateColumnSecurityRules - * - * @param updateColumnSecurityRulesRequest (required) + * @param updateColumnSecurityRulesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
- */ - public okhttp3.Call updateColumnSecurityRulesCall( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call updateColumnSecurityRulesCall(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -21859,287 +16557,129 @@ public okhttp3.Call updateColumnSecurityRulesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateColumnSecurityRulesValidateBeforeCall( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateColumnSecurityRulesValidateBeforeCall(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateColumnSecurityRulesRequest' is set if (updateColumnSecurityRulesRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateColumnSecurityRulesRequest' when" - + " calling updateColumnSecurityRules(Async)"); + throw new ApiException("Missing the required parameter 'updateColumnSecurityRulesRequest' when calling updateColumnSecurityRules(Async)"); } return updateColumnSecurityRulesCall(updateColumnSecurityRulesRequest, _callback); + } /** - * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified - * tables. This API endpoint allows you to create, update, or delete column-level security rules - * on columns of a table. The operation follows an \"all or none\" policy: if defining - * security rules for any of the provided columns fails, the entire operation will be rolled - * back, and no rules will be created. #### Usage guidelines - Provide table identifier using - * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use - * `clear_csr: true` to remove all column security rules from the table - For each - * column, specify the security rule using `column_security_rules` array - Use - * `is_unsecured: true` to mark a specific column as unprotected - Use - * `group_access` operations to manage group associations: - `ADD`: Add - * groups to the column's access list - `REMOVE`: Remove groups from the - * column's access list - `REPLACE`: Replace all existing groups with the - * specified groups #### Required permissions - `ADMINISTRATION` - Can administer - * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if - * RBAC is enabled) #### Example request ```json { \"identifier\": - * \"table-guid\", \"obj_identifier\": \"table-object-id\", - * \"clear_csr\": false, \"column_security_rules\": [ { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": false, \"group_access\": [ { \"operation\": - * \"ADD\", \"group_identifiers\": [\"hr_group_id\", - * \"hr_group_name\", \"finance_group_id\"] } ] }, { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups - * - * @param updateColumnSecurityRulesRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
- */ - public void updateColumnSecurityRules( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + * + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public void updateColumnSecurityRules(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { updateColumnSecurityRulesWithHttpInfo(updateColumnSecurityRulesRequest); } /** - * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified - * tables. This API endpoint allows you to create, update, or delete column-level security rules - * on columns of a table. The operation follows an \"all or none\" policy: if defining - * security rules for any of the provided columns fails, the entire operation will be rolled - * back, and no rules will be created. #### Usage guidelines - Provide table identifier using - * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use - * `clear_csr: true` to remove all column security rules from the table - For each - * column, specify the security rule using `column_security_rules` array - Use - * `is_unsecured: true` to mark a specific column as unprotected - Use - * `group_access` operations to manage group associations: - `ADD`: Add - * groups to the column's access list - `REMOVE`: Remove groups from the - * column's access list - `REPLACE`: Replace all existing groups with the - * specified groups #### Required permissions - `ADMINISTRATION` - Can administer - * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if - * RBAC is enabled) #### Example request ```json { \"identifier\": - * \"table-guid\", \"obj_identifier\": \"table-object-id\", - * \"clear_csr\": false, \"column_security_rules\": [ { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": false, \"group_access\": [ { \"operation\": - * \"ADD\", \"group_identifiers\": [\"hr_group_id\", - * \"hr_group_name\", \"finance_group_id\"] } ] }, { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups - * - * @param updateColumnSecurityRulesRequest (required) + * + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
- */ - public ApiResponse updateColumnSecurityRulesWithHttpInfo( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { - okhttp3.Call localVarCall = - updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public ApiResponse updateColumnSecurityRulesWithHttpInfo(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Creates, updates, or deletes column security - * rules for specified tables. This API endpoint allows you to create, update, or delete - * column-level security rules on columns of a table. The operation follows an \"all or - * none\" policy: if defining security rules for any of the provided columns fails, the - * entire operation will be rolled back, and no rules will be created. #### Usage guidelines - - * Provide table identifier using either `identifier` (GUID or name) or - * `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column - * security rules from the table - For each column, specify the security rule using - * `column_security_rules` array - Use `is_unsecured: true` to mark a - * specific column as unprotected - Use `group_access` operations to manage group - * associations: - `ADD`: Add groups to the column's access list - - * `REMOVE`: Remove groups from the column's access list - `REPLACE`: - * Replace all existing groups with the specified groups #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can - * manage worksheet views and tables (if RBAC is enabled) #### Example request - * ```json { \"identifier\": \"table-guid\", - * \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, - * \"column_security_rules\": [ { \"column_identifier\": \"col id or - * col name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"ADD\", \"group_identifiers\": - * [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] - * }, { \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups - * - * @param updateColumnSecurityRulesRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
- */ - public okhttp3.Call updateColumnSecurityRulesAsync( - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateColumnSecurityRulesValidateBeforeCall( - updateColumnSecurityRulesRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call updateColumnSecurityRulesAsync(UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateConfig - * - * @param updateConfigRequest (required) + * @param updateConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateConfigCall( - UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConfigCall(UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -22156,169 +16696,135 @@ public okhttp3.Call updateConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConfigValidateBeforeCall( - UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConfigValidateBeforeCall(UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateConfigRequest' is set if (updateConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateConfigRequest' when calling" - + " updateConfig(Async)"); + throw new ApiException("Missing the required parameter 'updateConfigRequest' when calling updateConfig(Async)"); } return updateConfigCall(updateConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. - * - * @param updateConfigRequest (required) + * + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest (required) * @return RepoConfigObject - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public RepoConfigObject updateConfig(UpdateConfigRequest updateConfigRequest) - throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RepoConfigObject updateConfig(UpdateConfigRequest updateConfigRequest) throws ApiException { ApiResponse localVarResp = updateConfigWithHttpInfo(updateConfigRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. - * - * @param updateConfigRequest (required) + * + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest (required) * @return ApiResponse<RepoConfigObject> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateConfigWithHttpInfo( - UpdateConfigRequest updateConfigRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConfigWithHttpInfo(UpdateConfigRequest updateConfigRequest) throws ApiException { okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Updates Git repository configuration settings. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param updateConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateConfigAsync( - UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) - throws ApiException { + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConfigAsync(UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateConnection - * - * @param updateConnectionRequest (required) + * @param updateConnectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call updateConnectionCall( - UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConnectionCall(UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -22335,204 +16841,137 @@ public okhttp3.Call updateConnectionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call updateConnectionValidateBeforeCall( - UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConnectionValidateBeforeCall(UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateConnectionRequest' is set if (updateConnectionRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateConnectionRequest' when calling" - + " updateConnection(Async)"); + throw new ApiException("Missing the required parameter 'updateConnectionRequest' when calling updateConnection(Async)"); } return updateConnectionCall(updateConnectionRequest, _callback); + } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update - * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your - * connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. - * - * @param updateConnectionRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public void updateConnection(UpdateConnectionRequest updateConnectionRequest) - throws ApiException { + public void updateConnection(UpdateConnectionRequest updateConnectionRequest) throws ApiException { updateConnectionWithHttpInfo(updateConnectionRequest); } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update - * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your - * connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. - * - * @param updateConnectionRequest (required) + * + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public ApiResponse updateConnectionWithHttpInfo( - UpdateConnectionRequest updateConnectionRequest) throws ApiException { - okhttp3.Call localVarCall = - updateConnectionValidateBeforeCall(updateConnectionRequest, null); + public ApiResponse updateConnectionWithHttpInfo(UpdateConnectionRequest updateConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = updateConnectionValidateBeforeCall(updateConnectionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and - * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the - * [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to - * update your connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. - * - * @param updateConnectionRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
* @deprecated */ @Deprecated - public okhttp3.Call updateConnectionAsync( - UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConnectionAsync(UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - updateConnectionValidateBeforeCall(updateConnectionRequest, _callback); + okhttp3.Call localVarCall = updateConnectionValidateBeforeCall(updateConnectionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateConnectionConfiguration - * * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) + * @param updateConnectionConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateConnectionConfigurationCall( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionConfigurationCall(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -22541,11 +16980,8 @@ public okhttp3.Call updateConnectionConfigurationCall( Object localVarPostBody = updateConnectionConfigurationRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/connection-configurations/{configuration_identifier}/update" - .replace( - "{" + "configuration_identifier" + "}", - localVarApiClient.escapeString(configurationIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update" + .replace("{" + "configuration_identifier" + "}", localVarApiClient.escapeString(configurationIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -22553,210 +16989,138 @@ public okhttp3.Call updateConnectionConfigurationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConnectionConfigurationValidateBeforeCall( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConnectionConfigurationValidateBeforeCall(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'configurationIdentifier' is set if (configurationIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'configurationIdentifier' when calling" - + " updateConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'configurationIdentifier' when calling updateConnectionConfiguration(Async)"); } // verify the required parameter 'updateConnectionConfigurationRequest' is set if (updateConnectionConfigurationRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateConnectionConfigurationRequest' when" - + " calling updateConnectionConfiguration(Async)"); + throw new ApiException("Missing the required parameter 'updateConnectionConfigurationRequest' when calling updateConnectionConfiguration(Async)"); } - return updateConnectionConfigurationCall( - configurationIdentifier, updateConnectionConfigurationRequest, _callback); + return updateConnectionConfigurationCall(configurationIdentifier, updateConnectionConfigurationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Updates a connection configuration object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. - * + * + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateConnectionConfiguration( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) - throws ApiException { - updateConnectionConfigurationWithHttpInfo( - configurationIdentifier, updateConnectionConfigurationRequest); - } - - /** - * Version: 10.12.0.cl or later Updates a connection configuration object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. - * + * @param updateConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateConnectionConfiguration(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) throws ApiException { + updateConnectionConfigurationWithHttpInfo(configurationIdentifier, updateConnectionConfigurationRequest); + } + + /** + * + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) + * @param updateConnectionConfigurationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateConnectionConfigurationWithHttpInfo( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateConnectionConfigurationValidateBeforeCall( - configurationIdentifier, updateConnectionConfigurationRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionConfigurationWithHttpInfo(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = updateConnectionConfigurationValidateBeforeCall(configurationIdentifier, updateConnectionConfigurationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates a connection configuration object. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. - * + * (asynchronously) + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * @param configurationIdentifier Unique ID or name of the configuration. (required) - * @param updateConnectionConfigurationRequest (required) + * @param updateConnectionConfigurationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateConnectionConfigurationAsync( - String configurationIdentifier, - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateConnectionConfigurationValidateBeforeCall( - configurationIdentifier, updateConnectionConfigurationRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionConfigurationAsync(String configurationIdentifier, UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateConnectionConfigurationValidateBeforeCall(configurationIdentifier, updateConnectionConfigurationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateConnectionV2 - * * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) + * @param updateConnectionV2Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateConnectionV2Call( - String connectionIdentifier, - UpdateConnectionV2Request updateConnectionV2Request, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionV2Call(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -22765,11 +17129,8 @@ public okhttp3.Call updateConnectionV2Call( Object localVarPostBody = updateConnectionV2Request; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/{connection_identifier}/update" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update" + .replace("{" + "connection_identifier" + "}", localVarApiClient.escapeString(connectionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -22777,303 +17138,138 @@ public okhttp3.Call updateConnectionV2Call( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConnectionV2ValidateBeforeCall( - String connectionIdentifier, - UpdateConnectionV2Request updateConnectionV2Request, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConnectionV2ValidateBeforeCall(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionIdentifier' is set if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " updateConnectionV2(Async)"); + throw new ApiException("Missing the required parameter 'connectionIdentifier' when calling updateConnectionV2(Async)"); } // verify the required parameter 'updateConnectionV2Request' is set if (updateConnectionV2Request == null) { - throw new ApiException( - "Missing the required parameter 'updateConnectionV2Request' when calling" - + " updateConnectionV2(Async)"); + throw new ApiException("Missing the required parameter 'updateConnectionV2Request' when calling updateConnectionV2(Async)"); } return updateConnectionV2Call(connectionIdentifier, updateConnectionV2Request, _callback); + } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` - * (**Can manage data**) and edit permissions to the connection object, or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. To update a connection object, pass these parameters in your API request: 1. GUID - * of the connection object. 2. If you are updating tables or database schema of a connection - * object: a. Add the updated JSON map of metadata with database, schema, and tables in - * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** - * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must - * explicitly provide the authenticationType property in the payload. If you do not specify - * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A - * JSON map of configuration attributes, database details, and table properties in - * `data_warehouse_config` as shown in the following example: ``` { - * \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateConnectionV2( - String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) - throws ApiException { + * @param updateConnectionV2Request (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateConnectionV2(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) throws ApiException { updateConnectionV2WithHttpInfo(connectionIdentifier, updateConnectionV2Request); } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` - * (**Can manage data**) and edit permissions to the connection object, or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. To update a connection object, pass these parameters in your API request: 1. GUID - * of the connection object. 2. If you are updating tables or database schema of a connection - * object: a. Add the updated JSON map of metadata with database, schema, and tables in - * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** - * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must - * explicitly provide the authenticationType property in the payload. If you do not specify - * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A - * JSON map of configuration attributes, database details, and table properties in - * `data_warehouse_config` as shown in the following example: ``` { - * \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) + * @param updateConnectionV2Request (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateConnectionV2WithHttpInfo( - String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) - throws ApiException { - okhttp3.Call localVarCall = - updateConnectionV2ValidateBeforeCall( - connectionIdentifier, updateConnectionV2Request, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionV2WithHttpInfo(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) throws ApiException { + okhttp3.Call localVarCall = updateConnectionV2ValidateBeforeCall(connectionIdentifier, updateConnectionV2Request, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.4.0.cl or later Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. **NOTE:** If the `authentication_type` is anything other than - * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. - * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the - * authentication type. * A JSON map of configuration attributes, database details, and table - * properties in `data_warehouse_config` as shown in the following example: - * ``` { \"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\":[ ] } ``` - * + * (asynchronously) + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. (required) - * @param updateConnectionV2Request (required) + * @param updateConnectionV2Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateConnectionV2Async( - String connectionIdentifier, - UpdateConnectionV2Request updateConnectionV2Request, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateConnectionV2ValidateBeforeCall( - connectionIdentifier, updateConnectionV2Request, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionV2Async(String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateConnectionV2ValidateBeforeCall(connectionIdentifier, updateConnectionV2Request, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateCustomAction - * * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) + * @param updateCustomActionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateCustomActionCall( - String customActionIdentifier, - UpdateCustomActionRequest updateCustomActionRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCustomActionCall(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -23082,11 +17278,8 @@ public okhttp3.Call updateCustomActionCall( Object localVarPostBody = updateCustomActionRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update" - .replace( - "{" + "custom_action_identifier" + "}", - localVarApiClient.escapeString(customActionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update" + .replace("{" + "custom_action_identifier" + "}", localVarApiClient.escapeString(customActionIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -23094,168 +17287,113 @@ public okhttp3.Call updateCustomActionCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCustomActionValidateBeforeCall( - String customActionIdentifier, - UpdateCustomActionRequest updateCustomActionRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateCustomActionValidateBeforeCall(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customActionIdentifier' is set if (customActionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'customActionIdentifier' when calling" - + " updateCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'customActionIdentifier' when calling updateCustomAction(Async)"); } // verify the required parameter 'updateCustomActionRequest' is set if (updateCustomActionRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateCustomActionRequest' when calling" - + " updateCustomAction(Async)"); + throw new ApiException("Missing the required parameter 'updateCustomActionRequest' when calling updateCustomAction(Async)"); } return updateCustomActionCall(customActionIdentifier, updateCustomActionRequest, _callback); + } /** - * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * + * + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateCustomAction( - String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) - throws ApiException { + * @param updateCustomActionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCustomAction(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) throws ApiException { updateCustomActionWithHttpInfo(customActionIdentifier, updateCustomActionRequest); } /** - * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * + * + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) + * @param updateCustomActionRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateCustomActionWithHttpInfo( - String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateCustomActionValidateBeforeCall( - customActionIdentifier, updateCustomActionRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCustomActionWithHttpInfo(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) throws ApiException { + okhttp3.Call localVarCall = updateCustomActionValidateBeforeCall(customActionIdentifier, updateCustomActionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.6.0.cl or later Updates a custom action. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). - * + * (asynchronously) + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * @param customActionIdentifier Unique ID or name of the custom action. (required) - * @param updateCustomActionRequest (required) + * @param updateCustomActionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateCustomActionAsync( - String customActionIdentifier, - UpdateCustomActionRequest updateCustomActionRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateCustomActionValidateBeforeCall( - customActionIdentifier, updateCustomActionRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCustomActionAsync(String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCustomActionValidateBeforeCall(customActionIdentifier, updateCustomActionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateDbtConnection - * * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -23266,44 +17404,30 @@ public okhttp3.Call updateCustomActionAsync( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateDbtConnectionCall( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateDbtConnectionCall(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -23364,86 +17488,40 @@ public okhttp3.Call updateDbtConnectionCall( localVarFormParams.put("file_content", fileContent); } - final String[] localVarAccepts = {"application/json"}; + 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); + 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); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateDbtConnectionValidateBeforeCall( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateDbtConnectionValidateBeforeCall(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbtConnectionIdentifier' is set if (dbtConnectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'dbtConnectionIdentifier' when calling" - + " updateDbtConnection(Async)"); - } - - return updateDbtConnectionCall( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); - } - - /** - * Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. - * + throw new ApiException("Missing the required parameter 'dbtConnectionIdentifier' when calling updateDbtConnection(Async)"); + } + + return updateDbtConnectionCall(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + + } + + /** + * + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -23454,66 +17532,28 @@ private okhttp3.Call updateDbtConnectionValidateBeforeCall( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public Object updateDbtConnection( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - ApiResponse localVarResp = - updateDbtConnectionWithHttpInfo( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object updateDbtConnection(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + ApiResponse localVarResp = updateDbtConnectionWithHttpInfo(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); return localVarResp.getData(); } /** - * Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. - * + * + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -23524,68 +17564,29 @@ public Object updateDbtConnection( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateDbtConnectionWithHttpInfo( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent) - throws ApiException { - okhttp3.Call localVarCall = - updateDbtConnectionValidateBeforeCall( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateDbtConnectionWithHttpInfo(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent) throws ApiException { + okhttp3.Call localVarCall = updateDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. - * + * (asynchronously) + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) * @param connectionName Name of the connection. (optional) * @param databaseName Name of the Database. (optional) @@ -23596,86 +17597,54 @@ public ApiResponse updateDbtConnectionWithHttpInfo( * @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 fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE' (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateDbtConnectionAsync( - String dbtConnectionIdentifier, - String connectionName, - String databaseName, - String importType, - String accessToken, - String dbtUrl, - String accountId, - String projectId, - String dbtEnvId, - String projectName, - File fileContent, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateDbtConnectionValidateBeforeCall( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent, - _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateDbtConnectionAsync(String dbtConnectionIdentifier, String connectionName, String databaseName, String importType, String accessToken, String dbtUrl, String accountId, String projectId, String dbtEnvId, String projectName, File fileContent, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateEmailCustomization - * - * @param updateEmailCustomizationRequest (required) + * @param updateEmailCustomizationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call updateEmailCustomizationCall( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateEmailCustomizationCall(UpdateEmailCustomizationRequest updateEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -23692,227 +17661,129 @@ public okhttp3.Call updateEmailCustomizationCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateEmailCustomizationValidateBeforeCall( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateEmailCustomizationValidateBeforeCall(UpdateEmailCustomizationRequest updateEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateEmailCustomizationRequest' is set if (updateEmailCustomizationRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateEmailCustomizationRequest' when calling" - + " updateEmailCustomization(Async)"); + throw new ApiException("Missing the required parameter 'updateEmailCustomizationRequest' when calling updateEmailCustomization(Async)"); } return updateEmailCustomizationCall(updateEmailCustomizationRequest, _callback); + } /** - * Version: 10.12.0.cl or later Updates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To update a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param updateEmailCustomizationRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public void updateEmailCustomization( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + * + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param updateEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void updateEmailCustomization(UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { updateEmailCustomizationWithHttpInfo(updateEmailCustomizationRequest); } /** - * Version: 10.12.0.cl or later Updates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To update a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param updateEmailCustomizationRequest (required) + * + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param updateEmailCustomizationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public ApiResponse updateEmailCustomizationWithHttpInfo( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { - okhttp3.Call localVarCall = - updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse updateEmailCustomizationWithHttpInfo(UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates a customization configuration for the - * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. #### Usage guidelines To update a custom configuration pass these - * parameters in your API request: - A JSON map of configuration attributes - * `template_properties`. The following example shows a sample set of customization - * configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", - * \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": - * \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : - * \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` - * - * @param updateEmailCustomizationRequest (required) + * (asynchronously) + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` + * @param updateEmailCustomizationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call updateEmailCustomizationAsync( - UpdateEmailCustomizationRequest updateEmailCustomizationRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateEmailCustomizationValidateBeforeCall( - updateEmailCustomizationRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateEmailCustomizationAsync(UpdateEmailCustomizationRequest updateEmailCustomizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateMetadataHeader - * - * @param updateMetadataHeaderRequest (required) + * @param updateMetadataHeaderRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateMetadataHeaderCall( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataHeaderCall(UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -23929,258 +17800,129 @@ public okhttp3.Call updateMetadataHeaderCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateMetadataHeaderValidateBeforeCall( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateMetadataHeaderValidateBeforeCall(UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateMetadataHeaderRequest' is set if (updateMetadataHeaderRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateMetadataHeaderRequest' when calling" - + " updateMetadataHeader(Async)"); + throw new ApiException("Missing the required parameter 'updateMetadataHeaderRequest' when calling updateMetadataHeader(Async)"); } return updateMetadataHeaderCall(updateMetadataHeaderRequest, _callback); + } /** - * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **headers_update** - **Description:** List of header objects with their - * attributes to be updated. Each object contains a list of attributes to be updated in the - * header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` - * - * @param updateMetadataHeaderRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateMetadataHeader(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) - throws ApiException { + * + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateMetadataHeader(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { updateMetadataHeaderWithHttpInfo(updateMetadataHeaderRequest); } /** - * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **headers_update** - **Description:** List of header objects with their - * attributes to be updated. Each object contains a list of attributes to be updated in the - * header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` - * - * @param updateMetadataHeaderRequest (required) + * + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateMetadataHeaderWithHttpInfo( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { - okhttp3.Call localVarCall = - updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateMetadataHeaderWithHttpInfo(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { + okhttp3.Call localVarCall = updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update header attributes for a given list of header objects. Version: - * 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` - * (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional - * Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## - * Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header - * objects with their attributes to be updated. Each object contains a list of attributes to be - * updated in the header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` - * - * @param updateMetadataHeaderRequest (required) + * (asynchronously) + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateMetadataHeaderAsync( - UpdateMetadataHeaderRequest updateMetadataHeaderRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataHeaderAsync(UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateMetadataObjId - * - * @param updateMetadataObjIdRequest (required) + * @param updateMetadataObjIdRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateMetadataObjIdCall( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataObjIdCall(UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -24197,244 +17939,130 @@ public okhttp3.Call updateMetadataObjIdCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateMetadataObjIdValidateBeforeCall( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateMetadataObjIdValidateBeforeCall(UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateMetadataObjIdRequest' is set if (updateMetadataObjIdRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateMetadataObjIdRequest' when calling" - + " updateMetadataObjId(Async)"); + throw new ApiException("Missing the required parameter 'updateMetadataObjIdRequest' when calling updateMetadataObjId(Async)"); } return updateMetadataObjIdCall(updateMetadataObjIdRequest, _callback); + } /** - * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` - * - * @param updateMetadataObjIdRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateMetadataObjId(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) - throws ApiException { + * + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateMetadataObjId(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { updateMetadataObjIdWithHttpInfo(updateMetadataObjIdRequest); } /** - * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` - * - * @param updateMetadataObjIdRequest (required) + * + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateMetadataObjIdWithHttpInfo( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { - okhttp3.Call localVarCall = - updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateMetadataObjIdWithHttpInfo(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { + okhttp3.Call localVarCall = updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` - * - * @param updateMetadataObjIdRequest (required) + * (asynchronously) + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateMetadataObjIdAsync( - UpdateMetadataObjIdRequest updateMetadataObjIdRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataObjIdAsync(UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateOrg - * * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) + * @param updateOrgRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateOrgCall( - String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateOrgCall(String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -24443,11 +18071,8 @@ public okhttp3.Call updateOrgCall( Object localVarPostBody = updateOrgRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/orgs/{org_identifier}/update" - .replace( - "{" + "org_identifier" + "}", - localVarApiClient.escapeString(orgIdentifier.toString())); + String localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update" + .replace("{" + "org_identifier" + "}", localVarApiClient.escapeString(orgIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -24455,176 +18080,138 @@ public okhttp3.Call updateOrgCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateOrgValidateBeforeCall( - String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateOrgValidateBeforeCall(String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'orgIdentifier' is set if (orgIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'orgIdentifier' when calling updateOrg(Async)"); + throw new ApiException("Missing the required parameter 'orgIdentifier' when calling updateOrg(Async)"); } // verify the required parameter 'updateOrgRequest' is set if (updateOrgRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateOrgRequest' when calling" - + " updateOrg(Async)"); + throw new ApiException("Missing the required parameter 'updateOrgRequest' when calling updateOrg(Async)"); } return updateOrgCall(orgIdentifier, updateOrgRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, - * description, and user associations. Requires cluster administration (**Can administer Org**) - * privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * + * + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateOrg(String orgIdentifier, UpdateOrgRequest updateOrgRequest) - throws ApiException { + * @param updateOrgRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateOrg(String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { updateOrgWithHttpInfo(orgIdentifier, updateOrgRequest); } /** - * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, - * description, and user associations. Requires cluster administration (**Can administer Org**) - * privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * + * + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) + * @param updateOrgRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateOrgWithHttpInfo( - String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { - okhttp3.Call localVarCall = - updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateOrgWithHttpInfo(String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { + okhttp3.Call localVarCall = updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates an Org object. You can modify Org - * properties such as name, description, and user associations. Requires cluster administration - * (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * @param orgIdentifier ID or name of the Org (required) - * @param updateOrgRequest (required) + * @param updateOrgRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateOrgAsync( - String orgIdentifier, - UpdateOrgRequest updateOrgRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateOrgAsync(String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateRole - * * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateRoleCall( - String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateRoleCall(String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -24633,11 +18220,8 @@ public okhttp3.Call updateRoleCall( Object localVarPostBody = updateRoleRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/roles/{role_identifier}/update" - .replace( - "{" + "role_identifier" + "}", - localVarApiClient.escapeString(roleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/roles/{role_identifier}/update" + .replace("{" + "role_identifier" + "}", localVarApiClient.escapeString(roleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -24645,181 +18229,142 @@ public okhttp3.Call updateRoleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateRoleValidateBeforeCall( - String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateRoleValidateBeforeCall(String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'roleIdentifier' is set if (roleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'roleIdentifier' when calling" - + " updateRole(Async)"); + throw new ApiException("Missing the required parameter 'roleIdentifier' when calling updateRole(Async)"); } // verify the required parameter 'updateRoleRequest' is set if (updateRoleRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateRoleRequest' when calling" - + " updateRole(Async)"); + throw new ApiException("Missing the required parameter 'updateRoleRequest' when calling updateRole(Async)"); } return updateRoleCall(roleIdentifier, updateRoleRequest, _callback); + } /** - * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * + * + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @return RoleResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public RoleResponse updateRole(String roleIdentifier, UpdateRoleRequest updateRoleRequest) - throws ApiException { - ApiResponse localVarResp = - updateRoleWithHttpInfo(roleIdentifier, updateRoleRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RoleResponse updateRole(String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { + ApiResponse localVarResp = updateRoleWithHttpInfo(roleIdentifier, updateRoleRequest); return localVarResp.getData(); } /** - * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. - * + * + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @return ApiResponse<RoleResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateRoleWithHttpInfo( - String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { - okhttp3.Call localVarCall = - updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateRoleWithHttpInfo(String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { + okhttp3.Call localVarCall = updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.5.0.cl or later Updates the properties of a Role object. - * Available only if [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update - * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. - * + * (asynchronously) + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * @param roleIdentifier Unique ID or name of the Role. (required) - * @param updateRoleRequest (required) + * @param updateRoleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateRoleAsync( - String roleIdentifier, - UpdateRoleRequest updateRoleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateRoleAsync(String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSchedule - * * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) + * @param updateScheduleRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateScheduleCall( - String scheduleIdentifier, - UpdateScheduleRequest updateScheduleRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateScheduleCall(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -24828,11 +18373,8 @@ public okhttp3.Call updateScheduleCall( Object localVarPostBody = updateScheduleRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/schedules/{schedule_identifier}/update" - .replace( - "{" + "schedule_identifier" + "}", - localVarApiClient.escapeString(scheduleIdentifier.toString())); + String localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update" + .replace("{" + "schedule_identifier" + "}", localVarApiClient.escapeString(scheduleIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -24840,194 +18382,137 @@ public okhttp3.Call updateScheduleCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateScheduleValidateBeforeCall( - String scheduleIdentifier, - UpdateScheduleRequest updateScheduleRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateScheduleValidateBeforeCall(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'scheduleIdentifier' is set if (scheduleIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'scheduleIdentifier' when calling" - + " updateSchedule(Async)"); + throw new ApiException("Missing the required parameter 'scheduleIdentifier' when calling updateSchedule(Async)"); } // verify the required parameter 'updateScheduleRequest' is set if (updateScheduleRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateScheduleRequest' when calling" - + " updateSchedule(Async)"); + throw new ApiException("Missing the required parameter 'updateScheduleRequest' when calling updateSchedule(Async)"); } return updateScheduleCall(scheduleIdentifier, updateScheduleRequest, _callback); + } /** - * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at - * least edit access to Liveboards. To update a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. - * + * + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateSchedule( - String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) - throws ApiException { + * @param updateScheduleRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateSchedule(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) throws ApiException { updateScheduleWithHttpInfo(scheduleIdentifier, updateScheduleRequest); } /** - * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at - * least edit access to Liveboards. To update a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. - * + * + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) + * @param updateScheduleRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateScheduleWithHttpInfo( - String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateScheduleWithHttpInfo(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) throws ApiException { + okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard - * job. Requires at least edit access to Liveboards. To update a schedule on behalf of another - * user, you need `ADMINISTRATION` (**Can administer Org**) or - * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the - * Liveboard. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. - * + * (asynchronously) + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * @param scheduleIdentifier Unique ID or name of the schedule. (required) - * @param updateScheduleRequest (required) + * @param updateScheduleRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateScheduleAsync( - String scheduleIdentifier, - UpdateScheduleRequest updateScheduleRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateScheduleValidateBeforeCall( - scheduleIdentifier, updateScheduleRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateScheduleAsync(String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateSystemConfig - * - * @param updateSystemConfigRequest (required) + * @param updateSystemConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateSystemConfigCall( - UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateSystemConfigCall(UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -25044,168 +18529,130 @@ public okhttp3.Call updateSystemConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateSystemConfigValidateBeforeCall( - UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateSystemConfigValidateBeforeCall(UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateSystemConfigRequest' is set if (updateSystemConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateSystemConfigRequest' when calling" - + " updateSystemConfig(Async)"); + throw new ApiException("Missing the required parameter 'updateSystemConfigRequest' when calling updateSystemConfig(Async)"); } return updateSystemConfigCall(updateSystemConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send - * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. - * - * @param updateSystemConfigRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateSystemConfig(UpdateSystemConfigRequest updateSystemConfigRequest) - throws ApiException { + * + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateSystemConfig(UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { updateSystemConfigWithHttpInfo(updateSystemConfigRequest); } /** - * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send - * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. - * - * @param updateSystemConfigRequest (required) + * + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateSystemConfigWithHttpInfo( - UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { - okhttp3.Call localVarCall = - updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateSystemConfigWithHttpInfo(UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { + okhttp3.Call localVarCall = updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later Updates the current configuration of the cluster. - * You must send the configuration data in JSON format. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. - * - * @param updateSystemConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateSystemConfigAsync( - UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateSystemConfigAsync(UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateTag - * * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) + * @param updateTagRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateTagCall( - String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateTagCall(String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -25214,11 +18661,8 @@ public okhttp3.Call updateTagCall( Object localVarPostBody = updateTagRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/tags/{tag_identifier}/update" - .replace( - "{" + "tag_identifier" + "}", - localVarApiClient.escapeString(tagIdentifier.toString())); + String localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update" + .replace("{" + "tag_identifier" + "}", localVarApiClient.escapeString(tagIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -25226,179 +18670,138 @@ public okhttp3.Call updateTagCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateTagValidateBeforeCall( - String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateTagValidateBeforeCall(String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tagIdentifier' is set if (tagIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'tagIdentifier' when calling updateTag(Async)"); + throw new ApiException("Missing the required parameter 'tagIdentifier' when calling updateTag(Async)"); } // verify the required parameter 'updateTagRequest' is set if (updateTagRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateTagRequest' when calling" - + " updateTag(Async)"); + throw new ApiException("Missing the required parameter 'updateTagRequest' when calling updateTag(Async)"); } return updateTagCall(tagIdentifier, updateTagRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and - * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * + * + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateTag(String tagIdentifier, UpdateTagRequest updateTagRequest) - throws ApiException { + * @param updateTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateTag(String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { updateTagWithHttpInfo(tagIdentifier, updateTagRequest); } /** - * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and - * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. - * + * + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) + * @param updateTagRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateTagWithHttpInfo( - String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { - okhttp3.Call localVarCall = - updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateTagWithHttpInfo(String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { + okhttp3.Call localVarCall = updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates a tag object. You can modify the - * `name` and `color` properties of a tag object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * @param tagIdentifier Name or Id of the tag. (required) - * @param updateTagRequest (required) + * @param updateTagRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateTagAsync( - String tagIdentifier, - UpdateTagRequest updateTagRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateTagAsync(String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateUser - * * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) + * @param updateUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateUserCall( - String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserCall(String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -25407,11 +18810,8 @@ public okhttp3.Call updateUserCall( Object localVarPostBody = updateUserRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/users/{user_identifier}/update" - .replace( - "{" + "user_identifier" + "}", - localVarApiClient.escapeString(userIdentifier.toString())); + String localVarPath = "/api/rest/2.0/users/{user_identifier}/update" + .replace("{" + "user_identifier" + "}", localVarApiClient.escapeString(userIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -25419,185 +18819,138 @@ public okhttp3.Call updateUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserValidateBeforeCall( - String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateUserValidateBeforeCall(String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userIdentifier' is set if (userIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'userIdentifier' when calling" - + " updateUser(Async)"); + throw new ApiException("Missing the required parameter 'userIdentifier' when calling updateUser(Async)"); } // verify the required parameter 'updateUserRequest' is set if (updateUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateUserRequest' when calling" - + " updateUser(Async)"); + throw new ApiException("Missing the required parameter 'updateUserRequest' when calling updateUser(Async)"); } return updateUserCall(userIdentifier, updateUserRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user - * properties such as username, email, and share notification settings. You can also assign new - * groups and Orgs, remove the user from a group or Org, reset password, and modify user - * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) - * privilege is required. - * + * + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateUser(String userIdentifier, UpdateUserRequest updateUserRequest) - throws ApiException { + * @param updateUserRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateUser(String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { updateUserWithHttpInfo(userIdentifier, updateUserRequest); } /** - * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user - * properties such as username, email, and share notification settings. You can also assign new - * groups and Orgs, remove the user from a group or Org, reset password, and modify user - * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) - * privilege is required. - * + * + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) + * @param updateUserRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateUserWithHttpInfo( - String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { - okhttp3.Call localVarCall = - updateUserValidateBeforeCall(userIdentifier, updateUserRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateUserWithHttpInfo(String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { + okhttp3.Call localVarCall = updateUserValidateBeforeCall(userIdentifier, updateUserRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a user object. You can - * modify user properties such as username, email, and share notification settings. You can also - * assign new groups and Orgs, remove the user from a group or Org, reset password, and modify - * user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) + * @param updateUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateUserAsync( - String userIdentifier, - UpdateUserRequest updateUserRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateUserValidateBeforeCall(userIdentifier, updateUserRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserAsync(String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateUserValidateBeforeCall(userIdentifier, updateUserRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateUserGroup - * * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) + * @param updateUserGroupRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateUserGroupCall( - String groupIdentifier, - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserGroupCall(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -25606,11 +18959,8 @@ public okhttp3.Call updateUserGroupCall( Object localVarPostBody = updateUserGroupRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/groups/{group_identifier}/update" - .replace( - "{" + "group_identifier" + "}", - localVarApiClient.escapeString(groupIdentifier.toString())); + String localVarPath = "/api/rest/2.0/groups/{group_identifier}/update" + .replace("{" + "group_identifier" + "}", localVarApiClient.escapeString(groupIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -25618,196 +18968,138 @@ public okhttp3.Call updateUserGroupCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserGroupValidateBeforeCall( - String groupIdentifier, - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateUserGroupValidateBeforeCall(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupIdentifier' is set if (groupIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'groupIdentifier' when calling" - + " updateUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'groupIdentifier' when calling updateUserGroup(Async)"); } // verify the required parameter 'updateUserGroupRequest' is set if (updateUserGroupRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateUserGroupRequest' when calling" - + " updateUserGroup(Async)"); + throw new ApiException("Missing the required parameter 'updateUserGroupRequest' when calling updateUserGroup(Async)"); } return updateUserGroupCall(groupIdentifier, updateUserGroupRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * Supported operations This API endpoint lets you perform the following operations in a single - * API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings - * + * + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateUserGroup( - String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) - throws ApiException { + * @param updateUserGroupRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateUserGroup(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) throws ApiException { updateUserGroupWithHttpInfo(groupIdentifier, updateUserGroupRequest); } /** - * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * Supported operations This API endpoint lets you perform the following operations in a single - * API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings - * + * + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) + * @param updateUserGroupRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateUserGroupWithHttpInfo( - String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) - throws ApiException { - okhttp3.Call localVarCall = - updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateUserGroupWithHttpInfo(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) throws ApiException { + okhttp3.Call localVarCall = updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a group object in - * ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) - * privilege is required. #### Supported operations This API endpoint lets you perform the - * following operations in a single API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * @param groupIdentifier GUID or name of the group. (required) - * @param updateUserGroupRequest (required) + * @param updateUserGroupRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateUserGroupAsync( - String groupIdentifier, - UpdateUserGroupRequest updateUserGroupRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateUserGroupValidateBeforeCall( - groupIdentifier, updateUserGroupRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserGroupAsync(String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateVariable - * * @param identifier Unique id or name of the variable to update. (required) - * @param updateVariableRequest (required) + * @param updateVariableRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateVariableCall( - String identifier, - UpdateVariableRequest updateVariableRequest, - final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableCall(String identifier, UpdateVariableRequest updateVariableRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -25816,11 +19108,8 @@ public okhttp3.Call updateVariableCall( Object localVarPostBody = updateVariableRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/template/variables/{identifier}/update" - .replace( - "{" + "identifier" + "}", - localVarApiClient.escapeString(identifier.toString())); + String localVarPath = "/api/rest/2.0/template/variables/{identifier}/update" + .replace("{" + "identifier" + "}", localVarApiClient.escapeString(identifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -25828,172 +19117,137 @@ public okhttp3.Call updateVariableCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateVariableValidateBeforeCall( - String identifier, - UpdateVariableRequest updateVariableRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateVariableValidateBeforeCall(String identifier, UpdateVariableRequest updateVariableRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'identifier' is set if (identifier == null) { - throw new ApiException( - "Missing the required parameter 'identifier' when calling" - + " updateVariable(Async)"); + throw new ApiException("Missing the required parameter 'identifier' when calling updateVariable(Async)"); } // verify the required parameter 'updateVariableRequest' is set if (updateVariableRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateVariableRequest' when calling" - + " updateVariable(Async)"); + throw new ApiException("Missing the required parameter 'updateVariableRequest' when calling updateVariable(Async)"); } return updateVariableCall(identifier, updateVariableRequest, _callback); + } /** - * 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) - * @throws ApiException If fail 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 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateVariable(String identifier, UpdateVariableRequest updateVariableRequest) - throws ApiException { + * @param updateVariableRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateVariable(String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { updateVariableWithHttpInfo(identifier, updateVariableRequest); } /** - * Update a variable's 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) + * @param updateVariableRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateVariableWithHttpInfo( - String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { - okhttp3.Call localVarCall = - updateVariableValidateBeforeCall(identifier, updateVariableRequest, null); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateVariableWithHttpInfo(String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { + okhttp3.Call localVarCall = updateVariableValidateBeforeCall(identifier, updateVariableRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update a variable's 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) + * @param updateVariableRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateVariableAsync( - String identifier, - UpdateVariableRequest updateVariableRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateVariableValidateBeforeCall(identifier, updateVariableRequest, _callback); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableAsync(String identifier, UpdateVariableRequest updateVariableRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateVariableValidateBeforeCall(identifier, updateVariableRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateVariableValues - * - * @param updateVariableValuesRequest (required) + * @param updateVariableValuesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateVariableValuesCall( - UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableValuesCall(UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -26002,7 +19256,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(); @@ -26010,177 +19264,276 @@ public okhttp3.Call updateVariableValuesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateVariableValuesValidateBeforeCall( - UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateVariableValuesValidateBeforeCall(UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateVariableValuesRequest' is set if (updateVariableValuesRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateVariableValuesRequest' when calling" - + " updateVariableValues(Async)"); + throw new ApiException("Missing the required parameter 'updateVariableValuesRequest' when calling updateVariableValues(Async)"); } return updateVariableValuesCall(updateVariableValuesRequest, _callback); + } /** - * 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 - * - * @param updateVariableValuesRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) - throws ApiException { + * + * 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 response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { updateVariableValuesWithHttpInfo(updateVariableValuesRequest); } /** - * 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 - * - * @param updateVariableValuesRequest (required) + * + * 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> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateVariableValuesWithHttpInfo(UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { + okhttp3.Call localVarCall = updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Update values for multiple variables Version: 10.14.0.cl or later 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 + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableValuesAsync(UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateWebhookConfiguration + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationCall(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update" + .replace("{" + "webhook_identifier" + "}", localVarApiClient.escapeString(webhookIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateWebhookConfigurationValidateBeforeCall(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'webhookIdentifier' is set + if (webhookIdentifier == null) { + throw new ApiException("Missing the required parameter 'webhookIdentifier' when calling updateWebhookConfiguration(Async)"); + } + + // verify the required parameter 'updateWebhookConfigurationRequest' is set + if (updateWebhookConfigurationRequest == null) { + throw new ApiException("Missing the required parameter 'updateWebhookConfigurationRequest' when calling updateWebhookConfiguration(Async)"); + } + + return updateWebhookConfigurationCall(webhookIdentifier, updateWebhookConfigurationRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateWebhookConfiguration(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) throws ApiException { + updateWebhookConfigurationWithHttpInfo(webhookIdentifier, updateWebhookConfigurationRequest); + } + + /** + * + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse updateVariableValuesWithHttpInfo( - UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { - okhttp3.Call localVarCall = - updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, null); + * @throws ApiException If fail 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) 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 - * - * @param updateVariableValuesRequest (required) + * (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 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call updateVariableValuesAsync( - UpdateVariableValuesRequest updateVariableValuesRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, _callback); + * @throws ApiException 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 - * * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
- */ - public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) - throws ApiException { + + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -26197,86 +19550,63 @@ public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateEmailCustomizationValidateBeforeCall(final ApiCallback _callback) - throws ApiException { + private okhttp3.Call validateEmailCustomizationValidateBeforeCall(final ApiCallback _callback) throws ApiException { return validateEmailCustomizationCall(_callback); + } /** - * Version: 10.10.0.cl or later Validates the email customization configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ public void validateEmailCustomization() throws ApiException { validateEmailCustomizationWithHttpInfo(); } /** - * Version: 10.10.0.cl or later Validates the email customization configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. - * + * + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ public ApiResponse validateEmailCustomizationWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(null); @@ -26284,30 +19614,22 @@ public ApiResponse validateEmailCustomizationWithHttpInfo() throws ApiExce } /** - * (asynchronously) Version: 10.10.0.cl or later Validates the email customization configuration - * if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` - * (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * + * (asynchronously) + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
*/ - public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _callback) - throws ApiException { + public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(_callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -26315,33 +19637,30 @@ public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _cal } /** * Build call for validateMerge - * - * @param validateMergeRequest (required) + * @param validateMergeRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call validateMergeCall( - ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateMergeCall(ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -26358,178 +19677,133 @@ public okhttp3.Call validateMergeCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateMergeValidateBeforeCall( - ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call validateMergeValidateBeforeCall(ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'validateMergeRequest' is set if (validateMergeRequest == null) { - throw new ApiException( - "Missing the required parameter 'validateMergeRequest' when calling" - + " validateMerge(Async)"); + throw new ApiException("Missing the required parameter 'validateMergeRequest' when calling validateMerge(Async)"); } return validateMergeCall(validateMergeRequest, _callback); + } /** - * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in - * your destination environment. Before merging content from your source branch to the - * destination branch, run this API operation from your destination environment and ensure that - * the changes from the source branch function in the destination environment. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param validateMergeRequest (required) + * + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest (required) * @return List<DeployResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public List validateMerge(ValidateMergeRequest validateMergeRequest) - throws ApiException { - ApiResponse> localVarResp = - validateMergeWithHttpInfo(validateMergeRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List validateMerge(ValidateMergeRequest validateMergeRequest) throws ApiException { + ApiResponse> localVarResp = validateMergeWithHttpInfo(validateMergeRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in - * your destination environment. Before merging content from your source branch to the - * destination branch, run this API operation from your destination environment and ensure that - * the changes from the source branch function in the destination environment. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param validateMergeRequest (required) + * + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest (required) * @return ApiResponse<List<DeployResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse> validateMergeWithHttpInfo( - ValidateMergeRequest validateMergeRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> validateMergeWithHttpInfo(ValidateMergeRequest validateMergeRequest) throws ApiException { okhttp3.Call localVarCall = validateMergeValidateBeforeCall(validateMergeRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Validates the content of your source branch - * against the objects in your destination environment. Before merging content from your source - * branch to the destination branch, run this API operation from your destination environment - * and ensure that the changes from the source branch function in the destination environment. - * Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param validateMergeRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call validateMergeAsync( - ValidateMergeRequest validateMergeRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - validateMergeValidateBeforeCall(validateMergeRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateMergeAsync(ValidateMergeRequest validateMergeRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = validateMergeValidateBeforeCall(validateMergeRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for validateToken - * - * @param validateTokenRequest (required) + * @param validateTokenRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call validateTokenCall( - ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) - throws ApiException { + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateTokenCall(ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -26546,131 +19820,104 @@ public okhttp3.Call validateTokenCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateTokenValidateBeforeCall( - ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call validateTokenValidateBeforeCall(ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'validateTokenRequest' is set if (validateTokenRequest == null) { - throw new ApiException( - "Missing the required parameter 'validateTokenRequest' when calling" - + " validateToken(Async)"); + throw new ApiException("Missing the required parameter 'validateTokenRequest' when calling validateToken(Async)"); } return validateTokenCall(validateTokenRequest, _callback); + } /** - * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. - * If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param validateTokenRequest (required) + * + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest (required) * @return TokenValidationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public TokenValidationResponse validateToken(ValidateTokenRequest validateTokenRequest) - throws ApiException { - ApiResponse localVarResp = - validateTokenWithHttpInfo(validateTokenRequest); + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public TokenValidationResponse validateToken(ValidateTokenRequest validateTokenRequest) throws ApiException { + ApiResponse localVarResp = validateTokenWithHttpInfo(validateTokenRequest); return localVarResp.getData(); } /** - * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. - * If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param validateTokenRequest (required) + * + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest (required) * @return ApiResponse<TokenValidationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public ApiResponse validateTokenWithHttpInfo( - ValidateTokenRequest validateTokenRequest) throws ApiException { + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse validateTokenWithHttpInfo(ValidateTokenRequest validateTokenRequest) throws ApiException { okhttp3.Call localVarCall = validateTokenValidateBeforeCall(validateTokenRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.12.0.cl or later Validates the authentication token specified in - * the API request. If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param validateTokenRequest (required) + * (asynchronously) + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object - * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- */ - public okhttp3.Call validateTokenAsync( - ValidateTokenRequest validateTokenRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - validateTokenValidateBeforeCall(validateTokenRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateTokenAsync(ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = validateTokenValidateBeforeCall(validateTokenRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java index 9d9e8cbad..5de3e8df9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java @@ -4,7 +4,6 @@ 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; @@ -12,10 +11,19 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.ActivateUserRequest; import com.thoughtspot.client.model.ChangeUserPasswordRequest; import com.thoughtspot.client.model.CreateUserRequest; import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ForceLogoutUsersRequest; import com.thoughtspot.client.model.ImportUsersRequest; import com.thoughtspot.client.model.ImportUsersResponse; @@ -24,15 +32,14 @@ import com.thoughtspot.client.model.SearchUsersRequest; import com.thoughtspot.client.model.UpdateUserRequest; import com.thoughtspot.client.model.User; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class UsersApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -91,33 +98,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for activateUser - * - * @param activateUserRequest (required) + * @param activateUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call activateUserCall( - ActivateUserRequest activateUserRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call activateUserCall(ActivateUserRequest activateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -134,72 +138,53 @@ public okhttp3.Call activateUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call activateUserValidateBeforeCall( - ActivateUserRequest activateUserRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call activateUserValidateBeforeCall(ActivateUserRequest activateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'activateUserRequest' is set if (activateUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'activateUserRequest' when calling" - + " activateUser(Async)"); + throw new ApiException("Missing the required parameter 'activateUserRequest' when calling activateUser(Async)"); } return activateUserCall(activateUserRequest, _callback); + } /** - * Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. - * - * @param activateUserRequest (required) + * + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest (required) * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public User activateUser(ActivateUserRequest activateUserRequest) throws ApiException { ApiResponse localVarResp = activateUserWithHttpInfo(activateUserRequest); @@ -207,101 +192,79 @@ public User activateUser(ActivateUserRequest activateUserRequest) throws ApiExce } /** - * Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. - * - * @param activateUserRequest (required) + * + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest (required) * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse activateUserWithHttpInfo(ActivateUserRequest activateUserRequest) - throws ApiException { + public ApiResponse activateUserWithHttpInfo(ActivateUserRequest activateUserRequest) throws ApiException { okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. - * - * @param activateUserRequest (required) + * (asynchronously) + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call activateUserAsync( - ActivateUserRequest activateUserRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call activateUserAsync(ActivateUserRequest activateUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for changeUserPassword - * - * @param changeUserPasswordRequest (required) + * @param changeUserPasswordRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call changeUserPasswordCall( - ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call changeUserPasswordCall(ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -318,161 +281,129 @@ public okhttp3.Call changeUserPasswordCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call changeUserPasswordValidateBeforeCall( - ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call changeUserPasswordValidateBeforeCall(ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'changeUserPasswordRequest' is set if (changeUserPasswordRequest == null) { - throw new ApiException( - "Missing the required parameter 'changeUserPasswordRequest' when calling" - + " changeUserPassword(Async)"); + throw new ApiException("Missing the required parameter 'changeUserPasswordRequest' when calling changeUserPassword(Async)"); } return changeUserPasswordCall(changeUserPasswordRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates the current password of the user. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param changeUserPasswordRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void changeUserPassword(ChangeUserPasswordRequest changeUserPasswordRequest) - throws ApiException { + public void changeUserPassword(ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { changeUserPasswordWithHttpInfo(changeUserPasswordRequest); } /** - * Version: 9.0.0.cl or later Updates the current password of the user. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param changeUserPasswordRequest (required) + * + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse changeUserPasswordWithHttpInfo( - ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { - okhttp3.Call localVarCall = - changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, null); + public ApiResponse changeUserPasswordWithHttpInfo(ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates the current password of the user. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * - * @param changeUserPasswordRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call changeUserPasswordAsync( - ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call changeUserPasswordAsync(ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, _callback); + okhttp3.Call localVarCall = changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for createUser - * - * @param createUserRequest (required) + * @param createUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createUserCall( - CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createUserCall(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -489,73 +420,53 @@ public okhttp3.Call createUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUserValidateBeforeCall( - CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createUserValidateBeforeCall(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createUserRequest' is set if (createUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'createUserRequest' when calling" - + " createUser(Async)"); + throw new ApiException("Missing the required parameter 'createUserRequest' when calling createUser(Async)"); } return createUserCall(createUserRequest, _callback); + } /** - * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to - * configure several user properties such as email address, account status, share notification - * preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param createUserRequest (required) + * + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest (required) * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public User createUser(CreateUserRequest createUserRequest) throws ApiException { ApiResponse localVarResp = createUserWithHttpInfo(createUserRequest); @@ -563,105 +474,79 @@ public User createUser(CreateUserRequest createUserRequest) throws ApiException } /** - * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to - * configure several user properties such as email address, account status, share notification - * preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param createUserRequest (required) + * + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest (required) * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createUserWithHttpInfo(CreateUserRequest createUserRequest) - throws ApiException { + public ApiResponse createUserWithHttpInfo(CreateUserRequest createUserRequest) throws ApiException { okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint - * allows you to configure several user properties such as email address, account status, share - * notification preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param createUserRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createUserAsync( - CreateUserRequest createUserRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createUserAsync(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deactivateUser - * - * @param deactivateUserRequest (required) + * @param deactivateUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deactivateUserCall( - DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deactivateUserCall(DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -678,180 +563,133 @@ public okhttp3.Call deactivateUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deactivateUserValidateBeforeCall( - DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deactivateUserValidateBeforeCall(DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deactivateUserRequest' is set if (deactivateUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'deactivateUserRequest' when calling" - + " deactivateUser(Async)"); + throw new ApiException("Missing the required parameter 'deactivateUserRequest' when calling deactivateUser(Async)"); } return deactivateUserCall(deactivateUserRequest, _callback); + } /** - * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` - * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a - * user account, the API request body must include the following information: - Username or the - * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is - * successful, ThoughtSpot returns the activation URL in the response. The activation URL is - * valid for 14 days and can be used to re-activate the account and reset the password of the - * deactivated account. - * - * @param deactivateUserRequest (required) + * + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest (required) * @return ResponseActivationURL - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ResponseActivationURL deactivateUser(DeactivateUserRequest deactivateUserRequest) - throws ApiException { - ApiResponse localVarResp = - deactivateUserWithHttpInfo(deactivateUserRequest); + public ResponseActivationURL deactivateUser(DeactivateUserRequest deactivateUserRequest) throws ApiException { + ApiResponse localVarResp = deactivateUserWithHttpInfo(deactivateUserRequest); return localVarResp.getData(); } /** - * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` - * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a - * user account, the API request body must include the following information: - Username or the - * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is - * successful, ThoughtSpot returns the activation URL in the response. The activation URL is - * valid for 14 days and can be used to re-activate the account and reset the password of the - * deactivated account. - * - * @param deactivateUserRequest (required) + * + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest (required) * @return ApiResponse<ResponseActivationURL> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deactivateUserWithHttpInfo( - DeactivateUserRequest deactivateUserRequest) throws ApiException { + public ApiResponse deactivateUserWithHttpInfo(DeactivateUserRequest deactivateUserRequest) throws ApiException { okhttp3.Call localVarCall = deactivateUserValidateBeforeCall(deactivateUserRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.7.0.cl or later Deactivates a user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To - * deactivate a user account, the API request body must include the following information: - - * Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API - * request is successful, ThoughtSpot returns the activation URL in the response. The activation - * URL is valid for 14 days and can be used to re-activate the account and reset the password of - * the deactivated account. - * - * @param deactivateUserRequest (required) + * (asynchronously) + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deactivateUserAsync( - DeactivateUserRequest deactivateUserRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - deactivateUserValidateBeforeCall(deactivateUserRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call deactivateUserAsync(DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deactivateUserValidateBeforeCall(deactivateUserRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteUser - * * @param userIdentifier GUID / name of the user (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -860,11 +698,8 @@ public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _cal Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/users/{user_identifier}/delete" - .replace( - "{" + "user_identifier" + "}", - localVarApiClient.escapeString(userIdentifier.toString())); + String localVarPath = "/api/rest/2.0/users/{user_identifier}/delete" + .replace("{" + "user_identifier" + "}", localVarApiClient.escapeString(userIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -872,99 +707,72 @@ public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _cal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserValidateBeforeCall( - String userIdentifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserValidateBeforeCall(String userIdentifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userIdentifier' is set if (userIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'userIdentifier' when calling" - + " deleteUser(Async)"); + throw new ApiException("Missing the required parameter 'userIdentifier' when calling deleteUser(Async)"); } return deleteUserCall(userIdentifier, _callback); + } /** - * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove - * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping - * properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteUser(String userIdentifier) throws ApiException { deleteUserWithHttpInfo(userIdentifier); } /** - * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove - * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping - * properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * + * + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteUserWithHttpInfo(String userIdentifier) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, null); @@ -972,33 +780,24 @@ public ApiResponse deleteUserWithHttpInfo(String userIdentifier) throws Ap } /** - * (asynchronously) Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If - * you want to remove a user from a specific Org but not from ThoughtSpot, update the group and - * Org mapping properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1006,33 +805,30 @@ public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback - * Response Details - * Status Code Description Response Headers - * 204 Force logging out of users operation successful. - - * 400 Invalid request. - - * 401 Unauthorized access. - - * 403 Forbidden access. - - * 500 Unexpected error - - * + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call forceLogoutUsersCall( - ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call forceLogoutUsersCall(ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1049,170 +845,129 @@ public okhttp3.Call forceLogoutUsersCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call forceLogoutUsersValidateBeforeCall( - ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call forceLogoutUsersValidateBeforeCall(ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'forceLogoutUsersRequest' is set if (forceLogoutUsersRequest == null) { - throw new ApiException( - "Missing the required parameter 'forceLogoutUsersRequest' when calling" - + " forceLogoutUsers(Async)"); + throw new ApiException("Missing the required parameter 'forceLogoutUsersRequest' when calling forceLogoutUsers(Async)"); } return forceLogoutUsersCall(forceLogoutUsersRequest, _callback); + } /** - * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with - * caution as it may invalidate active user sessions and force users to re-login. Make sure you - * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on - * your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param forceLogoutUsersRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void forceLogoutUsers(ForceLogoutUsersRequest forceLogoutUsersRequest) - throws ApiException { + public void forceLogoutUsers(ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { forceLogoutUsersWithHttpInfo(forceLogoutUsersRequest); } /** - * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with - * caution as it may invalidate active user sessions and force users to re-login. Make sure you - * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on - * your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param forceLogoutUsersRequest (required) + * + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse forceLogoutUsersWithHttpInfo( - ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { - okhttp3.Call localVarCall = - forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, null); + public ApiResponse forceLogoutUsersWithHttpInfo(ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { + okhttp3.Call localVarCall = forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Enforces logout on current user sessions. Use - * this API with caution as it may invalidate active user sessions and force users to re-login. - * Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all - * user sessions on your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param forceLogoutUsersRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call forceLogoutUsersAsync( - ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call forceLogoutUsersAsync(ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, _callback); + okhttp3.Call localVarCall = forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for importUsers - * - * @param importUsersRequest (required) + * @param importUsersRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importUsersCall( - ImportUsersRequest importUsersRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call importUsersCall(ImportUsersRequest importUsersRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1229,190 +984,133 @@ public okhttp3.Call importUsersCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importUsersValidateBeforeCall( - ImportUsersRequest importUsersRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call importUsersValidateBeforeCall(ImportUsersRequest importUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'importUsersRequest' is set if (importUsersRequest == null) { - throw new ApiException( - "Missing the required parameter 'importUsersRequest' when calling" - + " importUsers(Async)"); + throw new ApiException("Missing the required parameter 'importUsersRequest' when calling importUsers(Async)"); } return importUsersCall(importUsersRequest, _callback); + } /** - * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During - * the user import operation: * If the specified users are not available in ThoughtSpot, the - * users are created and assigned a default password. Defining a `default_password` in - * the API request is optional. * If `delete_unspecified_users` is set to - * `true`, the users not specified in the API request, excluding the - * `tsadmin`, `guest`, `system` and `su` users, are - * deleted. * If the specified user objects are already available in ThoughtSpot, the object - * properties are updated and synchronized as per the input data in the API request. A - * successful API call returns the object that represents the changes made in the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * - * @param importUsersRequest (required) + * + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest (required) * @return ImportUsersResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ImportUsersResponse importUsers(ImportUsersRequest importUsersRequest) - throws ApiException { + public ImportUsersResponse importUsers(ImportUsersRequest importUsersRequest) throws ApiException { ApiResponse localVarResp = importUsersWithHttpInfo(importUsersRequest); return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During - * the user import operation: * If the specified users are not available in ThoughtSpot, the - * users are created and assigned a default password. Defining a `default_password` in - * the API request is optional. * If `delete_unspecified_users` is set to - * `true`, the users not specified in the API request, excluding the - * `tsadmin`, `guest`, `system` and `su` users, are - * deleted. * If the specified user objects are already available in ThoughtSpot, the object - * properties are updated and synchronized as per the input data in the API request. A - * successful API call returns the object that represents the changes made in the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. - * - * @param importUsersRequest (required) + * + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest (required) * @return ApiResponse<ImportUsersResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse importUsersWithHttpInfo( - ImportUsersRequest importUsersRequest) throws ApiException { + public ApiResponse importUsersWithHttpInfo(ImportUsersRequest importUsersRequest) throws ApiException { okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Imports user data from external databases into - * ThoughtSpot. During the user import operation: * If the specified users are not available in - * ThoughtSpot, the users are created and assigned a default password. Defining a - * `default_password` in the API request is optional. * If - * `delete_unspecified_users` is set to `true`, the users not specified in - * the API request, excluding the `tsadmin`, `guest`, `system` and - * `su` users, are deleted. * If the specified user objects are already available in - * ThoughtSpot, the object properties are updated and synchronized as per the input data in the - * API request. A successful API call returns the object that represents the changes made in the - * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param importUsersRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call importUsersAsync( - ImportUsersRequest importUsersRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call importUsersAsync(ImportUsersRequest importUsersRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for resetUserPassword - * - * @param resetUserPasswordRequest (required) + * @param resetUserPasswordRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call resetUserPasswordCall( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call resetUserPasswordCall(ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1429,164 +1127,129 @@ public okhttp3.Call resetUserPasswordCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call resetUserPasswordValidateBeforeCall( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call resetUserPasswordValidateBeforeCall(ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'resetUserPasswordRequest' is set if (resetUserPasswordRequest == null) { - throw new ApiException( - "Missing the required parameter 'resetUserPasswordRequest' when calling" - + " resetUserPassword(Async)"); + throw new ApiException("Missing the required parameter 'resetUserPasswordRequest' when calling resetUserPassword(Async)"); } return resetUserPasswordCall(resetUserPasswordRequest, _callback); + } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) - throws ApiException { + public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { resetUserPasswordWithHttpInfo(resetUserPasswordRequest); } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) + * + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse resetUserPasswordWithHttpInfo( - ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { - okhttp3.Call localVarCall = - resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); + public ApiResponse resetUserPasswordWithHttpInfo(ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Resets the password of a user account. - * Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call resetUserPasswordAsync( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call resetUserPasswordAsync(ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); + okhttp3.Call localVarCall = resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for searchUsers - * - * @param searchUsersRequest (required) + * @param searchUsersRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchUsersCall( - SearchUsersRequest searchUsersRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchUsersCall(SearchUsersRequest searchUsersRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1603,75 +1266,53 @@ public okhttp3.Call searchUsersCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUsersValidateBeforeCall( - SearchUsersRequest searchUsersRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchUsersValidateBeforeCall(SearchUsersRequest searchUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchUsersRequest' is set if (searchUsersRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchUsersRequest' when calling" - + " searchUsers(Async)"); + throw new ApiException("Missing the required parameter 'searchUsersRequest' when calling searchUsers(Async)"); } return searchUsersCall(searchUsersRequest, _callback); + } /** - * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get - * details of a specific user, specify the user GUID or name. You can also filter the API - * response based on groups, Org ID, user visibility, account status, user type, and user - * preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. - * - * @param searchUsersRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest (required) * @return List<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public List searchUsers(SearchUsersRequest searchUsersRequest) throws ApiException { ApiResponse> localVarResp = searchUsersWithHttpInfo(searchUsersRequest); @@ -1679,108 +1320,80 @@ public List searchUsers(SearchUsersRequest searchUsersRequest) throws ApiE } /** - * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get - * details of a specific user, specify the user GUID or name. You can also filter the API - * response based on groups, Org ID, user visibility, account status, user type, and user - * preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. - * - * @param searchUsersRequest (required) + * + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest (required) * @return ApiResponse<List<User>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchUsersWithHttpInfo(SearchUsersRequest searchUsersRequest) - throws ApiException { + public ApiResponse> searchUsersWithHttpInfo(SearchUsersRequest searchUsersRequest) throws ApiException { okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot - * system. To get details of a specific user, specify the user GUID or name. You can also filter - * the API response based on groups, Org ID, user visibility, account status, user type, and - * user preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. - * - * @param searchUsersRequest (required) + * (asynchronously) + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchUsersAsync( - SearchUsersRequest searchUsersRequest, final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call searchUsersAsync(SearchUsersRequest searchUsersRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateUser - * * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) + * @param updateUserRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateUserCall( - String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateUserCall(String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1789,11 +1402,8 @@ public okhttp3.Call updateUserCall( Object localVarPostBody = updateUserRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/users/{user_identifier}/update" - .replace( - "{" + "user_identifier" + "}", - localVarApiClient.escapeString(userIdentifier.toString())); + String localVarPath = "/api/rest/2.0/users/{user_identifier}/update" + .replace("{" + "user_identifier" + "}", localVarApiClient.escapeString(userIdentifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1801,150 +1411,108 @@ public okhttp3.Call updateUserCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserValidateBeforeCall( - String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateUserValidateBeforeCall(String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userIdentifier' is set if (userIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'userIdentifier' when calling" - + " updateUser(Async)"); + throw new ApiException("Missing the required parameter 'userIdentifier' when calling updateUser(Async)"); } // verify the required parameter 'updateUserRequest' is set if (updateUserRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateUserRequest' when calling" - + " updateUser(Async)"); + throw new ApiException("Missing the required parameter 'updateUserRequest' when calling updateUser(Async)"); } return updateUserCall(userIdentifier, updateUserRequest, _callback); + } /** - * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user - * properties such as username, email, and share notification settings. You can also assign new - * groups and Orgs, remove the user from a group or Org, reset password, and modify user - * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) - * privilege is required. - * + * + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateUserRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateUser(String userIdentifier, UpdateUserRequest updateUserRequest) - throws ApiException { + public void updateUser(String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { updateUserWithHttpInfo(userIdentifier, updateUserRequest); } /** - * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user - * properties such as username, email, and share notification settings. You can also assign new - * groups and Orgs, remove the user from a group or Org, reset password, and modify user - * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) - * privilege is required. - * + * + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) + * @param updateUserRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateUserWithHttpInfo( - String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { - okhttp3.Call localVarCall = - updateUserValidateBeforeCall(userIdentifier, updateUserRequest, null); + public ApiResponse updateUserWithHttpInfo(String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { + okhttp3.Call localVarCall = updateUserValidateBeforeCall(userIdentifier, updateUserRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a user object. You can - * modify user properties such as username, email, and share notification settings. You can also - * assign new groups and Orgs, remove the user from a group or Org, reset password, and modify - * user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * + * (asynchronously) + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * @param userIdentifier GUID / name of the user (required) - * @param updateUserRequest (required) + * @param updateUserRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateUserAsync( - String userIdentifier, - UpdateUserRequest updateUserRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateUserValidateBeforeCall(userIdentifier, updateUserRequest, _callback); + public okhttp3.Call updateUserAsync(String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateUserValidateBeforeCall(userIdentifier, updateUserRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java index a274751eb..5fa5d5f2c 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 @@ -4,7 +4,6 @@ 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; @@ -12,20 +11,28 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.SearchVariablesRequest; import com.thoughtspot.client.model.UpdateVariableRequest; import com.thoughtspot.client.model.UpdateVariableValuesRequest; import com.thoughtspot.client.model.Variable; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class VariableApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -84,33 +91,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createVariable - * - * @param createVariableRequest (required) + * @param createVariableRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createVariableCall( - CreateVariableRequest createVariableRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createVariableCall(CreateVariableRequest createVariableRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -127,184 +131,133 @@ public okhttp3.Call createVariableCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createVariableValidateBeforeCall( - CreateVariableRequest createVariableRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createVariableValidateBeforeCall(CreateVariableRequest createVariableRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createVariableRequest' is set if (createVariableRequest == null) { - throw new ApiException( - "Missing the required parameter 'createVariableRequest' when calling" - + " createVariable(Async)"); + throw new ApiException("Missing the required parameter 'createVariableRequest' when calling createVariable(Async)"); } return createVariableCall(createVariableRequest, _callback); + } /** - * Create a variable which can be used for parameterizing metadata objects Version: 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 - * - * @param createVariableRequest (required) + * + * 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 - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public Variable createVariable(CreateVariableRequest createVariableRequest) - throws ApiException { + public Variable createVariable(CreateVariableRequest createVariableRequest) throws ApiException { ApiResponse localVarResp = createVariableWithHttpInfo(createVariableRequest); return localVarResp.getData(); } /** - * Create a variable which can be used for parameterizing metadata objects Version: 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 - * - * @param createVariableRequest (required) + * + * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createVariableWithHttpInfo( - CreateVariableRequest createVariableRequest) throws ApiException { + public ApiResponse createVariableWithHttpInfo(CreateVariableRequest createVariableRequest) throws ApiException { okhttp3.Call localVarCall = createVariableValidateBeforeCall(createVariableRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (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 - * - * @param createVariableRequest (required) + * (asynchronously) + * 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) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createVariableAsync( - CreateVariableRequest createVariableRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createVariableAsync(CreateVariableRequest createVariableRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - createVariableValidateBeforeCall(createVariableRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + okhttp3.Call localVarCall = createVariableValidateBeforeCall(createVariableRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteVariable - * * @param identifier Unique id or name of the variable (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -313,11 +266,8 @@ public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _cal Object localVarPostBody = null; // create path and map variables - String localVarPath = - "/api/rest/2.0/template/variables/{identifier}/delete" - .replace( - "{" + "identifier" + "}", - localVarApiClient.escapeString(identifier.toString())); + String localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete" + .replace("{" + "identifier" + "}", localVarApiClient.escapeString(identifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -325,91 +275,72 @@ public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _cal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVariableValidateBeforeCall( - String identifier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVariableValidateBeforeCall(String identifier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'identifier' is set if (identifier == null) { - throw new ApiException( - "Missing the required parameter 'identifier' when calling" - + " deleteVariable(Async)"); + throw new ApiException("Missing the required parameter 'identifier' when calling deleteVariable(Async)"); } return deleteVariableCall(identifier, _callback); + } /** - * 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 - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteVariable(String identifier) throws ApiException { deleteVariableWithHttpInfo(identifier); } /** - * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public ApiResponse deleteVariableWithHttpInfo(String identifier) throws ApiException { okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, null); @@ -417,29 +348,24 @@ 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 * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -447,33 +373,30 @@ public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback - * 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 - - * + + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchVariablesCall( - SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchVariablesCall(SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -490,179 +413,134 @@ public okhttp3.Call searchVariablesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchVariablesValidateBeforeCall( - SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchVariablesValidateBeforeCall(SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchVariablesRequest' is set if (searchVariablesRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchVariablesRequest' when calling" - + " searchVariables(Async)"); + throw new ApiException("Missing the required parameter 'searchVariablesRequest' when calling searchVariables(Async)"); } return searchVariablesCall(searchVariablesRequest, _callback); + } /** - * 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 - * - * @param searchVariablesRequest (required) + * + * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchVariables(SearchVariablesRequest searchVariablesRequest) - throws ApiException { - ApiResponse> localVarResp = - searchVariablesWithHttpInfo(searchVariablesRequest); + public List searchVariables(SearchVariablesRequest searchVariablesRequest) throws ApiException { + ApiResponse> localVarResp = searchVariablesWithHttpInfo(searchVariablesRequest); return localVarResp.getData(); } /** - * 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 - * - * @param searchVariablesRequest (required) + * + * 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>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchVariablesWithHttpInfo( - SearchVariablesRequest searchVariablesRequest) throws ApiException { + public ApiResponse> searchVariablesWithHttpInfo(SearchVariablesRequest searchVariablesRequest) throws ApiException { okhttp3.Call localVarCall = searchVariablesValidateBeforeCall(searchVariablesRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (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 - * - * @param searchVariablesRequest (required) + * (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 + * @throws ApiException 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 -
+ + + + + + + + +
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(); + public okhttp3.Call searchVariablesAsync(SearchVariablesRequest searchVariablesRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchVariablesValidateBeforeCall(searchVariablesRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateVariable - * * @param identifier Unique id or name of the variable to update. (required) - * @param updateVariableRequest (required) + * @param updateVariableRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateVariableCall( - String identifier, - UpdateVariableRequest updateVariableRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateVariableCall(String identifier, UpdateVariableRequest updateVariableRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -671,11 +549,8 @@ public okhttp3.Call updateVariableCall( Object localVarPostBody = updateVariableRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/template/variables/{identifier}/update" - .replace( - "{" + "identifier" + "}", - localVarApiClient.escapeString(identifier.toString())); + String localVarPath = "/api/rest/2.0/template/variables/{identifier}/update" + .replace("{" + "identifier" + "}", localVarApiClient.escapeString(identifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -683,172 +558,137 @@ public okhttp3.Call updateVariableCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateVariableValidateBeforeCall( - String identifier, - UpdateVariableRequest updateVariableRequest, - final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateVariableValidateBeforeCall(String identifier, UpdateVariableRequest updateVariableRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'identifier' is set if (identifier == null) { - throw new ApiException( - "Missing the required parameter 'identifier' when calling" - + " updateVariable(Async)"); + throw new ApiException("Missing the required parameter 'identifier' when calling updateVariable(Async)"); } // verify the required parameter 'updateVariableRequest' is set if (updateVariableRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateVariableRequest' when calling" - + " updateVariable(Async)"); + throw new ApiException("Missing the required parameter 'updateVariableRequest' when calling updateVariable(Async)"); } return updateVariableCall(identifier, updateVariableRequest, _callback); + } /** - * 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @param updateVariableRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateVariable(String identifier, UpdateVariableRequest updateVariableRequest) - throws ApiException { + public void updateVariable(String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { updateVariableWithHttpInfo(identifier, updateVariableRequest); } /** - * 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) + * @param updateVariableRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail 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 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateVariableWithHttpInfo( - String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { - okhttp3.Call localVarCall = - updateVariableValidateBeforeCall(identifier, updateVariableRequest, null); + public ApiResponse updateVariableWithHttpInfo(String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { + okhttp3.Call localVarCall = updateVariableValidateBeforeCall(identifier, updateVariableRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update a variable's 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) + * @param updateVariableRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 Updating the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateVariableAsync( - String identifier, - UpdateVariableRequest updateVariableRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - updateVariableValidateBeforeCall(identifier, updateVariableRequest, _callback); + public okhttp3.Call updateVariableAsync(String identifier, UpdateVariableRequest updateVariableRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateVariableValidateBeforeCall(identifier, updateVariableRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateVariableValues - * - * @param updateVariableValuesRequest (required) + * @param updateVariableValuesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateVariableValuesCall( - UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateVariableValuesCall(UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -857,7 +697,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(); @@ -865,148 +705,100 @@ public okhttp3.Call updateVariableValuesCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateVariableValuesValidateBeforeCall( - UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateVariableValuesValidateBeforeCall(UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateVariableValuesRequest' is set if (updateVariableValuesRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateVariableValuesRequest' when calling" - + " updateVariableValues(Async)"); + throw new ApiException("Missing the required parameter 'updateVariableValuesRequest' when calling updateVariableValues(Async)"); } return updateVariableValuesCall(updateVariableValuesRequest, _callback); + } /** - * 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 - * - * @param updateVariableValuesRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * 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 response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) - throws ApiException { + public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { updateVariableValuesWithHttpInfo(updateVariableValuesRequest); } /** - * 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 - * - * @param updateVariableValuesRequest (required) + * + * 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> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail 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 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateVariableValuesWithHttpInfo( - UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { - okhttp3.Call localVarCall = - updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, null); + public ApiResponse updateVariableValuesWithHttpInfo(UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { + okhttp3.Call localVarCall = updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Update values for multiple variables Version: 10.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 - * - * @param updateVariableValuesRequest (required) + * (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 * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException 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 Updating variable values is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateVariableValuesAsync( - UpdateVariableValuesRequest updateVariableValuesRequest, - final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateVariableValuesAsync(UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, _callback); + okhttp3.Call localVarCall = updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java index bc6658565..e7c621340 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java @@ -4,7 +4,6 @@ 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; @@ -12,6 +11,14 @@ import com.thoughtspot.client.ApiResponse; import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + import com.thoughtspot.client.model.CommitBranchRequest; import com.thoughtspot.client.model.CommitHistoryResponse; import com.thoughtspot.client.model.CommitResponse; @@ -19,6 +26,7 @@ import com.thoughtspot.client.model.DeleteConfigRequest; import com.thoughtspot.client.model.DeployCommitRequest; import com.thoughtspot.client.model.DeployResponse; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.RepoConfigObject; import com.thoughtspot.client.model.RevertCommitRequest; import com.thoughtspot.client.model.RevertResponse; @@ -26,15 +34,14 @@ import com.thoughtspot.client.model.SearchConfigRequest; import com.thoughtspot.client.model.UpdateConfigRequest; import com.thoughtspot.client.model.ValidateMergeRequest; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class VersionControlApi { private ApiClient localVarApiClient; private ApiClientConfiguration localVarApiClientConfiguration; @@ -93,33 +100,30 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for commitBranch - * - * @param commitBranchRequest (required) + * @param commitBranchRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call commitBranchCall( - CommitBranchRequest commitBranchRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call commitBranchCall(CommitBranchRequest commitBranchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -136,169 +140,133 @@ public okhttp3.Call commitBranchCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call commitBranchValidateBeforeCall( - CommitBranchRequest commitBranchRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call commitBranchValidateBeforeCall(CommitBranchRequest commitBranchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commitBranchRequest' is set if (commitBranchRequest == null) { - throw new ApiException( - "Missing the required parameter 'commitBranchRequest' when calling" - + " commitBranch(Async)"); + throw new ApiException("Missing the required parameter 'commitBranchRequest' when calling commitBranch(Async)"); } return commitBranchCall(commitBranchRequest, _callback); + } /** - * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured - * on your instance. Requires at least edit access to objects used in the commit operation. - * Before using this endpoint to push your commits: * Enable Git integration on your instance. * - * Make sure the Git repository and branch details are configured on your instance. For more - * information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param commitBranchRequest (required) + * + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest (required) * @return CommitResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public CommitResponse commitBranch(CommitBranchRequest commitBranchRequest) - throws ApiException { + public CommitResponse commitBranch(CommitBranchRequest commitBranchRequest) throws ApiException { ApiResponse localVarResp = commitBranchWithHttpInfo(commitBranchRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured - * on your instance. Requires at least edit access to objects used in the commit operation. - * Before using this endpoint to push your commits: * Enable Git integration on your instance. * - * Make sure the Git repository and branch details are configured on your instance. For more - * information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param commitBranchRequest (required) + * + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest (required) * @return ApiResponse<CommitResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse commitBranchWithHttpInfo( - CommitBranchRequest commitBranchRequest) throws ApiException { + public ApiResponse commitBranchWithHttpInfo(CommitBranchRequest commitBranchRequest) throws ApiException { okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git - * branch configured on your instance. Requires at least edit access to objects used in the - * commit operation. Before using this endpoint to push your commits: * Enable Git integration - * on your instance. * Make sure the Git repository and branch details are configured on your - * instance. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param commitBranchRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call commitBranchAsync( - CommitBranchRequest commitBranchRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call commitBranchAsync(CommitBranchRequest commitBranchRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConfig - * - * @param createConfigRequest (required) + * @param createConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createConfigCall( - CreateConfigRequest createConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createConfigCall(CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -315,200 +283,133 @@ public okhttp3.Call createConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createConfigValidateBeforeCall( - CreateConfigRequest createConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call createConfigValidateBeforeCall(CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConfigRequest' is set if (createConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'createConfigRequest' when calling" - + " createConfig(Async)"); + throw new ApiException("Missing the required parameter 'createConfigRequest' when calling createConfig(Async)"); } return createConfigCall(createConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot - * development and production environments to the development and production branches of a Git - * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git - * repository, check the following prerequisites: * You have a Git repository. If you are using - * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to - * GitHub. For information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. - * - * @param createConfigRequest (required) + * + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest (required) * @return RepoConfigObject - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public RepoConfigObject createConfig(CreateConfigRequest createConfigRequest) - throws ApiException { + public RepoConfigObject createConfig(CreateConfigRequest createConfigRequest) throws ApiException { ApiResponse localVarResp = createConfigWithHttpInfo(createConfigRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot - * development and production environments to the development and production branches of a Git - * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git - * repository, check the following prerequisites: * You have a Git repository. If you are using - * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to - * GitHub. For information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. - * - * @param createConfigRequest (required) + * + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest (required) * @return ApiResponse<RepoConfigObject> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse createConfigWithHttpInfo( - CreateConfigRequest createConfigRequest) throws ApiException { + public ApiResponse createConfigWithHttpInfo(CreateConfigRequest createConfigRequest) throws ApiException { okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a - * Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. You can use this API endpoint to connect your ThoughtSpot development and - * production environments to the development and production branches of a Git repository. - * Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check - * the following prerequisites: * You have a Git repository. If you are using GitHub, make sure - * you have a valid account and an access token to connect ThoughtSpot to GitHub. For - * information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. - * - * @param createConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call createConfigAsync( - CreateConfigRequest createConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call createConfigAsync(CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteConfig - * - * @param deleteConfigRequest (required) + * @param deleteConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConfigCall( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConfigCall(DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -525,128 +426,98 @@ public okhttp3.Call deleteConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConfigValidateBeforeCall( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deleteConfigValidateBeforeCall(DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deleteConfigRequest' is set if (deleteConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'deleteConfigRequest' when calling" - + " deleteConfig(Async)"); + throw new ApiException("Missing the required parameter 'deleteConfigRequest' when calling deleteConfig(Async)"); } return deleteConfigCall(deleteConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param deleteConfigRequest (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ public void deleteConfig(DeleteConfigRequest deleteConfigRequest) throws ApiException { deleteConfigWithHttpInfo(deleteConfigRequest); } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param deleteConfigRequest (required) + * + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest (required) * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) - throws ApiException { + public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) throws ApiException { okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later Deletes Git repository configuration from your - * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. - * - * @param deleteConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConfigAsync( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call deleteConfigAsync(DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -654,33 +525,30 @@ public okhttp3.Call deleteConfigAsync( } /** * Build call for deployCommit - * - * @param deployCommitRequest (required) + * @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 -
+ + + + + + + + +
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 { + public okhttp3.Call deployCommitCall(DeployCommitRequest deployCommitRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -697,172 +565,134 @@ public okhttp3.Call deployCommitCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deployCommitValidateBeforeCall( - DeployCommitRequest deployCommitRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call deployCommitValidateBeforeCall(DeployCommitRequest deployCommitRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'deployCommitRequest' is set if (deployCommitRequest == null) { - throw new ApiException( - "Missing the required parameter 'deployCommitRequest' when calling" - + " deployCommit(Async)"); + throw new ApiException("Missing the required parameter 'deployCommitRequest' when calling deployCommit(Async)"); } return deployCommitCall(deployCommitRequest, _callback); + } /** - * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your - * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy - * operation. The API deploys the head of the branch unless a `commit_id` is specified - * in the API request. If the branch name is not defined in the request, the default branch is - * considered for deploying commits. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param deployCommitRequest (required) + * + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest (required) * @return List<DeployResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List deployCommit(DeployCommitRequest deployCommitRequest) - throws ApiException { - ApiResponse> localVarResp = - deployCommitWithHttpInfo(deployCommitRequest); + public List deployCommit(DeployCommitRequest deployCommitRequest) throws ApiException { + ApiResponse> localVarResp = deployCommitWithHttpInfo(deployCommitRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your - * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy - * operation. The API deploys the head of the branch unless a `commit_id` is specified - * in the API request. If the branch name is not defined in the request, the default branch is - * considered for deploying commits. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param deployCommitRequest (required) + * + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest (required) * @return ApiResponse<List<DeployResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> deployCommitWithHttpInfo( - DeployCommitRequest deployCommitRequest) throws ApiException { + public ApiResponse> deployCommitWithHttpInfo(DeployCommitRequest deployCommitRequest) throws ApiException { okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML - * content to your ThoughtSpot instance. Requires at least edit access to the objects used in - * the deploy operation. The API deploys the head of the branch unless a `commit_id` - * is specified in the API request. If the branch name is not defined in the request, the - * default branch is considered for deploying commits. For more information, see [Git - * integration documentation](https://developers.thoughtspot.com/docs/git-integration). - * - * @param deployCommitRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call deployCommitAsync( - DeployCommitRequest deployCommitRequest, - final ApiCallback> _callback) - throws ApiException { + public okhttp3.Call deployCommitAsync(DeployCommitRequest deployCommitRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for revertCommit - * * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revertCommitCall( - String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call revertCommitCall(String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -871,11 +701,8 @@ public okhttp3.Call revertCommitCall( Object localVarPostBody = revertCommitRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" - .replace( - "{" + "commit_id" + "}", - localVarApiClient.escapeString(commitId.toString())); + String localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" + .replace("{" + "commit_id" + "}", localVarApiClient.escapeString(commitId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -883,186 +710,141 @@ public okhttp3.Call revertCommitCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call revertCommitValidateBeforeCall( - String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call revertCommitValidateBeforeCall(String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commitId' is set if (commitId == null) { - throw new ApiException( - "Missing the required parameter 'commitId' when calling revertCommit(Async)"); + throw new ApiException("Missing the required parameter 'commitId' when calling revertCommit(Async)"); } // verify the required parameter 'revertCommitRequest' is set if (revertCommitRequest == null) { - throw new ApiException( - "Missing the required parameter 'revertCommitRequest' when calling" - + " revertCommit(Async)"); + throw new ApiException("Missing the required parameter 'revertCommitRequest' when calling revertCommit(Async)"); } return revertCommitCall(commitId, revertCommitRequest, _callback); + } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * + * + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @return RevertResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) - throws ApiException { - ApiResponse localVarResp = - revertCommitWithHttpInfo(commitId, revertCommitRequest); + public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + ApiResponse localVarResp = revertCommitWithHttpInfo(commitId, revertCommitRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). - * + * + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @return ApiResponse<RevertResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse revertCommitWithHttpInfo( - String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { - okhttp3.Call localVarCall = - revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse revertCommitWithHttpInfo(String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + okhttp3.Call localVarCall = revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Reverts TML objects to a previous commit - * specified in the API request. Requires at least edit access to objects. In the API request, - * specify the `commit_id`. If the branch name is not specified in the request, the - * API will consider the default branch configured on your instance. By default, the API reverts - * all objects. If the revert operation fails for one of the objects provided in the commit, the - * API returns an error and does not revert any object. For more information, see [Git - * integration documentation](https://developers.thoughtspot.com/docs/git-integration). - * + * (asynchronously) + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revertCommitRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revertCommitAsync( - String commitId, - RevertCommitRequest revertCommitRequest, - final ApiCallback _callback) - throws ApiException { - - okhttp3.Call localVarCall = - revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + public okhttp3.Call revertCommitAsync(String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchCommits - * - * @param searchCommitsRequest (required) + * @param searchCommitsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCommitsCall( - SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchCommitsCall(SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1079,169 +861,133 @@ public okhttp3.Call searchCommitsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCommitsValidateBeforeCall( - SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchCommitsValidateBeforeCall(SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchCommitsRequest' is set if (searchCommitsRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchCommitsRequest' when calling" - + " searchCommits(Async)"); + throw new ApiException("Missing the required parameter 'searchCommitsRequest' when calling searchCommits(Async)"); } return searchCommitsCall(searchCommitsRequest, _callback); + } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param searchCommitsRequest (required) + * + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest (required) * @return List<CommitHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchCommits(SearchCommitsRequest searchCommitsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchCommitsWithHttpInfo(searchCommitsRequest); + public List searchCommits(SearchCommitsRequest searchCommitsRequest) throws ApiException { + ApiResponse> localVarResp = searchCommitsWithHttpInfo(searchCommitsRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param searchCommitsRequest (required) + * + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest (required) * @return ApiResponse<List<CommitHistoryResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchCommitsWithHttpInfo( - SearchCommitsRequest searchCommitsRequest) throws ApiException { + public ApiResponse> searchCommitsWithHttpInfo(SearchCommitsRequest searchCommitsRequest) throws ApiException { okhttp3.Call localVarCall = searchCommitsValidateBeforeCall(searchCommitsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Gets a list of commits for a given metadata - * object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based - * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your - * instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage - * data models**) privilege and edit access to the metadata objects. - * - * @param searchCommitsRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCommitsAsync( - SearchCommitsRequest searchCommitsRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - searchCommitsValidateBeforeCall(searchCommitsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call searchCommitsAsync(SearchCommitsRequest searchCommitsRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCommitsValidateBeforeCall(searchCommitsRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchConfig - * - * @param searchConfigRequest (required) + * @param searchConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchConfigCall( - SearchConfigRequest searchConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call searchConfigCall(SearchConfigRequest searchConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1258,169 +1004,133 @@ public okhttp3.Call searchConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchConfigValidateBeforeCall( - SearchConfigRequest searchConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call searchConfigValidateBeforeCall(SearchConfigRequest searchConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchConfigRequest' is set if (searchConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'searchConfigRequest' when calling" - + " searchConfig(Async)"); + throw new ApiException("Missing the required parameter 'searchConfigRequest' when calling searchConfig(Async)"); } return searchConfigCall(searchConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param searchConfigRequest (required) + * + * 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 + * @throws ApiException If fail to 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 -
+ + + + + + + + +
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); + 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) + * + * 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 + * @throws ApiException If fail to 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 -
+ + + + + + + + +
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 { + public ApiResponse> searchConfigWithHttpInfo(SearchConfigRequest searchConfigRequest) throws ApiException { okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + 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) + * (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 + * @throws ApiException 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 -
+ + + + + + + + +
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 { + public okhttp3.Call searchConfigAsync(SearchConfigRequest searchConfigRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateConfig - * - * @param updateConfigRequest (required) + * @param updateConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateConfigCall( - UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConfigCall(UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1437,166 +1147,133 @@ public okhttp3.Call updateConfigCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConfigValidateBeforeCall( - UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call updateConfigValidateBeforeCall(UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateConfigRequest' is set if (updateConfigRequest == null) { - throw new ApiException( - "Missing the required parameter 'updateConfigRequest' when calling" - + " updateConfig(Async)"); + throw new ApiException("Missing the required parameter 'updateConfigRequest' when calling updateConfig(Async)"); } return updateConfigCall(updateConfigRequest, _callback); + } /** - * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. - * - * @param updateConfigRequest (required) + * + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest (required) * @return RepoConfigObject - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public RepoConfigObject updateConfig(UpdateConfigRequest updateConfigRequest) - throws ApiException { + public RepoConfigObject updateConfig(UpdateConfigRequest updateConfigRequest) throws ApiException { ApiResponse localVarResp = updateConfigWithHttpInfo(updateConfigRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. - * - * @param updateConfigRequest (required) + * + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest (required) * @return ApiResponse<RepoConfigObject> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse updateConfigWithHttpInfo( - UpdateConfigRequest updateConfigRequest) throws ApiException { + public ApiResponse updateConfigWithHttpInfo(UpdateConfigRequest updateConfigRequest) throws ApiException { okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Updates Git repository configuration settings. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. - * - * @param updateConfigRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call updateConfigAsync( - UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call updateConfigAsync(UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for validateMerge - * - * @param validateMergeRequest (required) + * @param validateMergeRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call validateMergeCall( - ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) - throws ApiException { + public okhttp3.Call validateMergeCall(ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] {}; + String[] localBasePaths = new String[] { }; // Determine Base Path to Use - if (localCustomBaseUrl != null) { + if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { + } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; @@ -1613,146 +1290,104 @@ public okhttp3.Call validateMergeCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = { + "application/json" + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/json"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] {"bearerAuth"}; - return localVarApiClient.buildCall( - basePath, - localVarPath, - "POST", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames, - _callback); + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateMergeValidateBeforeCall( - ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) - throws ApiException { + private okhttp3.Call validateMergeValidateBeforeCall(ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'validateMergeRequest' is set if (validateMergeRequest == null) { - throw new ApiException( - "Missing the required parameter 'validateMergeRequest' when calling" - + " validateMerge(Async)"); + throw new ApiException("Missing the required parameter 'validateMergeRequest' when calling validateMerge(Async)"); } return validateMergeCall(validateMergeRequest, _callback); + } /** - * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in - * your destination environment. Before merging content from your source branch to the - * destination branch, run this API operation from your destination environment and ensure that - * the changes from the source branch function in the destination environment. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param validateMergeRequest (required) + * + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest (required) * @return List<DeployResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List validateMerge(ValidateMergeRequest validateMergeRequest) - throws ApiException { - ApiResponse> localVarResp = - validateMergeWithHttpInfo(validateMergeRequest); + public List validateMerge(ValidateMergeRequest validateMergeRequest) throws ApiException { + ApiResponse> localVarResp = validateMergeWithHttpInfo(validateMergeRequest); return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in - * your destination environment. Before merging content from your source branch to the - * destination branch, run this API operation from your destination environment and ensure that - * the changes from the source branch function in the destination environment. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param validateMergeRequest (required) + * + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest (required) * @return ApiResponse<List<DeployResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> validateMergeWithHttpInfo( - ValidateMergeRequest validateMergeRequest) throws ApiException { + public ApiResponse> validateMergeWithHttpInfo(ValidateMergeRequest validateMergeRequest) throws ApiException { okhttp3.Call localVarCall = validateMergeValidateBeforeCall(validateMergeRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Validates the content of your source branch - * against the objects in your destination environment. Before merging content from your source - * branch to the destination branch, run this API operation from your destination environment - * and ensure that the changes from the source branch function in the destination environment. - * Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. - * - * @param validateMergeRequest (required) + * (asynchronously) + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body - * object + * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - * - * - * - * - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call validateMergeAsync( - ValidateMergeRequest validateMergeRequest, - final ApiCallback> _callback) - throws ApiException { - - okhttp3.Call localVarCall = - validateMergeValidateBeforeCall(validateMergeRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + public okhttp3.Call validateMergeAsync(ValidateMergeRequest validateMergeRequest, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = validateMergeValidateBeforeCall(validateMergeRequest, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/WebhooksApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/WebhooksApi.java new file mode 100644 index 000000000..bd48ff4cf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/WebhooksApi.java @@ -0,0 +1,672 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +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.ProgressRequestBody; +import com.thoughtspot.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; +import com.thoughtspot.client.model.ErrorResponse; +import com.thoughtspot.client.model.SearchWebhookConfigurationsRequest; +import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; +import com.thoughtspot.client.model.WebhookDeleteResponse; +import com.thoughtspot.client.model.WebhookResponse; +import com.thoughtspot.client.model.WebhookSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WebhooksApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public WebhooksApi() { + this(Configuration.getDefaultApiClient()); + } + + public WebhooksApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public WebhooksApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createWebhookConfiguration + * @param createWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationCall(CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createWebhookConfigurationValidateBeforeCall(CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createWebhookConfigurationRequest' is set + if (createWebhookConfigurationRequest == null) { + throw new ApiException("Missing the required parameter 'createWebhookConfigurationRequest' when calling createWebhookConfiguration(Async)"); + } + + return createWebhookConfigurationCall(createWebhookConfigurationRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest (required) + * @return WebhookResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookResponse createWebhookConfiguration(CreateWebhookConfigurationRequest createWebhookConfigurationRequest) throws ApiException { + ApiResponse localVarResp = createWebhookConfigurationWithHttpInfo(createWebhookConfigurationRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest (required) + * @return ApiResponse<WebhookResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createWebhookConfigurationWithHttpInfo(CreateWebhookConfigurationRequest createWebhookConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = createWebhookConfigurationValidateBeforeCall(createWebhookConfigurationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationAsync(CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createWebhookConfigurationValidateBeforeCall(createWebhookConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteWebhookConfigurations + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsCall(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteWebhookConfigurationsValidateBeforeCall(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'deleteWebhookConfigurationsRequest' is set + if (deleteWebhookConfigurationsRequest == null) { + throw new ApiException("Missing the required parameter 'deleteWebhookConfigurationsRequest' when calling deleteWebhookConfigurations(Async)"); + } + + return deleteWebhookConfigurationsCall(deleteWebhookConfigurationsRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest (required) + * @return WebhookDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookDeleteResponse deleteWebhookConfigurations(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) throws ApiException { + ApiResponse localVarResp = deleteWebhookConfigurationsWithHttpInfo(deleteWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteWebhookConfigurationsWithHttpInfo(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) throws ApiException { + okhttp3.Call localVarCall = deleteWebhookConfigurationsValidateBeforeCall(deleteWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsAsync(DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteWebhookConfigurationsValidateBeforeCall(deleteWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchWebhookConfigurations + * @param searchWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchWebhookConfigurationsCall(SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchWebhookConfigurationsValidateBeforeCall(SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchWebhookConfigurationsRequest' is set + if (searchWebhookConfigurationsRequest == null) { + throw new ApiException("Missing the required parameter 'searchWebhookConfigurationsRequest' when calling searchWebhookConfigurations(Async)"); + } + + return searchWebhookConfigurationsCall(searchWebhookConfigurationsRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest (required) + * @return WebhookSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookSearchResponse searchWebhookConfigurations(SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest) throws ApiException { + ApiResponse localVarResp = searchWebhookConfigurationsWithHttpInfo(searchWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchWebhookConfigurationsWithHttpInfo(SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest) throws ApiException { + okhttp3.Call localVarCall = searchWebhookConfigurationsValidateBeforeCall(searchWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchWebhookConfigurationsAsync(SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchWebhookConfigurationsValidateBeforeCall(searchWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateWebhookConfiguration + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationCall(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update" + .replace("{" + "webhook_identifier" + "}", localVarApiClient.escapeString(webhookIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateWebhookConfigurationValidateBeforeCall(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'webhookIdentifier' is set + if (webhookIdentifier == null) { + throw new ApiException("Missing the required parameter 'webhookIdentifier' when calling updateWebhookConfiguration(Async)"); + } + + // verify the required parameter 'updateWebhookConfigurationRequest' is set + if (updateWebhookConfigurationRequest == null) { + throw new ApiException("Missing the required parameter 'updateWebhookConfigurationRequest' when calling updateWebhookConfiguration(Async)"); + } + + return updateWebhookConfigurationCall(webhookIdentifier, updateWebhookConfigurationRequest, _callback); + + } + + /** + * + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateWebhookConfiguration(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) throws ApiException { + updateWebhookConfigurationWithHttpInfo(webhookIdentifier, updateWebhookConfigurationRequest); + } + + /** + * + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateWebhookConfigurationWithHttpInfo(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) throws ApiException { + okhttp3.Call localVarCall = updateWebhookConfigurationValidateBeforeCall(webhookIdentifier, updateWebhookConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationAsync(String webhookIdentifier, UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateWebhookConfigurationValidateBeforeCall(webhookIdentifier, updateWebhookConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java index f5d599545..b7e7d255e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java @@ -6,73 +6,66 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.Pair; + import java.net.URI; -import java.util.List; import java.util.Map; +import java.util.List; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; + private final String location; + private final String paramName; - private String apiKey; - private String apiKeyPrefix; + private String apiKey; + private String apiKeyPrefix; - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } - public String getLocation() { - return location; - } + public String getLocation() { + return location; + } - public String getParamName() { - return paramName; - } + public String getParamName() { + return paramName; + } - public String getApiKey() { - return apiKey; - } + public String getApiKey() { + return apiKey; + } - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } - public String getApiKeyPrefix() { - return apiKeyPrefix; - } + public String getApiKeyPrefix() { + return apiKeyPrefix; + } - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } + } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java index f97a0258f..c8ba77dc6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java @@ -4,11 +4,12 @@ package com.thoughtspot.client.auth; -import com.thoughtspot.client.ApiException; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ApiException; + import java.net.URI; -import java.util.List; import java.util.Map; +import java.util.List; public interface Authentication { /** @@ -22,12 +23,5 @@ public interface Authentication { * @param uri URI * @throws ApiException if failed to update the parameters */ - void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException; + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java index f65bcb1e4..7011f0ca6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java @@ -4,12 +4,14 @@ package com.thoughtspot.client.auth; -import com.thoughtspot.client.ApiException; import com.thoughtspot.client.Pair; +import com.thoughtspot.client.ApiException; + +import okhttp3.Credentials; + import java.net.URI; -import java.util.List; import java.util.Map; -import okhttp3.Credentials; +import java.util.List; public class HttpBasicAuth implements Authentication { private String username; @@ -32,20 +34,13 @@ public void setPassword(String password) { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { if (username == null && password == null) { return; } - headerParams.put( - "Authorization", - Credentials.basic( - username == null ? "" : username, password == null ? "" : password)); + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java index 781b2e73a..6f20ec8bd 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java @@ -6,73 +6,61 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.Pair; + import java.net.URI; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class HttpBearerAuth implements Authentication { - private final String scheme; - private Supplier tokenSupplier; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } + private final String scheme; + private Supplier tokenSupplier; - /** - * Gets the token, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return tokenSupplier.get(); - } + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } - /** - * Sets the token, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.tokenSupplier = () -> bearerToken; - } + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } - /** - * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header - */ - public void setBearerToken(Supplier tokenSupplier) { - this.tokenSupplier = tokenSupplier; - } + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); - if (bearerToken == null) { - return; - } + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } - headerParams.put( - "Authorization", - (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; } - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java index b9a965a91..4efc3da5a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java @@ -4,269 +4,259 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** AIContext */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AIContext implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; +/** + * AIContext + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AIContext implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) - @javax.annotation.Nullable - private List instructions; + public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; + @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) + @javax.annotation.Nullable + private List instructions; - public static final String SERIALIZED_NAME_CONTENT = "content"; + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable + private List content; - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private List content; + public AIContext() { + } - public AIContext() {} + public AIContext instructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + return this; + } - public AIContext instructions(@javax.annotation.Nullable List instructions) { - this.instructions = instructions; - return this; + public AIContext addInstructionsItem(String instructionsItem) { + if (this.instructions == null) { + this.instructions = new ArrayList<>(); } - - public AIContext addInstructionsItem(String instructionsItem) { - if (this.instructions == null) { - this.instructions = new ArrayList<>(); - } - this.instructions.add(instructionsItem); - return this; + this.instructions.add(instructionsItem); + return this; + } + + /** + * User specific text instructions sent to AI system for processing the query. + * @return instructions + */ + @javax.annotation.Nullable + public List getInstructions() { + return instructions; + } + + public void setInstructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + } + + + public AIContext content(@javax.annotation.Nullable List content) { + this.content = content; + return this; + } + + public AIContext addContentItem(String contentItem) { + if (this.content == null) { + this.content = new ArrayList<>(); } + this.content.add(contentItem); + return this; + } - /** - * User specific text instructions sent to AI system for processing the query. - * - * @return instructions - */ - @javax.annotation.Nullable - public List getInstructions() { - return instructions; - } + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + * @return content + */ + @javax.annotation.Nullable + public List getContent() { + return content; + } - public void setInstructions(@javax.annotation.Nullable List instructions) { - this.instructions = instructions; - } + public void setContent(@javax.annotation.Nullable List content) { + this.content = content; + } - public AIContext content(@javax.annotation.Nullable List content) { - this.content = content; - return this; - } - public AIContext addContentItem(String contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); - } - this.content.add(contentItem); - return this; - } - /** - * User provided content like text data, csv data as a string message to provide context & - * potentially improve the quality of the response. - * - * @return content - */ - @javax.annotation.Nullable - public List getContent() { - return content; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setContent(@javax.annotation.Nullable List content) { - this.content = content; + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AIContext aiContext = (AIContext) o; - return Objects.equals(this.instructions, aiContext.instructions) - && Objects.equals(this.content, aiContext.content); + AIContext aiContext = (AIContext) o; + return Objects.equals(this.instructions, aiContext.instructions) && + Objects.equals(this.content, aiContext.content); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(instructions, content); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - 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())); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AIContext {\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public int hashCode() { - return Objects.hash(instructions, content); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("instructions"); + openapiFields.add("content"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AIContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AIContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AIContext is not found in the empty JSON string", AIContext.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AIContext {\n"); - sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append("}"); - return sb.toString(); - } + } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("instructions"); - openapiFields.add("content"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AIContext - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AIContext.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AIContext is not found in the empty" - + " JSON string", - AIContext.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AIContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AIContext` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AIContext.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AIContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("instructions") != null - && !jsonObj.get("instructions").isJsonNull() - && !jsonObj.get("instructions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `instructions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("instructions").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("content") != null - && !jsonObj.get("content").isJsonNull() - && !jsonObj.get("content").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `content` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("content").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AIContext.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AIContext' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AIContext.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AIContext value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AIContext read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AIContext given an JSON string - * - * @param jsonString JSON string - * @return An instance of AIContext - * @throws IOException if the JSON string is invalid with respect to AIContext - */ - public static AIContext fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AIContext.class); - } - - /** - * Convert an instance of AIContext to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("instructions") != null && !jsonObj.get("instructions").isJsonNull() && !jsonObj.get("instructions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `instructions` to be an array in the JSON string but got `%s`", jsonObj.get("instructions").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull() && !jsonObj.get("content").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `content` to be an array in the JSON string but got `%s`", jsonObj.get("content").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AIContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AIContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AIContext.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AIContext value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AIContext read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AIContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of AIContext + * @throws IOException if the JSON string is invalid with respect to AIContext + */ + public static AIContext fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AIContext.class); + } + + /** + * Convert an instance of AIContext to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java index 1e8f92269..8242971ce 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java @@ -4,248 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * With API key auth, you send a key-value pair to the API either in the request headers or query - * parameters. + * With API key auth, you send a key-value pair to the API either in the request headers or query parameters. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class APIKey implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_KEY = "key"; - - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public APIKey() {} - - public APIKey key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * Enter your key name - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - public APIKey value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * Enter you key value - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public APIKey() { + } + + public APIKey key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Enter your key name + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + + public APIKey value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Enter you key value + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIKey apIKey = (APIKey) o; + return Objects.equals(this.key, apIKey.key) && + Objects.equals(this.value, apIKey.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIKey {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in APIKey is not found in the empty JSON string", APIKey.openapiRequiredFields.toString())); } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIKey apIKey = (APIKey) o; - return Objects.equals(this.key, apIKey.key) && Objects.equals(this.value, apIKey.value); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } + } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIKey {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("key"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to APIKey - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!APIKey.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in APIKey is not found in the empty JSON" - + " string", - APIKey.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!APIKey.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `APIKey`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIKey` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) - && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) - && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!APIKey.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'APIKey' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(APIKey.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, APIKey value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public APIKey read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of APIKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIKey - * @throws IOException if the JSON string is invalid with respect to APIKey - */ - public static APIKey fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, APIKey.class); - } - - /** - * Convert an instance of APIKey to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of APIKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIKey + * @throws IOException if the JSON string is invalid with respect to APIKey + */ + public static APIKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, APIKey.class); + } + + /** + * Convert an instance of APIKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java index 7cc768e15..3f45197ce 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java @@ -4,249 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * With API key auth, you send a key-value pair to the API either in the request headers or query - * parameters. + * With API key auth, you send a key-value pair to the API either in the request headers or query parameters. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class APIKeyInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_KEY = "key"; - - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public APIKeyInput() {} - - public APIKeyInput key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * Enter your key name - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - public APIKeyInput value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * Enter you key value - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public APIKeyInput() { + } + + public APIKeyInput key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Enter your key name + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + + public APIKeyInput value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Enter you key value + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIKeyInput apIKeyInput = (APIKeyInput) o; + return Objects.equals(this.key, apIKeyInput.key) && + Objects.equals(this.value, apIKeyInput.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIKeyInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIKeyInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIKeyInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in APIKeyInput is not found in the empty JSON string", APIKeyInput.openapiRequiredFields.toString())); } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIKeyInput apIKeyInput = (APIKeyInput) o; - return Objects.equals(this.key, apIKeyInput.key) - && Objects.equals(this.value, apIKeyInput.value); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } + } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIKeyInput {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("key"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to APIKeyInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!APIKeyInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in APIKeyInput is not found in the empty" - + " JSON string", - APIKeyInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!APIKeyInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `APIKeyInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIKeyInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIKeyInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) - && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) - && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!APIKeyInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'APIKeyInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(APIKeyInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, APIKeyInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public APIKeyInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of APIKeyInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIKeyInput - * @throws IOException if the JSON string is invalid with respect to APIKeyInput - */ - public static APIKeyInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, APIKeyInput.class); - } - - /** - * Convert an instance of APIKeyInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIKeyInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIKeyInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIKeyInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIKeyInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIKeyInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of APIKeyInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIKeyInput + * @throws IOException if the JSON string is invalid with respect to APIKeyInput + */ + public static APIKeyInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, APIKeyInput.class); + } + + /** + * Convert an instance of APIKeyInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java index 48124a58f..4e6d251fe 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java @@ -4,13 +4,15 @@ package com.thoughtspot.client.model; -import java.util.Map; +import com.thoughtspot.client.ApiException; import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; -/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -39,23 +41,18 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - // @JsonValue - public Object getActualInstance() { - return instance; - } + //@JsonValue + public Object getActualInstance() {return instance;} /** * Set the actual instance * * @param instance the actual instance of the schema/object */ - public void setActualInstance(Object instance) { - this.instance = instance; - } + public void setActualInstance(Object instance) {this.instance = instance;} /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf - * schema as well + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well * * @return an instance of the actual schema/object */ @@ -67,7 +64,7 @@ private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { if (object.getActualInstance() == null) { return null; } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema) object.getActualInstance()); + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); } else { return object.getActualInstance(); } @@ -94,8 +91,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { @@ -112,9 +109,9 @@ public boolean equals(Object o) { return false; } AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) - && Objects.equals(this.isNullable, a.isNullable) - && Objects.equals(this.schemaType, a.schemaType); + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); } @Override @@ -134,4 +131,7 @@ public Boolean isNullable() { return Boolean.FALSE; } } + + + } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java index a4fce2203..82444d1cc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java @@ -4,382 +4,365 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.OrgInfo; +import com.thoughtspot.client.model.UserInfo; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** AccessToken */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AccessToken implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - - @SerializedName(SERIALIZED_NAME_TOKEN) - @javax.annotation.Nonnull - private String token; - - public static final String SERIALIZED_NAME_ORG = "org"; - - @SerializedName(SERIALIZED_NAME_ORG) - @javax.annotation.Nonnull - private OrgInfo org; - - public static final String SERIALIZED_NAME_USER = "user"; - - @SerializedName(SERIALIZED_NAME_USER) - @javax.annotation.Nonnull - private UserInfo user; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = - "expiration_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float expirationTimeInMillis; - - public AccessToken() {} - - public AccessToken id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * GUID of the auth token. - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public AccessToken token(@javax.annotation.Nonnull String token) { - this.token = token; - return this; - } - - /** - * Bearer auth token. - * - * @return token - */ - @javax.annotation.Nonnull - public String getToken() { - return token; - } - - public void setToken(@javax.annotation.Nonnull String token) { - this.token = token; - } - - public AccessToken org(@javax.annotation.Nonnull OrgInfo org) { - this.org = org; - return this; - } - - /** - * Get org - * - * @return org - */ - @javax.annotation.Nonnull - public OrgInfo getOrg() { - return org; - } - public void setOrg(@javax.annotation.Nonnull OrgInfo org) { - this.org = org; - } - - public AccessToken user(@javax.annotation.Nonnull UserInfo user) { - this.user = user; - return this; - } - - /** - * Get user - * - * @return user - */ - @javax.annotation.Nonnull - public UserInfo getUser() { - return user; - } - - public void setUser(@javax.annotation.Nonnull UserInfo user) { - this.user = user; - } - - public AccessToken creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Token creation time in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public AccessToken expirationTimeInMillis( - @javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - return this; - } - - /** - * Token expiration time in milliseconds. - * - * @return expirationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getExpirationTimeInMillis() { - return expirationTimeInMillis; - } - - public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccessToken accessToken = (AccessToken) o; - return Objects.equals(this.id, accessToken.id) - && Objects.equals(this.token, accessToken.token) - && Objects.equals(this.org, accessToken.org) - && Objects.equals(this.user, accessToken.user) - && Objects.equals(this.creationTimeInMillis, accessToken.creationTimeInMillis) - && Objects.equals(this.expirationTimeInMillis, accessToken.expirationTimeInMillis); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, token, org, user, creationTimeInMillis, expirationTimeInMillis); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * AccessToken + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AccessToken implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public static final String SERIALIZED_NAME_ORG = "org"; + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nonnull + private OrgInfo org; + + public static final String SERIALIZED_NAME_USER = "user"; + @SerializedName(SERIALIZED_NAME_USER) + @javax.annotation.Nonnull + private UserInfo user; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = "expiration_time_in_millis"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public AccessToken() { + } + + public AccessToken id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * GUID of the auth token. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public AccessToken token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Bearer auth token. + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + + public AccessToken org(@javax.annotation.Nonnull OrgInfo org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + */ + @javax.annotation.Nonnull + public OrgInfo getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nonnull OrgInfo org) { + this.org = org; + } + + + public AccessToken user(@javax.annotation.Nonnull UserInfo user) { + this.user = user; + return this; + } + + /** + * Get user + * @return user + */ + @javax.annotation.Nonnull + public UserInfo getUser() { + return user; + } + + public void setUser(@javax.annotation.Nonnull UserInfo user) { + this.user = user; + } + + + public AccessToken creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public AccessToken expirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccessToken {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" expirationTimeInMillis: ") - .append(toIndentedString(expirationTimeInMillis)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + AccessToken accessToken = (AccessToken) o; + return Objects.equals(this.id, accessToken.id) && + Objects.equals(this.token, accessToken.token) && + Objects.equals(this.org, accessToken.org) && + Objects.equals(this.user, accessToken.user) && + Objects.equals(this.creationTimeInMillis, accessToken.creationTimeInMillis) && + Objects.equals(this.expirationTimeInMillis, accessToken.expirationTimeInMillis); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, token, org, user, creationTimeInMillis, expirationTimeInMillis); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("token"); - openapiFields.add("org"); - openapiFields.add("user"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("expiration_time_in_millis"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - openapiRequiredFields.add("org"); - openapiRequiredFields.add("user"); - openapiRequiredFields.add("creation_time_in_millis"); - openapiRequiredFields.add("expiration_time_in_millis"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccessToken {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" expirationTimeInMillis: ").append(toIndentedString(expirationTimeInMillis)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccessToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccessToken.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AccessToken is not found in the empty" - + " JSON string", - AccessToken.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("token"); + openapiFields.add("org"); + openapiFields.add("user"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("org"); + openapiRequiredFields.add("user"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AccessToken + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccessToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AccessToken is not found in the empty JSON string", AccessToken.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccessToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AccessToken` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AccessToken.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccessToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccessToken.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AccessToken.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `token` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("token").toString())); - } - // validate the required field `org` - OrgInfo.validateJsonElement(jsonObj.get("org")); - // validate the required field `user` - UserInfo.validateJsonElement(jsonObj.get("user")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccessToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccessToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AccessToken.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AccessToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccessToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AccessToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccessToken - * @throws IOException if the JSON string is invalid with respect to AccessToken - */ - public static AccessToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccessToken.class); - } - - /** - * Convert an instance of AccessToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + // validate the required field `org` + OrgInfo.validateJsonElement(jsonObj.get("org")); + // validate the required field `user` + UserInfo.validateJsonElement(jsonObj.get("user")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccessToken.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AccessToken' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AccessToken.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AccessToken value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AccessToken read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AccessToken given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccessToken + * @throws IOException if the JSON string is invalid with respect to AccessToken + */ + public static AccessToken fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AccessToken.class); + } + + /** + * Convert an instance of AccessToken to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java index a74011eda..04fa82c3e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java @@ -4,238 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** Specify that the association is enabled for the metadata object */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ActionConfig implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_POSITION = "position"; - - @SerializedName(SERIALIZED_NAME_POSITION) - @javax.annotation.Nullable - private String position; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility; - - public ActionConfig() {} - - public ActionConfig position(@javax.annotation.Nullable String position) { - this.position = position; - return this; - } - - /** - * Position of the Custom action on the Metadata object. Earlier naming convention: context. - * - * @return position - */ - @javax.annotation.Nullable - public String getPosition() { - return position; - } - - public void setPosition(@javax.annotation.Nullable String position) { - this.position = position; - } - - public ActionConfig visibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the metadata association with custom action. Earlier naming convention: enabled - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; - } - - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActionConfig actionConfig = (ActionConfig) o; - return Objects.equals(this.position, actionConfig.position) - && Objects.equals(this.visibility, actionConfig.visibility); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(position, visibility); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActionConfig {\n"); - sb.append(" position: ").append(toIndentedString(position)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("position"); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActionConfig - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActionConfig.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActionConfig is not found in the" - + " empty JSON string", - ActionConfig.openapiRequiredFields.toString())); - } +/** + * Specify that the association is enabled for the metadata object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ActionConfig implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_POSITION = "position"; + @SerializedName(SERIALIZED_NAME_POSITION) + @javax.annotation.Nullable + private String position; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public ActionConfig() { + } + + public ActionConfig position(@javax.annotation.Nullable String position) { + this.position = position; + return this; + } + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + * @return position + */ + @javax.annotation.Nullable + public String getPosition() { + return position; + } + + public void setPosition(@javax.annotation.Nullable String position) { + this.position = position; + } + + + public ActionConfig visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionConfig actionConfig = (ActionConfig) o; + return Objects.equals(this.position, actionConfig.position) && + Objects.equals(this.visibility, actionConfig.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(position, visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionConfig {\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("position"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActionConfig is not found in the empty JSON string", ActionConfig.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActionConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActionConfig` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActionConfig.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) - && !jsonObj.get("position").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `position` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("position").toString())); - } - } + if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) && !jsonObj.get("position").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `position` to be a primitive type in the JSON string but got `%s`", jsonObj.get("position").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActionConfig.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionConfig read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActionConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionConfig - * @throws IOException if the JSON string is invalid with respect to ActionConfig - */ - public static ActionConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionConfig.class); - } - - /** - * Convert an instance of ActionConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActionConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActionConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ActionConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionConfig + * @throws IOException if the JSON string is invalid with respect to ActionConfig + */ + public static ActionConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionConfig.class); + } + + /** + * Convert an instance of ActionConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java index 385935fbb..0089b5c01 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java @@ -4,297 +4,294 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Specify that the association is enabled for the metadata object Default */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ActionConfigInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** Position of the Custom action on the Metadata object. Earlier naming convention: context. */ - @JsonAdapter(PositionEnum.Adapter.class) - public enum PositionEnum { - MENU("MENU"), - - PRIMARY("PRIMARY"), - - CONTEXT_MENU("CONTEXT_MENU"); - - private String value; - - PositionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PositionEnum fromValue(String value) { - for (PositionEnum b : PositionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PositionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PositionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PositionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PositionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POSITION = "position"; - @SerializedName(SERIALIZED_NAME_POSITION) - @javax.annotation.Nullable - private PositionEnum position; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility; - - public ActionConfigInput() {} - - public ActionConfigInput position(@javax.annotation.Nullable PositionEnum position) { - this.position = position; - return this; - } - - /** - * Position of the Custom action on the Metadata object. Earlier naming convention: context. - * - * @return position - */ - @javax.annotation.Nullable - public PositionEnum getPosition() { - return position; - } - - public void setPosition(@javax.annotation.Nullable PositionEnum position) { - this.position = position; - } +import com.thoughtspot.client.JSON; - public ActionConfigInput visibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; +/** + * Specify that the association is enabled for the metadata object Default + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ActionConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + @JsonAdapter(PositionEnum.Adapter.class) + public enum PositionEnum { + MENU("MENU"), + + PRIMARY("PRIMARY"), + + CONTEXT_MENU("CONTEXT_MENU"); + + private String value; + + PositionEnum(String value) { + this.value = value; } - /** - * Visibility of the metadata association with custom action. Earlier naming convention: enabled - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; + public String getValue() { + return value; } - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static PositionEnum fromValue(String value) { + for (PositionEnum b : PositionEnum.values()) { + if (b.value.equals(value)) { + return b; } - ActionConfigInput actionConfigInput = (ActionConfigInput) o; - return Objects.equals(this.position, actionConfigInput.position) - && Objects.equals(this.visibility, actionConfigInput.visibility); + } + return null; } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(position, visibility); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_POSITION = "position"; + @SerializedName(SERIALIZED_NAME_POSITION) + @javax.annotation.Nullable + private PositionEnum position; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public ActionConfigInput() { + } + + public ActionConfigInput position(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + return this; + } + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + * @return position + */ + @javax.annotation.Nullable + public PositionEnum getPosition() { + return position; + } + + public void setPosition(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + } + + + public ActionConfigInput visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActionConfigInput {\n"); - sb.append(" position: ").append(toIndentedString(position)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ActionConfigInput actionConfigInput = (ActionConfigInput) o; + return Objects.equals(this.position, actionConfigInput.position) && + Objects.equals(this.visibility, actionConfigInput.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(position, visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("position"); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionConfigInput {\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActionConfigInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActionConfigInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActionConfigInput is not found in the" - + " empty JSON string", - ActionConfigInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("position"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionConfigInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActionConfigInput is not found in the empty JSON string", ActionConfigInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActionConfigInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActionConfigInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActionConfigInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionConfigInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) - && !jsonObj.get("position").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `position` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("position").toString())); - } - // validate the optional field `position` - if (jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) { - PositionEnum.validateJsonElement(jsonObj.get("position")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionConfigInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionConfigInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActionConfigInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionConfigInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionConfigInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActionConfigInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionConfigInput - * @throws IOException if the JSON string is invalid with respect to ActionConfigInput - */ - public static ActionConfigInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionConfigInput.class); - } - - /** - * Convert an instance of ActionConfigInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) && !jsonObj.get("position").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `position` to be a primitive type in the JSON string but got `%s`", jsonObj.get("position").toString())); + } + // validate the optional field `position` + if (jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) { + PositionEnum.validateJsonElement(jsonObj.get("position")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionConfigInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActionConfigInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionConfigInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActionConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ActionConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionConfigInput + * @throws IOException if the JSON string is invalid with respect to ActionConfigInput + */ + public static ActionConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionConfigInput.class); + } + + /** + * Convert an instance of ActionConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java index cec6ff169..d91bf3125 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java @@ -4,298 +4,294 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Specify that the association is enabled for the metadata object Default */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ActionConfigInputCreate implements Serializable { - private static final long serialVersionUID = 1L; - - /** Position of the Custom action on the Metadata object. Earlier naming convention: context. */ - @JsonAdapter(PositionEnum.Adapter.class) - public enum PositionEnum { - MENU("MENU"), - - PRIMARY("PRIMARY"), - - CONTEXT_MENU("CONTEXT_MENU"); - - private String value; - - PositionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PositionEnum fromValue(String value) { - for (PositionEnum b : PositionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PositionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PositionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PositionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PositionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POSITION = "position"; - @SerializedName(SERIALIZED_NAME_POSITION) - @javax.annotation.Nullable - private PositionEnum position = PositionEnum.MENU; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility = true; - - public ActionConfigInputCreate() {} - - public ActionConfigInputCreate position(@javax.annotation.Nullable PositionEnum position) { - this.position = position; - return this; - } - - /** - * Position of the Custom action on the Metadata object. Earlier naming convention: context. - * - * @return position - */ - @javax.annotation.Nullable - public PositionEnum getPosition() { - return position; - } - - public void setPosition(@javax.annotation.Nullable PositionEnum position) { - this.position = position; - } +import com.thoughtspot.client.JSON; - public ActionConfigInputCreate visibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; +/** + * Specify that the association is enabled for the metadata object Default + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ActionConfigInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + @JsonAdapter(PositionEnum.Adapter.class) + public enum PositionEnum { + MENU("MENU"), + + PRIMARY("PRIMARY"), + + CONTEXT_MENU("CONTEXT_MENU"); + + private String value; + + PositionEnum(String value) { + this.value = value; } - /** - * Visibility of the metadata association with custom action. Earlier naming convention: enabled - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; + public String getValue() { + return value; } - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static PositionEnum fromValue(String value) { + for (PositionEnum b : PositionEnum.values()) { + if (b.value.equals(value)) { + return b; } - ActionConfigInputCreate actionConfigInputCreate = (ActionConfigInputCreate) o; - return Objects.equals(this.position, actionConfigInputCreate.position) - && Objects.equals(this.visibility, actionConfigInputCreate.visibility); + } + return null; } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(position, visibility); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_POSITION = "position"; + @SerializedName(SERIALIZED_NAME_POSITION) + @javax.annotation.Nullable + private PositionEnum position = PositionEnum.MENU; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility = true; + + public ActionConfigInputCreate() { + } + + public ActionConfigInputCreate position(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + return this; + } + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + * @return position + */ + @javax.annotation.Nullable + public PositionEnum getPosition() { + return position; + } + + public void setPosition(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + } + + + public ActionConfigInputCreate visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActionConfigInputCreate {\n"); - sb.append(" position: ").append(toIndentedString(position)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ActionConfigInputCreate actionConfigInputCreate = (ActionConfigInputCreate) o; + return Objects.equals(this.position, actionConfigInputCreate.position) && + Objects.equals(this.visibility, actionConfigInputCreate.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(position, visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("position"); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionConfigInputCreate {\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActionConfigInputCreate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActionConfigInputCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActionConfigInputCreate is not found" - + " in the empty JSON string", - ActionConfigInputCreate.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("position"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionConfigInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionConfigInputCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActionConfigInputCreate is not found in the empty JSON string", ActionConfigInputCreate.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActionConfigInputCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActionConfigInputCreate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActionConfigInputCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionConfigInputCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) - && !jsonObj.get("position").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `position` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("position").toString())); - } - // validate the optional field `position` - if (jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) { - PositionEnum.validateJsonElement(jsonObj.get("position")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionConfigInputCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionConfigInputCreate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActionConfigInputCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionConfigInputCreate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionConfigInputCreate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActionConfigInputCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionConfigInputCreate - * @throws IOException if the JSON string is invalid with respect to ActionConfigInputCreate - */ - public static ActionConfigInputCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionConfigInputCreate.class); - } - - /** - * Convert an instance of ActionConfigInputCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) && !jsonObj.get("position").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `position` to be a primitive type in the JSON string but got `%s`", jsonObj.get("position").toString())); + } + // validate the optional field `position` + if (jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) { + PositionEnum.validateJsonElement(jsonObj.get("position")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionConfigInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionConfigInputCreate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActionConfigInputCreate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionConfigInputCreate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActionConfigInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ActionConfigInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionConfigInputCreate + * @throws IOException if the JSON string is invalid with respect to ActionConfigInputCreate + */ + public static ActionConfigInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionConfigInputCreate.class); + } + + /** + * Convert an instance of ActionConfigInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java index 09c17e38d..ee29211c4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java @@ -4,220 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CALLBACK; +import com.thoughtspot.client.model.URL; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Type and Configuration for Custom Actions */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ActionDetails implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; - - @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) - @javax.annotation.Nullable - private CALLBACK callback; - - public static final String SERIALIZED_NAME_U_R_L = "URL"; - - @SerializedName(SERIALIZED_NAME_U_R_L) - @javax.annotation.Nullable - private URL url; - - public ActionDetails() {} - - public ActionDetails callback(@javax.annotation.Nullable CALLBACK callback) { - this.callback = callback; - return this; - } - - /** - * Get callback - * - * @return callback - */ - @javax.annotation.Nullable - public CALLBACK getCALLBACK() { - return callback; - } - - public void setCALLBACK(@javax.annotation.Nullable CALLBACK callback) { - this.callback = callback; - } - - public ActionDetails url(@javax.annotation.Nullable URL url) { - this.url = url; - return this; - } - - /** - * Get url - * - * @return url - */ - @javax.annotation.Nullable - public URL getURL() { - return url; - } - - public void setURL(@javax.annotation.Nullable URL url) { - this.url = url; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActionDetails actionDetails = (ActionDetails) o; - return Objects.equals(this.callback, actionDetails.callback) - && Objects.equals(this.url, actionDetails.url); +/** + * Type and Configuration for Custom Actions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ActionDetails implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; + @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) + @javax.annotation.Nullable + private CALLBACK callback; + + public static final String SERIALIZED_NAME_U_R_L = "URL"; + @SerializedName(SERIALIZED_NAME_U_R_L) + @javax.annotation.Nullable + private URL url; + + public ActionDetails() { + } + + public ActionDetails callback(@javax.annotation.Nullable CALLBACK callback) { + this.callback = callback; + return this; + } + + /** + * Get callback + * @return callback + */ + @javax.annotation.Nullable + public CALLBACK getCALLBACK() { + return callback; + } + + public void setCALLBACK(@javax.annotation.Nullable CALLBACK callback) { + this.callback = callback; + } + + + public ActionDetails url(@javax.annotation.Nullable URL url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @javax.annotation.Nullable + public URL getURL() { + return url; + } + + public void setURL(@javax.annotation.Nullable URL url) { + this.url = url; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(callback, url); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActionDetails {\n"); - sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append("}"); - return sb.toString(); + ActionDetails actionDetails = (ActionDetails) o; + return Objects.equals(this.callback, actionDetails.callback) && + Objects.equals(this.url, actionDetails.url); + } + + @Override + public int hashCode() { + return Objects.hash(callback, url); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionDetails {\n"); + sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("CALLBACK"); + openapiFields.add("URL"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActionDetails is not found in the empty JSON string", ActionDetails.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CALLBACK"); - openapiFields.add("URL"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActionDetails - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActionDetails.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActionDetails is not found in the" - + " empty JSON string", - ActionDetails.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActionDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActionDetails` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActionDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `CALLBACK` - if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { - CALLBACK.validateJsonElement(jsonObj.get("CALLBACK")); - } - // validate the optional field `URL` - if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { - URL.validateJsonElement(jsonObj.get("URL")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionDetails.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionDetails' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActionDetails.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionDetails value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionDetails read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActionDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionDetails - * @throws IOException if the JSON string is invalid with respect to ActionDetails - */ - public static ActionDetails fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionDetails.class); - } - - /** - * Convert an instance of ActionDetails to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `CALLBACK` + if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { + CALLBACK.validateJsonElement(jsonObj.get("CALLBACK")); + } + // validate the optional field `URL` + if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { + URL.validateJsonElement(jsonObj.get("URL")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActionDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActionDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ActionDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionDetails + * @throws IOException if the JSON string is invalid with respect to ActionDetails + */ + public static ActionDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionDetails.class); + } + + /** + * Convert an instance of ActionDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java index f1f7755c3..381875c5d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java @@ -4,224 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CALLBACKInput; +import com.thoughtspot.client.model.URLInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; +import com.thoughtspot.client.JSON; + /** - * Action details includes `Type` and configuration details of Custom Actions. Either - * Callback or URL is required. + * Action details includes `Type` and configuration details of Custom Actions. Either Callback or URL is required. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ActionDetailsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; - - @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) - @javax.annotation.Nullable - private CALLBACKInput CALLBACK; - - public static final String SERIALIZED_NAME_U_R_L = "URL"; - - @SerializedName(SERIALIZED_NAME_U_R_L) - @javax.annotation.Nullable - private URLInput URL; - - public ActionDetailsInput() {} - - public ActionDetailsInput CALLBACK(@javax.annotation.Nullable CALLBACKInput CALLBACK) { - this.CALLBACK = CALLBACK; - return this; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; + @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) + @javax.annotation.Nullable + private CALLBACKInput CALLBACK; + + public static final String SERIALIZED_NAME_U_R_L = "URL"; + @SerializedName(SERIALIZED_NAME_U_R_L) + @javax.annotation.Nullable + private URLInput URL; + + public ActionDetailsInput() { + } + + public ActionDetailsInput CALLBACK(@javax.annotation.Nullable CALLBACKInput CALLBACK) { + this.CALLBACK = CALLBACK; + return this; + } + + /** + * Get CALLBACK + * @return CALLBACK + */ + @javax.annotation.Nullable + public CALLBACKInput getCALLBACK() { + return CALLBACK; + } + + public void setCALLBACK(@javax.annotation.Nullable CALLBACKInput CALLBACK) { + this.CALLBACK = CALLBACK; + } + + + public ActionDetailsInput URL(@javax.annotation.Nullable URLInput URL) { + this.URL = URL; + return this; + } + + /** + * Get URL + * @return URL + */ + @javax.annotation.Nullable + public URLInput getURL() { + return URL; + } + + public void setURL(@javax.annotation.Nullable URLInput URL) { + this.URL = URL; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Get CALLBACK - * - * @return CALLBACK - */ - @javax.annotation.Nullable - public CALLBACKInput getCALLBACK() { - return CALLBACK; + if (o == null || getClass() != o.getClass()) { + return false; } - - public void setCALLBACK(@javax.annotation.Nullable CALLBACKInput CALLBACK) { - this.CALLBACK = CALLBACK; - } - - public ActionDetailsInput URL(@javax.annotation.Nullable URLInput URL) { - this.URL = URL; - return this; - } - - /** - * Get URL - * - * @return URL - */ - @javax.annotation.Nullable - public URLInput getURL() { - return URL; - } - - public void setURL(@javax.annotation.Nullable URLInput URL) { - this.URL = URL; + ActionDetailsInput actionDetailsInput = (ActionDetailsInput) o; + return Objects.equals(this.CALLBACK, actionDetailsInput.CALLBACK) && + Objects.equals(this.URL, actionDetailsInput.URL); + } + + @Override + public int hashCode() { + return Objects.hash(CALLBACK, URL); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionDetailsInput {\n"); + sb.append(" CALLBACK: ").append(toIndentedString(CALLBACK)).append("\n"); + sb.append(" URL: ").append(toIndentedString(URL)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActionDetailsInput actionDetailsInput = (ActionDetailsInput) o; - return Objects.equals(this.CALLBACK, actionDetailsInput.CALLBACK) - && Objects.equals(this.URL, actionDetailsInput.URL); - } - - @Override - public int hashCode() { - return Objects.hash(CALLBACK, URL); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActionDetailsInput {\n"); - sb.append(" CALLBACK: ").append(toIndentedString(CALLBACK)).append("\n"); - sb.append(" URL: ").append(toIndentedString(URL)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CALLBACK"); - openapiFields.add("URL"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActionDetailsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActionDetailsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActionDetailsInput is not found in" - + " the empty JSON string", - ActionDetailsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("CALLBACK"); + openapiFields.add("URL"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionDetailsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionDetailsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActionDetailsInput is not found in the empty JSON string", ActionDetailsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActionDetailsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActionDetailsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActionDetailsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionDetailsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `CALLBACK` - if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { - CALLBACKInput.validateJsonElement(jsonObj.get("CALLBACK")); - } - // validate the optional field `URL` - if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { - URLInput.validateJsonElement(jsonObj.get("URL")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionDetailsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionDetailsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActionDetailsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionDetailsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionDetailsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActionDetailsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionDetailsInput - * @throws IOException if the JSON string is invalid with respect to ActionDetailsInput - */ - public static ActionDetailsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionDetailsInput.class); - } - - /** - * Convert an instance of ActionDetailsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `CALLBACK` + if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { + CALLBACKInput.validateJsonElement(jsonObj.get("CALLBACK")); + } + // validate the optional field `URL` + if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { + URLInput.validateJsonElement(jsonObj.get("URL")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionDetailsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionDetailsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActionDetailsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionDetailsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActionDetailsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ActionDetailsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionDetailsInput + * @throws IOException if the JSON string is invalid with respect to ActionDetailsInput + */ + public static ActionDetailsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionDetailsInput.class); + } + + /** + * Convert an instance of ActionDetailsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java index 79face38b..1ea166ab6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java @@ -4,226 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CALLBACKInputMandatory; +import com.thoughtspot.client.model.URLInputMandatory; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; +import com.thoughtspot.client.JSON; + /** - * Action details includes Type and Configuration for Custom Actions, either Callback or URL is - * required. When both callback and url are provided, callback would be considered + * Action details includes Type and Configuration for Custom Actions, either Callback or URL is required. When both callback and url are provided, callback would be considered */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ActionDetailsInputCreate implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; - - @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) - @javax.annotation.Nullable - private CALLBACKInputMandatory CALLBACK; - - public static final String SERIALIZED_NAME_U_R_L = "URL"; - - @SerializedName(SERIALIZED_NAME_U_R_L) - @javax.annotation.Nullable - private URLInputMandatory URL; - - public ActionDetailsInputCreate() {} - - public ActionDetailsInputCreate CALLBACK( - @javax.annotation.Nullable CALLBACKInputMandatory CALLBACK) { - this.CALLBACK = CALLBACK; - return this; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; + @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) + @javax.annotation.Nullable + private CALLBACKInputMandatory CALLBACK; + + public static final String SERIALIZED_NAME_U_R_L = "URL"; + @SerializedName(SERIALIZED_NAME_U_R_L) + @javax.annotation.Nullable + private URLInputMandatory URL; + + public ActionDetailsInputCreate() { + } + + public ActionDetailsInputCreate CALLBACK(@javax.annotation.Nullable CALLBACKInputMandatory CALLBACK) { + this.CALLBACK = CALLBACK; + return this; + } + + /** + * Get CALLBACK + * @return CALLBACK + */ + @javax.annotation.Nullable + public CALLBACKInputMandatory getCALLBACK() { + return CALLBACK; + } + + public void setCALLBACK(@javax.annotation.Nullable CALLBACKInputMandatory CALLBACK) { + this.CALLBACK = CALLBACK; + } + + + public ActionDetailsInputCreate URL(@javax.annotation.Nullable URLInputMandatory URL) { + this.URL = URL; + return this; + } + + /** + * Get URL + * @return URL + */ + @javax.annotation.Nullable + public URLInputMandatory getURL() { + return URL; + } + + public void setURL(@javax.annotation.Nullable URLInputMandatory URL) { + this.URL = URL; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Get CALLBACK - * - * @return CALLBACK - */ - @javax.annotation.Nullable - public CALLBACKInputMandatory getCALLBACK() { - return CALLBACK; + if (o == null || getClass() != o.getClass()) { + return false; } - - public void setCALLBACK(@javax.annotation.Nullable CALLBACKInputMandatory CALLBACK) { - this.CALLBACK = CALLBACK; - } - - public ActionDetailsInputCreate URL(@javax.annotation.Nullable URLInputMandatory URL) { - this.URL = URL; - return this; - } - - /** - * Get URL - * - * @return URL - */ - @javax.annotation.Nullable - public URLInputMandatory getURL() { - return URL; - } - - public void setURL(@javax.annotation.Nullable URLInputMandatory URL) { - this.URL = URL; + ActionDetailsInputCreate actionDetailsInputCreate = (ActionDetailsInputCreate) o; + return Objects.equals(this.CALLBACK, actionDetailsInputCreate.CALLBACK) && + Objects.equals(this.URL, actionDetailsInputCreate.URL); + } + + @Override + public int hashCode() { + return Objects.hash(CALLBACK, URL); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionDetailsInputCreate {\n"); + sb.append(" CALLBACK: ").append(toIndentedString(CALLBACK)).append("\n"); + sb.append(" URL: ").append(toIndentedString(URL)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActionDetailsInputCreate actionDetailsInputCreate = (ActionDetailsInputCreate) o; - return Objects.equals(this.CALLBACK, actionDetailsInputCreate.CALLBACK) - && Objects.equals(this.URL, actionDetailsInputCreate.URL); - } - - @Override - public int hashCode() { - return Objects.hash(CALLBACK, URL); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActionDetailsInputCreate {\n"); - sb.append(" CALLBACK: ").append(toIndentedString(CALLBACK)).append("\n"); - sb.append(" URL: ").append(toIndentedString(URL)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CALLBACK"); - openapiFields.add("URL"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActionDetailsInputCreate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActionDetailsInputCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActionDetailsInputCreate is not found" - + " in the empty JSON string", - ActionDetailsInputCreate.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("CALLBACK"); + openapiFields.add("URL"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionDetailsInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionDetailsInputCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActionDetailsInputCreate is not found in the empty JSON string", ActionDetailsInputCreate.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActionDetailsInputCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActionDetailsInputCreate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActionDetailsInputCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionDetailsInputCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `CALLBACK` - if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { - CALLBACKInputMandatory.validateJsonElement(jsonObj.get("CALLBACK")); - } - // validate the optional field `URL` - if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { - URLInputMandatory.validateJsonElement(jsonObj.get("URL")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionDetailsInputCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionDetailsInputCreate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActionDetailsInputCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionDetailsInputCreate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionDetailsInputCreate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActionDetailsInputCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionDetailsInputCreate - * @throws IOException if the JSON string is invalid with respect to ActionDetailsInputCreate - */ - public static ActionDetailsInputCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionDetailsInputCreate.class); - } - - /** - * Convert an instance of ActionDetailsInputCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `CALLBACK` + if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { + CALLBACKInputMandatory.validateJsonElement(jsonObj.get("CALLBACK")); + } + // validate the optional field `URL` + if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { + URLInputMandatory.validateJsonElement(jsonObj.get("URL")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionDetailsInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionDetailsInputCreate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActionDetailsInputCreate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionDetailsInputCreate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActionDetailsInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ActionDetailsInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionDetailsInputCreate + * @throws IOException if the JSON string is invalid with respect to ActionDetailsInputCreate + */ + public static ActionDetailsInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionDetailsInputCreate.class); + } + + /** + * Convert an instance of ActionDetailsInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java index ae1d33b62..d82751124 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java @@ -4,311 +4,297 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ActivateUserRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ActivateUserRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nonnull - private String userIdentifier; - - public static final String SERIALIZED_NAME_AUTH_TOKEN = "auth_token"; - - @SerializedName(SERIALIZED_NAME_AUTH_TOKEN) - @javax.annotation.Nonnull - private String authToken; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nonnull - private String password; - - public static final String SERIALIZED_NAME_PROPERTIES = "properties"; - - @SerializedName(SERIALIZED_NAME_PROPERTIES) - @javax.annotation.Nullable - private String properties; - - public ActivateUserRequest() {} - - public ActivateUserRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * Unique ID or name of the user. - * - * @return userIdentifier - */ - @javax.annotation.Nonnull - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - public ActivateUserRequest authToken(@javax.annotation.Nonnull String authToken) { - this.authToken = authToken; - return this; - } - - /** - * Auth token for the user. - * - * @return authToken - */ - @javax.annotation.Nonnull - public String getAuthToken() { - return authToken; - } - - public void setAuthToken(@javax.annotation.Nonnull String authToken) { - this.authToken = authToken; - } - - public ActivateUserRequest password(@javax.annotation.Nonnull String password) { - this.password = password; - return this; - } - - /** - * New password for the user to access the account. - * - * @return password - */ - @javax.annotation.Nonnull - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nonnull String password) { - this.password = password; - } - - public ActivateUserRequest properties(@javax.annotation.Nullable String properties) { - this.properties = properties; - return this; - } - - /** - * Properties of the user. - * - * @return properties - */ - @javax.annotation.Nullable - public String getProperties() { - return properties; - } - - public void setProperties(@javax.annotation.Nullable String properties) { - this.properties = properties; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActivateUserRequest activateUserRequest = (ActivateUserRequest) o; - return Objects.equals(this.userIdentifier, activateUserRequest.userIdentifier) - && Objects.equals(this.authToken, activateUserRequest.authToken) - && Objects.equals(this.password, activateUserRequest.password) - && Objects.equals(this.properties, activateUserRequest.properties); - } - - @Override - public int hashCode() { - return Objects.hash(userIdentifier, authToken, password, properties); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActivateUserRequest {\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append(" authToken: ").append(toIndentedString(authToken)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * ActivateUserRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ActivateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_AUTH_TOKEN = "auth_token"; + @SerializedName(SERIALIZED_NAME_AUTH_TOKEN) + @javax.annotation.Nonnull + private String authToken; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nonnull + private String password; + + public static final String SERIALIZED_NAME_PROPERTIES = "properties"; + @SerializedName(SERIALIZED_NAME_PROPERTIES) + @javax.annotation.Nullable + private String properties; + + public ActivateUserRequest() { + } + + public ActivateUserRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Unique ID or name of the user. + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + public ActivateUserRequest authToken(@javax.annotation.Nonnull String authToken) { + this.authToken = authToken; + return this; + } + + /** + * Auth token for the user. + * @return authToken + */ + @javax.annotation.Nonnull + public String getAuthToken() { + return authToken; + } + + public void setAuthToken(@javax.annotation.Nonnull String authToken) { + this.authToken = authToken; + } + + + public ActivateUserRequest password(@javax.annotation.Nonnull String password) { + this.password = password; + return this; + } + + /** + * New password for the user to access the account. + * @return password + */ + @javax.annotation.Nonnull + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nonnull String password) { + this.password = password; + } + + + public ActivateUserRequest properties(@javax.annotation.Nullable String properties) { + this.properties = properties; + return this; + } + + /** + * Properties of the user. + * @return properties + */ + @javax.annotation.Nullable + public String getProperties() { + return properties; + } + + public void setProperties(@javax.annotation.Nullable String properties) { + this.properties = properties; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_identifier"); - openapiFields.add("auth_token"); - openapiFields.add("password"); - openapiFields.add("properties"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("user_identifier"); - openapiRequiredFields.add("auth_token"); - openapiRequiredFields.add("password"); + ActivateUserRequest activateUserRequest = (ActivateUserRequest) o; + return Objects.equals(this.userIdentifier, activateUserRequest.userIdentifier) && + Objects.equals(this.authToken, activateUserRequest.authToken) && + Objects.equals(this.password, activateUserRequest.password) && + Objects.equals(this.properties, activateUserRequest.properties); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, authToken, password, properties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActivateUserRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" authToken: ").append(toIndentedString(authToken)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActivateUserRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActivateUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ActivateUserRequest is not found in" - + " the empty JSON string", - ActivateUserRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("auth_token"); + openapiFields.add("password"); + openapiFields.add("properties"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_identifier"); + openapiRequiredFields.add("auth_token"); + openapiRequiredFields.add("password"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActivateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActivateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ActivateUserRequest is not found in the empty JSON string", ActivateUserRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ActivateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ActivateUserRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ActivateUserRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActivateUserRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ActivateUserRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ActivateUserRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - if (!jsonObj.get("auth_token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `auth_token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("auth_token").toString())); - } - if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("properties") != null && !jsonObj.get("properties").isJsonNull()) - && !jsonObj.get("properties").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `properties` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("properties").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActivateUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActivateUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ActivateUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ActivateUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActivateUserRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ActivateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActivateUserRequest - * @throws IOException if the JSON string is invalid with respect to ActivateUserRequest - */ - public static ActivateUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActivateUserRequest.class); - } - - /** - * Convert an instance of ActivateUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + if (!jsonObj.get("auth_token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `auth_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("auth_token").toString())); + } + if (!jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("properties") != null && !jsonObj.get("properties").isJsonNull()) && !jsonObj.get("properties").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `properties` to be a primitive type in the JSON string but got `%s`", jsonObj.get("properties").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActivateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActivateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActivateUserRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ActivateUserRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ActivateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ActivateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActivateUserRequest + * @throws IOException if the JSON string is invalid with respect to ActivateUserRequest + */ + public static ActivateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActivateUserRequest.class); + } + + /** + * Convert an instance of ActivateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java index 604326b54..aafba6d9d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java @@ -4,203 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** AgentConversation */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AgentConversation implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_CONVERSATION_ID = "conversation_id"; +/** + * AgentConversation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentConversation implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_CONVERSATION_ID) - @javax.annotation.Nonnull - private String conversationId; + public static final String SERIALIZED_NAME_CONVERSATION_ID = "conversation_id"; + @SerializedName(SERIALIZED_NAME_CONVERSATION_ID) + @javax.annotation.Nonnull + private String conversationId; - public AgentConversation() {} + public AgentConversation() { + } - public AgentConversation conversationId(@javax.annotation.Nonnull String conversationId) { - this.conversationId = conversationId; - return this; - } + public AgentConversation conversationId(@javax.annotation.Nonnull String conversationId) { + this.conversationId = conversationId; + return this; + } - /** - * Unique identifier of the conversation. - * - * @return conversationId - */ - @javax.annotation.Nonnull - public String getConversationId() { - return conversationId; - } + /** + * Unique identifier of the conversation. + * @return conversationId + */ + @javax.annotation.Nonnull + public String getConversationId() { + return conversationId; + } - public void setConversationId(@javax.annotation.Nonnull String conversationId) { - this.conversationId = conversationId; - } + public void setConversationId(@javax.annotation.Nonnull String conversationId) { + this.conversationId = conversationId; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AgentConversation agentConversation = (AgentConversation) o; - return Objects.equals(this.conversationId, agentConversation.conversationId); - } - @Override - public int hashCode() { - return Objects.hash(conversationId); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AgentConversation {\n"); - sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("conversation_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("conversation_id"); + AgentConversation agentConversation = (AgentConversation) o; + return Objects.equals(this.conversationId, agentConversation.conversationId); + } + + @Override + public int hashCode() { + return Objects.hash(conversationId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentConversation {\n"); + sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentConversation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AgentConversation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AgentConversation is not found in the" - + " empty JSON string", - AgentConversation.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conversation_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("conversation_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AgentConversation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AgentConversation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AgentConversation is not found in the empty JSON string", AgentConversation.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AgentConversation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AgentConversation` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AgentConversation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AgentConversation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AgentConversation.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AgentConversation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("conversation_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `conversation_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("conversation_id").toString())); - } - } + if (!jsonObj.get("conversation_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conversation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conversation_id").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentConversation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentConversation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AgentConversation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AgentConversation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AgentConversation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AgentConversation given an JSON string - * - * @param jsonString JSON string - * @return An instance of AgentConversation - * @throws IOException if the JSON string is invalid with respect to AgentConversation - */ - public static AgentConversation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentConversation.class); - } - - /** - * Convert an instance of AgentConversation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AgentConversation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AgentConversation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AgentConversation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AgentConversation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AgentConversation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AgentConversation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AgentConversation + * @throws IOException if the JSON string is invalid with respect to AgentConversation + */ + public static AgentConversation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AgentConversation.class); + } + + /** + * Convert an instance of AgentConversation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java index bec897a06..33569fff6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java @@ -4,427 +4,400 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** AnswerContent */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AnswerContent implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT = - "available_data_row_count"; - - @SerializedName(SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT) - @javax.annotation.Nonnull - private Integer availableDataRowCount; - - public static final String SERIALIZED_NAME_COLUMN_NAMES = "column_names"; - - @SerializedName(SERIALIZED_NAME_COLUMN_NAMES) - @javax.annotation.Nonnull - private List columnNames; - - public static final String SERIALIZED_NAME_DATA_ROWS = "data_rows"; - - @SerializedName(SERIALIZED_NAME_DATA_ROWS) - @javax.annotation.Nonnull - private List dataRows; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nonnull - private Integer recordOffset; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nonnull - private Integer recordSize; - - public static final String SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT = "returned_data_row_count"; - - @SerializedName(SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT) - @javax.annotation.Nonnull - private Integer returnedDataRowCount; - - public static final String SERIALIZED_NAME_SAMPLING_RATIO = "sampling_ratio"; - - @SerializedName(SERIALIZED_NAME_SAMPLING_RATIO) - @javax.annotation.Nonnull - private Float samplingRatio; - - public AnswerContent() {} - - public AnswerContent availableDataRowCount( - @javax.annotation.Nonnull Integer availableDataRowCount) { - this.availableDataRowCount = availableDataRowCount; - return this; - } - - /** - * Total available data row count. - * - * @return availableDataRowCount - */ - @javax.annotation.Nonnull - public Integer getAvailableDataRowCount() { - return availableDataRowCount; - } - - public void setAvailableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { - this.availableDataRowCount = availableDataRowCount; - } - - public AnswerContent columnNames(@javax.annotation.Nonnull List columnNames) { - this.columnNames = columnNames; - return this; - } - - public AnswerContent addColumnNamesItem(String columnNamesItem) { - if (this.columnNames == null) { - this.columnNames = new ArrayList<>(); - } - this.columnNames.add(columnNamesItem); - return this; - } - - /** - * Name of the columns. - * - * @return columnNames - */ - @javax.annotation.Nonnull - public List getColumnNames() { - return columnNames; - } - - public void setColumnNames(@javax.annotation.Nonnull List columnNames) { - this.columnNames = columnNames; - } - - public AnswerContent dataRows(@javax.annotation.Nonnull List dataRows) { - this.dataRows = dataRows; - return this; - } - - public AnswerContent addDataRowsItem(Object dataRowsItem) { - if (this.dataRows == null) { - this.dataRows = new ArrayList<>(); - } - this.dataRows.add(dataRowsItem); - return this; - } - - /** - * Rows of data set. - * - * @return dataRows - */ - @javax.annotation.Nonnull - public List getDataRows() { - return dataRows; - } - - public void setDataRows(@javax.annotation.Nonnull List dataRows) { - this.dataRows = dataRows; - } - - public AnswerContent recordOffset(@javax.annotation.Nonnull Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nonnull - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public AnswerContent recordSize(@javax.annotation.Nonnull Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nonnull - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { - this.recordSize = recordSize; - } - - public AnswerContent returnedDataRowCount( - @javax.annotation.Nonnull Integer returnedDataRowCount) { - this.returnedDataRowCount = returnedDataRowCount; - return this; - } - - /** - * Total returned data row count. - * - * @return returnedDataRowCount - */ - @javax.annotation.Nonnull - public Integer getReturnedDataRowCount() { - return returnedDataRowCount; - } - - public void setReturnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { - this.returnedDataRowCount = returnedDataRowCount; - } - - public AnswerContent samplingRatio(@javax.annotation.Nonnull Float samplingRatio) { - this.samplingRatio = samplingRatio; - return this; - } - - /** - * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the - * data set to the total number of keys expected in the query. If the value is 1.0, this means - * that the complete result is returned. - * - * @return samplingRatio - */ - @javax.annotation.Nonnull - public Float getSamplingRatio() { - return samplingRatio; - } - - public void setSamplingRatio(@javax.annotation.Nonnull Float samplingRatio) { - this.samplingRatio = samplingRatio; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnswerContent answerContent = (AnswerContent) o; - return Objects.equals(this.availableDataRowCount, answerContent.availableDataRowCount) - && Objects.equals(this.columnNames, answerContent.columnNames) - && Objects.equals(this.dataRows, answerContent.dataRows) - && Objects.equals(this.recordOffset, answerContent.recordOffset) - && Objects.equals(this.recordSize, answerContent.recordSize) - && Objects.equals(this.returnedDataRowCount, answerContent.returnedDataRowCount) - && Objects.equals(this.samplingRatio, answerContent.samplingRatio); - } - - @Override - public int hashCode() { - return Objects.hash( - availableDataRowCount, - columnNames, - dataRows, - recordOffset, - recordSize, - returnedDataRowCount, - samplingRatio); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnswerContent {\n"); - sb.append(" availableDataRowCount: ") - .append(toIndentedString(availableDataRowCount)) - .append("\n"); - sb.append(" columnNames: ").append(toIndentedString(columnNames)).append("\n"); - sb.append(" dataRows: ").append(toIndentedString(dataRows)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" returnedDataRowCount: ") - .append(toIndentedString(returnedDataRowCount)) - .append("\n"); - sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("available_data_row_count"); - openapiFields.add("column_names"); - openapiFields.add("data_rows"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("returned_data_row_count"); - openapiFields.add("sampling_ratio"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("available_data_row_count"); - openapiRequiredFields.add("column_names"); - openapiRequiredFields.add("data_rows"); - openapiRequiredFields.add("record_offset"); - openapiRequiredFields.add("record_size"); - openapiRequiredFields.add("returned_data_row_count"); - openapiRequiredFields.add("sampling_ratio"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AnswerContent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AnswerContent.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AnswerContent is not found in the" - + " empty JSON string", - AnswerContent.openapiRequiredFields.toString())); - } +/** + * AnswerContent + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnswerContent implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT = "available_data_row_count"; + @SerializedName(SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer availableDataRowCount; + + public static final String SERIALIZED_NAME_COLUMN_NAMES = "column_names"; + @SerializedName(SERIALIZED_NAME_COLUMN_NAMES) + @javax.annotation.Nonnull + private List columnNames; + + public static final String SERIALIZED_NAME_DATA_ROWS = "data_rows"; + @SerializedName(SERIALIZED_NAME_DATA_ROWS) + @javax.annotation.Nonnull + private List dataRows; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nonnull + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nonnull + private Integer recordSize; + + public static final String SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT = "returned_data_row_count"; + @SerializedName(SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer returnedDataRowCount; + + public static final String SERIALIZED_NAME_SAMPLING_RATIO = "sampling_ratio"; + @SerializedName(SERIALIZED_NAME_SAMPLING_RATIO) + @javax.annotation.Nonnull + private Float samplingRatio; + + public AnswerContent() { + } + + public AnswerContent availableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + return this; + } + + /** + * Total available data row count. + * @return availableDataRowCount + */ + @javax.annotation.Nonnull + public Integer getAvailableDataRowCount() { + return availableDataRowCount; + } + + public void setAvailableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + } + + + public AnswerContent columnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + return this; + } + + public AnswerContent addColumnNamesItem(String columnNamesItem) { + if (this.columnNames == null) { + this.columnNames = new ArrayList<>(); + } + this.columnNames.add(columnNamesItem); + return this; + } + + /** + * Name of the columns. + * @return columnNames + */ + @javax.annotation.Nonnull + public List getColumnNames() { + return columnNames; + } + + public void setColumnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + } + + + public AnswerContent dataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + return this; + } + + public AnswerContent addDataRowsItem(Object dataRowsItem) { + if (this.dataRows == null) { + this.dataRows = new ArrayList<>(); + } + this.dataRows.add(dataRowsItem); + return this; + } + + /** + * Rows of data set. + * @return dataRows + */ + @javax.annotation.Nonnull + public List getDataRows() { + return dataRows; + } + + public void setDataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + } + + + public AnswerContent recordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nonnull + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public AnswerContent recordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nonnull + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + } + + + public AnswerContent returnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + return this; + } + + /** + * Total returned data row count. + * @return returnedDataRowCount + */ + @javax.annotation.Nonnull + public Integer getReturnedDataRowCount() { + return returnedDataRowCount; + } + + public void setReturnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + } + + + public AnswerContent samplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + * @return samplingRatio + */ + @javax.annotation.Nonnull + public Float getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnswerContent answerContent = (AnswerContent) o; + return Objects.equals(this.availableDataRowCount, answerContent.availableDataRowCount) && + Objects.equals(this.columnNames, answerContent.columnNames) && + Objects.equals(this.dataRows, answerContent.dataRows) && + Objects.equals(this.recordOffset, answerContent.recordOffset) && + Objects.equals(this.recordSize, answerContent.recordSize) && + Objects.equals(this.returnedDataRowCount, answerContent.returnedDataRowCount) && + Objects.equals(this.samplingRatio, answerContent.samplingRatio); + } + + @Override + public int hashCode() { + return Objects.hash(availableDataRowCount, columnNames, dataRows, recordOffset, recordSize, returnedDataRowCount, samplingRatio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnswerContent {\n"); + sb.append(" availableDataRowCount: ").append(toIndentedString(availableDataRowCount)).append("\n"); + sb.append(" columnNames: ").append(toIndentedString(columnNames)).append("\n"); + sb.append(" dataRows: ").append(toIndentedString(dataRows)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" returnedDataRowCount: ").append(toIndentedString(returnedDataRowCount)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("available_data_row_count"); + openapiFields.add("column_names"); + openapiFields.add("data_rows"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("returned_data_row_count"); + openapiFields.add("sampling_ratio"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("available_data_row_count"); + openapiRequiredFields.add("column_names"); + openapiRequiredFields.add("data_rows"); + openapiRequiredFields.add("record_offset"); + openapiRequiredFields.add("record_size"); + openapiRequiredFields.add("returned_data_row_count"); + openapiRequiredFields.add("sampling_ratio"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerContent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AnswerContent is not found in the empty JSON string", AnswerContent.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AnswerContent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AnswerContent` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AnswerContent.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AnswerContent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AnswerContent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnswerContent.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("column_names") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("column_names").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_names` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("column_names").toString())); - } - // ensure the required json array is present - if (jsonObj.get("data_rows") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("data_rows").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_rows` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("data_rows").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AnswerContent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AnswerContent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AnswerContent.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AnswerContent value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AnswerContent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AnswerContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of AnswerContent - * @throws IOException if the JSON string is invalid with respect to AnswerContent - */ - public static AnswerContent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AnswerContent.class); - } - - /** - * Convert an instance of AnswerContent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the required json array is present + if (jsonObj.get("column_names") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("column_names").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `column_names` to be an array in the JSON string but got `%s`", jsonObj.get("column_names").toString())); + } + // ensure the required json array is present + if (jsonObj.get("data_rows") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("data_rows").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data_rows` to be an array in the JSON string but got `%s`", jsonObj.get("data_rows").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnswerContent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnswerContent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AnswerContent.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AnswerContent value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AnswerContent read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AnswerContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnswerContent + * @throws IOException if the JSON string is invalid with respect to AnswerContent + */ + public static AnswerContent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnswerContent.class); + } + + /** + * Convert an instance of AnswerContent to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContextInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContextInput.java index 276f8a136..eff97cfc2 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContextInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContextInput.java @@ -4,235 +4,233 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** AnswerContextInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AnswerContextInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; - - @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) - @javax.annotation.Nonnull - private String sessionIdentifier; - - public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; - - @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) - @javax.annotation.Nonnull - private Integer generationNumber; - - public AnswerContextInput() {} - - public AnswerContextInput sessionIdentifier( - @javax.annotation.Nonnull String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - return this; - } - - /** - * Unique identifier of the answer session. - * - * @return sessionIdentifier - */ - @javax.annotation.Nonnull - public String getSessionIdentifier() { - return sessionIdentifier; - } - - public void setSessionIdentifier(@javax.annotation.Nonnull String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - } - - public AnswerContextInput generationNumber(@javax.annotation.Nonnull Integer generationNumber) { - this.generationNumber = generationNumber; - return this; - } - - /** - * Generation number of the answer. - * - * @return generationNumber - */ - @javax.annotation.Nonnull - public Integer getGenerationNumber() { - return generationNumber; - } - - public void setGenerationNumber(@javax.annotation.Nonnull Integer generationNumber) { - this.generationNumber = generationNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnswerContextInput answerContextInput = (AnswerContextInput) o; - return Objects.equals(this.sessionIdentifier, answerContextInput.sessionIdentifier) - && Objects.equals(this.generationNumber, answerContextInput.generationNumber); - } - - @Override - public int hashCode() { - return Objects.hash(sessionIdentifier, generationNumber); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnswerContextInput {\n"); - sb.append(" sessionIdentifier: ") - .append(toIndentedString(sessionIdentifier)) - .append("\n"); - sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * AnswerContextInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnswerContextInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nonnull + private String sessionIdentifier; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nonnull + private Integer generationNumber; + + public AnswerContextInput() { + } + + public AnswerContextInput sessionIdentifier(@javax.annotation.Nonnull String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique identifier of the answer session. + * @return sessionIdentifier + */ + @javax.annotation.Nonnull + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nonnull String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + + public AnswerContextInput generationNumber(@javax.annotation.Nonnull Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation number of the answer. + * @return generationNumber + */ + @javax.annotation.Nonnull + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nonnull Integer generationNumber) { + this.generationNumber = generationNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("session_identifier"); - openapiFields.add("generation_number"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("session_identifier"); - openapiRequiredFields.add("generation_number"); + AnswerContextInput answerContextInput = (AnswerContextInput) o; + return Objects.equals(this.sessionIdentifier, answerContextInput.sessionIdentifier) && + Objects.equals(this.generationNumber, answerContextInput.generationNumber); + } + + @Override + public int hashCode() { + return Objects.hash(sessionIdentifier, generationNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnswerContextInput {\n"); + sb.append(" sessionIdentifier: ").append(toIndentedString(sessionIdentifier)).append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AnswerContextInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AnswerContextInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AnswerContextInput is not found in" - + " the empty JSON string", - AnswerContextInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("session_identifier"); + openapiRequiredFields.add("generation_number"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerContextInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerContextInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AnswerContextInput is not found in the empty JSON string", AnswerContextInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AnswerContextInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AnswerContextInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AnswerContextInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AnswerContextInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AnswerContextInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnswerContextInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("session_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `session_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("session_identifier").toString())); - } - } + if (!jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `session_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("session_identifier").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AnswerContextInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AnswerContextInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AnswerContextInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AnswerContextInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AnswerContextInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AnswerContextInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of AnswerContextInput - * @throws IOException if the JSON string is invalid with respect to AnswerContextInput - */ - public static AnswerContextInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AnswerContextInput.class); - } - - /** - * Convert an instance of AnswerContextInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnswerContextInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnswerContextInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AnswerContextInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AnswerContextInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AnswerContextInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AnswerContextInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnswerContextInput + * @throws IOException if the JSON string is invalid with respect to AnswerContextInput + */ + public static AnswerContextInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnswerContextInput.class); + } + + /** + * Convert an instance of AnswerContextInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java index 61ead5dfb..ccb598375 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java @@ -4,294 +4,285 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AnswerContent; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Response format associated with fetch data api */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AnswerDataResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nonnull - private String metadataId; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nonnull - private String metadataName; - - public static final String SERIALIZED_NAME_CONTENTS = "contents"; - - @SerializedName(SERIALIZED_NAME_CONTENTS) - @javax.annotation.Nonnull - private List contents; - - public AnswerDataResponse() {} - - public AnswerDataResponse metadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - return this; - } - - /** - * The unique identifier of the object - * - * @return metadataId - */ - @javax.annotation.Nonnull - public String getMetadataId() { - return metadataId; - } - - public void setMetadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - } - - public AnswerDataResponse metadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - return this; - } - - /** - * Name of the metadata object - * - * @return metadataName - */ - @javax.annotation.Nonnull - public String getMetadataName() { - return metadataName; - } +import com.thoughtspot.client.JSON; - public void setMetadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; +/** + * Response format associated with fetch data api + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnswerDataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + @SerializedName(SERIALIZED_NAME_CONTENTS) + @javax.annotation.Nonnull + private List contents; + + public AnswerDataResponse() { + } + + public AnswerDataResponse metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * The unique identifier of the object + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + + public AnswerDataResponse metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + + public AnswerDataResponse contents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + return this; + } + + public AnswerDataResponse addContentsItem(AnswerContent contentsItem) { + if (this.contents == null) { + this.contents = new ArrayList<>(); } + this.contents.add(contentsItem); + return this; + } - public AnswerDataResponse contents(@javax.annotation.Nonnull List contents) { - this.contents = contents; - return this; - } + /** + * Data content of metadata objects + * @return contents + */ + @javax.annotation.Nonnull + public List getContents() { + return contents; + } - public AnswerDataResponse addContentsItem(AnswerContent contentsItem) { - if (this.contents == null) { - this.contents = new ArrayList<>(); - } - this.contents.add(contentsItem); - return this; - } + public void setContents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + } - /** - * Data content of metadata objects - * - * @return contents - */ - @javax.annotation.Nonnull - public List getContents() { - return contents; - } - public void setContents(@javax.annotation.Nonnull List contents) { - this.contents = contents; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnswerDataResponse answerDataResponse = (AnswerDataResponse) o; - return Objects.equals(this.metadataId, answerDataResponse.metadataId) - && Objects.equals(this.metadataName, answerDataResponse.metadataName) - && Objects.equals(this.contents, answerDataResponse.contents); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(metadataId, metadataName, contents); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnswerDataResponse {\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); - sb.append("}"); - return sb.toString(); + AnswerDataResponse answerDataResponse = (AnswerDataResponse) o; + return Objects.equals(this.metadataId, answerDataResponse.metadataId) && + Objects.equals(this.metadataName, answerDataResponse.metadataName) && + Objects.equals(this.contents, answerDataResponse.contents); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, contents); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnswerDataResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("contents"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("contents"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerDataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerDataResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AnswerDataResponse is not found in the empty JSON string", AnswerDataResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_id"); - openapiFields.add("metadata_name"); - openapiFields.add("contents"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_id"); - openapiRequiredFields.add("metadata_name"); - openapiRequiredFields.add("contents"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AnswerDataResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AnswerDataResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AnswerDataResponse is not found in" - + " the empty JSON string", - AnswerDataResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AnswerDataResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AnswerDataResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AnswerDataResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AnswerDataResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AnswerDataResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnswerDataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - if (!jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("contents").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contents` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("contents").toString())); - } - - JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); - // validate the required field `contents` (array) - for (int i = 0; i < jsonArraycontents.size(); i++) { - AnswerContent.validateJsonElement(jsonArraycontents.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AnswerDataResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AnswerDataResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AnswerDataResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AnswerDataResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AnswerDataResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AnswerDataResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of AnswerDataResponse - * @throws IOException if the JSON string is invalid with respect to AnswerDataResponse - */ - public static AnswerDataResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AnswerDataResponse.class); - } - - /** - * Convert an instance of AnswerDataResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("contents").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `contents` to be an array in the JSON string but got `%s`", jsonObj.get("contents").toString())); + } + + JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); + // validate the required field `contents` (array) + for (int i = 0; i < jsonArraycontents.size(); i++) { + AnswerContent.validateJsonElement(jsonArraycontents.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnswerDataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnswerDataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AnswerDataResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AnswerDataResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AnswerDataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AnswerDataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnswerDataResponse + * @throws IOException if the JSON string is invalid with respect to AnswerDataResponse + */ + public static AnswerDataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnswerDataResponse.class); + } + + /** + * Convert an instance of AnswerDataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java index 3d6e0a6a4..4d58220be 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java @@ -4,306 +4,284 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorMetadataTypeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** AssignChangeAuthorRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssignChangeAuthorRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nonnull - private String userIdentifier; - - public static final String SERIALIZED_NAME_CURRENT_OWNER_IDENTIFIER = - "current_owner_identifier"; - - @SerializedName(SERIALIZED_NAME_CURRENT_OWNER_IDENTIFIER) - @javax.annotation.Nullable - private String currentOwnerIdentifier; - - public AssignChangeAuthorRequest() {} - - public AssignChangeAuthorRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; - } - - public AssignChangeAuthorRequest addMetadataItem(AuthorMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * GUID or name of the metadata object. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } - - public AssignChangeAuthorRequest userIdentifier( - @javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * GUID or name of the user who you want to assign as the author. - * - * @return userIdentifier - */ - @javax.annotation.Nonnull - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - public AssignChangeAuthorRequest currentOwnerIdentifier( - @javax.annotation.Nullable String currentOwnerIdentifier) { - this.currentOwnerIdentifier = currentOwnerIdentifier; - return this; - } - - /** - * GUID or name of the current author. When defined, the metadata objects authored by the - * specified owner are filtered for the API operation. - * - * @return currentOwnerIdentifier - */ - @javax.annotation.Nullable - public String getCurrentOwnerIdentifier() { - return currentOwnerIdentifier; - } +import com.thoughtspot.client.JSON; - public void setCurrentOwnerIdentifier( - @javax.annotation.Nullable String currentOwnerIdentifier) { - this.currentOwnerIdentifier = currentOwnerIdentifier; +/** + * AssignChangeAuthorRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AssignChangeAuthorRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_CURRENT_OWNER_IDENTIFIER = "current_owner_identifier"; + @SerializedName(SERIALIZED_NAME_CURRENT_OWNER_IDENTIFIER) + @javax.annotation.Nullable + private String currentOwnerIdentifier; + + public AssignChangeAuthorRequest() { + } + + public AssignChangeAuthorRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public AssignChangeAuthorRequest addMetadataItem(AuthorMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AssignChangeAuthorRequest assignChangeAuthorRequest = (AssignChangeAuthorRequest) o; - return Objects.equals(this.metadata, assignChangeAuthorRequest.metadata) - && Objects.equals(this.userIdentifier, assignChangeAuthorRequest.userIdentifier) - && Objects.equals( - this.currentOwnerIdentifier, - assignChangeAuthorRequest.currentOwnerIdentifier); + this.metadata.add(metadataItem); + return this; + } + + /** + * GUID or name of the metadata object. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public AssignChangeAuthorRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID or name of the user who you want to assign as the author. + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + public AssignChangeAuthorRequest currentOwnerIdentifier(@javax.annotation.Nullable String currentOwnerIdentifier) { + this.currentOwnerIdentifier = currentOwnerIdentifier; + return this; + } + + /** + * GUID or name of the current author. When defined, the metadata objects authored by the specified owner are filtered for the API operation. + * @return currentOwnerIdentifier + */ + @javax.annotation.Nullable + public String getCurrentOwnerIdentifier() { + return currentOwnerIdentifier; + } + + public void setCurrentOwnerIdentifier(@javax.annotation.Nullable String currentOwnerIdentifier) { + this.currentOwnerIdentifier = currentOwnerIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(metadata, userIdentifier, currentOwnerIdentifier); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AssignChangeAuthorRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append(" currentOwnerIdentifier: ") - .append(toIndentedString(currentOwnerIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + AssignChangeAuthorRequest assignChangeAuthorRequest = (AssignChangeAuthorRequest) o; + return Objects.equals(this.metadata, assignChangeAuthorRequest.metadata) && + Objects.equals(this.userIdentifier, assignChangeAuthorRequest.userIdentifier) && + Objects.equals(this.currentOwnerIdentifier, assignChangeAuthorRequest.currentOwnerIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, userIdentifier, currentOwnerIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignChangeAuthorRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" currentOwnerIdentifier: ").append(toIndentedString(currentOwnerIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("user_identifier"); + openapiFields.add("current_owner_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("user_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssignChangeAuthorRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssignChangeAuthorRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AssignChangeAuthorRequest is not found in the empty JSON string", AssignChangeAuthorRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("user_identifier"); - openapiFields.add("current_owner_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("user_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssignChangeAuthorRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AssignChangeAuthorRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AssignChangeAuthorRequest is not" - + " found in the empty JSON string", - AssignChangeAuthorRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AssignChangeAuthorRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AssignChangeAuthorRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssignChangeAuthorRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssignChangeAuthorRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AssignChangeAuthorRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AssignChangeAuthorRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - AuthorMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - if (!jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - if ((jsonObj.get("current_owner_identifier") != null - && !jsonObj.get("current_owner_identifier").isJsonNull()) - && !jsonObj.get("current_owner_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `current_owner_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("current_owner_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssignChangeAuthorRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssignChangeAuthorRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AssignChangeAuthorRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssignChangeAuthorRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AssignChangeAuthorRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AssignChangeAuthorRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssignChangeAuthorRequest - * @throws IOException if the JSON string is invalid with respect to AssignChangeAuthorRequest - */ - public static AssignChangeAuthorRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssignChangeAuthorRequest.class); - } - - /** - * Convert an instance of AssignChangeAuthorRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + AuthorMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + if ((jsonObj.get("current_owner_identifier") != null && !jsonObj.get("current_owner_identifier").isJsonNull()) && !jsonObj.get("current_owner_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `current_owner_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("current_owner_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssignChangeAuthorRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssignChangeAuthorRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AssignChangeAuthorRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AssignChangeAuthorRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssignChangeAuthorRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AssignChangeAuthorRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssignChangeAuthorRequest + * @throws IOException if the JSON string is invalid with respect to AssignChangeAuthorRequest + */ + public static AssignChangeAuthorRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssignChangeAuthorRequest.class); + } + + /** + * Convert an instance of AssignChangeAuthorRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java index ee7494c37..ffd977bbb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java @@ -4,272 +4,265 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.TagMetadataTypeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** AssignTagRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssignTagRequest implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_METADATA = "metadata"; +/** + * AssignTagRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AssignTagRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; - public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nonnull + private List tagIdentifiers; - @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) - @javax.annotation.Nonnull - private List tagIdentifiers; + public AssignTagRequest() { + } - public AssignTagRequest() {} + public AssignTagRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } - public AssignTagRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; + public AssignTagRequest addMetadataItem(TagMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - public AssignTagRequest addMetadataItem(TagMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public AssignTagRequest tagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public AssignTagRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } - /** - * Metadata objects. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } + /** + * GUID or name of the tag. + * @return tagIdentifiers + */ + @javax.annotation.Nonnull + public List getTagIdentifiers() { + return tagIdentifiers; + } - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } + public void setTagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } - public AssignTagRequest tagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { - this.tagIdentifiers = tagIdentifiers; - return this; - } - public AssignTagRequest addTagIdentifiersItem(String tagIdentifiersItem) { - if (this.tagIdentifiers == null) { - this.tagIdentifiers = new ArrayList<>(); - } - this.tagIdentifiers.add(tagIdentifiersItem); - return this; - } - /** - * GUID or name of the tag. - * - * @return tagIdentifiers - */ - @javax.annotation.Nonnull - public List getTagIdentifiers() { - return tagIdentifiers; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setTagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { - this.tagIdentifiers = tagIdentifiers; + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AssignTagRequest assignTagRequest = (AssignTagRequest) o; - return Objects.equals(this.metadata, assignTagRequest.metadata) - && Objects.equals(this.tagIdentifiers, assignTagRequest.tagIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(metadata, tagIdentifiers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AssignTagRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("tag_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("tag_identifiers"); + AssignTagRequest assignTagRequest = (AssignTagRequest) o; + return Objects.equals(this.metadata, assignTagRequest.metadata) && + Objects.equals(this.tagIdentifiers, assignTagRequest.tagIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, tagIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignTagRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssignTagRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AssignTagRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AssignTagRequest is not found in the" - + " empty JSON string", - AssignTagRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("tag_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("tag_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssignTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssignTagRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AssignTagRequest is not found in the empty JSON string", AssignTagRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AssignTagRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AssignTagRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssignTagRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssignTagRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AssignTagRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AssignTagRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - TagMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - // ensure the required json array is present - if (jsonObj.get("tag_identifiers") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("tag_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tag_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("tag_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssignTagRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssignTagRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AssignTagRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssignTagRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AssignTagRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AssignTagRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssignTagRequest - * @throws IOException if the JSON string is invalid with respect to AssignTagRequest - */ - public static AssignTagRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssignTagRequest.class); - } - - /** - * Convert an instance of AssignTagRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + TagMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; + // ensure the required json array is present + if (jsonObj.get("tag_identifiers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tag_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("tag_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssignTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssignTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AssignTagRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AssignTagRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssignTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AssignTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssignTagRequest + * @throws IOException if the JSON string is invalid with respect to AssignTagRequest + */ + public static AssignTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssignTagRequest.class); + } + + /** + * Convert an instance of AssignTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java index 5c1f3ad19..865037f71 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java @@ -4,342 +4,329 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionConfigInput; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** AssociateMetadataInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssociateMetadataInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; - - @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) - @javax.annotation.Nullable - private ActionConfigInput actionConfig; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - VISUALIZATION("VISUALIZATION"), - - ANSWER("ANSWER"), - - WORKSHEET("WORKSHEET"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - public AssociateMetadataInput() {} - - public AssociateMetadataInput actionConfig( - @javax.annotation.Nullable ActionConfigInput actionConfig) { - this.actionConfig = actionConfig; - return this; - } - - /** - * Get actionConfig - * - * @return actionConfig - */ - @javax.annotation.Nullable - public ActionConfigInput getActionConfig() { - return actionConfig; - } - - public void setActionConfig(@javax.annotation.Nullable ActionConfigInput actionConfig) { - this.actionConfig = actionConfig; - } - - public AssociateMetadataInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } +import com.thoughtspot.client.JSON; - public AssociateMetadataInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; +/** + * AssociateMetadataInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AssociateMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; + @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) + @javax.annotation.Nullable + private ActionConfigInput actionConfig; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + VISUALIZATION("VISUALIZATION"), + + ANSWER("ANSWER"), + + WORKSHEET("WORKSHEET"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - AssociateMetadataInput associateMetadataInput = (AssociateMetadataInput) o; - return Objects.equals(this.actionConfig, associateMetadataInput.actionConfig) - && Objects.equals(this.identifier, associateMetadataInput.identifier) - && Objects.equals(this.type, associateMetadataInput.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(actionConfig, identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public AssociateMetadataInput() { + } + + public AssociateMetadataInput actionConfig(@javax.annotation.Nullable ActionConfigInput actionConfig) { + this.actionConfig = actionConfig; + return this; + } + + /** + * Get actionConfig + * @return actionConfig + */ + @javax.annotation.Nullable + public ActionConfigInput getActionConfig() { + return actionConfig; + } + + public void setActionConfig(@javax.annotation.Nullable ActionConfigInput actionConfig) { + this.actionConfig = actionConfig; + } + + + public AssociateMetadataInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public AssociateMetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AssociateMetadataInput {\n"); - sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + AssociateMetadataInput associateMetadataInput = (AssociateMetadataInput) o; + return Objects.equals(this.actionConfig, associateMetadataInput.actionConfig) && + Objects.equals(this.identifier, associateMetadataInput.identifier) && + Objects.equals(this.type, associateMetadataInput.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(actionConfig, identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("action_config"); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociateMetadataInput {\n"); + sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AssociateMetadataInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AssociateMetadataInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AssociateMetadataInput is not found" - + " in the empty JSON string", - AssociateMetadataInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_config"); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssociateMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssociateMetadataInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AssociateMetadataInput is not found in the empty JSON string", AssociateMetadataInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AssociateMetadataInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AssociateMetadataInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssociateMetadataInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssociateMetadataInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `action_config` - if (jsonObj.get("action_config") != null && !jsonObj.get("action_config").isJsonNull()) { - ActionConfigInput.validateJsonElement(jsonObj.get("action_config")); - } - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssociateMetadataInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssociateMetadataInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AssociateMetadataInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssociateMetadataInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AssociateMetadataInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AssociateMetadataInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssociateMetadataInput - * @throws IOException if the JSON string is invalid with respect to AssociateMetadataInput - */ - public static AssociateMetadataInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssociateMetadataInput.class); - } - - /** - * Convert an instance of AssociateMetadataInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `action_config` + if (jsonObj.get("action_config") != null && !jsonObj.get("action_config").isJsonNull()) { + ActionConfigInput.validateJsonElement(jsonObj.get("action_config")); + } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssociateMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssociateMetadataInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AssociateMetadataInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AssociateMetadataInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssociateMetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AssociateMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociateMetadataInput + * @throws IOException if the JSON string is invalid with respect to AssociateMetadataInput + */ + public static AssociateMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssociateMetadataInput.class); + } + + /** + * Convert an instance of AssociateMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java index a2d6ca76d..e6a1be036 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java @@ -4,357 +4,337 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionConfigInputCreate; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** AssociateMetadataInputCreate */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AssociateMetadataInputCreate implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; - - @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) - @javax.annotation.Nullable - private ActionConfigInputCreate actionConfig; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - VISUALIZATION("VISUALIZATION"), - - ANSWER("ANSWER"), - - WORKSHEET("WORKSHEET"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - public AssociateMetadataInputCreate() {} - - public AssociateMetadataInputCreate actionConfig( - @javax.annotation.Nullable ActionConfigInputCreate actionConfig) { - this.actionConfig = actionConfig; - return this; - } - - /** - * Get actionConfig - * - * @return actionConfig - */ - @javax.annotation.Nullable - public ActionConfigInputCreate getActionConfig() { - return actionConfig; - } - - public void setActionConfig(@javax.annotation.Nullable ActionConfigInputCreate actionConfig) { - this.actionConfig = actionConfig; - } - - public AssociateMetadataInputCreate identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } +import com.thoughtspot.client.JSON; - public AssociateMetadataInputCreate type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; +/** + * AssociateMetadataInputCreate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AssociateMetadataInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; + @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) + @javax.annotation.Nullable + private ActionConfigInputCreate actionConfig; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + VISUALIZATION("VISUALIZATION"), + + ANSWER("ANSWER"), + + WORKSHEET("WORKSHEET"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - AssociateMetadataInputCreate associateMetadataInputCreate = - (AssociateMetadataInputCreate) o; - return Objects.equals(this.actionConfig, associateMetadataInputCreate.actionConfig) - && Objects.equals(this.identifier, associateMetadataInputCreate.identifier) - && Objects.equals(this.type, associateMetadataInputCreate.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(actionConfig, identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public AssociateMetadataInputCreate() { + } + + public AssociateMetadataInputCreate actionConfig(@javax.annotation.Nullable ActionConfigInputCreate actionConfig) { + this.actionConfig = actionConfig; + return this; + } + + /** + * Get actionConfig + * @return actionConfig + */ + @javax.annotation.Nullable + public ActionConfigInputCreate getActionConfig() { + return actionConfig; + } + + public void setActionConfig(@javax.annotation.Nullable ActionConfigInputCreate actionConfig) { + this.actionConfig = actionConfig; + } + + + public AssociateMetadataInputCreate identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public AssociateMetadataInputCreate type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AssociateMetadataInputCreate {\n"); - sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + AssociateMetadataInputCreate associateMetadataInputCreate = (AssociateMetadataInputCreate) o; + return Objects.equals(this.actionConfig, associateMetadataInputCreate.actionConfig) && + Objects.equals(this.identifier, associateMetadataInputCreate.identifier) && + Objects.equals(this.type, associateMetadataInputCreate.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(actionConfig, identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("action_config"); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociateMetadataInputCreate {\n"); + sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * AssociateMetadataInputCreate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AssociateMetadataInputCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AssociateMetadataInputCreate is not" - + " found in the empty JSON string", - AssociateMetadataInputCreate.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_config"); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssociateMetadataInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssociateMetadataInputCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AssociateMetadataInputCreate is not found in the empty JSON string", AssociateMetadataInputCreate.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AssociateMetadataInputCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AssociateMetadataInputCreate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssociateMetadataInputCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssociateMetadataInputCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AssociateMetadataInputCreate.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AssociateMetadataInputCreate.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `action_config` - if (jsonObj.get("action_config") != null && !jsonObj.get("action_config").isJsonNull()) { - ActionConfigInputCreate.validateJsonElement(jsonObj.get("action_config")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AssociateMetadataInputCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AssociateMetadataInputCreate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(AssociateMetadataInputCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AssociateMetadataInputCreate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AssociateMetadataInputCreate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AssociateMetadataInputCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssociateMetadataInputCreate - * @throws IOException if the JSON string is invalid with respect to - * AssociateMetadataInputCreate - */ - public static AssociateMetadataInputCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AssociateMetadataInputCreate.class); - } - - /** - * Convert an instance of AssociateMetadataInputCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `action_config` + if (jsonObj.get("action_config") != null && !jsonObj.get("action_config").isJsonNull()) { + ActionConfigInputCreate.validateJsonElement(jsonObj.get("action_config")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssociateMetadataInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssociateMetadataInputCreate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AssociateMetadataInputCreate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AssociateMetadataInputCreate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssociateMetadataInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AssociateMetadataInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociateMetadataInputCreate + * @throws IOException if the JSON string is invalid with respect to AssociateMetadataInputCreate + */ + public static AssociateMetadataInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssociateMetadataInputCreate.class); + } + + /** + * Convert an instance of AssociateMetadataInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java index 7d729da77..33d542fa7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java @@ -4,310 +4,303 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.APIKey; +import com.thoughtspot.client.model.BasicAuth; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Authorization type for the custom action. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Authentication implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AP_I_KEY = "API_Key"; - - @SerializedName(SERIALIZED_NAME_AP_I_KEY) - @javax.annotation.Nullable - private APIKey apIKey; - - public static final String SERIALIZED_NAME_BASIC_AUTH = "Basic_Auth"; - - @SerializedName(SERIALIZED_NAME_BASIC_AUTH) - @javax.annotation.Nullable - private BasicAuth basicAuth; - - public static final String SERIALIZED_NAME_BEARER_TOKEN = "Bearer_Token"; - - @SerializedName(SERIALIZED_NAME_BEARER_TOKEN) - @javax.annotation.Nullable - private String bearerToken; - - public static final String SERIALIZED_NAME_NO_AUTH = "No_Auth"; - - @SerializedName(SERIALIZED_NAME_NO_AUTH) - @javax.annotation.Nullable - private String noAuth; - - public Authentication() {} - - public Authentication apIKey(@javax.annotation.Nullable APIKey apIKey) { - this.apIKey = apIKey; - return this; - } - - /** - * Get apIKey - * - * @return apIKey - */ - @javax.annotation.Nullable - public APIKey getApIKey() { - return apIKey; - } - - public void setApIKey(@javax.annotation.Nullable APIKey apIKey) { - this.apIKey = apIKey; - } - - public Authentication basicAuth(@javax.annotation.Nullable BasicAuth basicAuth) { - this.basicAuth = basicAuth; - return this; - } - - /** - * Get basicAuth - * - * @return basicAuth - */ - @javax.annotation.Nullable - public BasicAuth getBasicAuth() { - return basicAuth; - } - - public void setBasicAuth(@javax.annotation.Nullable BasicAuth basicAuth) { - this.basicAuth = basicAuth; - } - - public Authentication bearerToken(@javax.annotation.Nullable String bearerToken) { - this.bearerToken = bearerToken; - return this; - } - /** - * Bearer tokens enable requests to authenticate using an access key. - * - * @return bearerToken - */ - @javax.annotation.Nullable - public String getBearerToken() { - return bearerToken; - } - - public void setBearerToken(@javax.annotation.Nullable String bearerToken) { - this.bearerToken = bearerToken; - } - - public Authentication noAuth(@javax.annotation.Nullable String noAuth) { - this.noAuth = noAuth; - return this; - } - - /** - * No authorization. If your request doesn't require authorization. - * - * @return noAuth - */ - @javax.annotation.Nullable - public String getNoAuth() { - return noAuth; - } - - public void setNoAuth(@javax.annotation.Nullable String noAuth) { - this.noAuth = noAuth; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Authentication authentication = (Authentication) o; - return Objects.equals(this.apIKey, authentication.apIKey) - && Objects.equals(this.basicAuth, authentication.basicAuth) - && Objects.equals(this.bearerToken, authentication.bearerToken) - && Objects.equals(this.noAuth, authentication.noAuth); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(apIKey, basicAuth, bearerToken, noAuth); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * Authorization type for the custom action. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Authentication implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AP_I_KEY = "API_Key"; + @SerializedName(SERIALIZED_NAME_AP_I_KEY) + @javax.annotation.Nullable + private APIKey apIKey; + + public static final String SERIALIZED_NAME_BASIC_AUTH = "Basic_Auth"; + @SerializedName(SERIALIZED_NAME_BASIC_AUTH) + @javax.annotation.Nullable + private BasicAuth basicAuth; + + public static final String SERIALIZED_NAME_BEARER_TOKEN = "Bearer_Token"; + @SerializedName(SERIALIZED_NAME_BEARER_TOKEN) + @javax.annotation.Nullable + private String bearerToken; + + public static final String SERIALIZED_NAME_NO_AUTH = "No_Auth"; + @SerializedName(SERIALIZED_NAME_NO_AUTH) + @javax.annotation.Nullable + private String noAuth; + + public Authentication() { + } + + public Authentication apIKey(@javax.annotation.Nullable APIKey apIKey) { + this.apIKey = apIKey; + return this; + } + + /** + * Get apIKey + * @return apIKey + */ + @javax.annotation.Nullable + public APIKey getApIKey() { + return apIKey; + } + + public void setApIKey(@javax.annotation.Nullable APIKey apIKey) { + this.apIKey = apIKey; + } + + + public Authentication basicAuth(@javax.annotation.Nullable BasicAuth basicAuth) { + this.basicAuth = basicAuth; + return this; + } + + /** + * Get basicAuth + * @return basicAuth + */ + @javax.annotation.Nullable + public BasicAuth getBasicAuth() { + return basicAuth; + } + + public void setBasicAuth(@javax.annotation.Nullable BasicAuth basicAuth) { + this.basicAuth = basicAuth; + } + + + public Authentication bearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + return this; + } + + /** + * Bearer tokens enable requests to authenticate using an access key. + * @return bearerToken + */ + @javax.annotation.Nullable + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + } + + + public Authentication noAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + return this; + } + + /** + * No authorization. If your request doesn't require authorization. + * @return noAuth + */ + @javax.annotation.Nullable + public String getNoAuth() { + return noAuth; + } + + public void setNoAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Authentication {\n"); - sb.append(" apIKey: ").append(toIndentedString(apIKey)).append("\n"); - sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); - sb.append(" bearerToken: ").append(toIndentedString(bearerToken)).append("\n"); - sb.append(" noAuth: ").append(toIndentedString(noAuth)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + Authentication authentication = (Authentication) o; + return Objects.equals(this.apIKey, authentication.apIKey) && + Objects.equals(this.basicAuth, authentication.basicAuth) && + Objects.equals(this.bearerToken, authentication.bearerToken) && + Objects.equals(this.noAuth, authentication.noAuth); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(apIKey, basicAuth, bearerToken, noAuth); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("API_Key"); - openapiFields.add("Basic_Auth"); - openapiFields.add("Bearer_Token"); - openapiFields.add("No_Auth"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Authentication {\n"); + sb.append(" apIKey: ").append(toIndentedString(apIKey)).append("\n"); + sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); + sb.append(" bearerToken: ").append(toIndentedString(bearerToken)).append("\n"); + sb.append(" noAuth: ").append(toIndentedString(noAuth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Authentication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Authentication.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Authentication is not found in the" - + " empty JSON string", - Authentication.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("API_Key"); + openapiFields.add("Basic_Auth"); + openapiFields.add("Bearer_Token"); + openapiFields.add("No_Auth"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Authentication + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Authentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Authentication is not found in the empty JSON string", Authentication.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Authentication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Authentication` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Authentication.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Authentication` 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()) { - APIKey.validateJsonElement(jsonObj.get("API_Key")); - } - // validate the optional field `Basic_Auth` - if (jsonObj.get("Basic_Auth") != null && !jsonObj.get("Basic_Auth").isJsonNull()) { - BasicAuth.validateJsonElement(jsonObj.get("Basic_Auth")); - } - if ((jsonObj.get("Bearer_Token") != null && !jsonObj.get("Bearer_Token").isJsonNull()) - && !jsonObj.get("Bearer_Token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Bearer_Token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Bearer_Token").toString())); - } - if ((jsonObj.get("No_Auth") != null && !jsonObj.get("No_Auth").isJsonNull()) - && !jsonObj.get("No_Auth").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `No_Auth` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("No_Auth").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Authentication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Authentication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Authentication.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Authentication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Authentication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Authentication given an JSON string - * - * @param jsonString JSON string - * @return An instance of Authentication - * @throws IOException if the JSON string is invalid with respect to Authentication - */ - public static Authentication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Authentication.class); - } - - /** - * Convert an instance of Authentication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `API_Key` + if (jsonObj.get("API_Key") != null && !jsonObj.get("API_Key").isJsonNull()) { + APIKey.validateJsonElement(jsonObj.get("API_Key")); + } + // validate the optional field `Basic_Auth` + if (jsonObj.get("Basic_Auth") != null && !jsonObj.get("Basic_Auth").isJsonNull()) { + BasicAuth.validateJsonElement(jsonObj.get("Basic_Auth")); + } + if ((jsonObj.get("Bearer_Token") != null && !jsonObj.get("Bearer_Token").isJsonNull()) && !jsonObj.get("Bearer_Token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `Bearer_Token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Bearer_Token").toString())); + } + if ((jsonObj.get("No_Auth") != null && !jsonObj.get("No_Auth").isJsonNull()) && !jsonObj.get("No_Auth").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `No_Auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("No_Auth").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Authentication.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Authentication' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Authentication.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Authentication value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Authentication read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Authentication given an JSON string + * + * @param jsonString JSON string + * @return An instance of Authentication + * @throws IOException if the JSON string is invalid with respect to Authentication + */ + public static Authentication fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Authentication.class); + } + + /** + * Convert an instance of Authentication to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java index 29d37ac24..1101f200c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java @@ -4,311 +4,303 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.APIKeyInput; +import com.thoughtspot.client.model.BasicAuthInput; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Authorization type for the custom action. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AuthenticationInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AP_I_KEY = "API_Key"; - - @SerializedName(SERIALIZED_NAME_AP_I_KEY) - @javax.annotation.Nullable - private APIKeyInput apIKey; - - public static final String SERIALIZED_NAME_BASIC_AUTH = "Basic_Auth"; - - @SerializedName(SERIALIZED_NAME_BASIC_AUTH) - @javax.annotation.Nullable - private BasicAuthInput basicAuth; - - public static final String SERIALIZED_NAME_BEARER_TOKEN = "Bearer_Token"; - - @SerializedName(SERIALIZED_NAME_BEARER_TOKEN) - @javax.annotation.Nullable - private String bearerToken; - - public static final String SERIALIZED_NAME_NO_AUTH = "No_Auth"; - - @SerializedName(SERIALIZED_NAME_NO_AUTH) - @javax.annotation.Nullable - private String noAuth; - - public AuthenticationInput() {} - - public AuthenticationInput apIKey(@javax.annotation.Nullable APIKeyInput apIKey) { - this.apIKey = apIKey; - return this; - } - - /** - * Get apIKey - * - * @return apIKey - */ - @javax.annotation.Nullable - public APIKeyInput getApIKey() { - return apIKey; - } - - public void setApIKey(@javax.annotation.Nullable APIKeyInput apIKey) { - this.apIKey = apIKey; - } - - public AuthenticationInput basicAuth(@javax.annotation.Nullable BasicAuthInput basicAuth) { - this.basicAuth = basicAuth; - return this; - } - - /** - * Get basicAuth - * - * @return basicAuth - */ - @javax.annotation.Nullable - public BasicAuthInput getBasicAuth() { - return basicAuth; - } - - public void setBasicAuth(@javax.annotation.Nullable BasicAuthInput basicAuth) { - this.basicAuth = basicAuth; - } - - public AuthenticationInput bearerToken(@javax.annotation.Nullable String bearerToken) { - this.bearerToken = bearerToken; - return this; - } - /** - * Bearer tokens enable requests to authenticate using an access key. - * - * @return bearerToken - */ - @javax.annotation.Nullable - public String getBearerToken() { - return bearerToken; - } - - public void setBearerToken(@javax.annotation.Nullable String bearerToken) { - this.bearerToken = bearerToken; - } - - public AuthenticationInput noAuth(@javax.annotation.Nullable String noAuth) { - this.noAuth = noAuth; - return this; - } - - /** - * No authorization. If your request doesn't require authorization. - * - * @return noAuth - */ - @javax.annotation.Nullable - public String getNoAuth() { - return noAuth; - } - - public void setNoAuth(@javax.annotation.Nullable String noAuth) { - this.noAuth = noAuth; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthenticationInput authenticationInput = (AuthenticationInput) o; - return Objects.equals(this.apIKey, authenticationInput.apIKey) - && Objects.equals(this.basicAuth, authenticationInput.basicAuth) - && Objects.equals(this.bearerToken, authenticationInput.bearerToken) - && Objects.equals(this.noAuth, authenticationInput.noAuth); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(apIKey, basicAuth, bearerToken, noAuth); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * Authorization type for the custom action. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AuthenticationInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AP_I_KEY = "API_Key"; + @SerializedName(SERIALIZED_NAME_AP_I_KEY) + @javax.annotation.Nullable + private APIKeyInput apIKey; + + public static final String SERIALIZED_NAME_BASIC_AUTH = "Basic_Auth"; + @SerializedName(SERIALIZED_NAME_BASIC_AUTH) + @javax.annotation.Nullable + private BasicAuthInput basicAuth; + + public static final String SERIALIZED_NAME_BEARER_TOKEN = "Bearer_Token"; + @SerializedName(SERIALIZED_NAME_BEARER_TOKEN) + @javax.annotation.Nullable + private String bearerToken; + + public static final String SERIALIZED_NAME_NO_AUTH = "No_Auth"; + @SerializedName(SERIALIZED_NAME_NO_AUTH) + @javax.annotation.Nullable + private String noAuth; + + public AuthenticationInput() { + } + + public AuthenticationInput apIKey(@javax.annotation.Nullable APIKeyInput apIKey) { + this.apIKey = apIKey; + return this; + } + + /** + * Get apIKey + * @return apIKey + */ + @javax.annotation.Nullable + public APIKeyInput getApIKey() { + return apIKey; + } + + public void setApIKey(@javax.annotation.Nullable APIKeyInput apIKey) { + this.apIKey = apIKey; + } + + + public AuthenticationInput basicAuth(@javax.annotation.Nullable BasicAuthInput basicAuth) { + this.basicAuth = basicAuth; + return this; + } + + /** + * Get basicAuth + * @return basicAuth + */ + @javax.annotation.Nullable + public BasicAuthInput getBasicAuth() { + return basicAuth; + } + + public void setBasicAuth(@javax.annotation.Nullable BasicAuthInput basicAuth) { + this.basicAuth = basicAuth; + } + + + public AuthenticationInput bearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + return this; + } + + /** + * Bearer tokens enable requests to authenticate using an access key. + * @return bearerToken + */ + @javax.annotation.Nullable + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + } + + + public AuthenticationInput noAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + return this; + } + + /** + * No authorization. If your request doesn't require authorization. + * @return noAuth + */ + @javax.annotation.Nullable + public String getNoAuth() { + return noAuth; + } + + public void setNoAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthenticationInput {\n"); - sb.append(" apIKey: ").append(toIndentedString(apIKey)).append("\n"); - sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); - sb.append(" bearerToken: ").append(toIndentedString(bearerToken)).append("\n"); - sb.append(" noAuth: ").append(toIndentedString(noAuth)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + AuthenticationInput authenticationInput = (AuthenticationInput) o; + return Objects.equals(this.apIKey, authenticationInput.apIKey) && + Objects.equals(this.basicAuth, authenticationInput.basicAuth) && + Objects.equals(this.bearerToken, authenticationInput.bearerToken) && + Objects.equals(this.noAuth, authenticationInput.noAuth); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(apIKey, basicAuth, bearerToken, noAuth); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("API_Key"); - openapiFields.add("Basic_Auth"); - openapiFields.add("Bearer_Token"); - openapiFields.add("No_Auth"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthenticationInput {\n"); + sb.append(" apIKey: ").append(toIndentedString(apIKey)).append("\n"); + sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); + sb.append(" bearerToken: ").append(toIndentedString(bearerToken)).append("\n"); + sb.append(" noAuth: ").append(toIndentedString(noAuth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthenticationInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthenticationInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AuthenticationInput is not found in" - + " the empty JSON string", - AuthenticationInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("API_Key"); + openapiFields.add("Basic_Auth"); + openapiFields.add("Bearer_Token"); + openapiFields.add("No_Auth"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthenticationInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthenticationInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthenticationInput is not found in the empty JSON string", AuthenticationInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthenticationInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AuthenticationInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AuthenticationInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthenticationInput` 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()) { - APIKeyInput.validateJsonElement(jsonObj.get("API_Key")); - } - // validate the optional field `Basic_Auth` - if (jsonObj.get("Basic_Auth") != null && !jsonObj.get("Basic_Auth").isJsonNull()) { - BasicAuthInput.validateJsonElement(jsonObj.get("Basic_Auth")); - } - if ((jsonObj.get("Bearer_Token") != null && !jsonObj.get("Bearer_Token").isJsonNull()) - && !jsonObj.get("Bearer_Token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `Bearer_Token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("Bearer_Token").toString())); - } - if ((jsonObj.get("No_Auth") != null && !jsonObj.get("No_Auth").isJsonNull()) - && !jsonObj.get("No_Auth").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `No_Auth` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("No_Auth").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthenticationInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthenticationInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AuthenticationInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthenticationInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthenticationInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AuthenticationInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthenticationInput - * @throws IOException if the JSON string is invalid with respect to AuthenticationInput - */ - public static AuthenticationInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthenticationInput.class); - } - - /** - * Convert an instance of AuthenticationInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `API_Key` + if (jsonObj.get("API_Key") != null && !jsonObj.get("API_Key").isJsonNull()) { + APIKeyInput.validateJsonElement(jsonObj.get("API_Key")); + } + // validate the optional field `Basic_Auth` + if (jsonObj.get("Basic_Auth") != null && !jsonObj.get("Basic_Auth").isJsonNull()) { + BasicAuthInput.validateJsonElement(jsonObj.get("Basic_Auth")); + } + if ((jsonObj.get("Bearer_Token") != null && !jsonObj.get("Bearer_Token").isJsonNull()) && !jsonObj.get("Bearer_Token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `Bearer_Token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Bearer_Token").toString())); + } + if ((jsonObj.get("No_Auth") != null && !jsonObj.get("No_Auth").isJsonNull()) && !jsonObj.get("No_Auth").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `No_Auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("No_Auth").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthenticationInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthenticationInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthenticationInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthenticationInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthenticationInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AuthenticationInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthenticationInput + * @throws IOException if the JSON string is invalid with respect to AuthenticationInput + */ + public static AuthenticationInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthenticationInput.class); + } + + /** + * Convert an instance of AuthenticationInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java index 5317649bb..bb467ee71 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java @@ -4,237 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Author of the schedule. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Author implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public Author() {} - - public Author id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the object. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public Author name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the object. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Author author = (Author) o; - return Objects.equals(this.id, author.id) && Objects.equals(this.name, author.name); +/** + * Author of the schedule. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Author implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public Author() { + } + + public Author id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Author name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the object. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(id, name); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Author {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); + Author author = (Author) o; + return Objects.equals(this.id, author.id) && + Objects.equals(this.name, author.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Author {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Author + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Author.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Author is not found in the empty JSON string", Author.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Author - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Author.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Author is not found in the empty JSON" - + " string", - Author.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Author.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Author`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Author.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Author` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Author.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Author.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Author.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Author' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Author.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Author value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Author read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Author given an JSON string - * - * @param jsonString JSON string - * @return An instance of Author - * @throws IOException if the JSON string is invalid with respect to Author - */ - public static Author fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Author.class); - } - - /** - * Convert an instance of Author to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Author.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Author' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Author.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Author value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Author read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Author given an JSON string + * + * @param jsonString JSON string + * @return An instance of Author + * @throws IOException if the JSON string is invalid with respect to Author + */ + public static Author fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Author.class); + } + + /** + * Convert an instance of Author to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java index 40875bd99..aed3b3e54 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java @@ -4,322 +4,307 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataType InputType used in Author API's */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AuthorMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - CONNECTION("CONNECTION"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public AuthorMetadataTypeInput() {} - - public AuthorMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public AuthorMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; +/** + * MetadataType InputType used in Author API's + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AuthorMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Unique ID or name of the metadata object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - AuthorMetadataTypeInput authorMetadataTypeInput = (AuthorMetadataTypeInput) o; - return Objects.equals(this.type, authorMetadataTypeInput.type) - && Objects.equals(this.identifier, authorMetadataTypeInput.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public AuthorMetadataTypeInput() { + } + + public AuthorMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public AuthorMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + AuthorMetadataTypeInput authorMetadataTypeInput = (AuthorMetadataTypeInput) o; + return Objects.equals(this.type, authorMetadataTypeInput.type) && + Objects.equals(this.identifier, authorMetadataTypeInput.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AuthorMetadataTypeInput is not found" - + " in the empty JSON string", - AuthorMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthorMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthorMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorMetadataTypeInput is not found in the empty JSON string", AuthorMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AuthorMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AuthorMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorMetadataTypeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthorMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorMetadataTypeInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AuthorMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorMetadataTypeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to AuthorMetadataTypeInput - */ - public static AuthorMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorMetadataTypeInput.class); - } - - /** - * Convert an instance of AuthorMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthorMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthorMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthorMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthorMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthorMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of AuthorMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthorMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to AuthorMetadataTypeInput + */ + public static AuthorMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthorMetadataTypeInput.class); + } + + /** + * Convert an instance of AuthorMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java index 85504876f..97dcaad50 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java @@ -4,246 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** AuthorType */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class AuthorType implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public AuthorType() {} - - public AuthorType email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email id of the committer - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public AuthorType username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username of the committer - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorType authorType = (AuthorType) o; - return Objects.equals(this.email, authorType.email) - && Objects.equals(this.username, authorType.username); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(email, username); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorType {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("email"); - openapiFields.add("username"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorType - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in AuthorType is not found in the empty" - + " JSON string", - AuthorType.openapiRequiredFields.toString())); - } +/** + * AuthorType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AuthorType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public AuthorType() { + } + + public AuthorType email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email id of the committer + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public AuthorType username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username of the committer + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorType authorType = (AuthorType) o; + return Objects.equals(this.email, authorType.email) && + Objects.equals(this.username, authorType.username); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(email, username); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorType {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthorType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthorType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorType is not found in the empty JSON string", AuthorType.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `AuthorType` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AuthorType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(AuthorType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorType read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorType given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorType - * @throws IOException if the JSON string is invalid with respect to AuthorType - */ - public static AuthorType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorType.class); - } - - /** - * Convert an instance of AuthorType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthorType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthorType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthorType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthorType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthorType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthorType given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthorType + * @throws IOException if the JSON string is invalid with respect to AuthorType + */ + public static AuthorType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthorType.class); + } + + /** + * Convert an instance of AuthorType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java index 4feabcf6a..56fa8e649 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java @@ -4,249 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Basic Auth: Basic authentication involves sending a verified username and password with your - * request. + * Basic Auth: Basic authentication involves sending a verified username and password with your request. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class BasicAuth implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public BasicAuth() {} - - public BasicAuth password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password for the basic authentication - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public BasicAuth username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username for the basic authentication - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public BasicAuth() { + } + + public BasicAuth password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password for the basic authentication + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public BasicAuth username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username for the basic authentication + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicAuth basicAuth = (BasicAuth) o; + return Objects.equals(this.password, basicAuth.password) && + Objects.equals(this.username, basicAuth.username); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(password, username); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BasicAuth {\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("password"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BasicAuth + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BasicAuth.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BasicAuth is not found in the empty JSON string", BasicAuth.openapiRequiredFields.toString())); } - if (o == null || getClass() != o.getClass()) { - return false; - } - BasicAuth basicAuth = (BasicAuth) o; - return Objects.equals(this.password, basicAuth.password) - && Objects.equals(this.username, basicAuth.username); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(password, username); - } + } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BasicAuth {\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("password"); - openapiFields.add("username"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BasicAuth - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BasicAuth.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BasicAuth is not found in the empty" - + " JSON string", - BasicAuth.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BasicAuth.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BasicAuth` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BasicAuth.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BasicAuth` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BasicAuth.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BasicAuth' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BasicAuth.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BasicAuth value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BasicAuth read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BasicAuth given an JSON string - * - * @param jsonString JSON string - * @return An instance of BasicAuth - * @throws IOException if the JSON string is invalid with respect to BasicAuth - */ - public static BasicAuth fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BasicAuth.class); - } - - /** - * Convert an instance of BasicAuth to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BasicAuth.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BasicAuth' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BasicAuth.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BasicAuth value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BasicAuth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BasicAuth given an JSON string + * + * @param jsonString JSON string + * @return An instance of BasicAuth + * @throws IOException if the JSON string is invalid with respect to BasicAuth + */ + public static BasicAuth fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BasicAuth.class); + } + + /** + * Convert an instance of BasicAuth to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java index d25bc3105..d42bda391 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java @@ -4,249 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Basic Auth: Basic authentication involves sending a verified username and password with your - * request. + * Basic Auth: Basic authentication involves sending a verified username and password with your request. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class BasicAuthInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public BasicAuthInput() {} - - public BasicAuthInput password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password for the basic authentication - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public BasicAuthInput username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username for the basic authentication - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public BasicAuthInput() { + } + + public BasicAuthInput password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password for the basic authentication + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public BasicAuthInput username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username for the basic authentication + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicAuthInput basicAuthInput = (BasicAuthInput) o; + return Objects.equals(this.password, basicAuthInput.password) && + Objects.equals(this.username, basicAuthInput.username); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(password, username); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BasicAuthInput {\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("password"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BasicAuthInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BasicAuthInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BasicAuthInput is not found in the empty JSON string", BasicAuthInput.openapiRequiredFields.toString())); } - if (o == null || getClass() != o.getClass()) { - return false; - } - BasicAuthInput basicAuthInput = (BasicAuthInput) o; - return Objects.equals(this.password, basicAuthInput.password) - && Objects.equals(this.username, basicAuthInput.username); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(password, username); - } + } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BasicAuthInput {\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("password"); - openapiFields.add("username"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BasicAuthInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BasicAuthInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in BasicAuthInput is not found in the" - + " empty JSON string", - BasicAuthInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BasicAuthInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `BasicAuthInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BasicAuthInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BasicAuthInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BasicAuthInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BasicAuthInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(BasicAuthInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, BasicAuthInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BasicAuthInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of BasicAuthInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of BasicAuthInput - * @throws IOException if the JSON string is invalid with respect to BasicAuthInput - */ - public static BasicAuthInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BasicAuthInput.class); - } - - /** - * Convert an instance of BasicAuthInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BasicAuthInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BasicAuthInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BasicAuthInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BasicAuthInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BasicAuthInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BasicAuthInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of BasicAuthInput + * @throws IOException if the JSON string is invalid with respect to BasicAuthInput + */ + public static BasicAuthInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BasicAuthInput.class); + } + + /** + * Convert an instance of BasicAuthInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java index 29bdbd386..3f51aab20 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java @@ -4,210 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** CALLBACK Custom Action Type */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CALLBACK implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_REFERENCE = "reference"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_REFERENCE) - @javax.annotation.Nullable - private String reference; +/** + * CALLBACK Custom Action Type + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CALLBACK implements Serializable { + private static final long serialVersionUID = 1L; - public CALLBACK() {} + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; - public CALLBACK reference(@javax.annotation.Nullable String reference) { - this.reference = reference; - return this; - } + public CALLBACK() { + } - /** - * Reference name of the SDK. By default, the value will be set to action name. - * - * @return reference - */ - @javax.annotation.Nullable - public String getReference() { - return reference; - } + public CALLBACK reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } - public void setReference(@javax.annotation.Nullable String reference) { - this.reference = reference; - } + /** + * Reference name of the SDK. By default, the value will be set to action name. + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CALLBACK CALLBACK = (CALLBACK) o; - return Objects.equals(this.reference, CALLBACK.reference); - } + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(reference); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CALLBACK {\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CALLBACK CALLBACK = (CALLBACK) o; + return Objects.equals(this.reference, CALLBACK.reference); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reference); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CALLBACK {\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CALLBACK - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CALLBACK.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CALLBACK is not found in the empty" - + " JSON string", - CALLBACK.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CALLBACK + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CALLBACK.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CALLBACK is not found in the empty JSON string", CALLBACK.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CALLBACK.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CALLBACK` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CALLBACK.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CALLBACK` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) - && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reference` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reference").toString())); - } - } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CALLBACK.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CALLBACK' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CALLBACK.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CALLBACK value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CALLBACK read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CALLBACK given an JSON string - * - * @param jsonString JSON string - * @return An instance of CALLBACK - * @throws IOException if the JSON string is invalid with respect to CALLBACK - */ - public static CALLBACK fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CALLBACK.class); - } - - /** - * Convert an instance of CALLBACK to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CALLBACK.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CALLBACK' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CALLBACK.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CALLBACK value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CALLBACK read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CALLBACK given an JSON string + * + * @param jsonString JSON string + * @return An instance of CALLBACK + * @throws IOException if the JSON string is invalid with respect to CALLBACK + */ + public static CALLBACK fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CALLBACK.class); + } + + /** + * Convert an instance of CALLBACK to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java index 03ca655e9..73ddffe5f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java @@ -4,210 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** CALLBACK Custom Action Type */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CALLBACKInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_REFERENCE = "reference"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_REFERENCE) - @javax.annotation.Nullable - private String reference; +/** + * CALLBACK Custom Action Type + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CALLBACKInput implements Serializable { + private static final long serialVersionUID = 1L; - public CALLBACKInput() {} + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; - public CALLBACKInput reference(@javax.annotation.Nullable String reference) { - this.reference = reference; - return this; - } + public CALLBACKInput() { + } - /** - * Reference name. By default, the value will be set to action name. - * - * @return reference - */ - @javax.annotation.Nullable - public String getReference() { - return reference; - } + public CALLBACKInput reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } - public void setReference(@javax.annotation.Nullable String reference) { - this.reference = reference; - } + /** + * Reference name. By default, the value will be set to action name. + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CALLBACKInput caLLBACKInput = (CALLBACKInput) o; - return Objects.equals(this.reference, caLLBACKInput.reference); - } + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(reference); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CALLBACKInput {\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CALLBACKInput caLLBACKInput = (CALLBACKInput) o; + return Objects.equals(this.reference, caLLBACKInput.reference); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reference); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CALLBACKInput {\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CALLBACKInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CALLBACKInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CALLBACKInput is not found in the" - + " empty JSON string", - CALLBACKInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CALLBACKInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CALLBACKInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CALLBACKInput is not found in the empty JSON string", CALLBACKInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CALLBACKInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CALLBACKInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CALLBACKInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CALLBACKInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) - && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reference` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reference").toString())); - } - } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CALLBACKInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CALLBACKInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CALLBACKInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CALLBACKInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CALLBACKInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CALLBACKInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of CALLBACKInput - * @throws IOException if the JSON string is invalid with respect to CALLBACKInput - */ - public static CALLBACKInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CALLBACKInput.class); - } - - /** - * Convert an instance of CALLBACKInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CALLBACKInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CALLBACKInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CALLBACKInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CALLBACKInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CALLBACKInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CALLBACKInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CALLBACKInput + * @throws IOException if the JSON string is invalid with respect to CALLBACKInput + */ + public static CALLBACKInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CALLBACKInput.class); + } + + /** + * Convert an instance of CALLBACKInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java index 964645c8d..a1c02472d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java @@ -4,211 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** CALLBACK Custom Action Type */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CALLBACKInputMandatory implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_REFERENCE = "reference"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_REFERENCE) - @javax.annotation.Nullable - private String reference; +/** + * CALLBACK Custom Action Type + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CALLBACKInputMandatory implements Serializable { + private static final long serialVersionUID = 1L; - public CALLBACKInputMandatory() {} + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; - public CALLBACKInputMandatory reference(@javax.annotation.Nullable String reference) { - this.reference = reference; - return this; - } + public CALLBACKInputMandatory() { + } - /** - * Reference name. By default, the value will be set to action name. - * - * @return reference - */ - @javax.annotation.Nullable - public String getReference() { - return reference; - } + public CALLBACKInputMandatory reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } - public void setReference(@javax.annotation.Nullable String reference) { - this.reference = reference; - } + /** + * Reference name. By default, the value will be set to action name. + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CALLBACKInputMandatory caLLBACKInputMandatory = (CALLBACKInputMandatory) o; - return Objects.equals(this.reference, caLLBACKInputMandatory.reference); - } + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(reference); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CALLBACKInputMandatory {\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CALLBACKInputMandatory caLLBACKInputMandatory = (CALLBACKInputMandatory) o; + return Objects.equals(this.reference, caLLBACKInputMandatory.reference); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reference); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CALLBACKInputMandatory {\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CALLBACKInputMandatory - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CALLBACKInputMandatory.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CALLBACKInputMandatory is not found" - + " in the empty JSON string", - CALLBACKInputMandatory.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CALLBACKInputMandatory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CALLBACKInputMandatory.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CALLBACKInputMandatory is not found in the empty JSON string", CALLBACKInputMandatory.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CALLBACKInputMandatory.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CALLBACKInputMandatory` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CALLBACKInputMandatory.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CALLBACKInputMandatory` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) - && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reference` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reference").toString())); - } - } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CALLBACKInputMandatory.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CALLBACKInputMandatory' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CALLBACKInputMandatory.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CALLBACKInputMandatory value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CALLBACKInputMandatory read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CALLBACKInputMandatory given an JSON string - * - * @param jsonString JSON string - * @return An instance of CALLBACKInputMandatory - * @throws IOException if the JSON string is invalid with respect to CALLBACKInputMandatory - */ - public static CALLBACKInputMandatory fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CALLBACKInputMandatory.class); - } - - /** - * Convert an instance of CALLBACKInputMandatory to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CALLBACKInputMandatory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CALLBACKInputMandatory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CALLBACKInputMandatory.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CALLBACKInputMandatory value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CALLBACKInputMandatory read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CALLBACKInputMandatory given an JSON string + * + * @param jsonString JSON string + * @return An instance of CALLBACKInputMandatory + * @throws IOException if the JSON string is invalid with respect to CALLBACKInputMandatory + */ + public static CALLBACKInputMandatory fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CALLBACKInputMandatory.class); + } + + /** + * Convert an instance of CALLBACKInputMandatory to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java index 7d1c76a12..9a367d93d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java @@ -4,444 +4,389 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CalendarResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CalendarResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CALENDAR_NAME = "calendar_name"; - - @SerializedName(SERIALIZED_NAME_CALENDAR_NAME) - @javax.annotation.Nullable - private String calendarName; - - public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) - @javax.annotation.Nullable - private String connectionName; - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) - @javax.annotation.Nullable - private String dataWarehouseType; - - public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = - "modification_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private String modificationTimeInMillis; - - public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) - @javax.annotation.Nullable - private String authorName; - - public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_ID) - @javax.annotation.Nullable - private String connectionId; - - public static final String SERIALIZED_NAME_CALENDAR_ID = "calendar_id"; - - @SerializedName(SERIALIZED_NAME_CALENDAR_ID) - @javax.annotation.Nullable - private String calendarId; - - public CalendarResponse() {} - - public CalendarResponse calendarName(@javax.annotation.Nullable String calendarName) { - this.calendarName = calendarName; - return this; - } - - /** - * Name of the calendar - * - * @return calendarName - */ - @javax.annotation.Nullable - public String getCalendarName() { - return calendarName; - } - - public void setCalendarName(@javax.annotation.Nullable String calendarName) { - this.calendarName = calendarName; - } - - public CalendarResponse connectionName(@javax.annotation.Nullable String connectionName) { - this.connectionName = connectionName; - return this; - } - - /** - * Name of the connection - * - * @return connectionName - */ - @javax.annotation.Nullable - public String getConnectionName() { - return connectionName; - } - - public void setConnectionName(@javax.annotation.Nullable String connectionName) { - this.connectionName = connectionName; - } - - public CalendarResponse dataWarehouseType(@javax.annotation.Nullable String dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - return this; - } - - /** - * Type of data warehouse - * - * @return dataWarehouseType - */ - @javax.annotation.Nullable - public String getDataWarehouseType() { - return dataWarehouseType; - } - - public void setDataWarehouseType(@javax.annotation.Nullable String dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - } - - public CalendarResponse modificationTimeInMillis( - @javax.annotation.Nullable String modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - return this; - } - - /** - * Last modification time in milliseconds - * - * @return modificationTimeInMillis - */ - @javax.annotation.Nullable - public String getModificationTimeInMillis() { - return modificationTimeInMillis; - } - - public void setModificationTimeInMillis( - @javax.annotation.Nullable String modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - } - - public CalendarResponse authorName(@javax.annotation.Nullable String authorName) { - this.authorName = authorName; - return this; - } - - /** - * Name of the author who created the calendar - * - * @return authorName - */ - @javax.annotation.Nullable - public String getAuthorName() { - return authorName; - } - - public void setAuthorName(@javax.annotation.Nullable String authorName) { - this.authorName = authorName; - } - - public CalendarResponse connectionId(@javax.annotation.Nullable String connectionId) { - this.connectionId = connectionId; - return this; - } - - /** - * Unique ID of the connection - * - * @return connectionId - */ - @javax.annotation.Nullable - public String getConnectionId() { - return connectionId; - } - - public void setConnectionId(@javax.annotation.Nullable String connectionId) { - this.connectionId = connectionId; - } - - public CalendarResponse calendarId(@javax.annotation.Nullable String calendarId) { - this.calendarId = calendarId; - return this; - } - /** - * Unique ID of the calendar - * - * @return calendarId - */ - @javax.annotation.Nullable - public String getCalendarId() { - return calendarId; - } - - public void setCalendarId(@javax.annotation.Nullable String calendarId) { - this.calendarId = calendarId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CalendarResponse calendarResponse = (CalendarResponse) o; - return Objects.equals(this.calendarName, calendarResponse.calendarName) - && Objects.equals(this.connectionName, calendarResponse.connectionName) - && Objects.equals(this.dataWarehouseType, calendarResponse.dataWarehouseType) - && Objects.equals( - this.modificationTimeInMillis, calendarResponse.modificationTimeInMillis) - && Objects.equals(this.authorName, calendarResponse.authorName) - && Objects.equals(this.connectionId, calendarResponse.connectionId) - && Objects.equals(this.calendarId, calendarResponse.calendarId); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - calendarName, - connectionName, - dataWarehouseType, - modificationTimeInMillis, - authorName, - connectionId, - calendarId); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CalendarResponse {\n"); - sb.append(" calendarName: ").append(toIndentedString(calendarName)).append("\n"); - sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); - sb.append(" dataWarehouseType: ") - .append(toIndentedString(dataWarehouseType)) - .append("\n"); - sb.append(" modificationTimeInMillis: ") - .append(toIndentedString(modificationTimeInMillis)) - .append("\n"); - sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); - sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); - sb.append(" calendarId: ").append(toIndentedString(calendarId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("calendar_name"); - openapiFields.add("connection_name"); - openapiFields.add("data_warehouse_type"); - openapiFields.add("modification_time_in_millis"); - openapiFields.add("author_name"); - openapiFields.add("connection_id"); - openapiFields.add("calendar_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CalendarResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CalendarResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CalendarResponse is not found in the" - + " empty JSON string", - CalendarResponse.openapiRequiredFields.toString())); - } +/** + * CalendarResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CalendarResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CALENDAR_NAME = "calendar_name"; + @SerializedName(SERIALIZED_NAME_CALENDAR_NAME) + @javax.annotation.Nullable + private String calendarName; + + public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; + @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) + @javax.annotation.Nullable + private String connectionName; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nullable + private String dataWarehouseType; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = "modification_time_in_millis"; + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private String modificationTimeInMillis; + + public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; + @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable + private String authorName; + + public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; + @SerializedName(SERIALIZED_NAME_CONNECTION_ID) + @javax.annotation.Nullable + private String connectionId; + + public static final String SERIALIZED_NAME_CALENDAR_ID = "calendar_id"; + @SerializedName(SERIALIZED_NAME_CALENDAR_ID) + @javax.annotation.Nullable + private String calendarId; + + public CalendarResponse() { + } + + public CalendarResponse calendarName(@javax.annotation.Nullable String calendarName) { + this.calendarName = calendarName; + return this; + } + + /** + * Name of the calendar + * @return calendarName + */ + @javax.annotation.Nullable + public String getCalendarName() { + return calendarName; + } + + public void setCalendarName(@javax.annotation.Nullable String calendarName) { + this.calendarName = calendarName; + } + + + public CalendarResponse connectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Name of the connection + * @return connectionName + */ + @javax.annotation.Nullable + public String getConnectionName() { + return connectionName; + } + + public void setConnectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + } + + + public CalendarResponse dataWarehouseType(@javax.annotation.Nullable String dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of data warehouse + * @return dataWarehouseType + */ + @javax.annotation.Nullable + public String getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType(@javax.annotation.Nullable String dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + + public CalendarResponse modificationTimeInMillis(@javax.annotation.Nullable String modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modification time in milliseconds + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public String getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis(@javax.annotation.Nullable String modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + + public CalendarResponse authorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Name of the author who created the calendar + * @return authorName + */ + @javax.annotation.Nullable + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + } + + + public CalendarResponse connectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Unique ID of the connection + * @return connectionId + */ + @javax.annotation.Nullable + public String getConnectionId() { + return connectionId; + } + + public void setConnectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + } + + + public CalendarResponse calendarId(@javax.annotation.Nullable String calendarId) { + this.calendarId = calendarId; + return this; + } + + /** + * Unique ID of the calendar + * @return calendarId + */ + @javax.annotation.Nullable + public String getCalendarId() { + return calendarId; + } + + public void setCalendarId(@javax.annotation.Nullable String calendarId) { + this.calendarId = calendarId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarResponse calendarResponse = (CalendarResponse) o; + return Objects.equals(this.calendarName, calendarResponse.calendarName) && + Objects.equals(this.connectionName, calendarResponse.connectionName) && + Objects.equals(this.dataWarehouseType, calendarResponse.dataWarehouseType) && + Objects.equals(this.modificationTimeInMillis, calendarResponse.modificationTimeInMillis) && + Objects.equals(this.authorName, calendarResponse.authorName) && + Objects.equals(this.connectionId, calendarResponse.connectionId) && + Objects.equals(this.calendarId, calendarResponse.calendarId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(calendarName, connectionName, dataWarehouseType, modificationTimeInMillis, authorName, connectionId, calendarId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarResponse {\n"); + sb.append(" calendarName: ").append(toIndentedString(calendarName)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" dataWarehouseType: ").append(toIndentedString(dataWarehouseType)).append("\n"); + sb.append(" modificationTimeInMillis: ").append(toIndentedString(modificationTimeInMillis)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" calendarId: ").append(toIndentedString(calendarId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("calendar_name"); + openapiFields.add("connection_name"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("author_name"); + openapiFields.add("connection_id"); + openapiFields.add("calendar_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CalendarResponse is not found in the empty JSON string", CalendarResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CalendarResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CalendarResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CalendarResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CalendarResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("calendar_name") != null && !jsonObj.get("calendar_name").isJsonNull()) - && !jsonObj.get("calendar_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `calendar_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("calendar_name").toString())); - } - if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) - && !jsonObj.get("connection_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("connection_name").toString())); - } - if ((jsonObj.get("data_warehouse_type") != null - && !jsonObj.get("data_warehouse_type").isJsonNull()) - && !jsonObj.get("data_warehouse_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_warehouse_type").toString())); - } - if ((jsonObj.get("modification_time_in_millis") != null - && !jsonObj.get("modification_time_in_millis").isJsonNull()) - && !jsonObj.get("modification_time_in_millis").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modification_time_in_millis` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("modification_time_in_millis").toString())); - } - if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) - && !jsonObj.get("author_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_name").toString())); - } - if ((jsonObj.get("connection_id") != null && !jsonObj.get("connection_id").isJsonNull()) - && !jsonObj.get("connection_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("connection_id").toString())); - } - if ((jsonObj.get("calendar_id") != null && !jsonObj.get("calendar_id").isJsonNull()) - && !jsonObj.get("calendar_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `calendar_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("calendar_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CalendarResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CalendarResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CalendarResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CalendarResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CalendarResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CalendarResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CalendarResponse - * @throws IOException if the JSON string is invalid with respect to CalendarResponse - */ - public static CalendarResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CalendarResponse.class); - } - - /** - * Convert an instance of CalendarResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("calendar_name") != null && !jsonObj.get("calendar_name").isJsonNull()) && !jsonObj.get("calendar_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `calendar_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendar_name").toString())); + } + if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) && !jsonObj.get("connection_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_name").toString())); + } + if ((jsonObj.get("data_warehouse_type") != null && !jsonObj.get("data_warehouse_type").isJsonNull()) && !jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_warehouse_type").toString())); + } + if ((jsonObj.get("modification_time_in_millis") != null && !jsonObj.get("modification_time_in_millis").isJsonNull()) && !jsonObj.get("modification_time_in_millis").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modification_time_in_millis` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modification_time_in_millis").toString())); + } + if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) && !jsonObj.get("author_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_name").toString())); + } + if ((jsonObj.get("connection_id") != null && !jsonObj.get("connection_id").isJsonNull()) && !jsonObj.get("connection_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_id").toString())); + } + if ((jsonObj.get("calendar_id") != null && !jsonObj.get("calendar_id").isJsonNull()) && !jsonObj.get("calendar_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `calendar_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendar_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CalendarResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CalendarResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CalendarResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarResponse + * @throws IOException if the JSON string is invalid with respect to CalendarResponse + */ + public static CalendarResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CalendarResponse.class); + } + + /** + * Convert an instance of CalendarResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java index 58b7566cc..749893dca 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java @@ -4,278 +4,267 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ChangeUserPasswordRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ChangeUserPasswordRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CURRENT_PASSWORD = "current_password"; - - @SerializedName(SERIALIZED_NAME_CURRENT_PASSWORD) - @javax.annotation.Nonnull - private String currentPassword; - - public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; - - @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) - @javax.annotation.Nonnull - private String newPassword; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nonnull - private String userIdentifier; - - public ChangeUserPasswordRequest() {} - - public ChangeUserPasswordRequest currentPassword( - @javax.annotation.Nonnull String currentPassword) { - this.currentPassword = currentPassword; - return this; - } - - /** - * Current password of the user. - * - * @return currentPassword - */ - @javax.annotation.Nonnull - public String getCurrentPassword() { - return currentPassword; - } - - public void setCurrentPassword(@javax.annotation.Nonnull String currentPassword) { - this.currentPassword = currentPassword; - } - - public ChangeUserPasswordRequest newPassword(@javax.annotation.Nonnull String newPassword) { - this.newPassword = newPassword; - return this; - } - - /** - * New password for the user. - * - * @return newPassword - */ - @javax.annotation.Nonnull - public String getNewPassword() { - return newPassword; - } - - public void setNewPassword(@javax.annotation.Nonnull String newPassword) { - this.newPassword = newPassword; - } - - public ChangeUserPasswordRequest userIdentifier( - @javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * GUID or name of the user. - * - * @return userIdentifier - */ - @javax.annotation.Nonnull - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChangeUserPasswordRequest changeUserPasswordRequest = (ChangeUserPasswordRequest) o; - return Objects.equals(this.currentPassword, changeUserPasswordRequest.currentPassword) - && Objects.equals(this.newPassword, changeUserPasswordRequest.newPassword) - && Objects.equals(this.userIdentifier, changeUserPasswordRequest.userIdentifier); - } - - @Override - public int hashCode() { - return Objects.hash(currentPassword, newPassword, userIdentifier); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChangeUserPasswordRequest {\n"); - sb.append(" currentPassword: ").append(toIndentedString(currentPassword)).append("\n"); - sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * ChangeUserPasswordRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChangeUserPasswordRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CURRENT_PASSWORD = "current_password"; + @SerializedName(SERIALIZED_NAME_CURRENT_PASSWORD) + @javax.annotation.Nonnull + private String currentPassword; + + public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; + @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) + @javax.annotation.Nonnull + private String newPassword; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public ChangeUserPasswordRequest() { + } + + public ChangeUserPasswordRequest currentPassword(@javax.annotation.Nonnull String currentPassword) { + this.currentPassword = currentPassword; + return this; + } + + /** + * Current password of the user. + * @return currentPassword + */ + @javax.annotation.Nonnull + public String getCurrentPassword() { + return currentPassword; + } + + public void setCurrentPassword(@javax.annotation.Nonnull String currentPassword) { + this.currentPassword = currentPassword; + } + + + public ChangeUserPasswordRequest newPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + return this; + } + + /** + * New password for the user. + * @return newPassword + */ + @javax.annotation.Nonnull + public String getNewPassword() { + return newPassword; + } + + public void setNewPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + } + + + public ChangeUserPasswordRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID or name of the user. + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("current_password"); - openapiFields.add("new_password"); - openapiFields.add("user_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("current_password"); - openapiRequiredFields.add("new_password"); - openapiRequiredFields.add("user_identifier"); + ChangeUserPasswordRequest changeUserPasswordRequest = (ChangeUserPasswordRequest) o; + return Objects.equals(this.currentPassword, changeUserPasswordRequest.currentPassword) && + Objects.equals(this.newPassword, changeUserPasswordRequest.newPassword) && + Objects.equals(this.userIdentifier, changeUserPasswordRequest.userIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(currentPassword, newPassword, userIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeUserPasswordRequest {\n"); + sb.append(" currentPassword: ").append(toIndentedString(currentPassword)).append("\n"); + sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChangeUserPasswordRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChangeUserPasswordRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ChangeUserPasswordRequest is not" - + " found in the empty JSON string", - ChangeUserPasswordRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("current_password"); + openapiFields.add("new_password"); + openapiFields.add("user_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("current_password"); + openapiRequiredFields.add("new_password"); + openapiRequiredFields.add("user_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChangeUserPasswordRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChangeUserPasswordRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeUserPasswordRequest is not found in the empty JSON string", ChangeUserPasswordRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChangeUserPasswordRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ChangeUserPasswordRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ChangeUserPasswordRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeUserPasswordRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ChangeUserPasswordRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChangeUserPasswordRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("current_password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `current_password` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("current_password").toString())); - } - if (!jsonObj.get("new_password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `new_password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("new_password").toString())); - } - if (!jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChangeUserPasswordRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChangeUserPasswordRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ChangeUserPasswordRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ChangeUserPasswordRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChangeUserPasswordRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ChangeUserPasswordRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChangeUserPasswordRequest - * @throws IOException if the JSON string is invalid with respect to ChangeUserPasswordRequest - */ - public static ChangeUserPasswordRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChangeUserPasswordRequest.class); - } - - /** - * Convert an instance of ChangeUserPasswordRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("current_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `current_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("current_password").toString())); + } + if (!jsonObj.get("new_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `new_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("new_password").toString())); + } + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeUserPasswordRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeUserPasswordRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeUserPasswordRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeUserPasswordRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ChangeUserPasswordRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ChangeUserPasswordRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeUserPasswordRequest + * @throws IOException if the JSON string is invalid with respect to ChangeUserPasswordRequest + */ + public static ChangeUserPasswordRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeUserPasswordRequest.class); + } + + /** + * Convert an instance of ChangeUserPasswordRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java index f71d99b42..4272ccb96 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java @@ -4,376 +4,359 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Column */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Column implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DATA_TYPE = "data_type"; - - @SerializedName(SERIALIZED_NAME_DATA_TYPE) - @javax.annotation.Nonnull - private String dataType; - - public static final String SERIALIZED_NAME_IS_AGGREGATE = "is_aggregate"; - @SerializedName(SERIALIZED_NAME_IS_AGGREGATE) - @javax.annotation.Nullable - private String isAggregate; - - public static final String SERIALIZED_NAME_CAN_IMPORT = "can_import"; - - @SerializedName(SERIALIZED_NAME_CAN_IMPORT) - @javax.annotation.Nullable - private Boolean canImport; - - public static final String SERIALIZED_NAME_SELECTED = "selected"; - - @SerializedName(SERIALIZED_NAME_SELECTED) - @javax.annotation.Nullable - private Boolean selected; - - public static final String SERIALIZED_NAME_IS_LINKED_ACTIVE = "is_linked_active"; - - @SerializedName(SERIALIZED_NAME_IS_LINKED_ACTIVE) - @javax.annotation.Nullable - private Boolean isLinkedActive; - - public Column() {} - - public Column name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the column - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public Column dataType(@javax.annotation.Nonnull String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Data type of the column - * - * @return dataType - */ - @javax.annotation.Nonnull - public String getDataType() { - return dataType; - } - - public void setDataType(@javax.annotation.Nonnull String dataType) { - this.dataType = dataType; - } - - public Column isAggregate(@javax.annotation.Nullable String isAggregate) { - this.isAggregate = isAggregate; - return this; - } - - /** - * Determines if the column schema is an aggregate - * - * @return isAggregate - */ - @javax.annotation.Nullable - public String getIsAggregate() { - return isAggregate; - } - - public void setIsAggregate(@javax.annotation.Nullable String isAggregate) { - this.isAggregate = isAggregate; - } - - public Column canImport(@javax.annotation.Nullable Boolean canImport) { - this.canImport = canImport; - return this; - } - - /** - * Determines if the column schema can be imported - * - * @return canImport - */ - @javax.annotation.Nullable - public Boolean getCanImport() { - return canImport; - } - - public void setCanImport(@javax.annotation.Nullable Boolean canImport) { - this.canImport = canImport; - } - - public Column selected(@javax.annotation.Nullable Boolean selected) { - this.selected = selected; - return this; - } - - /** - * Determines if the table is selected - * - * @return selected - */ - @javax.annotation.Nullable - public Boolean getSelected() { - return selected; - } - - public void setSelected(@javax.annotation.Nullable Boolean selected) { - this.selected = selected; - } - - public Column isLinkedActive(@javax.annotation.Nullable Boolean isLinkedActive) { - this.isLinkedActive = isLinkedActive; - return this; - } - - /** - * Determines if the table is linked - * - * @return isLinkedActive - */ - @javax.annotation.Nullable - public Boolean getIsLinkedActive() { - return isLinkedActive; - } - - public void setIsLinkedActive(@javax.annotation.Nullable Boolean isLinkedActive) { - this.isLinkedActive = isLinkedActive; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Column column = (Column) o; - return Objects.equals(this.name, column.name) - && Objects.equals(this.dataType, column.dataType) - && Objects.equals(this.isAggregate, column.isAggregate) - && Objects.equals(this.canImport, column.canImport) - && Objects.equals(this.selected, column.selected) - && Objects.equals(this.isLinkedActive, column.isLinkedActive); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(name, dataType, isAggregate, canImport, selected, isLinkedActive); +/** + * Column + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Column implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DATA_TYPE = "data_type"; + @SerializedName(SERIALIZED_NAME_DATA_TYPE) + @javax.annotation.Nonnull + private String dataType; + + public static final String SERIALIZED_NAME_IS_AGGREGATE = "is_aggregate"; + @SerializedName(SERIALIZED_NAME_IS_AGGREGATE) + @javax.annotation.Nullable + private String isAggregate; + + public static final String SERIALIZED_NAME_CAN_IMPORT = "can_import"; + @SerializedName(SERIALIZED_NAME_CAN_IMPORT) + @javax.annotation.Nullable + private Boolean canImport; + + public static final String SERIALIZED_NAME_SELECTED = "selected"; + @SerializedName(SERIALIZED_NAME_SELECTED) + @javax.annotation.Nullable + private Boolean selected; + + public static final String SERIALIZED_NAME_IS_LINKED_ACTIVE = "is_linked_active"; + @SerializedName(SERIALIZED_NAME_IS_LINKED_ACTIVE) + @javax.annotation.Nullable + private Boolean isLinkedActive; + + public Column() { + } + + public Column name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the column + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Column dataType(@javax.annotation.Nonnull String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Data type of the column + * @return dataType + */ + @javax.annotation.Nonnull + public String getDataType() { + return dataType; + } + + public void setDataType(@javax.annotation.Nonnull String dataType) { + this.dataType = dataType; + } + + + public Column isAggregate(@javax.annotation.Nullable String isAggregate) { + this.isAggregate = isAggregate; + return this; + } + + /** + * Determines if the column schema is an aggregate + * @return isAggregate + */ + @javax.annotation.Nullable + public String getIsAggregate() { + return isAggregate; + } + + public void setIsAggregate(@javax.annotation.Nullable String isAggregate) { + this.isAggregate = isAggregate; + } + + + public Column canImport(@javax.annotation.Nullable Boolean canImport) { + this.canImport = canImport; + return this; + } + + /** + * Determines if the column schema can be imported + * @return canImport + */ + @javax.annotation.Nullable + public Boolean getCanImport() { + return canImport; + } + + public void setCanImport(@javax.annotation.Nullable Boolean canImport) { + this.canImport = canImport; + } + + + public Column selected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + return this; + } + + /** + * Determines if the table is selected + * @return selected + */ + @javax.annotation.Nullable + public Boolean getSelected() { + return selected; + } + + public void setSelected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + } + + + public Column isLinkedActive(@javax.annotation.Nullable Boolean isLinkedActive) { + this.isLinkedActive = isLinkedActive; + return this; + } + + /** + * Determines if the table is linked + * @return isLinkedActive + */ + @javax.annotation.Nullable + public Boolean getIsLinkedActive() { + return isLinkedActive; + } + + public void setIsLinkedActive(@javax.annotation.Nullable Boolean isLinkedActive) { + this.isLinkedActive = isLinkedActive; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Column {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); - sb.append(" isAggregate: ").append(toIndentedString(isAggregate)).append("\n"); - sb.append(" canImport: ").append(toIndentedString(canImport)).append("\n"); - sb.append(" selected: ").append(toIndentedString(selected)).append("\n"); - sb.append(" isLinkedActive: ").append(toIndentedString(isLinkedActive)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + Column column = (Column) o; + return Objects.equals(this.name, column.name) && + Objects.equals(this.dataType, column.dataType) && + Objects.equals(this.isAggregate, column.isAggregate) && + Objects.equals(this.canImport, column.canImport) && + Objects.equals(this.selected, column.selected) && + Objects.equals(this.isLinkedActive, column.isLinkedActive); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, dataType, isAggregate, canImport, selected, isLinkedActive); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("data_type"); - openapiFields.add("is_aggregate"); - openapiFields.add("can_import"); - openapiFields.add("selected"); - openapiFields.add("is_linked_active"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("data_type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Column {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" isAggregate: ").append(toIndentedString(isAggregate)).append("\n"); + sb.append(" canImport: ").append(toIndentedString(canImport)).append("\n"); + sb.append(" selected: ").append(toIndentedString(selected)).append("\n"); + sb.append(" isLinkedActive: ").append(toIndentedString(isLinkedActive)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Column - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Column.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Column is not found in the empty JSON" - + " string", - Column.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("data_type"); + openapiFields.add("is_aggregate"); + openapiFields.add("can_import"); + openapiFields.add("selected"); + openapiFields.add("is_linked_active"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Column + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Column.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Column is not found in the empty JSON string", Column.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Column.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Column`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Column.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Column` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Column.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Column.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("data_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("data_type").toString())); - } - if ((jsonObj.get("is_aggregate") != null && !jsonObj.get("is_aggregate").isJsonNull()) - && !jsonObj.get("is_aggregate").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `is_aggregate` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("is_aggregate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Column.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Column' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Column.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Column value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Column read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Column given an JSON string - * - * @param jsonString JSON string - * @return An instance of Column - * @throws IOException if the JSON string is invalid with respect to Column - */ - public static Column fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Column.class); - } - - /** - * Convert an instance of Column to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("data_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_type").toString())); + } + if ((jsonObj.get("is_aggregate") != null && !jsonObj.get("is_aggregate").isJsonNull()) && !jsonObj.get("is_aggregate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_aggregate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_aggregate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Column.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Column' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Column.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Column value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Column read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Column given an JSON string + * + * @param jsonString JSON string + * @return An instance of Column + * @throws IOException if the JSON string is invalid with respect to Column + */ + public static Column fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Column.class); + } + + /** + * Convert an instance of Column to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java index e497e73db..546ac9e12 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 @@ -4,312 +4,301 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleColumn; +import com.thoughtspot.client.model.ColumnSecurityRuleGroup; +import com.thoughtspot.client.model.ColumnSecurityRuleSourceTable; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ColumnSecurityRule */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRule implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COLUMN = "column"; - - @SerializedName(SERIALIZED_NAME_COLUMN) - @javax.annotation.Nonnull - private ColumnSecurityRuleColumn column; - - public static final String SERIALIZED_NAME_GROUPS = "groups"; - - @SerializedName(SERIALIZED_NAME_GROUPS) - @javax.annotation.Nullable - private List groups; - - public static final String SERIALIZED_NAME_SOURCE_TABLE_DETAILS = "sourceTableDetails"; - - @SerializedName(SERIALIZED_NAME_SOURCE_TABLE_DETAILS) - @javax.annotation.Nullable - private ColumnSecurityRuleSourceTable sourceTableDetails; - - public ColumnSecurityRule() {} - - public ColumnSecurityRule column(@javax.annotation.Nonnull ColumnSecurityRuleColumn column) { - this.column = column; - return this; - } - - /** - * Get column - * - * @return column - */ - @javax.annotation.Nonnull - public ColumnSecurityRuleColumn getColumn() { - return column; - } - - public void setColumn(@javax.annotation.Nonnull ColumnSecurityRuleColumn column) { - this.column = column; - } - - public ColumnSecurityRule groups( - @javax.annotation.Nullable List groups) { - this.groups = groups; - return this; - } - - public ColumnSecurityRule addGroupsItem(ColumnSecurityRuleGroup groupsItem) { - if (this.groups == null) { - this.groups = new ArrayList<>(); - } - this.groups.add(groupsItem); - return this; - } - /** - * Array of groups that have access to this column - * - * @return groups - */ - @javax.annotation.Nullable - public List getGroups() { - return groups; - } +import com.thoughtspot.client.JSON; - public void setGroups(@javax.annotation.Nullable List groups) { - this.groups = groups; +/** + * ColumnSecurityRule + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRule implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN = "column"; + @SerializedName(SERIALIZED_NAME_COLUMN) + @javax.annotation.Nonnull + private ColumnSecurityRuleColumn column; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + public static final String SERIALIZED_NAME_SOURCE_TABLE_DETAILS = "source_table_details"; + @SerializedName(SERIALIZED_NAME_SOURCE_TABLE_DETAILS) + @javax.annotation.Nullable + private ColumnSecurityRuleSourceTable sourceTableDetails; + + public ColumnSecurityRule() { + } + + public ColumnSecurityRule column(@javax.annotation.Nonnull ColumnSecurityRuleColumn column) { + this.column = column; + return this; + } + + /** + * Get column + * @return column + */ + @javax.annotation.Nonnull + public ColumnSecurityRuleColumn getColumn() { + return column; + } + + public void setColumn(@javax.annotation.Nonnull ColumnSecurityRuleColumn column) { + this.column = column; + } + + + public ColumnSecurityRule groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public ColumnSecurityRule addGroupsItem(ColumnSecurityRuleGroup groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); } - - public ColumnSecurityRule sourceTableDetails( - @javax.annotation.Nullable ColumnSecurityRuleSourceTable sourceTableDetails) { - this.sourceTableDetails = sourceTableDetails; - return this; + this.groups.add(groupsItem); + return this; + } + + /** + * Array of groups that have access to this column + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + + public ColumnSecurityRule sourceTableDetails(@javax.annotation.Nullable ColumnSecurityRuleSourceTable sourceTableDetails) { + this.sourceTableDetails = sourceTableDetails; + return this; + } + + /** + * Get sourceTableDetails + * @return sourceTableDetails + */ + @javax.annotation.Nullable + public ColumnSecurityRuleSourceTable getSourceTableDetails() { + return sourceTableDetails; + } + + public void setSourceTableDetails(@javax.annotation.Nullable ColumnSecurityRuleSourceTable sourceTableDetails) { + this.sourceTableDetails = sourceTableDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Get sourceTableDetails - * - * @return sourceTableDetails - */ - @javax.annotation.Nullable - public ColumnSecurityRuleSourceTable getSourceTableDetails() { - return sourceTableDetails; + if (o == null || getClass() != o.getClass()) { + return false; } - - public void setSourceTableDetails( - @javax.annotation.Nullable ColumnSecurityRuleSourceTable sourceTableDetails) { - this.sourceTableDetails = sourceTableDetails; + ColumnSecurityRule columnSecurityRule = (ColumnSecurityRule) o; + return Objects.equals(this.column, columnSecurityRule.column) && + Objects.equals(this.groups, columnSecurityRule.groups) && + Objects.equals(this.sourceTableDetails, columnSecurityRule.sourceTableDetails); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(column, groups, sourceTableDetails); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRule columnSecurityRule = (ColumnSecurityRule) o; - return Objects.equals(this.column, columnSecurityRule.column) - && Objects.equals(this.groups, columnSecurityRule.groups) - && Objects.equals(this.sourceTableDetails, columnSecurityRule.sourceTableDetails); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(column, groups, sourceTableDetails); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRule {\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" sourceTableDetails: ").append(toIndentedString(sourceTableDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column"); + openapiFields.add("groups"); + openapiFields.add("source_table_details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRule is not found in the empty JSON string", ColumnSecurityRule.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRule {\n"); - sb.append(" column: ").append(toIndentedString(column)).append("\n"); - sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" sourceTableDetails: ") - .append(toIndentedString(sourceTableDetails)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("column"); - openapiFields.add("groups"); - openapiFields.add("sourceTableDetails"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("column"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRule - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRule is not found in" - + " the empty JSON string", - ColumnSecurityRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRule` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRule.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ColumnSecurityRule.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRule.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `column` - ColumnSecurityRuleColumn.validateJsonElement(jsonObj.get("column")); - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { - JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); - if (jsonArraygroups != null) { - // ensure the json data is an array - if (!jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups").toString())); - } - - // validate the optional field `groups` (array) - for (int i = 0; i < jsonArraygroups.size(); i++) { - ColumnSecurityRuleGroup.validateJsonElement(jsonArraygroups.get(i)); - } - ; - } + // validate the required field `column` + ColumnSecurityRuleColumn.validateJsonElement(jsonObj.get("column")); + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + ColumnSecurityRuleGroup.validateJsonElement(jsonArraygroups.get(i)); + }; } - // validate the optional field `sourceTableDetails` - if (jsonObj.get("sourceTableDetails") != null - && !jsonObj.get("sourceTableDetails").isJsonNull()) { - ColumnSecurityRuleSourceTable.validateJsonElement(jsonObj.get("sourceTableDetails")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRule value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRule read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ColumnSecurityRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRule - * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRule - */ - public static ColumnSecurityRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRule.class); - } - - /** - * Convert an instance of ColumnSecurityRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + // validate the optional field `source_table_details` + if (jsonObj.get("source_table_details") != null && !jsonObj.get("source_table_details").isJsonNull()) { + ColumnSecurityRuleSourceTable.validateJsonElement(jsonObj.get("source_table_details")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRule.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRule value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRule given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRule + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRule + */ + public static ColumnSecurityRule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRule.class); + } + + /** + * Convert an instance of ColumnSecurityRule to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java index 154c79fc7..0910db3ef 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java @@ -4,240 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ColumnSecurityRuleColumn */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleColumn implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public ColumnSecurityRuleColumn() {} - - public ColumnSecurityRuleColumn id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the column - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ColumnSecurityRuleColumn name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * The name of the column - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleColumn columnSecurityRuleColumn = (ColumnSecurityRuleColumn) o; - return Objects.equals(this.id, columnSecurityRuleColumn.id) - && Objects.equals(this.name, columnSecurityRuleColumn.name); +/** + * ColumnSecurityRuleColumn + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleColumn implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ColumnSecurityRuleColumn() { + } + + public ColumnSecurityRuleColumn id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the column + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ColumnSecurityRuleColumn name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the column + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(id, name); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleColumn {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); + ColumnSecurityRuleColumn columnSecurityRuleColumn = (ColumnSecurityRuleColumn) o; + return Objects.equals(this.id, columnSecurityRuleColumn.id) && + Objects.equals(this.name, columnSecurityRuleColumn.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleColumn {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleColumn + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleColumn.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleColumn is not found in the empty JSON string", ColumnSecurityRuleColumn.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleColumn - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleColumn.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleColumn is not found" - + " in the empty JSON string", - ColumnSecurityRuleColumn.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleColumn.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleColumn` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleColumn.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleColumn` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ColumnSecurityRuleColumn.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleColumn.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleColumn.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleColumn' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleColumn.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleColumn value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleColumn read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ColumnSecurityRuleColumn given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleColumn - * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleColumn - */ - public static ColumnSecurityRuleColumn fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleColumn.class); - } - - /** - * Convert an instance of ColumnSecurityRuleColumn to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleColumn.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleColumn' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleColumn.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleColumn value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleColumn read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRuleColumn given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleColumn + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleColumn + */ + public static ColumnSecurityRuleColumn fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleColumn.class); + } + + /** + * Convert an instance of ColumnSecurityRuleColumn to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java index 50410c39f..93e469eb1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java @@ -4,240 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ColumnSecurityRuleGroup */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleGroup implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public ColumnSecurityRuleGroup() {} - - public ColumnSecurityRuleGroup id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the group - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ColumnSecurityRuleGroup name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * The name of the group - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleGroup columnSecurityRuleGroup = (ColumnSecurityRuleGroup) o; - return Objects.equals(this.id, columnSecurityRuleGroup.id) - && Objects.equals(this.name, columnSecurityRuleGroup.name); +/** + * ColumnSecurityRuleGroup + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleGroup implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ColumnSecurityRuleGroup() { + } + + public ColumnSecurityRuleGroup id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the group + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ColumnSecurityRuleGroup name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the group + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(id, name); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleGroup {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); + ColumnSecurityRuleGroup columnSecurityRuleGroup = (ColumnSecurityRuleGroup) o; + return Objects.equals(this.id, columnSecurityRuleGroup.id) && + Objects.equals(this.name, columnSecurityRuleGroup.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleGroup {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleGroup is not found in the empty JSON string", ColumnSecurityRuleGroup.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleGroup - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleGroup is not found" - + " in the empty JSON string", - ColumnSecurityRuleGroup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleGroup` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleGroup.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ColumnSecurityRuleGroup.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleGroup.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleGroup' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleGroup value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleGroup read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ColumnSecurityRuleGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleGroup - * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleGroup - */ - public static ColumnSecurityRuleGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleGroup.class); - } - - /** - * Convert an instance of ColumnSecurityRuleGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRuleGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleGroup + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleGroup + */ + public static ColumnSecurityRuleGroup fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleGroup.class); + } + + /** + * Convert an instance of ColumnSecurityRuleGroup to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java index e5ce9aef4..b8b446cf4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java @@ -4,319 +4,305 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ColumnSecurityRuleGroupOperation */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleGroupOperation implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of operation to be performed on the groups */ - @JsonAdapter(OperationEnum.Adapter.class) - public enum OperationEnum { - ADD("ADD"), - - REMOVE("REMOVE"), - - REPLACE("REPLACE"); - - private String value; - - OperationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperationEnum fromValue(String value) { - for (OperationEnum b : OperationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperationEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperationEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_OPERATION = "operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - @javax.annotation.Nonnull - private OperationEnum operation; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nonnull - private List groupIdentifiers; - - public ColumnSecurityRuleGroupOperation() {} - - public ColumnSecurityRuleGroupOperation operation( - @javax.annotation.Nonnull OperationEnum operation) { - this.operation = operation; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Type of operation to be performed on the groups - * - * @return operation - */ - @javax.annotation.Nonnull - public OperationEnum getOperation() { - return operation; +/** + * ColumnSecurityRuleGroupOperation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleGroupOperation implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of operation to be performed on the groups + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; } - public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { - this.operation = operation; + public String getValue() { + return value; } - public ColumnSecurityRuleGroupOperation groupIdentifiers( - @javax.annotation.Nonnull List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public ColumnSecurityRuleGroupOperation addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Array of group identifiers (name or GUID) on which the operation will be performed - * - * @return groupIdentifiers - */ - @javax.annotation.Nonnull - public List getGroupIdentifiers() { - return groupIdentifiers; + public 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 void setGroupIdentifiers(@javax.annotation.Nonnull List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleGroupOperation columnSecurityRuleGroupOperation = - (ColumnSecurityRuleGroupOperation) o; - return Objects.equals(this.operation, columnSecurityRuleGroupOperation.operation) - && Objects.equals( - this.groupIdentifiers, columnSecurityRuleGroupOperation.groupIdentifiers); + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nonnull + private OperationEnum operation; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nonnull + private List groupIdentifiers; + + public ColumnSecurityRuleGroupOperation() { + } + + public ColumnSecurityRuleGroupOperation operation(@javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of operation to be performed on the groups + * @return operation + */ + @javax.annotation.Nonnull + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + } + + + public ColumnSecurityRuleGroupOperation groupIdentifiers(@javax.annotation.Nonnull List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public ColumnSecurityRuleGroupOperation addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } - @Override - public int hashCode() { - return Objects.hash(operation, groupIdentifiers); - } + /** + * Array of group identifiers (name or GUID) on which the operation will be performed + * @return groupIdentifiers + */ + @javax.annotation.Nonnull + public List getGroupIdentifiers() { + return groupIdentifiers; + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleGroupOperation {\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); - } + public void setGroupIdentifiers(@javax.annotation.Nonnull List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("operation"); - openapiFields.add("group_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("operation"); - openapiRequiredFields.add("group_identifiers"); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ColumnSecurityRuleGroupOperation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleGroupOperation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleGroupOperation is" - + " not found in the empty JSON string", - ColumnSecurityRuleGroupOperation.openapiRequiredFields.toString())); - } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleGroupOperation columnSecurityRuleGroupOperation = (ColumnSecurityRuleGroupOperation) o; + return Objects.equals(this.operation, columnSecurityRuleGroupOperation.operation) && + Objects.equals(this.groupIdentifiers, columnSecurityRuleGroupOperation.groupIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(operation, groupIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleGroupOperation {\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("operation"); + openapiFields.add("group_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("operation"); + openapiRequiredFields.add("group_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleGroupOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleGroupOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleGroupOperation is not found in the empty JSON string", ColumnSecurityRuleGroupOperation.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleGroupOperation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleGroupOperation` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleGroupOperation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleGroupOperation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ColumnSecurityRuleGroupOperation.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleGroupOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operation").toString())); - } - // validate the required field `operation` - OperationEnum.validateJsonElement(jsonObj.get("operation")); - // ensure the required json array is present - if (jsonObj.get("group_identifiers") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleGroupOperation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleGroupOperation' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ColumnSecurityRuleGroupOperation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleGroupOperation value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleGroupOperation read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ColumnSecurityRuleGroupOperation given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleGroupOperation - * @throws IOException if the JSON string is invalid with respect to - * ColumnSecurityRuleGroupOperation - */ - public static ColumnSecurityRuleGroupOperation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleGroupOperation.class); - } - - /** - * Convert an instance of ColumnSecurityRuleGroupOperation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); + } + // validate the required field `operation` + OperationEnum.validateJsonElement(jsonObj.get("operation")); + // ensure the required json array is present + if (jsonObj.get("group_identifiers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleGroupOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleGroupOperation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleGroupOperation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleGroupOperation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleGroupOperation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRuleGroupOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleGroupOperation + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleGroupOperation + */ + public static ColumnSecurityRuleGroupOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleGroupOperation.class); + } + + /** + * Convert an instance of ColumnSecurityRuleGroupOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java index 29f408406..d73ebbd96 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 @@ -4,313 +4,291 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRule; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ColumnSecurityRuleResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_GUID = "guid"; - - @SerializedName(SERIALIZED_NAME_GUID) - @javax.annotation.Nullable - private String guid; - - public static final String SERIALIZED_NAME_OBJ_ID = "objId"; - - @SerializedName(SERIALIZED_NAME_OBJ_ID) - @javax.annotation.Nullable - private String objId; - - public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "columnSecurityRules"; - - @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) - @javax.annotation.Nullable - private List columnSecurityRules; - - public ColumnSecurityRuleResponse() {} - - public ColumnSecurityRuleResponse guid(@javax.annotation.Nullable String guid) { - this.guid = guid; - return this; - } - - /** - * GUID of the table for which the column security rules are fetched - * - * @return guid - */ - @javax.annotation.Nullable - public String getGuid() { - return guid; - } - - public void setGuid(@javax.annotation.Nullable String guid) { - this.guid = guid; - } - - public ColumnSecurityRuleResponse objId(@javax.annotation.Nullable String objId) { - this.objId = objId; - return this; - } - /** - * Object ID of the table for which the column security rules are fetched - * - * @return objId - */ - @javax.annotation.Nullable - public String getObjId() { - return objId; - } - - public void setObjId(@javax.annotation.Nullable String objId) { - this.objId = objId; - } - - public ColumnSecurityRuleResponse columnSecurityRules( - @javax.annotation.Nullable List columnSecurityRules) { - this.columnSecurityRules = columnSecurityRules; - return this; - } - - public ColumnSecurityRuleResponse addColumnSecurityRulesItem( - ColumnSecurityRule columnSecurityRulesItem) { - if (this.columnSecurityRules == null) { - this.columnSecurityRules = new ArrayList<>(); - } - this.columnSecurityRules.add(columnSecurityRulesItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * Array containing column security rule objects - * - * @return columnSecurityRules - */ - @javax.annotation.Nullable - public List getColumnSecurityRules() { - return columnSecurityRules; +/** + * ColumnSecurityRuleResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TABLE_GUID = "table_guid"; + @SerializedName(SERIALIZED_NAME_TABLE_GUID) + @javax.annotation.Nullable + private String tableGuid; + + public static final String SERIALIZED_NAME_OBJ_ID = "obj_id"; + @SerializedName(SERIALIZED_NAME_OBJ_ID) + @javax.annotation.Nullable + private String objId; + + public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "column_security_rules"; + @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) + @javax.annotation.Nullable + private List columnSecurityRules; + + public ColumnSecurityRuleResponse() { + } + + public ColumnSecurityRuleResponse tableGuid(@javax.annotation.Nullable String tableGuid) { + this.tableGuid = tableGuid; + return this; + } + + /** + * GUID of the table for which the column security rules are fetched + * @return tableGuid + */ + @javax.annotation.Nullable + public String getTableGuid() { + return tableGuid; + } + + public void setTableGuid(@javax.annotation.Nullable String tableGuid) { + this.tableGuid = tableGuid; + } + + + public ColumnSecurityRuleResponse objId(@javax.annotation.Nullable String objId) { + this.objId = objId; + return this; + } + + /** + * Object ID of the table for which the column security rules are fetched + * @return objId + */ + @javax.annotation.Nullable + public String getObjId() { + return objId; + } + + public void setObjId(@javax.annotation.Nullable String objId) { + this.objId = objId; + } + + + public ColumnSecurityRuleResponse columnSecurityRules(@javax.annotation.Nullable List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + return this; + } + + public ColumnSecurityRuleResponse addColumnSecurityRulesItem(ColumnSecurityRule columnSecurityRulesItem) { + if (this.columnSecurityRules == null) { + this.columnSecurityRules = new ArrayList<>(); } + this.columnSecurityRules.add(columnSecurityRulesItem); + return this; + } - public void setColumnSecurityRules( - @javax.annotation.Nullable List columnSecurityRules) { - this.columnSecurityRules = columnSecurityRules; - } + /** + * Array containing column security rule objects + * @return columnSecurityRules + */ + @javax.annotation.Nullable + public List getColumnSecurityRules() { + return columnSecurityRules; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleResponse columnSecurityRuleResponse = (ColumnSecurityRuleResponse) o; - return Objects.equals(this.guid, columnSecurityRuleResponse.guid) - && Objects.equals(this.objId, columnSecurityRuleResponse.objId) - && Objects.equals( - this.columnSecurityRules, columnSecurityRuleResponse.columnSecurityRules); - } + public void setColumnSecurityRules(@javax.annotation.Nullable List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + } - 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(guid, objId, columnSecurityRules); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleResponse {\n"); - sb.append(" guid: ").append(toIndentedString(guid)).append("\n"); - sb.append(" objId: ").append(toIndentedString(objId)).append("\n"); - sb.append(" columnSecurityRules: ") - .append(toIndentedString(columnSecurityRules)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ColumnSecurityRuleResponse columnSecurityRuleResponse = (ColumnSecurityRuleResponse) o; + return Objects.equals(this.tableGuid, columnSecurityRuleResponse.tableGuid) && + Objects.equals(this.objId, columnSecurityRuleResponse.objId) && + Objects.equals(this.columnSecurityRules, columnSecurityRuleResponse.columnSecurityRules); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(tableGuid, objId, columnSecurityRules); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("guid"); - openapiFields.add("objId"); - openapiFields.add("columnSecurityRules"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleResponse {\n"); + sb.append(" tableGuid: ").append(toIndentedString(tableGuid)).append("\n"); + sb.append(" objId: ").append(toIndentedString(objId)).append("\n"); + sb.append(" columnSecurityRules: ").append(toIndentedString(columnSecurityRules)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleResponse is not" - + " found in the empty JSON string", - ColumnSecurityRuleResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("table_guid"); + openapiFields.add("obj_id"); + openapiFields.add("column_security_rules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleResponse is not found in the empty JSON string", ColumnSecurityRuleResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("guid") != null && !jsonObj.get("guid").isJsonNull()) - && !jsonObj.get("guid").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `guid` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("guid").toString())); - } - if ((jsonObj.get("objId") != null && !jsonObj.get("objId").isJsonNull()) - && !jsonObj.get("objId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `objId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("objId").toString())); + if ((jsonObj.get("table_guid") != null && !jsonObj.get("table_guid").isJsonNull()) && !jsonObj.get("table_guid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `table_guid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("table_guid").toString())); + } + if ((jsonObj.get("obj_id") != null && !jsonObj.get("obj_id").isJsonNull()) && !jsonObj.get("obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `obj_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obj_id").toString())); + } + if (jsonObj.get("column_security_rules") != null && !jsonObj.get("column_security_rules").isJsonNull()) { + JsonArray jsonArraycolumnSecurityRules = jsonObj.getAsJsonArray("column_security_rules"); + if (jsonArraycolumnSecurityRules != null) { + // ensure the json data is an array + if (!jsonObj.get("column_security_rules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `column_security_rules` to be an array in the JSON string but got `%s`", jsonObj.get("column_security_rules").toString())); + } + + // validate the optional field `column_security_rules` (array) + for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { + ColumnSecurityRule.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); + }; } - if (jsonObj.get("columnSecurityRules") != null - && !jsonObj.get("columnSecurityRules").isJsonNull()) { - JsonArray jsonArraycolumnSecurityRules = jsonObj.getAsJsonArray("columnSecurityRules"); - if (jsonArraycolumnSecurityRules != null) { - // ensure the json data is an array - if (!jsonObj.get("columnSecurityRules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `columnSecurityRules` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("columnSecurityRules").toString())); - } - - // validate the optional field `columnSecurityRules` (array) - for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { - ColumnSecurityRule.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of ColumnSecurityRuleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleResponse - * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleResponse - */ - public static ColumnSecurityRuleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleResponse.class); - } - - /** - * Convert an instance of ColumnSecurityRuleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRuleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleResponse + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleResponse + */ + public static ColumnSecurityRuleResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleResponse.class); + } + + /** + * Convert an instance of ColumnSecurityRuleResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java index 50a60380b..98141e4d0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java @@ -4,245 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ColumnSecurityRuleSourceTable */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleSourceTable implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public ColumnSecurityRuleSourceTable() {} - - public ColumnSecurityRuleSourceTable id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the source table - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ColumnSecurityRuleSourceTable name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * The name of the source table - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleSourceTable columnSecurityRuleSourceTable = - (ColumnSecurityRuleSourceTable) o; - return Objects.equals(this.id, columnSecurityRuleSourceTable.id) - && Objects.equals(this.name, columnSecurityRuleSourceTable.name); +/** + * ColumnSecurityRuleSourceTable + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleSourceTable implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ColumnSecurityRuleSourceTable() { + } + + public ColumnSecurityRuleSourceTable id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source table + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ColumnSecurityRuleSourceTable name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the source table + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(id, name); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleSourceTable {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); + ColumnSecurityRuleSourceTable columnSecurityRuleSourceTable = (ColumnSecurityRuleSourceTable) o; + return Objects.equals(this.id, columnSecurityRuleSourceTable.id) && + Objects.equals(this.name, columnSecurityRuleSourceTable.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleSourceTable {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleSourceTable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleSourceTable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleSourceTable is not found in the empty JSON string", ColumnSecurityRuleSourceTable.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ColumnSecurityRuleSourceTable - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleSourceTable.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleSourceTable is not" - + " found in the empty JSON string", - ColumnSecurityRuleSourceTable.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleSourceTable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleSourceTable` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleSourceTable.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleSourceTable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ColumnSecurityRuleSourceTable.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleSourceTable.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleSourceTable.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleSourceTable' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ColumnSecurityRuleSourceTable.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleSourceTable value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleSourceTable read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ColumnSecurityRuleSourceTable given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleSourceTable - * @throws IOException if the JSON string is invalid with respect to - * ColumnSecurityRuleSourceTable - */ - public static ColumnSecurityRuleSourceTable fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleSourceTable.class); - } - - /** - * Convert an instance of ColumnSecurityRuleSourceTable to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleSourceTable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleSourceTable' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleSourceTable.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleSourceTable value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleSourceTable read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRuleSourceTable given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleSourceTable + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleSourceTable + */ + public static ColumnSecurityRuleSourceTable fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleSourceTable.class); + } + + /** + * Convert an instance of ColumnSecurityRuleSourceTable to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java index 6e0493f29..5b027c5fc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java @@ -4,253 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ColumnSecurityRuleTableInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleTableInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; - - @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) - @javax.annotation.Nullable - private String objIdentifier; - - public ColumnSecurityRuleTableInput() {} - - public ColumnSecurityRuleTableInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Name or GUID of the table - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } - - public ColumnSecurityRuleTableInput objIdentifier( - @javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; - return this; - } - - /** - * Object ID of the table - * - * @return objIdentifier - */ - @javax.annotation.Nullable - public String getObjIdentifier() { - return objIdentifier; - } - - public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleTableInput columnSecurityRuleTableInput = - (ColumnSecurityRuleTableInput) o; - return Objects.equals(this.identifier, columnSecurityRuleTableInput.identifier) - && Objects.equals(this.objIdentifier, columnSecurityRuleTableInput.objIdentifier); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(identifier, objIdentifier); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleTableInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("obj_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ColumnSecurityRuleTableInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleTableInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleTableInput is not" - + " found in the empty JSON string", - ColumnSecurityRuleTableInput.openapiRequiredFields.toString())); - } +/** + * ColumnSecurityRuleTableInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleTableInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + public ColumnSecurityRuleTableInput() { + } + + public ColumnSecurityRuleTableInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Name or GUID of the table + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public ColumnSecurityRuleTableInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * Object ID of the table + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleTableInput columnSecurityRuleTableInput = (ColumnSecurityRuleTableInput) o; + return Objects.equals(this.identifier, columnSecurityRuleTableInput.identifier) && + Objects.equals(this.objIdentifier, columnSecurityRuleTableInput.objIdentifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, objIdentifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleTableInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleTableInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleTableInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleTableInput is not found in the empty JSON string", ColumnSecurityRuleTableInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleTableInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleTableInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleTableInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleTableInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) - && !jsonObj.get("obj_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `obj_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("obj_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleTableInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleTableInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ColumnSecurityRuleTableInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleTableInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleTableInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ColumnSecurityRuleTableInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleTableInput - * @throws IOException if the JSON string is invalid with respect to - * ColumnSecurityRuleTableInput - */ - public static ColumnSecurityRuleTableInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleTableInput.class); - } - - /** - * Convert an instance of ColumnSecurityRuleTableInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `obj_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obj_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleTableInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleTableInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleTableInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleTableInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleTableInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleTableInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleTableInput + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleTableInput + */ + public static ColumnSecurityRuleTableInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleTableInput.class); + } + + /** + * Convert an instance of ColumnSecurityRuleTableInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java index 3d69a24ad..f32de2bc9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java @@ -4,315 +4,296 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleGroupOperation; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ColumnSecurityRuleUpdate */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ColumnSecurityRuleUpdate implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COLUMN_IDENTIFIER = "column_identifier"; - - @SerializedName(SERIALIZED_NAME_COLUMN_IDENTIFIER) - @javax.annotation.Nonnull - private String columnIdentifier; - - public static final String SERIALIZED_NAME_IS_UNSECURED = "is_unsecured"; - - @SerializedName(SERIALIZED_NAME_IS_UNSECURED) - @javax.annotation.Nullable - private Boolean isUnsecured; - - public static final String SERIALIZED_NAME_GROUP_ACCESS = "group_access"; - - @SerializedName(SERIALIZED_NAME_GROUP_ACCESS) - @javax.annotation.Nullable - private List groupAccess; - - public ColumnSecurityRuleUpdate() {} - - public ColumnSecurityRuleUpdate columnIdentifier( - @javax.annotation.Nonnull String columnIdentifier) { - this.columnIdentifier = columnIdentifier; - return this; - } - - /** - * Column identifier (col_id or name) - * - * @return columnIdentifier - */ - @javax.annotation.Nonnull - public String getColumnIdentifier() { - return columnIdentifier; - } - - public void setColumnIdentifier(@javax.annotation.Nonnull String columnIdentifier) { - this.columnIdentifier = columnIdentifier; - } - - public ColumnSecurityRuleUpdate isUnsecured(@javax.annotation.Nullable Boolean isUnsecured) { - this.isUnsecured = isUnsecured; - return this; - } - - /** - * If true, the column will be marked as unprotected and all groups associated with it will be - * removed - * - * @return isUnsecured - */ - @javax.annotation.Nullable - public Boolean getIsUnsecured() { - return isUnsecured; - } - - public void setIsUnsecured(@javax.annotation.Nullable Boolean isUnsecured) { - this.isUnsecured = isUnsecured; - } - public ColumnSecurityRuleUpdate groupAccess( - @javax.annotation.Nullable List groupAccess) { - this.groupAccess = groupAccess; - return this; - } - - public ColumnSecurityRuleUpdate addGroupAccessItem( - ColumnSecurityRuleGroupOperation groupAccessItem) { - if (this.groupAccess == null) { - this.groupAccess = new ArrayList<>(); - } - this.groupAccess.add(groupAccessItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * Array of group operation objects that specifies the actions for groups to be associated with - * a column - * - * @return groupAccess - */ - @javax.annotation.Nullable - public List getGroupAccess() { - return groupAccess; +/** + * ColumnSecurityRuleUpdate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleUpdate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_IDENTIFIER = "column_identifier"; + @SerializedName(SERIALIZED_NAME_COLUMN_IDENTIFIER) + @javax.annotation.Nonnull + private String columnIdentifier; + + public static final String SERIALIZED_NAME_IS_UNSECURED = "is_unsecured"; + @SerializedName(SERIALIZED_NAME_IS_UNSECURED) + @javax.annotation.Nullable + private Boolean isUnsecured; + + public static final String SERIALIZED_NAME_GROUP_ACCESS = "group_access"; + @SerializedName(SERIALIZED_NAME_GROUP_ACCESS) + @javax.annotation.Nullable + private List groupAccess; + + public ColumnSecurityRuleUpdate() { + } + + public ColumnSecurityRuleUpdate columnIdentifier(@javax.annotation.Nonnull String columnIdentifier) { + this.columnIdentifier = columnIdentifier; + return this; + } + + /** + * Column identifier (col_id or name) + * @return columnIdentifier + */ + @javax.annotation.Nonnull + public String getColumnIdentifier() { + return columnIdentifier; + } + + public void setColumnIdentifier(@javax.annotation.Nonnull String columnIdentifier) { + this.columnIdentifier = columnIdentifier; + } + + + public ColumnSecurityRuleUpdate isUnsecured(@javax.annotation.Nullable Boolean isUnsecured) { + this.isUnsecured = isUnsecured; + return this; + } + + /** + * If true, the column will be marked as unprotected and all groups associated with it will be removed + * @return isUnsecured + */ + @javax.annotation.Nullable + public Boolean getIsUnsecured() { + return isUnsecured; + } + + public void setIsUnsecured(@javax.annotation.Nullable Boolean isUnsecured) { + this.isUnsecured = isUnsecured; + } + + + public ColumnSecurityRuleUpdate groupAccess(@javax.annotation.Nullable List groupAccess) { + this.groupAccess = groupAccess; + return this; + } + + public ColumnSecurityRuleUpdate addGroupAccessItem(ColumnSecurityRuleGroupOperation groupAccessItem) { + if (this.groupAccess == null) { + this.groupAccess = new ArrayList<>(); } + this.groupAccess.add(groupAccessItem); + return this; + } - public void setGroupAccess( - @javax.annotation.Nullable List groupAccess) { - this.groupAccess = groupAccess; - } + /** + * Array of group operation objects that specifies the actions for groups to be associated with a column + * @return groupAccess + */ + @javax.annotation.Nullable + public List getGroupAccess() { + return groupAccess; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ColumnSecurityRuleUpdate columnSecurityRuleUpdate = (ColumnSecurityRuleUpdate) o; - return Objects.equals(this.columnIdentifier, columnSecurityRuleUpdate.columnIdentifier) - && Objects.equals(this.isUnsecured, columnSecurityRuleUpdate.isUnsecured) - && Objects.equals(this.groupAccess, columnSecurityRuleUpdate.groupAccess); - } + public void setGroupAccess(@javax.annotation.Nullable List groupAccess) { + this.groupAccess = groupAccess; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(columnIdentifier, isUnsecured, groupAccess); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ColumnSecurityRuleUpdate {\n"); - sb.append(" columnIdentifier: ").append(toIndentedString(columnIdentifier)).append("\n"); - sb.append(" isUnsecured: ").append(toIndentedString(isUnsecured)).append("\n"); - sb.append(" groupAccess: ").append(toIndentedString(groupAccess)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ColumnSecurityRuleUpdate columnSecurityRuleUpdate = (ColumnSecurityRuleUpdate) o; + return Objects.equals(this.columnIdentifier, columnSecurityRuleUpdate.columnIdentifier) && + Objects.equals(this.isUnsecured, columnSecurityRuleUpdate.isUnsecured) && + Objects.equals(this.groupAccess, columnSecurityRuleUpdate.groupAccess); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(columnIdentifier, isUnsecured, groupAccess); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("column_identifier"); - openapiFields.add("is_unsecured"); - openapiFields.add("group_access"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("column_identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleUpdate {\n"); + sb.append(" columnIdentifier: ").append(toIndentedString(columnIdentifier)).append("\n"); + sb.append(" isUnsecured: ").append(toIndentedString(isUnsecured)).append("\n"); + sb.append(" groupAccess: ").append(toIndentedString(groupAccess)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleUpdate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ColumnSecurityRuleUpdate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ColumnSecurityRuleUpdate is not found" - + " in the empty JSON string", - ColumnSecurityRuleUpdate.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_identifier"); + openapiFields.add("is_unsecured"); + openapiFields.add("group_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleUpdate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ColumnSecurityRuleUpdate is not found in the empty JSON string", ColumnSecurityRuleUpdate.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ColumnSecurityRuleUpdate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ColumnSecurityRuleUpdate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ColumnSecurityRuleUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ColumnSecurityRuleUpdate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ColumnSecurityRuleUpdate.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleUpdate.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("column_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("column_identifier").toString())); + if (!jsonObj.get("column_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `column_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("column_identifier").toString())); + } + if (jsonObj.get("group_access") != null && !jsonObj.get("group_access").isJsonNull()) { + JsonArray jsonArraygroupAccess = jsonObj.getAsJsonArray("group_access"); + if (jsonArraygroupAccess != null) { + // ensure the json data is an array + if (!jsonObj.get("group_access").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_access` to be an array in the JSON string but got `%s`", jsonObj.get("group_access").toString())); + } + + // validate the optional field `group_access` (array) + for (int i = 0; i < jsonArraygroupAccess.size(); i++) { + ColumnSecurityRuleGroupOperation.validateJsonElement(jsonArraygroupAccess.get(i)); + }; } - if (jsonObj.get("group_access") != null && !jsonObj.get("group_access").isJsonNull()) { - JsonArray jsonArraygroupAccess = jsonObj.getAsJsonArray("group_access"); - if (jsonArraygroupAccess != null) { - // ensure the json data is an array - if (!jsonObj.get("group_access").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_access` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_access").toString())); - } - - // validate the optional field `group_access` (array) - for (int i = 0; i < jsonArraygroupAccess.size(); i++) { - ColumnSecurityRuleGroupOperation.validateJsonElement( - jsonArraygroupAccess.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ColumnSecurityRuleUpdate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ColumnSecurityRuleUpdate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleUpdate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ColumnSecurityRuleUpdate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ColumnSecurityRuleUpdate read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of ColumnSecurityRuleUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of ColumnSecurityRuleUpdate - * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleUpdate - */ - public static ColumnSecurityRuleUpdate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleUpdate.class); - } - - /** - * Convert an instance of ColumnSecurityRuleUpdate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleUpdate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleUpdate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ColumnSecurityRuleUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleUpdate + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleUpdate + */ + public static ColumnSecurityRuleUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleUpdate.class); + } + + /** + * Convert an instance of ColumnSecurityRuleUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java index acd212a3c..733f8c31c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java @@ -4,342 +4,323 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.MetadataObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CommitBranchRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CommitBranchRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - - public static final String SERIALIZED_NAME_DELETE_AWARE = "delete_aware"; - - @SerializedName(SERIALIZED_NAME_DELETE_AWARE) - @javax.annotation.Nullable - private Boolean deleteAware = true; - - public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; - - @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - @javax.annotation.Nullable - private String branchName; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nonnull - private String comment; - - public CommitBranchRequest() {} - - public CommitBranchRequest metadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; - } - - public CommitBranchRequest addMetadataItem(MetadataObject metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata objects. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } - - public CommitBranchRequest deleteAware(@javax.annotation.Nullable Boolean deleteAware) { - this.deleteAware = deleteAware; - return this; - } - - /** - * Delete the tml files from version control repo if it does not exist in the ThoughSpot - * instance - * - * @return deleteAware - */ - @javax.annotation.Nullable - public Boolean getDeleteAware() { - return deleteAware; - } - public void setDeleteAware(@javax.annotation.Nullable Boolean deleteAware) { - this.deleteAware = deleteAware; - } - - public CommitBranchRequest branchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - return this; - } - - /** - * Name of the remote branch where object should be pushed Note: If no branch_name is specified, - * then the commit_branch_name will be considered. - * - * @return branchName - */ - @javax.annotation.Nullable - public String getBranchName() { - return branchName; - } - - public void setBranchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - } - - public CommitBranchRequest comment(@javax.annotation.Nonnull String comment) { - this.comment = comment; - return this; - } - - /** - * Comment to be added to the commit - * - * @return comment - */ - @javax.annotation.Nonnull - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nonnull String comment) { - this.comment = comment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CommitBranchRequest commitBranchRequest = (CommitBranchRequest) o; - return Objects.equals(this.metadata, commitBranchRequest.metadata) - && Objects.equals(this.deleteAware, commitBranchRequest.deleteAware) - && Objects.equals(this.branchName, commitBranchRequest.branchName) - && Objects.equals(this.comment, commitBranchRequest.comment); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(metadata, deleteAware, branchName, comment); +/** + * CommitBranchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CommitBranchRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_DELETE_AWARE = "delete_aware"; + @SerializedName(SERIALIZED_NAME_DELETE_AWARE) + @javax.annotation.Nullable + private Boolean deleteAware = true; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nullable + private String branchName; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public CommitBranchRequest() { + } + + public CommitBranchRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public CommitBranchRequest addMetadataItem(MetadataObject metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public CommitBranchRequest deleteAware(@javax.annotation.Nullable Boolean deleteAware) { + this.deleteAware = deleteAware; + return this; + } + + /** + * Delete the tml files from version control repo if it does not exist in the ThoughSpot instance + * @return deleteAware + */ + @javax.annotation.Nullable + public Boolean getDeleteAware() { + return deleteAware; + } + + public void setDeleteAware(@javax.annotation.Nullable Boolean deleteAware) { + this.deleteAware = deleteAware; + } + + + public CommitBranchRequest branchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the remote branch where object should be pushed Note: If no branch_name is specified, then the commit_branch_name will be considered. + * @return branchName + */ + @javax.annotation.Nullable + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + } + + + public CommitBranchRequest comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Comment to be added to the commit + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CommitBranchRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" deleteAware: ").append(toIndentedString(deleteAware)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CommitBranchRequest commitBranchRequest = (CommitBranchRequest) o; + return Objects.equals(this.metadata, commitBranchRequest.metadata) && + Objects.equals(this.deleteAware, commitBranchRequest.deleteAware) && + Objects.equals(this.branchName, commitBranchRequest.branchName) && + Objects.equals(this.comment, commitBranchRequest.comment); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, deleteAware, branchName, comment); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("delete_aware"); - openapiFields.add("branch_name"); - openapiFields.add("comment"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("comment"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitBranchRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" deleteAware: ").append(toIndentedString(deleteAware)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CommitBranchRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CommitBranchRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CommitBranchRequest is not found in" - + " the empty JSON string", - CommitBranchRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("delete_aware"); + openapiFields.add("branch_name"); + openapiFields.add("comment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("comment"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitBranchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitBranchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CommitBranchRequest is not found in the empty JSON string", CommitBranchRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CommitBranchRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CommitBranchRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommitBranchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommitBranchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommitBranchRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommitBranchRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - MetadataObject.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) - && !jsonObj.get("branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("branch_name").toString())); - } - if (!jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `comment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommitBranchRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommitBranchRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CommitBranchRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CommitBranchRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommitBranchRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CommitBranchRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommitBranchRequest - * @throws IOException if the JSON string is invalid with respect to CommitBranchRequest - */ - public static CommitBranchRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommitBranchRequest.class); - } - - /** - * Convert an instance of CommitBranchRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataObject.validateJsonElement(jsonArraymetadata.get(i)); + }; + if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) && !jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch_name").toString())); + } + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitBranchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitBranchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommitBranchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitBranchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommitBranchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CommitBranchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitBranchRequest + * @throws IOException if the JSON string is invalid with respect to CommitBranchRequest + */ + public static CommitBranchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitBranchRequest.class); + } + + /** + * Convert an instance of CommitBranchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java index 1057b55b2..83918571c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java @@ -4,292 +4,278 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CommitFileType */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CommitFileType implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; - - @SerializedName(SERIALIZED_NAME_FILE_NAME) - @javax.annotation.Nonnull - private String fileName; - - public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; - - @SerializedName(SERIALIZED_NAME_STATUS_CODE) - @javax.annotation.Nonnull - private String statusCode; - - public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; - - @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) - @javax.annotation.Nullable - private String statusMessage; - - public CommitFileType() {} - - public CommitFileType fileName(@javax.annotation.Nonnull String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Name of the file deployed - * - * @return fileName - */ - @javax.annotation.Nonnull - public String getFileName() { - return fileName; - } - - public void setFileName(@javax.annotation.Nonnull String fileName) { - this.fileName = fileName; - } - - public CommitFileType statusCode(@javax.annotation.Nonnull String statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Indicates the status of deployment for the file - * - * @return statusCode - */ - @javax.annotation.Nonnull - public String getStatusCode() { - return statusCode; - } - - public void setStatusCode(@javax.annotation.Nonnull String statusCode) { - this.statusCode = statusCode; - } - public CommitFileType statusMessage(@javax.annotation.Nullable String statusMessage) { - this.statusMessage = statusMessage; - return this; - } - - /** - * Any error or warning with the deployment - * - * @return statusMessage - */ - @javax.annotation.Nullable - public String getStatusMessage() { - return statusMessage; - } +import com.thoughtspot.client.JSON; - public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { - this.statusMessage = statusMessage; +/** + * CommitFileType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CommitFileType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull + private String fileName; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull + private String statusCode; + + public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; + @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nullable + private String statusMessage; + + public CommitFileType() { + } + + public CommitFileType fileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the file deployed + * @return fileName + */ + @javax.annotation.Nonnull + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + } + + + public CommitFileType statusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Indicates the status of deployment for the file + * @return statusCode + */ + @javax.annotation.Nonnull + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + } + + + public CommitFileType statusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + return this; + } + + /** + * Any error or warning with the deployment + * @return statusMessage + */ + @javax.annotation.Nullable + public String getStatusMessage() { + return statusMessage; + } + + public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CommitFileType commitFileType = (CommitFileType) o; - return Objects.equals(this.fileName, commitFileType.fileName) - && Objects.equals(this.statusCode, commitFileType.statusCode) - && Objects.equals(this.statusMessage, commitFileType.statusMessage); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + CommitFileType commitFileType = (CommitFileType) o; + return Objects.equals(this.fileName, commitFileType.fileName) && + Objects.equals(this.statusCode, commitFileType.statusCode) && + Objects.equals(this.statusMessage, commitFileType.statusMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fileName, statusCode, statusMessage); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(fileName, statusCode, statusMessage); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitFileType {\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("file_name"); + openapiFields.add("status_code"); + openapiFields.add("status_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("file_name"); + openapiRequiredFields.add("status_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitFileType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitFileType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CommitFileType is not found in the empty JSON string", CommitFileType.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CommitFileType {\n"); - sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommitFileType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommitFileType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("file_name"); - openapiFields.add("status_code"); - openapiFields.add("status_message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("file_name"); - openapiRequiredFields.add("status_code"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CommitFileType - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CommitFileType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CommitFileType is not found in the" - + " empty JSON string", - CommitFileType.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CommitFileType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CommitFileType` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommitFileType.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommitFileType.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("file_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_name").toString())); - } - if (!jsonObj.get("status_code").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_code` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("status_code").toString())); - } - if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) - && !jsonObj.get("status_message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_message` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("status_message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommitFileType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommitFileType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CommitFileType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CommitFileType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommitFileType read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CommitFileType given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommitFileType - * @throws IOException if the JSON string is invalid with respect to CommitFileType - */ - public static CommitFileType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommitFileType.class); - } - - /** - * Convert an instance of CommitFileType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_name").toString())); + } + if (!jsonObj.get("status_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_code").toString())); + } + if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) && !jsonObj.get("status_message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitFileType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitFileType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommitFileType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitFileType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommitFileType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CommitFileType given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitFileType + * @throws IOException if the JSON string is invalid with respect to CommitFileType + */ + public static CommitFileType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitFileType.class); + } + + /** + * Convert an instance of CommitFileType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java index 035c0df82..ec4afa96c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java @@ -4,373 +4,360 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorType; +import com.thoughtspot.client.model.CommiterType; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CommitHistoryResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CommitHistoryResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COMMITTER = "committer"; - - @SerializedName(SERIALIZED_NAME_COMMITTER) - @javax.annotation.Nonnull - private CommiterType committer; - - public static final String SERIALIZED_NAME_AUTHOR = "author"; - - @SerializedName(SERIALIZED_NAME_AUTHOR) - @javax.annotation.Nonnull - private AuthorType author; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nonnull - private String comment; - - public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; - - @SerializedName(SERIALIZED_NAME_COMMIT_TIME) - @javax.annotation.Nonnull - private String commitTime; - - public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; - - @SerializedName(SERIALIZED_NAME_COMMIT_ID) - @javax.annotation.Nonnull - private String commitId; - - public static final String SERIALIZED_NAME_BRANCH = "branch"; - - @SerializedName(SERIALIZED_NAME_BRANCH) - @javax.annotation.Nonnull - private String branch; - - public CommitHistoryResponse() {} - - public CommitHistoryResponse committer(@javax.annotation.Nonnull CommiterType committer) { - this.committer = committer; - return this; - } - - /** - * Get committer - * - * @return committer - */ - @javax.annotation.Nonnull - public CommiterType getCommitter() { - return committer; - } - - public void setCommitter(@javax.annotation.Nonnull CommiterType committer) { - this.committer = committer; - } - - public CommitHistoryResponse author(@javax.annotation.Nonnull AuthorType author) { - this.author = author; - return this; - } - - /** - * Get author - * - * @return author - */ - @javax.annotation.Nonnull - public AuthorType getAuthor() { - return author; - } - - public void setAuthor(@javax.annotation.Nonnull AuthorType author) { - this.author = author; - } - - public CommitHistoryResponse comment(@javax.annotation.Nonnull String comment) { - this.comment = comment; - return this; - } - - /** - * Comments associated with the commit - * - * @return comment - */ - @javax.annotation.Nonnull - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nonnull String comment) { - this.comment = comment; - } - - public CommitHistoryResponse commitTime(@javax.annotation.Nonnull String commitTime) { - this.commitTime = commitTime; - return this; - } - - /** - * Time at which the changes were committed. - * - * @return commitTime - */ - @javax.annotation.Nonnull - public String getCommitTime() { - return commitTime; - } - - public void setCommitTime(@javax.annotation.Nonnull String commitTime) { - this.commitTime = commitTime; - } - - public CommitHistoryResponse commitId(@javax.annotation.Nonnull String commitId) { - this.commitId = commitId; - return this; - } - - /** - * SHA id associated with the commit - * - * @return commitId - */ - @javax.annotation.Nonnull - public String getCommitId() { - return commitId; - } - - public void setCommitId(@javax.annotation.Nonnull String commitId) { - this.commitId = commitId; - } - - public CommitHistoryResponse branch(@javax.annotation.Nonnull String branch) { - this.branch = branch; - return this; - } - - /** - * Branch where changes were committed - * - * @return branch - */ - @javax.annotation.Nonnull - public String getBranch() { - return branch; - } - - public void setBranch(@javax.annotation.Nonnull String branch) { - this.branch = branch; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CommitHistoryResponse commitHistoryResponse = (CommitHistoryResponse) o; - return Objects.equals(this.committer, commitHistoryResponse.committer) - && Objects.equals(this.author, commitHistoryResponse.author) - && Objects.equals(this.comment, commitHistoryResponse.comment) - && Objects.equals(this.commitTime, commitHistoryResponse.commitTime) - && Objects.equals(this.commitId, commitHistoryResponse.commitId) - && Objects.equals(this.branch, commitHistoryResponse.branch); - } - - @Override - public int hashCode() { - return Objects.hash(committer, author, comment, commitTime, commitId, branch); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CommitHistoryResponse {\n"); - sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); - sb.append(" author: ").append(toIndentedString(author)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); - sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); - sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * CommitHistoryResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CommitHistoryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMITTER = "committer"; + @SerializedName(SERIALIZED_NAME_COMMITTER) + @javax.annotation.Nonnull + private CommiterType committer; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nonnull + private AuthorType author; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; + @SerializedName(SERIALIZED_NAME_COMMIT_TIME) + @javax.annotation.Nonnull + private String commitTime; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nonnull + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH = "branch"; + @SerializedName(SERIALIZED_NAME_BRANCH) + @javax.annotation.Nonnull + private String branch; + + public CommitHistoryResponse() { + } + + public CommitHistoryResponse committer(@javax.annotation.Nonnull CommiterType committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + */ + @javax.annotation.Nonnull + public CommiterType getCommitter() { + return committer; + } + + public void setCommitter(@javax.annotation.Nonnull CommiterType committer) { + this.committer = committer; + } + + + public CommitHistoryResponse author(@javax.annotation.Nonnull AuthorType author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + */ + @javax.annotation.Nonnull + public AuthorType getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nonnull AuthorType author) { + this.author = author; + } + + + public CommitHistoryResponse comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Comments associated with the commit + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + + public CommitHistoryResponse commitTime(@javax.annotation.Nonnull String commitTime) { + this.commitTime = commitTime; + return this; + } + + /** + * Time at which the changes were committed. + * @return commitTime + */ + @javax.annotation.Nonnull + public String getCommitTime() { + return commitTime; + } + + public void setCommitTime(@javax.annotation.Nonnull String commitTime) { + this.commitTime = commitTime; + } + + + public CommitHistoryResponse commitId(@javax.annotation.Nonnull String commitId) { + this.commitId = commitId; + return this; + } + + /** + * SHA id associated with the commit + * @return commitId + */ + @javax.annotation.Nonnull + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nonnull String commitId) { + this.commitId = commitId; + } + + + public CommitHistoryResponse branch(@javax.annotation.Nonnull String branch) { + this.branch = branch; + return this; + } + + /** + * Branch where changes were committed + * @return branch + */ + @javax.annotation.Nonnull + public String getBranch() { + return branch; + } + + public void setBranch(@javax.annotation.Nonnull String branch) { + this.branch = branch; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("committer"); - openapiFields.add("author"); - openapiFields.add("comment"); - openapiFields.add("commit_time"); - openapiFields.add("commit_id"); - openapiFields.add("branch"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("committer"); - openapiRequiredFields.add("author"); - openapiRequiredFields.add("comment"); - openapiRequiredFields.add("commit_time"); - openapiRequiredFields.add("commit_id"); - openapiRequiredFields.add("branch"); + CommitHistoryResponse commitHistoryResponse = (CommitHistoryResponse) o; + return Objects.equals(this.committer, commitHistoryResponse.committer) && + Objects.equals(this.author, commitHistoryResponse.author) && + Objects.equals(this.comment, commitHistoryResponse.comment) && + Objects.equals(this.commitTime, commitHistoryResponse.commitTime) && + Objects.equals(this.commitId, commitHistoryResponse.commitId) && + Objects.equals(this.branch, commitHistoryResponse.branch); + } + + @Override + public int hashCode() { + return Objects.hash(committer, author, comment, commitTime, commitId, branch); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitHistoryResponse {\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CommitHistoryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CommitHistoryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CommitHistoryResponse is not found in" - + " the empty JSON string", - CommitHistoryResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("committer"); + openapiFields.add("author"); + openapiFields.add("comment"); + openapiFields.add("commit_time"); + openapiFields.add("commit_id"); + openapiFields.add("branch"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("committer"); + openapiRequiredFields.add("author"); + openapiRequiredFields.add("comment"); + openapiRequiredFields.add("commit_time"); + openapiRequiredFields.add("commit_id"); + openapiRequiredFields.add("branch"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitHistoryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CommitHistoryResponse is not found in the empty JSON string", CommitHistoryResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CommitHistoryResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CommitHistoryResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommitHistoryResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommitHistoryResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommitHistoryResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommitHistoryResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `committer` - CommiterType.validateJsonElement(jsonObj.get("committer")); - // validate the required field `author` - AuthorType.validateJsonElement(jsonObj.get("author")); - if (!jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `comment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("comment").toString())); - } - if (!jsonObj.get("commit_time").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_time` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_time").toString())); - } - if (!jsonObj.get("commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_id").toString())); - } - if (!jsonObj.get("branch").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("branch").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommitHistoryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommitHistoryResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CommitHistoryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CommitHistoryResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommitHistoryResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CommitHistoryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommitHistoryResponse - * @throws IOException if the JSON string is invalid with respect to CommitHistoryResponse - */ - public static CommitHistoryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommitHistoryResponse.class); - } - - /** - * Convert an instance of CommitHistoryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `committer` + CommiterType.validateJsonElement(jsonObj.get("committer")); + // validate the required field `author` + AuthorType.validateJsonElement(jsonObj.get("author")); + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + if (!jsonObj.get("commit_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_time").toString())); + } + if (!jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_id").toString())); + } + if (!jsonObj.get("branch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitHistoryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitHistoryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommitHistoryResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitHistoryResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommitHistoryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CommitHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitHistoryResponse + * @throws IOException if the JSON string is invalid with respect to CommitHistoryResponse + */ + public static CommitHistoryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitHistoryResponse.class); + } + + /** + * Convert an instance of CommitHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java index bb4ed981b..39f36a3eb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java @@ -4,443 +4,415 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorType; +import com.thoughtspot.client.model.CommitFileType; +import com.thoughtspot.client.model.CommiterType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CommitResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CommitResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COMMITTER = "committer"; - - @SerializedName(SERIALIZED_NAME_COMMITTER) - @javax.annotation.Nullable - private CommiterType committer; - - public static final String SERIALIZED_NAME_AUTHOR = "author"; - - @SerializedName(SERIALIZED_NAME_AUTHOR) - @javax.annotation.Nullable - private AuthorType author; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; - - @SerializedName(SERIALIZED_NAME_COMMIT_TIME) - @javax.annotation.Nullable - private String commitTime; - - public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; - - @SerializedName(SERIALIZED_NAME_COMMIT_ID) - @javax.annotation.Nullable - private String commitId; - - public static final String SERIALIZED_NAME_BRANCH = "branch"; - - @SerializedName(SERIALIZED_NAME_BRANCH) - @javax.annotation.Nullable - private String branch; - - public static final String SERIALIZED_NAME_COMMITTED_FILES = "committed_files"; - - @SerializedName(SERIALIZED_NAME_COMMITTED_FILES) - @javax.annotation.Nullable - private List committedFiles; - - public CommitResponse() {} - - public CommitResponse committer(@javax.annotation.Nullable CommiterType committer) { - this.committer = committer; - return this; - } - - /** - * Get committer - * - * @return committer - */ - @javax.annotation.Nullable - public CommiterType getCommitter() { - return committer; - } - - public void setCommitter(@javax.annotation.Nullable CommiterType committer) { - this.committer = committer; - } - - public CommitResponse author(@javax.annotation.Nullable AuthorType author) { - this.author = author; - return this; - } - - /** - * Get author - * - * @return author - */ - @javax.annotation.Nullable - public AuthorType getAuthor() { - return author; - } - - public void setAuthor(@javax.annotation.Nullable AuthorType author) { - this.author = author; - } - - public CommitResponse comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * Comments associated with the commit - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - public CommitResponse commitTime(@javax.annotation.Nullable String commitTime) { - this.commitTime = commitTime; - return this; - } - - /** - * Time at which the changes were committed. - * - * @return commitTime - */ - @javax.annotation.Nullable - public String getCommitTime() { - return commitTime; - } - public void setCommitTime(@javax.annotation.Nullable String commitTime) { - this.commitTime = commitTime; - } - - public CommitResponse commitId(@javax.annotation.Nullable String commitId) { - this.commitId = commitId; - return this; - } - - /** - * SHA id associated with the commit - * - * @return commitId - */ - @javax.annotation.Nullable - public String getCommitId() { - return commitId; - } - - public void setCommitId(@javax.annotation.Nullable String commitId) { - this.commitId = commitId; - } - - public CommitResponse branch(@javax.annotation.Nullable String branch) { - this.branch = branch; - return this; - } - - /** - * Branch where changes were committed - * - * @return branch - */ - @javax.annotation.Nullable - public String getBranch() { - return branch; - } - - public void setBranch(@javax.annotation.Nullable String branch) { - this.branch = branch; - } - - public CommitResponse committedFiles( - @javax.annotation.Nullable List committedFiles) { - this.committedFiles = committedFiles; - return this; - } - - public CommitResponse addCommittedFilesItem(CommitFileType committedFilesItem) { - if (this.committedFiles == null) { - this.committedFiles = new ArrayList<>(); - } - this.committedFiles.add(committedFilesItem); - return this; - } - - /** - * Files that were pushed as part of this commit - * - * @return committedFiles - */ - @javax.annotation.Nullable - public List getCommittedFiles() { - return committedFiles; - } - - public void setCommittedFiles(@javax.annotation.Nullable List committedFiles) { - this.committedFiles = committedFiles; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CommitResponse commitResponse = (CommitResponse) o; - return Objects.equals(this.committer, commitResponse.committer) - && Objects.equals(this.author, commitResponse.author) - && Objects.equals(this.comment, commitResponse.comment) - && Objects.equals(this.commitTime, commitResponse.commitTime) - && Objects.equals(this.commitId, commitResponse.commitId) - && Objects.equals(this.branch, commitResponse.branch) - && Objects.equals(this.committedFiles, commitResponse.committedFiles); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - committer, author, comment, commitTime, commitId, branch, committedFiles); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CommitResponse {\n"); - sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); - sb.append(" author: ").append(toIndentedString(author)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); - sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); - sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); - sb.append(" committedFiles: ").append(toIndentedString(committedFiles)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("committer"); - openapiFields.add("author"); - openapiFields.add("comment"); - openapiFields.add("commit_time"); - openapiFields.add("commit_id"); - openapiFields.add("branch"); - openapiFields.add("committed_files"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CommitResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CommitResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CommitResponse is not found in the" - + " empty JSON string", - CommitResponse.openapiRequiredFields.toString())); - } +/** + * CommitResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CommitResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMITTER = "committer"; + @SerializedName(SERIALIZED_NAME_COMMITTER) + @javax.annotation.Nullable + private CommiterType committer; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nullable + private AuthorType author; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nullable + private String comment; + + public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; + @SerializedName(SERIALIZED_NAME_COMMIT_TIME) + @javax.annotation.Nullable + private String commitTime; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nullable + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH = "branch"; + @SerializedName(SERIALIZED_NAME_BRANCH) + @javax.annotation.Nullable + private String branch; + + public static final String SERIALIZED_NAME_COMMITTED_FILES = "committed_files"; + @SerializedName(SERIALIZED_NAME_COMMITTED_FILES) + @javax.annotation.Nullable + private List committedFiles; + + public CommitResponse() { + } + + public CommitResponse committer(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + */ + @javax.annotation.Nullable + public CommiterType getCommitter() { + return committer; + } + + public void setCommitter(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + } + + + public CommitResponse author(@javax.annotation.Nullable AuthorType author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + */ + @javax.annotation.Nullable + public AuthorType getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nullable AuthorType author) { + this.author = author; + } + + + public CommitResponse comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Comments associated with the commit + * @return comment + */ + @javax.annotation.Nullable + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + + public CommitResponse commitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + return this; + } + + /** + * Time at which the changes were committed. + * @return commitTime + */ + @javax.annotation.Nullable + public String getCommitTime() { + return commitTime; + } + + public void setCommitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + } + + + public CommitResponse commitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + return this; + } + + /** + * SHA id associated with the commit + * @return commitId + */ + @javax.annotation.Nullable + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + } + + + public CommitResponse branch(@javax.annotation.Nullable String branch) { + this.branch = branch; + return this; + } + + /** + * Branch where changes were committed + * @return branch + */ + @javax.annotation.Nullable + public String getBranch() { + return branch; + } + + public void setBranch(@javax.annotation.Nullable String branch) { + this.branch = branch; + } + + + public CommitResponse committedFiles(@javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + return this; + } + + public CommitResponse addCommittedFilesItem(CommitFileType committedFilesItem) { + if (this.committedFiles == null) { + this.committedFiles = new ArrayList<>(); + } + this.committedFiles.add(committedFilesItem); + return this; + } + + /** + * Files that were pushed as part of this commit + * @return committedFiles + */ + @javax.annotation.Nullable + public List getCommittedFiles() { + return committedFiles; + } + + public void setCommittedFiles(@javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommitResponse commitResponse = (CommitResponse) o; + return Objects.equals(this.committer, commitResponse.committer) && + Objects.equals(this.author, commitResponse.author) && + Objects.equals(this.comment, commitResponse.comment) && + Objects.equals(this.commitTime, commitResponse.commitTime) && + Objects.equals(this.commitId, commitResponse.commitId) && + Objects.equals(this.branch, commitResponse.branch) && + Objects.equals(this.committedFiles, commitResponse.committedFiles); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(committer, author, comment, commitTime, commitId, branch, committedFiles); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitResponse {\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append(" committedFiles: ").append(toIndentedString(committedFiles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("committer"); + openapiFields.add("author"); + openapiFields.add("comment"); + openapiFields.add("commit_time"); + openapiFields.add("commit_id"); + openapiFields.add("branch"); + openapiFields.add("committed_files"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CommitResponse is not found in the empty JSON string", CommitResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CommitResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CommitResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommitResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommitResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `committer` - if (jsonObj.get("committer") != null && !jsonObj.get("committer").isJsonNull()) { - CommiterType.validateJsonElement(jsonObj.get("committer")); + // validate the optional field `committer` + if (jsonObj.get("committer") != null && !jsonObj.get("committer").isJsonNull()) { + CommiterType.validateJsonElement(jsonObj.get("committer")); + } + // validate the optional field `author` + if (jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) { + AuthorType.validateJsonElement(jsonObj.get("author")); + } + if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + if ((jsonObj.get("commit_time") != null && !jsonObj.get("commit_time").isJsonNull()) && !jsonObj.get("commit_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_time").toString())); + } + if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) && !jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_id").toString())); + } + if ((jsonObj.get("branch") != null && !jsonObj.get("branch").isJsonNull()) && !jsonObj.get("branch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch").toString())); + } + if (jsonObj.get("committed_files") != null && !jsonObj.get("committed_files").isJsonNull()) { + JsonArray jsonArraycommittedFiles = jsonObj.getAsJsonArray("committed_files"); + if (jsonArraycommittedFiles != null) { + // ensure the json data is an array + if (!jsonObj.get("committed_files").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `committed_files` to be an array in the JSON string but got `%s`", jsonObj.get("committed_files").toString())); + } + + // validate the optional field `committed_files` (array) + for (int i = 0; i < jsonArraycommittedFiles.size(); i++) { + CommitFileType.validateJsonElement(jsonArraycommittedFiles.get(i)); + }; } - // validate the optional field `author` - if (jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) { - AuthorType.validateJsonElement(jsonObj.get("author")); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) - && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `comment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("comment").toString())); - } - if ((jsonObj.get("commit_time") != null && !jsonObj.get("commit_time").isJsonNull()) - && !jsonObj.get("commit_time").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_time` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_time").toString())); - } - if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) - && !jsonObj.get("commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_id").toString())); - } - if ((jsonObj.get("branch") != null && !jsonObj.get("branch").isJsonNull()) - && !jsonObj.get("branch").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("branch").toString())); - } - if (jsonObj.get("committed_files") != null - && !jsonObj.get("committed_files").isJsonNull()) { - JsonArray jsonArraycommittedFiles = jsonObj.getAsJsonArray("committed_files"); - if (jsonArraycommittedFiles != null) { - // ensure the json data is an array - if (!jsonObj.get("committed_files").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `committed_files` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("committed_files").toString())); - } - - // validate the optional field `committed_files` (array) - for (int i = 0; i < jsonArraycommittedFiles.size(); i++) { - CommitFileType.validateJsonElement(jsonArraycommittedFiles.get(i)); - } - ; - } - } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommitResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommitResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CommitResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CommitResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommitResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CommitResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommitResponse - * @throws IOException if the JSON string is invalid with respect to CommitResponse - */ - public static CommitResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommitResponse.class); - } - - /** - * Convert an instance of CommitResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommitResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommitResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommitResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitResponse + * @throws IOException if the JSON string is invalid with respect to CommitResponse + */ + public static CommitResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitResponse.class); + } + + /** + * Convert an instance of CommitResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java index 552b49646..e79ac79c1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java @@ -4,246 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CommiterType */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CommiterType implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public CommiterType() {} - - public CommiterType email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email id of the committer - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public CommiterType username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username of the committer - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CommiterType commiterType = (CommiterType) o; - return Objects.equals(this.email, commiterType.email) - && Objects.equals(this.username, commiterType.username); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(email, username); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CommiterType {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("email"); - openapiFields.add("username"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CommiterType - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CommiterType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CommiterType is not found in the" - + " empty JSON string", - CommiterType.openapiRequiredFields.toString())); - } +/** + * CommiterType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CommiterType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public CommiterType() { + } + + public CommiterType email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email id of the committer + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public CommiterType username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username of the committer + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommiterType commiterType = (CommiterType) o; + return Objects.equals(this.email, commiterType.email) && + Objects.equals(this.username, commiterType.username); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(email, username); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommiterType {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommiterType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommiterType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CommiterType is not found in the empty JSON string", CommiterType.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CommiterType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CommiterType` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommiterType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommiterType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommiterType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommiterType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CommiterType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CommiterType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommiterType read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CommiterType given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommiterType - * @throws IOException if the JSON string is invalid with respect to CommiterType - */ - public static CommiterType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommiterType.class); - } - - /** - * Convert an instance of CommiterType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommiterType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommiterType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CommiterType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CommiterType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CommiterType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CommiterType given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommiterType + * @throws IOException if the JSON string is invalid with respect to CommiterType + */ + public static CommiterType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommiterType.class); + } + + /** + * Convert an instance of CommiterType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java new file mode 100644 index 000000000..04dd6cacf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java @@ -0,0 +1,284 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfig; +import com.thoughtspot.client.model.OrgChannelConfigResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..2dc9b2aa4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java @@ -0,0 +1,272 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfigInput; +import com.thoughtspot.client.model.OrgChannelConfigInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/ConnectionConfigurationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java index 1fa10f44b..c610d000b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java @@ -4,784 +4,702 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserPrincipal; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ConnectionConfigurationResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ConnectionConfigurationResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = - "configuration_identifier"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) - @javax.annotation.Nullable - private String configurationIdentifier; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - @javax.annotation.Nullable - private Object _configuration; - - public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; - - @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) - @javax.annotation.Nullable - private List policyPrincipals; - - /** Gets or Sets policyProcesses */ - @JsonAdapter(PolicyProcessesEnum.Adapter.class) - public enum PolicyProcessesEnum { - SAGE_INDEXING("SAGE_INDEXING"), - - ROW_COUNT_STATS("ROW_COUNT_STATS"); - - private String value; - - PolicyProcessesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyProcessesEnum fromValue(String value) { - for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyProcessesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyProcessesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; - - @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) - @javax.annotation.Nullable - private List policyProcesses; - - public static final String SERIALIZED_NAME_DISABLED = "disabled"; - - @SerializedName(SERIALIZED_NAME_DISABLED) - @javax.annotation.Nullable - private Boolean disabled; - - /** Gets or Sets dataWarehouseType */ - @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) - public enum DataWarehouseTypeEnum { - SNOWFLAKE("SNOWFLAKE"), - - AMAZON_REDSHIFT("AMAZON_REDSHIFT"), - - GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), - - AZURE_SYNAPSE("AZURE_SYNAPSE"), - - TERADATA("TERADATA"), - - SAP_HANA("SAP_HANA"), - - STARBURST("STARBURST"), - - ORACLE_ADW("ORACLE_ADW"), - - DATABRICKS("DATABRICKS"), - - DENODO("DENODO"), - - DREMIO("DREMIO"), - - TRINO("TRINO"), - - PRESTO("PRESTO"), - - POSTGRES("POSTGRES"), - - SQLSERVER("SQLSERVER"), - - MYSQL("MYSQL"), - - GENERIC_JDBC("GENERIC_JDBC"), - - AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), - - AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), - - AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), - - AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), - - LOOKER("LOOKER"), - - AMAZON_ATHENA("AMAZON_ATHENA"), - - SINGLESTORE("SINGLESTORE"), - - GCP_SQLSERVER("GCP_SQLSERVER"), - - GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), - - GCP_POSTGRESQL("GCP_POSTGRESQL"), - - GCP_MYSQL("GCP_MYSQL"), - - MODE("MODE"), - - GOOGLE_SHEETS("GOOGLE_SHEETS"), - - FALCON("FALCON"), - - FALCON_ONPREM("FALCON_ONPREM"), - - CLICKHOUSE("CLICKHOUSE"); - - private String value; - - DataWarehouseTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static DataWarehouseTypeEnum fromValue(String value) { - for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataWarehouseTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataWarehouseTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) - @javax.annotation.Nullable - private DataWarehouseTypeEnum dataWarehouseType; - - /** Gets or Sets policyType */ - @JsonAdapter(PolicyTypeEnum.Adapter.class) - public enum PolicyTypeEnum { - NO_POLICY("NO_POLICY"), - - PRINCIPALS("PRINCIPALS"), - - PROCESSES("PROCESSES"); - - private String value; - - PolicyTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyTypeEnum fromValue(String value) { - for (PolicyTypeEnum b : PolicyTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; - - @SerializedName(SERIALIZED_NAME_POLICY_TYPE) - @javax.annotation.Nullable - private PolicyTypeEnum policyType; - - public ConnectionConfigurationResponse() {} - - public ConnectionConfigurationResponse configurationIdentifier( - @javax.annotation.Nullable String configurationIdentifier) { - this.configurationIdentifier = configurationIdentifier; - return this; - } - - /** - * Get configurationIdentifier - * - * @return configurationIdentifier - */ - @javax.annotation.Nullable - public String getConfigurationIdentifier() { - return configurationIdentifier; - } - - public void setConfigurationIdentifier( - @javax.annotation.Nullable String configurationIdentifier) { - this.configurationIdentifier = configurationIdentifier; - } - - public ConnectionConfigurationResponse name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - public ConnectionConfigurationResponse description( - @javax.annotation.Nullable String description) { - this.description = description; - return this; - } +/** + * ConnectionConfigurationResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConnectionConfigurationResponse implements Serializable { + private static final long serialVersionUID = 1L; - /** - * Get description - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = "configuration_identifier"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) + @javax.annotation.Nullable + private String configurationIdentifier; - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; - public ConnectionConfigurationResponse _configuration( - @javax.annotation.Nullable Object _configuration) { - this._configuration = _configuration; - return this; - } + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; - /** - * Get _configuration - * - * @return _configuration - */ - @javax.annotation.Nullable - public Object getConfiguration() { - return _configuration; - } + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nullable + private Object _configuration; - public void setConfiguration(@javax.annotation.Nullable Object _configuration) { - this._configuration = _configuration; - } + public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; + @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) + @javax.annotation.Nullable + private List policyPrincipals; - public ConnectionConfigurationResponse policyPrincipals( - @javax.annotation.Nullable List policyPrincipals) { - this.policyPrincipals = policyPrincipals; - return this; - } + /** + * Gets or Sets policyProcesses + */ + @JsonAdapter(PolicyProcessesEnum.Adapter.class) + public enum PolicyProcessesEnum { + SAGE_INDEXING("SAGE_INDEXING"), + + ROW_COUNT_STATS("ROW_COUNT_STATS"); - public ConnectionConfigurationResponse addPolicyPrincipalsItem( - UserPrincipal policyPrincipalsItem) { - if (this.policyPrincipals == null) { - this.policyPrincipals = new ArrayList<>(); - } - this.policyPrincipals.add(policyPrincipalsItem); - return this; - } + private String value; - /** - * Get policyPrincipals - * - * @return policyPrincipals - */ - @javax.annotation.Nullable - public List getPolicyPrincipals() { - return policyPrincipals; + PolicyProcessesEnum(String value) { + this.value = value; } - public void setPolicyPrincipals( - @javax.annotation.Nullable List policyPrincipals) { - this.policyPrincipals = policyPrincipals; + public String getValue() { + return value; } - public ConnectionConfigurationResponse policyProcesses( - @javax.annotation.Nullable List policyProcesses) { - this.policyProcesses = policyProcesses; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public ConnectionConfigurationResponse addPolicyProcessesItem( - PolicyProcessesEnum policyProcessesItem) { - if (this.policyProcesses == null) { - this.policyProcesses = new ArrayList<>(); + public static PolicyProcessesEnum fromValue(String value) { + for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.policyProcesses.add(policyProcessesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Get policyProcesses - * - * @return policyProcesses - */ - @javax.annotation.Nullable - public List getPolicyProcesses() { - return policyProcesses; - } - - public void setPolicyProcesses( - @javax.annotation.Nullable List policyProcesses) { - this.policyProcesses = policyProcesses; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public ConnectionConfigurationResponse disabled(@javax.annotation.Nullable Boolean disabled) { - this.disabled = disabled; - return this; + @Override + public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyProcessesEnum.fromValue(value); + } } - /** - * Get disabled - * - * @return disabled - */ - @javax.annotation.Nullable - public Boolean getDisabled() { - return disabled; - } - - public void setDisabled(@javax.annotation.Nullable Boolean disabled) { - this.disabled = disabled; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyProcessesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; + @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) + @javax.annotation.Nullable + private List policyProcesses; + + public static final String SERIALIZED_NAME_DISABLED = "disabled"; + @SerializedName(SERIALIZED_NAME_DISABLED) + @javax.annotation.Nullable + private Boolean disabled; + + /** + * Gets or Sets dataWarehouseType + */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public ConnectionConfigurationResponse dataWarehouseType( - @javax.annotation.Nullable DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Get dataWarehouseType - * - * @return dataWarehouseType - */ - @javax.annotation.Nullable - public DataWarehouseTypeEnum getDataWarehouseType() { - return dataWarehouseType; + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setDataWarehouseType( - @javax.annotation.Nullable DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public ConnectionConfigurationResponse policyType( - @javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - return this; + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } } - /** - * Get policyType - * - * @return policyType - */ - @javax.annotation.Nullable - public PolicyTypeEnum getPolicyType() { - return policyType; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); } + } - public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - } + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nullable + private DataWarehouseTypeEnum dataWarehouseType; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConnectionConfigurationResponse connectionConfigurationResponse = - (ConnectionConfigurationResponse) o; - return Objects.equals( - this.configurationIdentifier, - connectionConfigurationResponse.configurationIdentifier) - && Objects.equals(this.name, connectionConfigurationResponse.name) - && Objects.equals(this.description, connectionConfigurationResponse.description) - && Objects.equals( - this._configuration, connectionConfigurationResponse._configuration) - && Objects.equals( - this.policyPrincipals, connectionConfigurationResponse.policyPrincipals) - && Objects.equals( - this.policyProcesses, connectionConfigurationResponse.policyProcesses) - && Objects.equals(this.disabled, connectionConfigurationResponse.disabled) - && Objects.equals( - this.dataWarehouseType, connectionConfigurationResponse.dataWarehouseType) - && Objects.equals(this.policyType, connectionConfigurationResponse.policyType); - } + /** + * Gets or Sets policyType + */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - configurationIdentifier, - name, - description, - _configuration, - policyPrincipals, - policyProcesses, - disabled, - dataWarehouseType, - policyType); + PolicyTypeEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConnectionConfigurationResponse {\n"); - sb.append(" configurationIdentifier: ") - .append(toIndentedString(configurationIdentifier)) - .append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); - sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); - sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); - sb.append(" dataWarehouseType: ") - .append(toIndentedString(dataWarehouseType)) - .append("\n"); - sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("configuration_identifier"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("configuration"); - openapiFields.add("policy_principals"); - openapiFields.add("policy_processes"); - openapiFields.add("disabled"); - openapiFields.add("data_warehouse_type"); - openapiFields.add("policy_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ConnectionConfigurationResponse - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ConnectionConfigurationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ConnectionConfigurationResponse is" - + " not found in the empty JSON string", - ConnectionConfigurationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ConnectionConfigurationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ConnectionConfigurationResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType; + + public ConnectionConfigurationResponse() { + } + + public ConnectionConfigurationResponse configurationIdentifier(@javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + return this; + } + + /** + * Get configurationIdentifier + * @return configurationIdentifier + */ + @javax.annotation.Nullable + public String getConfigurationIdentifier() { + return configurationIdentifier; + } + + public void setConfigurationIdentifier(@javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + } + + + public ConnectionConfigurationResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public ConnectionConfigurationResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ConnectionConfigurationResponse _configuration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Get _configuration + * @return _configuration + */ + @javax.annotation.Nullable + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + } + + + public ConnectionConfigurationResponse policyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + return this; + } + + public ConnectionConfigurationResponse addPolicyPrincipalsItem(UserPrincipal policyPrincipalsItem) { + if (this.policyPrincipals == null) { + this.policyPrincipals = new ArrayList<>(); + } + this.policyPrincipals.add(policyPrincipalsItem); + return this; + } + + /** + * Get policyPrincipals + * @return policyPrincipals + */ + @javax.annotation.Nullable + public List getPolicyPrincipals() { + return policyPrincipals; + } + + public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + } + + + public ConnectionConfigurationResponse policyProcesses(@javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + return this; + } + + public ConnectionConfigurationResponse addPolicyProcessesItem(PolicyProcessesEnum policyProcessesItem) { + if (this.policyProcesses == null) { + this.policyProcesses = new ArrayList<>(); + } + this.policyProcesses.add(policyProcessesItem); + return this; + } + + /** + * Get policyProcesses + * @return policyProcesses + */ + @javax.annotation.Nullable + public List getPolicyProcesses() { + return policyProcesses; + } + + public void setPolicyProcesses(@javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + } + + + public ConnectionConfigurationResponse disabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Get disabled + * @return disabled + */ + @javax.annotation.Nullable + public Boolean getDisabled() { + return disabled; + } + + public void setDisabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + } + + + public ConnectionConfigurationResponse dataWarehouseType(@javax.annotation.Nullable DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Get dataWarehouseType + * @return dataWarehouseType + */ + @javax.annotation.Nullable + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType(@javax.annotation.Nullable DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + + public ConnectionConfigurationResponse policyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Get policyType + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionConfigurationResponse connectionConfigurationResponse = (ConnectionConfigurationResponse) o; + return Objects.equals(this.configurationIdentifier, connectionConfigurationResponse.configurationIdentifier) && + Objects.equals(this.name, connectionConfigurationResponse.name) && + Objects.equals(this.description, connectionConfigurationResponse.description) && + Objects.equals(this._configuration, connectionConfigurationResponse._configuration) && + Objects.equals(this.policyPrincipals, connectionConfigurationResponse.policyPrincipals) && + Objects.equals(this.policyProcesses, connectionConfigurationResponse.policyProcesses) && + Objects.equals(this.disabled, connectionConfigurationResponse.disabled) && + Objects.equals(this.dataWarehouseType, connectionConfigurationResponse.dataWarehouseType) && + Objects.equals(this.policyType, connectionConfigurationResponse.policyType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(configurationIdentifier, name, description, _configuration, policyPrincipals, policyProcesses, disabled, dataWarehouseType, policyType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionConfigurationResponse {\n"); + sb.append(" configurationIdentifier: ").append(toIndentedString(configurationIdentifier)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); + sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); + sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append(" dataWarehouseType: ").append(toIndentedString(dataWarehouseType)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration_identifier"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("configuration"); + openapiFields.add("policy_principals"); + openapiFields.add("policy_processes"); + openapiFields.add("disabled"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("policy_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConnectionConfigurationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionConfigurationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConnectionConfigurationResponse is not found in the empty JSON string", ConnectionConfigurationResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConnectionConfigurationResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConnectionConfigurationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("configuration_identifier") != null - && !jsonObj.get("configuration_identifier").isJsonNull()) - && !jsonObj.get("configuration_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `configuration_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("configuration_identifier").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (jsonObj.get("policy_principals") != null - && !jsonObj.get("policy_principals").isJsonNull()) { - JsonArray jsonArraypolicyPrincipals = jsonObj.getAsJsonArray("policy_principals"); - if (jsonArraypolicyPrincipals != null) { - // ensure the json data is an array - if (!jsonObj.get("policy_principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_principals` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("policy_principals").toString())); - } - - // validate the optional field `policy_principals` (array) - for (int i = 0; i < jsonArraypolicyPrincipals.size(); i++) { - UserPrincipal.validateJsonElement(jsonArraypolicyPrincipals.get(i)); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("policy_processes") != null - && !jsonObj.get("policy_processes").isJsonNull() - && !jsonObj.get("policy_processes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_processes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("policy_processes").toString())); - } - if ((jsonObj.get("data_warehouse_type") != null - && !jsonObj.get("data_warehouse_type").isJsonNull()) - && !jsonObj.get("data_warehouse_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_warehouse_type").toString())); - } - // validate the optional field `data_warehouse_type` - if (jsonObj.get("data_warehouse_type") != null - && !jsonObj.get("data_warehouse_type").isJsonNull()) { - DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); - } - if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) - && !jsonObj.get("policy_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("policy_type").toString())); - } - // validate the optional field `policy_type` - if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { - PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConnectionConfigurationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConnectionConfigurationResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ConnectionConfigurationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ConnectionConfigurationResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ConnectionConfigurationResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ConnectionConfigurationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConnectionConfigurationResponse - * @throws IOException if the JSON string is invalid with respect to - * ConnectionConfigurationResponse - */ - public static ConnectionConfigurationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ConnectionConfigurationResponse.class); - } - - /** - * Convert an instance of ConnectionConfigurationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("configuration_identifier") != null && !jsonObj.get("configuration_identifier").isJsonNull()) && !jsonObj.get("configuration_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configuration_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configuration_identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (jsonObj.get("policy_principals") != null && !jsonObj.get("policy_principals").isJsonNull()) { + JsonArray jsonArraypolicyPrincipals = jsonObj.getAsJsonArray("policy_principals"); + if (jsonArraypolicyPrincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("policy_principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_principals` to be an array in the JSON string but got `%s`", jsonObj.get("policy_principals").toString())); + } + + // validate the optional field `policy_principals` (array) + for (int i = 0; i < jsonArraypolicyPrincipals.size(); i++) { + UserPrincipal.validateJsonElement(jsonArraypolicyPrincipals.get(i)); + }; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_processes") != null && !jsonObj.get("policy_processes").isJsonNull() && !jsonObj.get("policy_processes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_processes` to be an array in the JSON string but got `%s`", jsonObj.get("policy_processes").toString())); + } + if ((jsonObj.get("data_warehouse_type") != null && !jsonObj.get("data_warehouse_type").isJsonNull()) && !jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_warehouse_type").toString())); + } + // validate the optional field `data_warehouse_type` + if (jsonObj.get("data_warehouse_type") != null && !jsonObj.get("data_warehouse_type").isJsonNull()) { + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionConfigurationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionConfigurationResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConnectionConfigurationResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectionConfigurationResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ConnectionConfigurationResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ConnectionConfigurationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionConfigurationResponse + * @throws IOException if the JSON string is invalid with respect to ConnectionConfigurationResponse + */ + public static ConnectionConfigurationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionConfigurationResponse.class); + } + + /** + * Convert an instance of ConnectionConfigurationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java index d53a751b6..4eef29322 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java @@ -4,357 +4,323 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ConnectionConfigurationSearchRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ConnectionConfigurationSearchRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; - - public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = - "configuration_identifier"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) - @javax.annotation.Nullable - private String configurationIdentifier; - - /** Type of policy. */ - @JsonAdapter(PolicyTypeEnum.Adapter.class) - public enum PolicyTypeEnum { - NO_POLICY("NO_POLICY"), - - PRINCIPALS("PRINCIPALS"), - - PROCESSES("PROCESSES"); - - private String value; - - PolicyTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyTypeEnum fromValue(String value) { - for (PolicyTypeEnum b : PolicyTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; - - @SerializedName(SERIALIZED_NAME_POLICY_TYPE) - @javax.annotation.Nullable - private PolicyTypeEnum policyType; - - public ConnectionConfigurationSearchRequest() {} - - public ConnectionConfigurationSearchRequest connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; - } - - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } - - public ConnectionConfigurationSearchRequest configurationIdentifier( - @javax.annotation.Nullable String configurationIdentifier) { - this.configurationIdentifier = configurationIdentifier; - return this; - } - - /** - * Unique ID or name of the configuration. - * - * @return configurationIdentifier - */ - @javax.annotation.Nullable - public String getConfigurationIdentifier() { - return configurationIdentifier; - } - - public void setConfigurationIdentifier( - @javax.annotation.Nullable String configurationIdentifier) { - this.configurationIdentifier = configurationIdentifier; - } - - public ConnectionConfigurationSearchRequest policyType( - @javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - return this; - } - - /** - * Type of policy. - * - * @return policyType - */ - @javax.annotation.Nullable - public PolicyTypeEnum getPolicyType() { - return policyType; - } - - public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = - (ConnectionConfigurationSearchRequest) o; - return Objects.equals( - this.connectionIdentifier, - connectionConfigurationSearchRequest.connectionIdentifier) - && Objects.equals( - this.configurationIdentifier, - connectionConfigurationSearchRequest.configurationIdentifier) - && Objects.equals(this.policyType, connectionConfigurationSearchRequest.policyType); +/** + * ConnectionConfigurationSearchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConnectionConfigurationSearchRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = "configuration_identifier"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) + @javax.annotation.Nullable + private String configurationIdentifier; + + /** + * Type of policy. + */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); + + private String value; + + PolicyTypeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(connectionIdentifier, configurationIdentifier, policyType); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConnectionConfigurationSearchRequest {\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append(" configurationIdentifier: ") - .append(toIndentedString(configurationIdentifier)) - .append("\n"); - sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_identifier"); - openapiFields.add("configuration_identifier"); - openapiFields.add("policy_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("connection_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ConnectionConfigurationSearchRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ConnectionConfigurationSearchRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ConnectionConfigurationSearchRequest" - + " is not found in the empty JSON string", - ConnectionConfigurationSearchRequest.openapiRequiredFields - .toString())); - } + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType; + + public ConnectionConfigurationSearchRequest() { + } + + public ConnectionConfigurationSearchRequest connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + public ConnectionConfigurationSearchRequest configurationIdentifier(@javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + return this; + } + + /** + * Unique ID or name of the configuration. + * @return configurationIdentifier + */ + @javax.annotation.Nullable + public String getConfigurationIdentifier() { + return configurationIdentifier; + } + + public void setConfigurationIdentifier(@javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + } + + + public ConnectionConfigurationSearchRequest policyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Type of policy. + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = (ConnectionConfigurationSearchRequest) o; + return Objects.equals(this.connectionIdentifier, connectionConfigurationSearchRequest.connectionIdentifier) && + Objects.equals(this.configurationIdentifier, connectionConfigurationSearchRequest.configurationIdentifier) && + Objects.equals(this.policyType, connectionConfigurationSearchRequest.policyType); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier, configurationIdentifier, policyType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionConfigurationSearchRequest {\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append(" configurationIdentifier: ").append(toIndentedString(configurationIdentifier)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("configuration_identifier"); + openapiFields.add("policy_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConnectionConfigurationSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionConfigurationSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConnectionConfigurationSearchRequest is not found in the empty JSON string", ConnectionConfigurationSearchRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ConnectionConfigurationSearchRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ConnectionConfigurationSearchRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConnectionConfigurationSearchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConnectionConfigurationSearchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ConnectionConfigurationSearchRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConnectionConfigurationSearchRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - if ((jsonObj.get("configuration_identifier") != null - && !jsonObj.get("configuration_identifier").isJsonNull()) - && !jsonObj.get("configuration_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `configuration_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("configuration_identifier").toString())); - } - if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) - && !jsonObj.get("policy_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("policy_type").toString())); - } - // validate the optional field `policy_type` - if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { - PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConnectionConfigurationSearchRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConnectionConfigurationSearchRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ConnectionConfigurationSearchRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, ConnectionConfigurationSearchRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ConnectionConfigurationSearchRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ConnectionConfigurationSearchRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConnectionConfigurationSearchRequest - * @throws IOException if the JSON string is invalid with respect to - * ConnectionConfigurationSearchRequest - */ - public static ConnectionConfigurationSearchRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, ConnectionConfigurationSearchRequest.class); - } - - /** - * Convert an instance of ConnectionConfigurationSearchRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("configuration_identifier") != null && !jsonObj.get("configuration_identifier").isJsonNull()) && !jsonObj.get("configuration_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configuration_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configuration_identifier").toString())); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionConfigurationSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionConfigurationSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConnectionConfigurationSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectionConfigurationSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ConnectionConfigurationSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ConnectionConfigurationSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionConfigurationSearchRequest + * @throws IOException if the JSON string is invalid with respect to ConnectionConfigurationSearchRequest + */ + public static ConnectionConfigurationSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionConfigurationSearchRequest.class); + } + + /** + * Convert an instance of ConnectionConfigurationSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java index 0a9f5eda3..9bb18bdec 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java @@ -4,314 +4,291 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DataWarehouseObjectInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ConnectionInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ConnectionInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS = "data_warehouse_objects"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS) - @javax.annotation.Nullable - private List dataWarehouseObjects; - - public ConnectionInput() {} - - public ConnectionInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } - - public ConnectionInput namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - /** - * A pattern to match case-insensitive name of the connection object. User `%` for a - * wildcard match. - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; - } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public ConnectionInput dataWarehouseObjects( - @javax.annotation.Nullable List dataWarehouseObjects) { - this.dataWarehouseObjects = dataWarehouseObjects; - return this; - } - - public ConnectionInput addDataWarehouseObjectsItem( - DataWarehouseObjectInput dataWarehouseObjectsItem) { - if (this.dataWarehouseObjects == null) { - this.dataWarehouseObjects = new ArrayList<>(); - } - this.dataWarehouseObjects.add(dataWarehouseObjectsItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * Filter options for databases, schemas, tables and columns. - * - * @return dataWarehouseObjects - */ - @javax.annotation.Nullable - public List getDataWarehouseObjects() { - return dataWarehouseObjects; +/** + * ConnectionInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConnectionInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS = "data_warehouse_objects"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS) + @javax.annotation.Nullable + private List dataWarehouseObjects; + + public ConnectionInput() { + } + + public ConnectionInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public ConnectionInput namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public ConnectionInput dataWarehouseObjects(@javax.annotation.Nullable List dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + return this; + } + + public ConnectionInput addDataWarehouseObjectsItem(DataWarehouseObjectInput dataWarehouseObjectsItem) { + if (this.dataWarehouseObjects == null) { + this.dataWarehouseObjects = new ArrayList<>(); } + this.dataWarehouseObjects.add(dataWarehouseObjectsItem); + return this; + } - public void setDataWarehouseObjects( - @javax.annotation.Nullable List dataWarehouseObjects) { - this.dataWarehouseObjects = dataWarehouseObjects; - } + /** + * Filter options for databases, schemas, tables and columns. + * @return dataWarehouseObjects + */ + @javax.annotation.Nullable + public List getDataWarehouseObjects() { + return dataWarehouseObjects; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConnectionInput connectionInput = (ConnectionInput) o; - return Objects.equals(this.identifier, connectionInput.identifier) - && Objects.equals(this.namePattern, connectionInput.namePattern) - && Objects.equals(this.dataWarehouseObjects, connectionInput.dataWarehouseObjects); - } + public void setDataWarehouseObjects(@javax.annotation.Nullable List dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(identifier, namePattern, dataWarehouseObjects); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConnectionInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" dataWarehouseObjects: ") - .append(toIndentedString(dataWarehouseObjects)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ConnectionInput connectionInput = (ConnectionInput) o; + return Objects.equals(this.identifier, connectionInput.identifier) && + Objects.equals(this.namePattern, connectionInput.namePattern) && + Objects.equals(this.dataWarehouseObjects, connectionInput.dataWarehouseObjects); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, namePattern, dataWarehouseObjects); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("name_pattern"); - openapiFields.add("data_warehouse_objects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" dataWarehouseObjects: ").append(toIndentedString(dataWarehouseObjects)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ConnectionInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ConnectionInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ConnectionInput is not found in the" - + " empty JSON string", - ConnectionInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("data_warehouse_objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConnectionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConnectionInput is not found in the empty JSON string", ConnectionInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ConnectionInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ConnectionInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConnectionInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConnectionInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + if (jsonObj.get("data_warehouse_objects") != null && !jsonObj.get("data_warehouse_objects").isJsonNull()) { + JsonArray jsonArraydataWarehouseObjects = jsonObj.getAsJsonArray("data_warehouse_objects"); + if (jsonArraydataWarehouseObjects != null) { + // ensure the json data is an array + if (!jsonObj.get("data_warehouse_objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_objects` to be an array in the JSON string but got `%s`", jsonObj.get("data_warehouse_objects").toString())); + } + + // validate the optional field `data_warehouse_objects` (array) + for (int i = 0; i < jsonArraydataWarehouseObjects.size(); i++) { + DataWarehouseObjectInput.validateJsonElement(jsonArraydataWarehouseObjects.get(i)); + }; } - if (jsonObj.get("data_warehouse_objects") != null - && !jsonObj.get("data_warehouse_objects").isJsonNull()) { - JsonArray jsonArraydataWarehouseObjects = - jsonObj.getAsJsonArray("data_warehouse_objects"); - if (jsonArraydataWarehouseObjects != null) { - // ensure the json data is an array - if (!jsonObj.get("data_warehouse_objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_objects` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("data_warehouse_objects").toString())); - } - - // validate the optional field `data_warehouse_objects` (array) - for (int i = 0; i < jsonArraydataWarehouseObjects.size(); i++) { - DataWarehouseObjectInput.validateJsonElement( - jsonArraydataWarehouseObjects.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConnectionInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConnectionInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ConnectionInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ConnectionInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ConnectionInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of ConnectionInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConnectionInput - * @throws IOException if the JSON string is invalid with respect to ConnectionInput - */ - public static ConnectionInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ConnectionInput.class); - } - - /** - * Convert an instance of ConnectionInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConnectionInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectionInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ConnectionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ConnectionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionInput + * @throws IOException if the JSON string is invalid with respect to ConnectionInput + */ + public static ConnectionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionInput.class); + } + + /** + * Convert an instance of ConnectionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java index 4ec5e747d..c6f2a31e9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java @@ -4,373 +4,363 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AnswerContextInput; +import com.thoughtspot.client.model.DataSourceContextInput; +import com.thoughtspot.client.model.LBContextInput; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ContextPayloadV2Input */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ContextPayloadV2Input implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of the context. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ANSWER("answer"), - - LIVEBOARD("liveboard"), - - DATA_SOURCE("data_source"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_ANSWER_CONTEXT = "answer_context"; - - @SerializedName(SERIALIZED_NAME_ANSWER_CONTEXT) - @javax.annotation.Nullable - private AnswerContextInput answerContext; - - public static final String SERIALIZED_NAME_LIVEBOARD_CONTEXT = "liveboard_context"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_CONTEXT) - @javax.annotation.Nullable - private LBContextInput liveboardContext; - - public static final String SERIALIZED_NAME_DATA_SOURCE_CONTEXT = "data_source_context"; - - @SerializedName(SERIALIZED_NAME_DATA_SOURCE_CONTEXT) - @javax.annotation.Nullable - private DataSourceContextInput dataSourceContext; - - public ContextPayloadV2Input() {} - - public ContextPayloadV2Input type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - /** - * Type of the context. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - public ContextPayloadV2Input answerContext( - @javax.annotation.Nullable AnswerContextInput answerContext) { - this.answerContext = answerContext; - return this; - } - - /** - * Get answerContext - * - * @return answerContext - */ - @javax.annotation.Nullable - public AnswerContextInput getAnswerContext() { - return answerContext; - } - - public void setAnswerContext(@javax.annotation.Nullable AnswerContextInput answerContext) { - this.answerContext = answerContext; - } - - public ContextPayloadV2Input liveboardContext( - @javax.annotation.Nullable LBContextInput liveboardContext) { - this.liveboardContext = liveboardContext; - return this; - } - - /** - * Get liveboardContext - * - * @return liveboardContext - */ - @javax.annotation.Nullable - public LBContextInput getLiveboardContext() { - return liveboardContext; - } - - public void setLiveboardContext(@javax.annotation.Nullable LBContextInput liveboardContext) { - this.liveboardContext = liveboardContext; - } +import com.thoughtspot.client.JSON; - public ContextPayloadV2Input dataSourceContext( - @javax.annotation.Nullable DataSourceContextInput dataSourceContext) { - this.dataSourceContext = dataSourceContext; - return this; +/** + * ContextPayloadV2Input + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ContextPayloadV2Input implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of the context. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ANSWER("answer"), + + LIVEBOARD("liveboard"), + + DATA_SOURCE("data_source"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Get dataSourceContext - * - * @return dataSourceContext - */ - @javax.annotation.Nullable - public DataSourceContextInput getDataSourceContext() { - return dataSourceContext; + public String getValue() { + return value; } - public void setDataSourceContext( - @javax.annotation.Nullable DataSourceContextInput dataSourceContext) { - this.dataSourceContext = dataSourceContext; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - ContextPayloadV2Input contextPayloadV2Input = (ContextPayloadV2Input) o; - return Objects.equals(this.type, contextPayloadV2Input.type) - && Objects.equals(this.answerContext, contextPayloadV2Input.answerContext) - && Objects.equals(this.liveboardContext, contextPayloadV2Input.liveboardContext) - && Objects.equals(this.dataSourceContext, contextPayloadV2Input.dataSourceContext); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, answerContext, liveboardContext, dataSourceContext); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_ANSWER_CONTEXT = "answer_context"; + @SerializedName(SERIALIZED_NAME_ANSWER_CONTEXT) + @javax.annotation.Nullable + private AnswerContextInput answerContext; + + public static final String SERIALIZED_NAME_LIVEBOARD_CONTEXT = "liveboard_context"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_CONTEXT) + @javax.annotation.Nullable + private LBContextInput liveboardContext; + + public static final String SERIALIZED_NAME_DATA_SOURCE_CONTEXT = "data_source_context"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_CONTEXT) + @javax.annotation.Nullable + private DataSourceContextInput dataSourceContext; + + public ContextPayloadV2Input() { + } + + public ContextPayloadV2Input type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the context. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public ContextPayloadV2Input answerContext(@javax.annotation.Nullable AnswerContextInput answerContext) { + this.answerContext = answerContext; + return this; + } + + /** + * Get answerContext + * @return answerContext + */ + @javax.annotation.Nullable + public AnswerContextInput getAnswerContext() { + return answerContext; + } + + public void setAnswerContext(@javax.annotation.Nullable AnswerContextInput answerContext) { + this.answerContext = answerContext; + } + + + public ContextPayloadV2Input liveboardContext(@javax.annotation.Nullable LBContextInput liveboardContext) { + this.liveboardContext = liveboardContext; + return this; + } + + /** + * Get liveboardContext + * @return liveboardContext + */ + @javax.annotation.Nullable + public LBContextInput getLiveboardContext() { + return liveboardContext; + } + + public void setLiveboardContext(@javax.annotation.Nullable LBContextInput liveboardContext) { + this.liveboardContext = liveboardContext; + } + + + public ContextPayloadV2Input dataSourceContext(@javax.annotation.Nullable DataSourceContextInput dataSourceContext) { + this.dataSourceContext = dataSourceContext; + return this; + } + + /** + * Get dataSourceContext + * @return dataSourceContext + */ + @javax.annotation.Nullable + public DataSourceContextInput getDataSourceContext() { + return dataSourceContext; + } + + public void setDataSourceContext(@javax.annotation.Nullable DataSourceContextInput dataSourceContext) { + this.dataSourceContext = dataSourceContext; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContextPayloadV2Input {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" answerContext: ").append(toIndentedString(answerContext)).append("\n"); - sb.append(" liveboardContext: ").append(toIndentedString(liveboardContext)).append("\n"); - sb.append(" dataSourceContext: ") - .append(toIndentedString(dataSourceContext)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ContextPayloadV2Input contextPayloadV2Input = (ContextPayloadV2Input) o; + return Objects.equals(this.type, contextPayloadV2Input.type) && + Objects.equals(this.answerContext, contextPayloadV2Input.answerContext) && + Objects.equals(this.liveboardContext, contextPayloadV2Input.liveboardContext) && + Objects.equals(this.dataSourceContext, contextPayloadV2Input.dataSourceContext); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, answerContext, liveboardContext, dataSourceContext); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - 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("answer_context"); - openapiFields.add("liveboard_context"); - openapiFields.add("data_source_context"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContextPayloadV2Input {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" answerContext: ").append(toIndentedString(answerContext)).append("\n"); + sb.append(" liveboardContext: ").append(toIndentedString(liveboardContext)).append("\n"); + sb.append(" dataSourceContext: ").append(toIndentedString(dataSourceContext)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ContextPayloadV2Input - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ContextPayloadV2Input.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ContextPayloadV2Input is not found in" - + " the empty JSON string", - ContextPayloadV2Input.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\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("answer_context"); + openapiFields.add("liveboard_context"); + openapiFields.add("data_source_context"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ContextPayloadV2Input + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ContextPayloadV2Input.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ContextPayloadV2Input is not found in the empty JSON string", ContextPayloadV2Input.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ContextPayloadV2Input.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ContextPayloadV2Input` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ContextPayloadV2Input.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ContextPayloadV2Input` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `answer_context` - if (jsonObj.get("answer_context") != null && !jsonObj.get("answer_context").isJsonNull()) { - AnswerContextInput.validateJsonElement(jsonObj.get("answer_context")); - } - // validate the optional field `liveboard_context` - if (jsonObj.get("liveboard_context") != null - && !jsonObj.get("liveboard_context").isJsonNull()) { - LBContextInput.validateJsonElement(jsonObj.get("liveboard_context")); - } - // validate the optional field `data_source_context` - if (jsonObj.get("data_source_context") != null - && !jsonObj.get("data_source_context").isJsonNull()) { - DataSourceContextInput.validateJsonElement(jsonObj.get("data_source_context")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContextPayloadV2Input.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ContextPayloadV2Input' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ContextPayloadV2Input.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ContextPayloadV2Input value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ContextPayloadV2Input read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ContextPayloadV2Input given an JSON string - * - * @param jsonString JSON string - * @return An instance of ContextPayloadV2Input - * @throws IOException if the JSON string is invalid with respect to ContextPayloadV2Input - */ - public static ContextPayloadV2Input fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ContextPayloadV2Input.class); - } - - /** - * Convert an instance of ContextPayloadV2Input to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `answer_context` + if (jsonObj.get("answer_context") != null && !jsonObj.get("answer_context").isJsonNull()) { + AnswerContextInput.validateJsonElement(jsonObj.get("answer_context")); + } + // validate the optional field `liveboard_context` + if (jsonObj.get("liveboard_context") != null && !jsonObj.get("liveboard_context").isJsonNull()) { + LBContextInput.validateJsonElement(jsonObj.get("liveboard_context")); + } + // validate the optional field `data_source_context` + if (jsonObj.get("data_source_context") != null && !jsonObj.get("data_source_context").isJsonNull()) { + DataSourceContextInput.validateJsonElement(jsonObj.get("data_source_context")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContextPayloadV2Input.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContextPayloadV2Input' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ContextPayloadV2Input.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ContextPayloadV2Input value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ContextPayloadV2Input read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ContextPayloadV2Input given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContextPayloadV2Input + * @throws IOException if the JSON string is invalid with respect to ContextPayloadV2Input + */ + public static ContextPayloadV2Input fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContextPayloadV2Input.class); + } + + /** + * Convert an instance of ContextPayloadV2Input to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java index 29d3a51b9..0a21325a5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java @@ -4,205 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Conversation */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Conversation implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; +/** + * Conversation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Conversation implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) - @javax.annotation.Nonnull - private String conversationIdentifier; + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nonnull + private String conversationIdentifier; - public Conversation() {} + public Conversation() { + } - public Conversation conversationIdentifier( - @javax.annotation.Nonnull String conversationIdentifier) { - this.conversationIdentifier = conversationIdentifier; - return this; - } + public Conversation conversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } - /** - * Unique identifier of the conversation. - * - * @return conversationIdentifier - */ - @javax.annotation.Nonnull - public String getConversationIdentifier() { - return conversationIdentifier; - } + /** + * Unique identifier of the conversation. + * @return conversationIdentifier + */ + @javax.annotation.Nonnull + public String getConversationIdentifier() { + return conversationIdentifier; + } - public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { - this.conversationIdentifier = conversationIdentifier; - } + public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Conversation conversation = (Conversation) o; - return Objects.equals(this.conversationIdentifier, conversation.conversationIdentifier); - } - @Override - public int hashCode() { - return Objects.hash(conversationIdentifier); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Conversation {\n"); - sb.append(" conversationIdentifier: ") - .append(toIndentedString(conversationIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("conversation_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("conversation_identifier"); + Conversation conversation = (Conversation) o; + return Objects.equals(this.conversationIdentifier, conversation.conversationIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(conversationIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Conversation {\n"); + sb.append(" conversationIdentifier: ").append(toIndentedString(conversationIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Conversation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Conversation.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Conversation is not found in the" - + " empty JSON string", - Conversation.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conversation_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("conversation_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Conversation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Conversation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Conversation is not found in the empty JSON string", Conversation.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Conversation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Conversation` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Conversation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Conversation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Conversation.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Conversation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `conversation_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("conversation_identifier").toString())); - } - } + if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conversation_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conversation_identifier").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Conversation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Conversation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Conversation.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Conversation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Conversation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Conversation given an JSON string - * - * @param jsonString JSON string - * @return An instance of Conversation - * @throws IOException if the JSON string is invalid with respect to Conversation - */ - public static Conversation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Conversation.class); - } - - /** - * Convert an instance of Conversation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Conversation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Conversation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Conversation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Conversation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Conversation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Conversation given an JSON string + * + * @param jsonString JSON string + * @return An instance of Conversation + * @throws IOException if the JSON string is invalid with respect to Conversation + */ + public static Conversation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Conversation.class); + } + + /** + * Convert an instance of Conversation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java index 2c7684644..f2f683eb0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java @@ -4,278 +4,260 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ConversationSettingsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ConversationSettingsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ENABLE_CONTEXTUAL_CHANGE_ANALYSIS = - "enable_contextual_change_analysis"; - - @SerializedName(SERIALIZED_NAME_ENABLE_CONTEXTUAL_CHANGE_ANALYSIS) - @javax.annotation.Nullable - private Boolean enableContextualChangeAnalysis = false; - - public static final String SERIALIZED_NAME_ENABLE_NATURAL_LANGUAGE_ANSWER_GENERATION = - "enable_natural_language_answer_generation"; - - @SerializedName(SERIALIZED_NAME_ENABLE_NATURAL_LANGUAGE_ANSWER_GENERATION) - @javax.annotation.Nullable - private Boolean enableNaturalLanguageAnswerGeneration = true; - - public static final String SERIALIZED_NAME_ENABLE_REASONING = "enable_reasoning"; - - @SerializedName(SERIALIZED_NAME_ENABLE_REASONING) - @javax.annotation.Nullable - private Boolean enableReasoning = false; - - public ConversationSettingsInput() {} - - public ConversationSettingsInput enableContextualChangeAnalysis( - @javax.annotation.Nullable Boolean enableContextualChangeAnalysis) { - this.enableContextualChangeAnalysis = enableContextualChangeAnalysis; - return this; - } - - /** - * Enable contextual change analysis. - * - * @return enableContextualChangeAnalysis - */ - @javax.annotation.Nullable - public Boolean getEnableContextualChangeAnalysis() { - return enableContextualChangeAnalysis; - } - - public void setEnableContextualChangeAnalysis( - @javax.annotation.Nullable Boolean enableContextualChangeAnalysis) { - this.enableContextualChangeAnalysis = enableContextualChangeAnalysis; - } - - public ConversationSettingsInput enableNaturalLanguageAnswerGeneration( - @javax.annotation.Nullable Boolean enableNaturalLanguageAnswerGeneration) { - this.enableNaturalLanguageAnswerGeneration = enableNaturalLanguageAnswerGeneration; - return this; - } - - /** - * Enable natural language to answer generation. - * - * @return enableNaturalLanguageAnswerGeneration - */ - @javax.annotation.Nullable - public Boolean getEnableNaturalLanguageAnswerGeneration() { - return enableNaturalLanguageAnswerGeneration; - } - public void setEnableNaturalLanguageAnswerGeneration( - @javax.annotation.Nullable Boolean enableNaturalLanguageAnswerGeneration) { - this.enableNaturalLanguageAnswerGeneration = enableNaturalLanguageAnswerGeneration; - } - - public ConversationSettingsInput enableReasoning( - @javax.annotation.Nullable Boolean enableReasoning) { - this.enableReasoning = enableReasoning; - return this; - } - - /** - * Enable reasoning. - * - * @return enableReasoning - */ - @javax.annotation.Nullable - public Boolean getEnableReasoning() { - return enableReasoning; - } - - public void setEnableReasoning(@javax.annotation.Nullable Boolean enableReasoning) { - this.enableReasoning = enableReasoning; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConversationSettingsInput conversationSettingsInput = (ConversationSettingsInput) o; - return Objects.equals( - this.enableContextualChangeAnalysis, - conversationSettingsInput.enableContextualChangeAnalysis) - && Objects.equals( - this.enableNaturalLanguageAnswerGeneration, - conversationSettingsInput.enableNaturalLanguageAnswerGeneration) - && Objects.equals(this.enableReasoning, conversationSettingsInput.enableReasoning); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - enableContextualChangeAnalysis, - enableNaturalLanguageAnswerGeneration, - enableReasoning); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * ConversationSettingsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConversationSettingsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ENABLE_CONTEXTUAL_CHANGE_ANALYSIS = "enable_contextual_change_analysis"; + @SerializedName(SERIALIZED_NAME_ENABLE_CONTEXTUAL_CHANGE_ANALYSIS) + @javax.annotation.Nullable + private Boolean enableContextualChangeAnalysis = false; + + public static final String SERIALIZED_NAME_ENABLE_NATURAL_LANGUAGE_ANSWER_GENERATION = "enable_natural_language_answer_generation"; + @SerializedName(SERIALIZED_NAME_ENABLE_NATURAL_LANGUAGE_ANSWER_GENERATION) + @javax.annotation.Nullable + private Boolean enableNaturalLanguageAnswerGeneration = true; + + public static final String SERIALIZED_NAME_ENABLE_REASONING = "enable_reasoning"; + @SerializedName(SERIALIZED_NAME_ENABLE_REASONING) + @javax.annotation.Nullable + private Boolean enableReasoning = false; + + public ConversationSettingsInput() { + } + + public ConversationSettingsInput enableContextualChangeAnalysis(@javax.annotation.Nullable Boolean enableContextualChangeAnalysis) { + this.enableContextualChangeAnalysis = enableContextualChangeAnalysis; + return this; + } + + /** + * Enable contextual change analysis. + * @return enableContextualChangeAnalysis + */ + @javax.annotation.Nullable + public Boolean getEnableContextualChangeAnalysis() { + return enableContextualChangeAnalysis; + } + + public void setEnableContextualChangeAnalysis(@javax.annotation.Nullable Boolean enableContextualChangeAnalysis) { + this.enableContextualChangeAnalysis = enableContextualChangeAnalysis; + } + + + public ConversationSettingsInput enableNaturalLanguageAnswerGeneration(@javax.annotation.Nullable Boolean enableNaturalLanguageAnswerGeneration) { + this.enableNaturalLanguageAnswerGeneration = enableNaturalLanguageAnswerGeneration; + return this; + } + + /** + * Enable natural language to answer generation. + * @return enableNaturalLanguageAnswerGeneration + */ + @javax.annotation.Nullable + public Boolean getEnableNaturalLanguageAnswerGeneration() { + return enableNaturalLanguageAnswerGeneration; + } + + public void setEnableNaturalLanguageAnswerGeneration(@javax.annotation.Nullable Boolean enableNaturalLanguageAnswerGeneration) { + this.enableNaturalLanguageAnswerGeneration = enableNaturalLanguageAnswerGeneration; + } + + + public ConversationSettingsInput enableReasoning(@javax.annotation.Nullable Boolean enableReasoning) { + this.enableReasoning = enableReasoning; + return this; + } + + /** + * Enable reasoning. + * @return enableReasoning + */ + @javax.annotation.Nullable + public Boolean getEnableReasoning() { + return enableReasoning; + } + + public void setEnableReasoning(@javax.annotation.Nullable Boolean enableReasoning) { + this.enableReasoning = enableReasoning; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConversationSettingsInput {\n"); - sb.append(" enableContextualChangeAnalysis: ") - .append(toIndentedString(enableContextualChangeAnalysis)) - .append("\n"); - sb.append(" enableNaturalLanguageAnswerGeneration: ") - .append(toIndentedString(enableNaturalLanguageAnswerGeneration)) - .append("\n"); - sb.append(" enableReasoning: ").append(toIndentedString(enableReasoning)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ConversationSettingsInput conversationSettingsInput = (ConversationSettingsInput) o; + return Objects.equals(this.enableContextualChangeAnalysis, conversationSettingsInput.enableContextualChangeAnalysis) && + Objects.equals(this.enableNaturalLanguageAnswerGeneration, conversationSettingsInput.enableNaturalLanguageAnswerGeneration) && + Objects.equals(this.enableReasoning, conversationSettingsInput.enableReasoning); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(enableContextualChangeAnalysis, enableNaturalLanguageAnswerGeneration, enableReasoning); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("enable_contextual_change_analysis"); - openapiFields.add("enable_natural_language_answer_generation"); - openapiFields.add("enable_reasoning"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationSettingsInput {\n"); + sb.append(" enableContextualChangeAnalysis: ").append(toIndentedString(enableContextualChangeAnalysis)).append("\n"); + sb.append(" enableNaturalLanguageAnswerGeneration: ").append(toIndentedString(enableNaturalLanguageAnswerGeneration)).append("\n"); + sb.append(" enableReasoning: ").append(toIndentedString(enableReasoning)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ConversationSettingsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ConversationSettingsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ConversationSettingsInput is not" - + " found in the empty JSON string", - ConversationSettingsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enable_contextual_change_analysis"); + openapiFields.add("enable_natural_language_answer_generation"); + openapiFields.add("enable_reasoning"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConversationSettingsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConversationSettingsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConversationSettingsInput is not found in the empty JSON string", ConversationSettingsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ConversationSettingsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ConversationSettingsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConversationSettingsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConversationSettingsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConversationSettingsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConversationSettingsInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ConversationSettingsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ConversationSettingsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ConversationSettingsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } - /** - * Create an instance of ConversationSettingsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConversationSettingsInput - * @throws IOException if the JSON string is invalid with respect to ConversationSettingsInput - */ - public static ConversationSettingsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ConversationSettingsInput.class); - } - - /** - * Convert an instance of ConversationSettingsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConversationSettingsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConversationSettingsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConversationSettingsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConversationSettingsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ConversationSettingsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ConversationSettingsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConversationSettingsInput + * @throws IOException if the JSON string is invalid with respect to ConversationSettingsInput + */ + public static ConversationSettingsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConversationSettingsInput.class); + } + + /** + * Convert an instance of ConversationSettingsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java index 3adbbd3c4..7f22ac01a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java @@ -4,341 +4,313 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ConvertWorksheetToModelRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ConvertWorksheetToModelRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_WORKSHEET_IDS = "worksheet_ids"; - - @SerializedName(SERIALIZED_NAME_WORKSHEET_IDS) - @javax.annotation.Nullable - private List worksheetIds; - - public static final String SERIALIZED_NAME_EXCLUDE_WORKSHEET_IDS = "exclude_worksheet_ids"; - - @SerializedName(SERIALIZED_NAME_EXCLUDE_WORKSHEET_IDS) - @javax.annotation.Nullable - private List excludeWorksheetIds; - - public static final String SERIALIZED_NAME_CONVERT_ALL = "convert_all"; - - @SerializedName(SERIALIZED_NAME_CONVERT_ALL) - @javax.annotation.Nullable - private Boolean convertAll = false; - - public static final String SERIALIZED_NAME_APPLY_CHANGES = "apply_changes"; - - @SerializedName(SERIALIZED_NAME_APPLY_CHANGES) - @javax.annotation.Nullable - private Boolean applyChanges = false; - - public ConvertWorksheetToModelRequest() {} - - public ConvertWorksheetToModelRequest worksheetIds( - @javax.annotation.Nullable List worksheetIds) { - this.worksheetIds = worksheetIds; - return this; - } - - public ConvertWorksheetToModelRequest addWorksheetIdsItem(String worksheetIdsItem) { - if (this.worksheetIds == null) { - this.worksheetIds = new ArrayList<>(); - } - this.worksheetIds.add(worksheetIdsItem); - return this; - } - - /** - * List of Worksheet IDs. - * - * @return worksheetIds - */ - @javax.annotation.Nullable - public List getWorksheetIds() { - return worksheetIds; - } - - public void setWorksheetIds(@javax.annotation.Nullable List worksheetIds) { - this.worksheetIds = worksheetIds; - } - - public ConvertWorksheetToModelRequest excludeWorksheetIds( - @javax.annotation.Nullable List excludeWorksheetIds) { - this.excludeWorksheetIds = excludeWorksheetIds; - return this; - } - - public ConvertWorksheetToModelRequest addExcludeWorksheetIdsItem( - String excludeWorksheetIdsItem) { - if (this.excludeWorksheetIds == null) { - this.excludeWorksheetIds = new ArrayList<>(); - } - this.excludeWorksheetIds.add(excludeWorksheetIdsItem); - return this; - } - /** - * List of Worksheet IDs to be excluded. - * - * @return excludeWorksheetIds - */ - @javax.annotation.Nullable - public List getExcludeWorksheetIds() { - return excludeWorksheetIds; - } - - public void setExcludeWorksheetIds( - @javax.annotation.Nullable List excludeWorksheetIds) { - this.excludeWorksheetIds = excludeWorksheetIds; - } - - public ConvertWorksheetToModelRequest convertAll( - @javax.annotation.Nullable Boolean convertAll) { - this.convertAll = convertAll; - return this; - } - - /** - * Indicates whether all the worksheet needs to be converted to models. - * - * @return convertAll - */ - @javax.annotation.Nullable - public Boolean getConvertAll() { - return convertAll; - } - - public void setConvertAll(@javax.annotation.Nullable Boolean convertAll) { - this.convertAll = convertAll; - } - - public ConvertWorksheetToModelRequest applyChanges( - @javax.annotation.Nullable Boolean applyChanges) { - this.applyChanges = applyChanges; - return this; - } - - /** - * Indicates whether the changes should be applied to database. - * - * @return applyChanges - */ - @javax.annotation.Nullable - public Boolean getApplyChanges() { - return applyChanges; - } - - public void setApplyChanges(@javax.annotation.Nullable Boolean applyChanges) { - this.applyChanges = applyChanges; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConvertWorksheetToModelRequest convertWorksheetToModelRequest = - (ConvertWorksheetToModelRequest) o; - return Objects.equals(this.worksheetIds, convertWorksheetToModelRequest.worksheetIds) - && Objects.equals( - this.excludeWorksheetIds, - convertWorksheetToModelRequest.excludeWorksheetIds) - && Objects.equals(this.convertAll, convertWorksheetToModelRequest.convertAll) - && Objects.equals(this.applyChanges, convertWorksheetToModelRequest.applyChanges); - } +import com.thoughtspot.client.JSON; - 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())); +/** + * ConvertWorksheetToModelRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConvertWorksheetToModelRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_WORKSHEET_IDS = "worksheet_ids"; + @SerializedName(SERIALIZED_NAME_WORKSHEET_IDS) + @javax.annotation.Nullable + private List worksheetIds; + + public static final String SERIALIZED_NAME_EXCLUDE_WORKSHEET_IDS = "exclude_worksheet_ids"; + @SerializedName(SERIALIZED_NAME_EXCLUDE_WORKSHEET_IDS) + @javax.annotation.Nullable + private List excludeWorksheetIds; + + public static final String SERIALIZED_NAME_CONVERT_ALL = "convert_all"; + @SerializedName(SERIALIZED_NAME_CONVERT_ALL) + @javax.annotation.Nullable + private Boolean convertAll = false; + + public static final String SERIALIZED_NAME_APPLY_CHANGES = "apply_changes"; + @SerializedName(SERIALIZED_NAME_APPLY_CHANGES) + @javax.annotation.Nullable + private Boolean applyChanges = false; + + public ConvertWorksheetToModelRequest() { + } + + public ConvertWorksheetToModelRequest worksheetIds(@javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + return this; + } + + public ConvertWorksheetToModelRequest addWorksheetIdsItem(String worksheetIdsItem) { + if (this.worksheetIds == null) { + this.worksheetIds = new ArrayList<>(); } - - @Override - public int hashCode() { - return Objects.hash(worksheetIds, excludeWorksheetIds, convertAll, applyChanges); + this.worksheetIds.add(worksheetIdsItem); + return this; + } + + /** + * List of Worksheet IDs. + * @return worksheetIds + */ + @javax.annotation.Nullable + public List getWorksheetIds() { + return worksheetIds; + } + + public void setWorksheetIds(@javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + } + + + public ConvertWorksheetToModelRequest excludeWorksheetIds(@javax.annotation.Nullable List excludeWorksheetIds) { + this.excludeWorksheetIds = excludeWorksheetIds; + return this; + } + + public ConvertWorksheetToModelRequest addExcludeWorksheetIdsItem(String excludeWorksheetIdsItem) { + if (this.excludeWorksheetIds == null) { + this.excludeWorksheetIds = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.excludeWorksheetIds.add(excludeWorksheetIdsItem); + return this; + } + + /** + * List of Worksheet IDs to be excluded. + * @return excludeWorksheetIds + */ + @javax.annotation.Nullable + public List getExcludeWorksheetIds() { + return excludeWorksheetIds; + } + + public void setExcludeWorksheetIds(@javax.annotation.Nullable List excludeWorksheetIds) { + this.excludeWorksheetIds = excludeWorksheetIds; + } + + + public ConvertWorksheetToModelRequest convertAll(@javax.annotation.Nullable Boolean convertAll) { + this.convertAll = convertAll; + return this; + } + + /** + * Indicates whether all the worksheet needs to be converted to models. + * @return convertAll + */ + @javax.annotation.Nullable + public Boolean getConvertAll() { + return convertAll; + } + + public void setConvertAll(@javax.annotation.Nullable Boolean convertAll) { + this.convertAll = convertAll; + } + + + public ConvertWorksheetToModelRequest applyChanges(@javax.annotation.Nullable Boolean applyChanges) { + this.applyChanges = applyChanges; + return this; + } + + /** + * Indicates whether the changes should be applied to database. + * @return applyChanges + */ + @javax.annotation.Nullable + public Boolean getApplyChanges() { + return applyChanges; + } + + public void setApplyChanges(@javax.annotation.Nullable Boolean applyChanges) { + this.applyChanges = applyChanges; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConvertWorksheetToModelRequest {\n"); - sb.append(" worksheetIds: ").append(toIndentedString(worksheetIds)).append("\n"); - sb.append(" excludeWorksheetIds: ") - .append(toIndentedString(excludeWorksheetIds)) - .append("\n"); - sb.append(" convertAll: ").append(toIndentedString(convertAll)).append("\n"); - sb.append(" applyChanges: ").append(toIndentedString(applyChanges)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ConvertWorksheetToModelRequest convertWorksheetToModelRequest = (ConvertWorksheetToModelRequest) o; + return Objects.equals(this.worksheetIds, convertWorksheetToModelRequest.worksheetIds) && + Objects.equals(this.excludeWorksheetIds, convertWorksheetToModelRequest.excludeWorksheetIds) && + Objects.equals(this.convertAll, convertWorksheetToModelRequest.convertAll) && + Objects.equals(this.applyChanges, convertWorksheetToModelRequest.applyChanges); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(worksheetIds, excludeWorksheetIds, convertAll, applyChanges); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("worksheet_ids"); - openapiFields.add("exclude_worksheet_ids"); - openapiFields.add("convert_all"); - openapiFields.add("apply_changes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConvertWorksheetToModelRequest {\n"); + sb.append(" worksheetIds: ").append(toIndentedString(worksheetIds)).append("\n"); + sb.append(" excludeWorksheetIds: ").append(toIndentedString(excludeWorksheetIds)).append("\n"); + sb.append(" convertAll: ").append(toIndentedString(convertAll)).append("\n"); + sb.append(" applyChanges: ").append(toIndentedString(applyChanges)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ConvertWorksheetToModelRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ConvertWorksheetToModelRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ConvertWorksheetToModelRequest is not" - + " found in the empty JSON string", - ConvertWorksheetToModelRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("worksheet_ids"); + openapiFields.add("exclude_worksheet_ids"); + openapiFields.add("convert_all"); + openapiFields.add("apply_changes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConvertWorksheetToModelRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConvertWorksheetToModelRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConvertWorksheetToModelRequest is not found in the empty JSON string", ConvertWorksheetToModelRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ConvertWorksheetToModelRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ConvertWorksheetToModelRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConvertWorksheetToModelRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConvertWorksheetToModelRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("worksheet_ids") != null - && !jsonObj.get("worksheet_ids").isJsonNull() - && !jsonObj.get("worksheet_ids").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `worksheet_ids` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("worksheet_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("exclude_worksheet_ids") != null - && !jsonObj.get("exclude_worksheet_ids").isJsonNull() - && !jsonObj.get("exclude_worksheet_ids").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `exclude_worksheet_ids` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("exclude_worksheet_ids").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConvertWorksheetToModelRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConvertWorksheetToModelRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ConvertWorksheetToModelRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ConvertWorksheetToModelRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ConvertWorksheetToModelRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ConvertWorksheetToModelRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ConvertWorksheetToModelRequest - * @throws IOException if the JSON string is invalid with respect to - * ConvertWorksheetToModelRequest - */ - public static ConvertWorksheetToModelRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ConvertWorksheetToModelRequest.class); - } - - /** - * Convert an instance of ConvertWorksheetToModelRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("worksheet_ids") != null && !jsonObj.get("worksheet_ids").isJsonNull() && !jsonObj.get("worksheet_ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `worksheet_ids` to be an array in the JSON string but got `%s`", jsonObj.get("worksheet_ids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("exclude_worksheet_ids") != null && !jsonObj.get("exclude_worksheet_ids").isJsonNull() && !jsonObj.get("exclude_worksheet_ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `exclude_worksheet_ids` to be an array in the JSON string but got `%s`", jsonObj.get("exclude_worksheet_ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConvertWorksheetToModelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConvertWorksheetToModelRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConvertWorksheetToModelRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConvertWorksheetToModelRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ConvertWorksheetToModelRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ConvertWorksheetToModelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConvertWorksheetToModelRequest + * @throws IOException if the JSON string is invalid with respect to ConvertWorksheetToModelRequest + */ + public static ConvertWorksheetToModelRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConvertWorksheetToModelRequest.class); + } + + /** + * Convert an instance of ConvertWorksheetToModelRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java index 9f29df32d..cc727e446 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java @@ -4,367 +4,351 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CopyObjectRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CopyObjectRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - /** Type of metadata object */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_TITLE = "title"; - - @SerializedName(SERIALIZED_NAME_TITLE) - @javax.annotation.Nullable - private String title; - - public CopyObjectRequest() {} - - public CopyObjectRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the new object - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public CopyObjectRequest identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * GUID of metadata object to be copied (answer id or liveboard id) - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } - - public CopyObjectRequest type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata object - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - public CopyObjectRequest title(@javax.annotation.Nullable String title) { - this.title = title; - return this; - } - - /** - * Title of the new object - * - * @return title - */ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - public void setTitle(@javax.annotation.Nullable String title) { - this.title = title; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CopyObjectRequest copyObjectRequest = (CopyObjectRequest) o; - return Objects.equals(this.description, copyObjectRequest.description) - && Objects.equals(this.identifier, copyObjectRequest.identifier) - && Objects.equals(this.type, copyObjectRequest.type) - && Objects.equals(this.title, copyObjectRequest.title); +/** + * CopyObjectRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CopyObjectRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata object + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(description, identifier, type, title); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CopyObjectRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("identifier"); - openapiFields.add("type"); - openapiFields.add("title"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + 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); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CopyObjectRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CopyObjectRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CopyObjectRequest is not found in the" - + " empty JSON string", - CopyObjectRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_TITLE = "title"; + @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nullable + private String title; + + public CopyObjectRequest() { + } + + public CopyObjectRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the new object + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CopyObjectRequest identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * GUID of metadata object to be copied (answer id or liveboard id) + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public CopyObjectRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public CopyObjectRequest title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Title of the new object + * @return title + */ + @javax.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CopyObjectRequest copyObjectRequest = (CopyObjectRequest) o; + return Objects.equals(this.description, copyObjectRequest.description) && + Objects.equals(this.identifier, copyObjectRequest.identifier) && + Objects.equals(this.type, copyObjectRequest.type) && + Objects.equals(this.title, copyObjectRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash(description, identifier, type, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CopyObjectRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("identifier"); + openapiFields.add("type"); + openapiFields.add("title"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CopyObjectRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CopyObjectRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CopyObjectRequest is not found in the empty JSON string", CopyObjectRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CopyObjectRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CopyObjectRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CopyObjectRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CopyObjectRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CopyObjectRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CopyObjectRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) - && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `title` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("title").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CopyObjectRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CopyObjectRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CopyObjectRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CopyObjectRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CopyObjectRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CopyObjectRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CopyObjectRequest - * @throws IOException if the JSON string is invalid with respect to CopyObjectRequest - */ - public static CopyObjectRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CopyObjectRequest.class); - } - - /** - * Convert an instance of CopyObjectRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CopyObjectRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CopyObjectRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CopyObjectRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CopyObjectRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CopyObjectRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CopyObjectRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CopyObjectRequest + * @throws IOException if the JSON string is invalid with respect to CopyObjectRequest + */ + public static CopyObjectRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CopyObjectRequest.class); + } + + /** + * Convert an instance of CopyObjectRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java index ace583d35..b8b03d0bf 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java @@ -4,243 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ContextPayloadV2Input; +import com.thoughtspot.client.model.ConversationSettingsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateAgentConversationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateAgentConversationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_CONTEXT = "metadata_context"; - - @SerializedName(SERIALIZED_NAME_METADATA_CONTEXT) - @javax.annotation.Nonnull - private ContextPayloadV2Input metadataContext; - - public static final String SERIALIZED_NAME_CONVERSATION_SETTINGS = "conversation_settings"; - - @SerializedName(SERIALIZED_NAME_CONVERSATION_SETTINGS) - @javax.annotation.Nonnull - private ConversationSettingsInput conversationSettings; - - public CreateAgentConversationRequest() {} - - public CreateAgentConversationRequest metadataContext( - @javax.annotation.Nonnull ContextPayloadV2Input metadataContext) { - this.metadataContext = metadataContext; - return this; - } - - /** - * Context for the conversation. - * - * @return metadataContext - */ - @javax.annotation.Nonnull - public ContextPayloadV2Input getMetadataContext() { - return metadataContext; - } - - public void setMetadataContext( - @javax.annotation.Nonnull ContextPayloadV2Input metadataContext) { - this.metadataContext = metadataContext; - } - - public CreateAgentConversationRequest conversationSettings( - @javax.annotation.Nonnull ConversationSettingsInput conversationSettings) { - this.conversationSettings = conversationSettings; - return this; - } - - /** - * Conversation settings. - * - * @return conversationSettings - */ - @javax.annotation.Nonnull - public ConversationSettingsInput getConversationSettings() { - return conversationSettings; - } - - public void setConversationSettings( - @javax.annotation.Nonnull ConversationSettingsInput conversationSettings) { - this.conversationSettings = conversationSettings; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAgentConversationRequest createAgentConversationRequest = - (CreateAgentConversationRequest) o; - return Objects.equals(this.metadataContext, createAgentConversationRequest.metadataContext) - && Objects.equals( - this.conversationSettings, - createAgentConversationRequest.conversationSettings); - } - - @Override - public int hashCode() { - return Objects.hash(metadataContext, conversationSettings); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAgentConversationRequest {\n"); - sb.append(" metadataContext: ").append(toIndentedString(metadataContext)).append("\n"); - sb.append(" conversationSettings: ") - .append(toIndentedString(conversationSettings)) - .append("\n"); - sb.append("}"); - return sb.toString(); +/** + * CreateAgentConversationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateAgentConversationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_CONTEXT = "metadata_context"; + @SerializedName(SERIALIZED_NAME_METADATA_CONTEXT) + @javax.annotation.Nonnull + private ContextPayloadV2Input metadataContext; + + public static final String SERIALIZED_NAME_CONVERSATION_SETTINGS = "conversation_settings"; + @SerializedName(SERIALIZED_NAME_CONVERSATION_SETTINGS) + @javax.annotation.Nonnull + private ConversationSettingsInput conversationSettings; + + public CreateAgentConversationRequest() { + } + + public CreateAgentConversationRequest metadataContext(@javax.annotation.Nonnull ContextPayloadV2Input metadataContext) { + this.metadataContext = metadataContext; + return this; + } + + /** + * Context for the conversation. + * @return metadataContext + */ + @javax.annotation.Nonnull + public ContextPayloadV2Input getMetadataContext() { + return metadataContext; + } + + public void setMetadataContext(@javax.annotation.Nonnull ContextPayloadV2Input metadataContext) { + this.metadataContext = metadataContext; + } + + + public CreateAgentConversationRequest conversationSettings(@javax.annotation.Nonnull ConversationSettingsInput conversationSettings) { + this.conversationSettings = conversationSettings; + return this; + } + + /** + * Conversation settings. + * @return conversationSettings + */ + @javax.annotation.Nonnull + public ConversationSettingsInput getConversationSettings() { + return conversationSettings; + } + + public void setConversationSettings(@javax.annotation.Nonnull ConversationSettingsInput conversationSettings) { + this.conversationSettings = conversationSettings; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_context"); - openapiFields.add("conversation_settings"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_context"); - openapiRequiredFields.add("conversation_settings"); + CreateAgentConversationRequest createAgentConversationRequest = (CreateAgentConversationRequest) o; + return Objects.equals(this.metadataContext, createAgentConversationRequest.metadataContext) && + Objects.equals(this.conversationSettings, createAgentConversationRequest.conversationSettings); + } + + @Override + public int hashCode() { + return Objects.hash(metadataContext, conversationSettings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAgentConversationRequest {\n"); + sb.append(" metadataContext: ").append(toIndentedString(metadataContext)).append("\n"); + sb.append(" conversationSettings: ").append(toIndentedString(conversationSettings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CreateAgentConversationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAgentConversationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateAgentConversationRequest is not" - + " found in the empty JSON string", - CreateAgentConversationRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_context"); + openapiFields.add("conversation_settings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_context"); + openapiRequiredFields.add("conversation_settings"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAgentConversationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAgentConversationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAgentConversationRequest is not found in the empty JSON string", CreateAgentConversationRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAgentConversationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateAgentConversationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateAgentConversationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAgentConversationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAgentConversationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAgentConversationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `metadata_context` - ContextPayloadV2Input.validateJsonElement(jsonObj.get("metadata_context")); - // validate the required field `conversation_settings` - ConversationSettingsInput.validateJsonElement(jsonObj.get("conversation_settings")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAgentConversationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAgentConversationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateAgentConversationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAgentConversationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAgentConversationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAgentConversationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAgentConversationRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateAgentConversationRequest - */ - public static CreateAgentConversationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAgentConversationRequest.class); - } - - /** - * Convert an instance of CreateAgentConversationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `metadata_context` + ContextPayloadV2Input.validateJsonElement(jsonObj.get("metadata_context")); + // validate the required field `conversation_settings` + ConversationSettingsInput.validateJsonElement(jsonObj.get("conversation_settings")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAgentConversationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAgentConversationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAgentConversationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAgentConversationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateAgentConversationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateAgentConversationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAgentConversationRequest + * @throws IOException if the JSON string is invalid with respect to CreateAgentConversationRequest + */ + public static CreateAgentConversationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAgentConversationRequest.class); + } + + /** + * Convert an instance of CreateAgentConversationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java index 503c2ba88..7406eb154 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java @@ -4,813 +4,733 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExternalTableInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateCalendarRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateCalendarRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - /** Type of create operation. */ - @JsonAdapter(CreationMethodEnum.Adapter.class) - public enum CreationMethodEnum { - FROM_INPUT_PARAMS("FROM_INPUT_PARAMS"), - - FROM_EXISTING_TABLE("FROM_EXISTING_TABLE"); - - private String value; +import com.thoughtspot.client.JSON; - CreationMethodEnum(String value) { - this.value = value; - } +/** + * CreateCalendarRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateCalendarRequest implements Serializable { + private static final long serialVersionUID = 1L; - public String getValue() { - return value; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; - @Override - public String toString() { - return String.valueOf(value); - } + /** + * Type of create operation. + */ + @JsonAdapter(CreationMethodEnum.Adapter.class) + public enum CreationMethodEnum { + FROM_INPUT_PARAMS("FROM_INPUT_PARAMS"), + + FROM_EXISTING_TABLE("FROM_EXISTING_TABLE"); - public static CreationMethodEnum fromValue(String value) { - for (CreationMethodEnum b : CreationMethodEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CreationMethodEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CreationMethodEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CreationMethodEnum.fromValue(value); - } - } + private String value; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - CreationMethodEnum.fromValue(value); - } + CreationMethodEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_CREATION_METHOD = "creation_method"; - - @SerializedName(SERIALIZED_NAME_CREATION_METHOD) - @javax.annotation.Nonnull - private CreationMethodEnum creationMethod; - - public static final String SERIALIZED_NAME_TABLE_REFERENCE = "table_reference"; - - @SerializedName(SERIALIZED_NAME_TABLE_REFERENCE) - @javax.annotation.Nonnull - private ExternalTableInput tableReference; - - public static final String SERIALIZED_NAME_START_DATE = "start_date"; - - @SerializedName(SERIALIZED_NAME_START_DATE) - @javax.annotation.Nullable - private String startDate; - - public static final String SERIALIZED_NAME_END_DATE = "end_date"; - - @SerializedName(SERIALIZED_NAME_END_DATE) - @javax.annotation.Nullable - private String endDate; - - /** Type of the calendar. */ - @JsonAdapter(CalendarTypeEnum.Adapter.class) - public enum CalendarTypeEnum { - MONTH_OFFSET("MONTH_OFFSET"), - - FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), - - FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), - - FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); - - private String value; - - CalendarTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CalendarTypeEnum fromValue(String value) { - for (CalendarTypeEnum b : CalendarTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CalendarTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - CalendarTypeEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; - - @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) - @javax.annotation.Nullable - private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; - - /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if - * you set `month_offset` to \"April\", the custom calendar will treat - * \"April\" as the first month of the year, and the related attributes such as - * quarters and start date will be based on this offset. The default value is - * `January`, which represents the standard calendar year (January to December). - */ - @JsonAdapter(MonthOffsetEnum.Adapter.class) - public enum MonthOffsetEnum { - JANUARY("January"), - - FEBRUARY("February"), - - MARCH("March"), - - APRIL("April"), - - MAY("May"), - - JUNE("June"), - - JULY("July"), - - AUGUST("August"), - - SEPTEMBER("September"), - - OCTOBER("October"), - - NOVEMBER("November"), - - DECEMBER("December"); - - private String value; - - MonthOffsetEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MonthOffsetEnum fromValue(String value) { - for (MonthOffsetEnum b : MonthOffsetEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MonthOffsetEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MonthOffsetEnum.fromValue(value); - } + @Override + public String toString() { + return String.valueOf(value); } - public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; - - @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) - @javax.annotation.Nullable - private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; - - /** Specify the starting day of the week. */ - @JsonAdapter(StartDayOfWeekEnum.Adapter.class) - public enum StartDayOfWeekEnum { - SUNDAY("Sunday"), - - MONDAY("Monday"), - - TUESDAY("Tuesday"), - - WEDNESDAY("Wednesday"), - - THURSDAY("Thursday"), - - FRIDAY("Friday"), - - SATURDAY("Saturday"); - - private String value; - - StartDayOfWeekEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StartDayOfWeekEnum fromValue(String value) { - for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StartDayOfWeekEnum.fromValue(value); - } + public static CreationMethodEnum fromValue(String value) { + for (CreationMethodEnum b : CreationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StartDayOfWeekEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; - - @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) - @javax.annotation.Nullable - private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; - - public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; - - @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) - @javax.annotation.Nullable - private String quarterNamePrefix = ""; - - public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; - - @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) - @javax.annotation.Nullable - private String yearNamePrefix = ""; - - public CreateCalendarRequest() {} - - public CreateCalendarRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the custom calendar. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateCalendarRequest creationMethod( - @javax.annotation.Nonnull CreationMethodEnum creationMethod) { - this.creationMethod = creationMethod; - return this; - } - - /** - * Type of create operation. - * - * @return creationMethod - */ - @javax.annotation.Nonnull - public CreationMethodEnum getCreationMethod() { - return creationMethod; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setCreationMethod(@javax.annotation.Nonnull CreationMethodEnum creationMethod) { - this.creationMethod = creationMethod; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CreationMethodEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public CreateCalendarRequest tableReference( - @javax.annotation.Nonnull ExternalTableInput tableReference) { - this.tableReference = tableReference; - return this; + @Override + public CreationMethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CreationMethodEnum.fromValue(value); + } } - /** - * Table reference containing connection identifier and table details in this format: - * `{\"connection_identifier\":\"conn1\", - * \"database_name\":\"db1\", \"schema_name\":\"sc1\", - * \"table_name\":\"tb1\"}`. The given table will be created if - * `creation_method` is set as `FROM_INPUT_PARAMS`. - * - * @return tableReference - */ - @javax.annotation.Nonnull - public ExternalTableInput getTableReference() { - return tableReference; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CreationMethodEnum.fromValue(value); } + } - public void setTableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { - this.tableReference = tableReference; - } + public static final String SERIALIZED_NAME_CREATION_METHOD = "creation_method"; + @SerializedName(SERIALIZED_NAME_CREATION_METHOD) + @javax.annotation.Nonnull + private CreationMethodEnum creationMethod; - public CreateCalendarRequest startDate(@javax.annotation.Nullable String startDate) { - this.startDate = startDate; - return this; - } + public static final String SERIALIZED_NAME_TABLE_REFERENCE = "table_reference"; + @SerializedName(SERIALIZED_NAME_TABLE_REFERENCE) + @javax.annotation.Nonnull + private ExternalTableInput tableReference; - /** - * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if - * `creation_method` is set as `FROM_INPUT_PARAMS`. - * - * @return startDate - */ - @javax.annotation.Nullable - public String getStartDate() { - return startDate; - } + public static final String SERIALIZED_NAME_START_DATE = "start_date"; + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nullable + private String startDate; - public void setStartDate(@javax.annotation.Nullable String startDate) { - this.startDate = startDate; - } + public static final String SERIALIZED_NAME_END_DATE = "end_date"; + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nullable + private String endDate; - public CreateCalendarRequest endDate(@javax.annotation.Nullable String endDate) { - this.endDate = endDate; - return this; - } + /** + * Type of the calendar. + */ + @JsonAdapter(CalendarTypeEnum.Adapter.class) + public enum CalendarTypeEnum { + MONTH_OFFSET("MONTH_OFFSET"), + + FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), + + FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), + + FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); - /** - * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if - * `creation_method` is set as `FROM_INPUT_PARAMS`. - * - * @return endDate - */ - @javax.annotation.Nullable - public String getEndDate() { - return endDate; - } + private String value; - public void setEndDate(@javax.annotation.Nullable String endDate) { - this.endDate = endDate; + CalendarTypeEnum(String value) { + this.value = value; } - public CreateCalendarRequest calendarType( - @javax.annotation.Nullable CalendarTypeEnum calendarType) { - this.calendarType = calendarType; - return this; + public String getValue() { + return value; } - /** - * Type of the calendar. - * - * @return calendarType - */ - @javax.annotation.Nullable - public CalendarTypeEnum getCalendarType() { - return calendarType; - } - - public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { - this.calendarType = calendarType; + @Override + public String toString() { + return String.valueOf(value); } - public CreateCalendarRequest monthOffset( - @javax.annotation.Nullable MonthOffsetEnum monthOffset) { - this.monthOffset = monthOffset; - return this; + public static CalendarTypeEnum fromValue(String value) { + for (CalendarTypeEnum b : CalendarTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if - * you set `month_offset` to \"April\", the custom calendar will treat - * \"April\" as the first month of the year, and the related attributes such as - * quarters and start date will be based on this offset. The default value is - * `January`, which represents the standard calendar year (January to December). - * - * @return monthOffset - */ - @javax.annotation.Nullable - public MonthOffsetEnum getMonthOffset() { - return monthOffset; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { - this.monthOffset = monthOffset; + @Override + public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CalendarTypeEnum.fromValue(value); + } } - public CreateCalendarRequest startDayOfWeek( - @javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { - this.startDayOfWeek = startDayOfWeek; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; + @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) + @javax.annotation.Nullable + private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + @JsonAdapter(MonthOffsetEnum.Adapter.class) + public enum MonthOffsetEnum { + JANUARY("January"), + + FEBRUARY("February"), + + MARCH("March"), + + APRIL("April"), + + MAY("May"), + + JUNE("June"), + + JULY("July"), + + AUGUST("August"), + + SEPTEMBER("September"), + + OCTOBER("October"), + + NOVEMBER("November"), + + DECEMBER("December"); + + private String value; + + MonthOffsetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - /** - * Specify the starting day of the week. - * - * @return startDayOfWeek - */ - @javax.annotation.Nullable - public StartDayOfWeekEnum getStartDayOfWeek() { - return startDayOfWeek; + @Override + public String toString() { + return String.valueOf(value); } - public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { - this.startDayOfWeek = startDayOfWeek; + public static MonthOffsetEnum fromValue(String value) { + for (MonthOffsetEnum b : MonthOffsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public CreateCalendarRequest quarterNamePrefix( - @javax.annotation.Nullable String quarterNamePrefix) { - this.quarterNamePrefix = quarterNamePrefix; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Prefix to add before the quarter. - * - * @return quarterNamePrefix - */ - @javax.annotation.Nullable - public String getQuarterNamePrefix() { - return quarterNamePrefix; + @Override + public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthOffsetEnum.fromValue(value); + } } - public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { - this.quarterNamePrefix = quarterNamePrefix; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthOffsetEnum.fromValue(value); } + } - public CreateCalendarRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { - this.yearNamePrefix = yearNamePrefix; - return this; - } + public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; + @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) + @javax.annotation.Nullable + private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; - /** - * Prefix to add before the year. - * - * @return yearNamePrefix - */ - @javax.annotation.Nullable - public String getYearNamePrefix() { - return yearNamePrefix; - } + /** + * Specify the starting day of the week. + */ + @JsonAdapter(StartDayOfWeekEnum.Adapter.class) + public enum StartDayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); - public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { - this.yearNamePrefix = yearNamePrefix; - } + private String value; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCalendarRequest createCalendarRequest = (CreateCalendarRequest) o; - return Objects.equals(this.name, createCalendarRequest.name) - && Objects.equals(this.creationMethod, createCalendarRequest.creationMethod) - && Objects.equals(this.tableReference, createCalendarRequest.tableReference) - && Objects.equals(this.startDate, createCalendarRequest.startDate) - && Objects.equals(this.endDate, createCalendarRequest.endDate) - && Objects.equals(this.calendarType, createCalendarRequest.calendarType) - && Objects.equals(this.monthOffset, createCalendarRequest.monthOffset) - && Objects.equals(this.startDayOfWeek, createCalendarRequest.startDayOfWeek) - && Objects.equals(this.quarterNamePrefix, createCalendarRequest.quarterNamePrefix) - && Objects.equals(this.yearNamePrefix, createCalendarRequest.yearNamePrefix); + StartDayOfWeekEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - name, - creationMethod, - tableReference, - startDate, - endDate, - calendarType, - monthOffset, - startDayOfWeek, - quarterNamePrefix, - yearNamePrefix); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCalendarRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" creationMethod: ").append(toIndentedString(creationMethod)).append("\n"); - sb.append(" tableReference: ").append(toIndentedString(tableReference)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); - sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); - sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); - sb.append(" quarterNamePrefix: ") - .append(toIndentedString(quarterNamePrefix)) - .append("\n"); - sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static StartDayOfWeekEnum fromValue(String value) { + for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("creation_method"); - openapiFields.add("table_reference"); - openapiFields.add("start_date"); - openapiFields.add("end_date"); - openapiFields.add("calendar_type"); - openapiFields.add("month_offset"); - openapiFields.add("start_day_of_week"); - openapiFields.add("quarter_name_prefix"); - openapiFields.add("year_name_prefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("creation_method"); - openapiRequiredFields.add("table_reference"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartDayOfWeekEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCalendarRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCalendarRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateCalendarRequest is not found in" - + " the empty JSON string", - CreateCalendarRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCalendarRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateCalendarRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCalendarRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + StartDayOfWeekEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; + @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) + @javax.annotation.Nullable + private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; + + public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; + @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) + @javax.annotation.Nullable + private String quarterNamePrefix = ""; + + public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; + @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) + @javax.annotation.Nullable + private String yearNamePrefix = ""; + + public CreateCalendarRequest() { + } + + public CreateCalendarRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the custom calendar. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateCalendarRequest creationMethod(@javax.annotation.Nonnull CreationMethodEnum creationMethod) { + this.creationMethod = creationMethod; + return this; + } + + /** + * Type of create operation. + * @return creationMethod + */ + @javax.annotation.Nonnull + public CreationMethodEnum getCreationMethod() { + return creationMethod; + } + + public void setCreationMethod(@javax.annotation.Nonnull CreationMethodEnum creationMethod) { + this.creationMethod = creationMethod; + } + + + public CreateCalendarRequest tableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + return this; + } + + /** + * Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. + * @return tableReference + */ + @javax.annotation.Nonnull + public ExternalTableInput getTableReference() { + return tableReference; + } + + public void setTableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + } + + + public CreateCalendarRequest startDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + * @return startDate + */ + @javax.annotation.Nullable + public String getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + } + + + public CreateCalendarRequest endDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + * @return endDate + */ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + } + + + public CreateCalendarRequest calendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + return this; + } + + /** + * Type of the calendar. + * @return calendarType + */ + @javax.annotation.Nullable + public CalendarTypeEnum getCalendarType() { + return calendarType; + } + + public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + } + + + public CreateCalendarRequest monthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + return this; + } + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + * @return monthOffset + */ + @javax.annotation.Nullable + public MonthOffsetEnum getMonthOffset() { + return monthOffset; + } + + public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + } + + + public CreateCalendarRequest startDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + return this; + } + + /** + * Specify the starting day of the week. + * @return startDayOfWeek + */ + @javax.annotation.Nullable + public StartDayOfWeekEnum getStartDayOfWeek() { + return startDayOfWeek; + } + + public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + } + + + public CreateCalendarRequest quarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + return this; + } + + /** + * Prefix to add before the quarter. + * @return quarterNamePrefix + */ + @javax.annotation.Nullable + public String getQuarterNamePrefix() { + return quarterNamePrefix; + } + + public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + } + + + public CreateCalendarRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + return this; + } + + /** + * Prefix to add before the year. + * @return yearNamePrefix + */ + @javax.annotation.Nullable + public String getYearNamePrefix() { + return yearNamePrefix; + } + + public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCalendarRequest createCalendarRequest = (CreateCalendarRequest) o; + return Objects.equals(this.name, createCalendarRequest.name) && + Objects.equals(this.creationMethod, createCalendarRequest.creationMethod) && + Objects.equals(this.tableReference, createCalendarRequest.tableReference) && + Objects.equals(this.startDate, createCalendarRequest.startDate) && + Objects.equals(this.endDate, createCalendarRequest.endDate) && + Objects.equals(this.calendarType, createCalendarRequest.calendarType) && + Objects.equals(this.monthOffset, createCalendarRequest.monthOffset) && + Objects.equals(this.startDayOfWeek, createCalendarRequest.startDayOfWeek) && + Objects.equals(this.quarterNamePrefix, createCalendarRequest.quarterNamePrefix) && + Objects.equals(this.yearNamePrefix, createCalendarRequest.yearNamePrefix); + } + + @Override + public int hashCode() { + return Objects.hash(name, creationMethod, tableReference, startDate, endDate, calendarType, monthOffset, startDayOfWeek, quarterNamePrefix, yearNamePrefix); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCalendarRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" creationMethod: ").append(toIndentedString(creationMethod)).append("\n"); + sb.append(" tableReference: ").append(toIndentedString(tableReference)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); + sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); + sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); + sb.append(" quarterNamePrefix: ").append(toIndentedString(quarterNamePrefix)).append("\n"); + sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("creation_method"); + openapiFields.add("table_reference"); + openapiFields.add("start_date"); + openapiFields.add("end_date"); + openapiFields.add("calendar_type"); + openapiFields.add("month_offset"); + openapiFields.add("start_day_of_week"); + openapiFields.add("quarter_name_prefix"); + openapiFields.add("year_name_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("creation_method"); + openapiRequiredFields.add("table_reference"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCalendarRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCalendarRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCalendarRequest is not found in the empty JSON string", CreateCalendarRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateCalendarRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCalendarRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCalendarRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("creation_method").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `creation_method` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("creation_method").toString())); - } - // validate the required field `creation_method` - CreationMethodEnum.validateJsonElement(jsonObj.get("creation_method")); - // validate the required field `table_reference` - ExternalTableInput.validateJsonElement(jsonObj.get("table_reference")); - if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) - && !jsonObj.get("start_date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `start_date` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("start_date").toString())); - } - if ((jsonObj.get("end_date") != null && !jsonObj.get("end_date").isJsonNull()) - && !jsonObj.get("end_date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `end_date` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("end_date").toString())); - } - if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) - && !jsonObj.get("calendar_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `calendar_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("calendar_type").toString())); - } - // validate the optional field `calendar_type` - if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { - CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); - } - if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) - && !jsonObj.get("month_offset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `month_offset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("month_offset").toString())); - } - // validate the optional field `month_offset` - if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { - MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); - } - if ((jsonObj.get("start_day_of_week") != null - && !jsonObj.get("start_day_of_week").isJsonNull()) - && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `start_day_of_week` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("start_day_of_week").toString())); - } - // validate the optional field `start_day_of_week` - if (jsonObj.get("start_day_of_week") != null - && !jsonObj.get("start_day_of_week").isJsonNull()) { - StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); - } - if ((jsonObj.get("quarter_name_prefix") != null - && !jsonObj.get("quarter_name_prefix").isJsonNull()) - && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quarter_name_prefix` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("quarter_name_prefix").toString())); - } - if ((jsonObj.get("year_name_prefix") != null - && !jsonObj.get("year_name_prefix").isJsonNull()) - && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `year_name_prefix` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("year_name_prefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCalendarRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCalendarRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateCalendarRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCalendarRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCalendarRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCalendarRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCalendarRequest - * @throws IOException if the JSON string is invalid with respect to CreateCalendarRequest - */ - public static CreateCalendarRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCalendarRequest.class); - } - - /** - * Convert an instance of CreateCalendarRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("creation_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creation_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creation_method").toString())); + } + // validate the required field `creation_method` + CreationMethodEnum.validateJsonElement(jsonObj.get("creation_method")); + // validate the required field `table_reference` + ExternalTableInput.validateJsonElement(jsonObj.get("table_reference")); + if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_date").toString())); + } + if ((jsonObj.get("end_date") != null && !jsonObj.get("end_date").isJsonNull()) && !jsonObj.get("end_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `end_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("end_date").toString())); + } + if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) && !jsonObj.get("calendar_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `calendar_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendar_type").toString())); + } + // validate the optional field `calendar_type` + if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { + CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); + } + if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) && !jsonObj.get("month_offset").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `month_offset` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month_offset").toString())); + } + // validate the optional field `month_offset` + if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { + MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); + } + if ((jsonObj.get("start_day_of_week") != null && !jsonObj.get("start_day_of_week").isJsonNull()) && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_day_of_week` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_day_of_week").toString())); + } + // validate the optional field `start_day_of_week` + if (jsonObj.get("start_day_of_week") != null && !jsonObj.get("start_day_of_week").isJsonNull()) { + StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); + } + if ((jsonObj.get("quarter_name_prefix") != null && !jsonObj.get("quarter_name_prefix").isJsonNull()) && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quarter_name_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quarter_name_prefix").toString())); + } + if ((jsonObj.get("year_name_prefix") != null && !jsonObj.get("year_name_prefix").isJsonNull()) && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `year_name_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("year_name_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCalendarRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCalendarRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCalendarRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCalendarRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCalendarRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCalendarRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCalendarRequest + * @throws IOException if the JSON string is invalid with respect to CreateCalendarRequest + */ + public static CreateCalendarRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCalendarRequest.class); + } + + /** + * Convert an instance of CreateCalendarRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java index 47ce86957..a931c1ced 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java @@ -4,504 +4,437 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CreateConfigRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateConfigRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; - - @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) - @javax.annotation.Nonnull - private String repositoryUrl; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nonnull - private String username; - - public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; - - @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) - @javax.annotation.Nonnull - private String accessToken; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - public static final String SERIALIZED_NAME_BRANCH_NAMES = "branch_names"; - - @SerializedName(SERIALIZED_NAME_BRANCH_NAMES) - @javax.annotation.Nullable - private List branchNames; - - public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; - - @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) - @javax.annotation.Nullable - private String commitBranchName; - - public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; - - @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) - @javax.annotation.Nullable - private Boolean enableGuidMapping = true; - - public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = - "configuration_branch_name"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) - @javax.annotation.Nullable - private String configurationBranchName; - - public CreateConfigRequest() {} - - public CreateConfigRequest repositoryUrl(@javax.annotation.Nonnull String repositoryUrl) { - this.repositoryUrl = repositoryUrl; - return this; - } - - /** - * URL for connecting to remote repository - * - * @return repositoryUrl - */ - @javax.annotation.Nonnull - public String getRepositoryUrl() { - return repositoryUrl; - } - - public void setRepositoryUrl(@javax.annotation.Nonnull String repositoryUrl) { - this.repositoryUrl = repositoryUrl; - } - - public CreateConfigRequest username(@javax.annotation.Nonnull String username) { - this.username = username; - return this; - } - - /** - * Username to authenticate connection to remote repository - * - * @return username - */ - @javax.annotation.Nonnull - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nonnull String username) { - this.username = username; - } - - public CreateConfigRequest accessToken(@javax.annotation.Nonnull String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Access token corresponding to the user to authenticate connection to remote repository - * - * @return accessToken - */ - @javax.annotation.Nonnull - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(@javax.annotation.Nonnull String accessToken) { - this.accessToken = accessToken; - } - - public CreateConfigRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for - * cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: - * If no value is specified, then the configurations will be returned for all orgs the user has - * access to Version: 9.5.0.cl or later - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - public CreateConfigRequest branchNames(@javax.annotation.Nullable List branchNames) { - this.branchNames = branchNames; - return this; - } - - public CreateConfigRequest addBranchNamesItem(String branchNamesItem) { - if (this.branchNames == null) { - this.branchNames = new ArrayList<>(); - } - this.branchNames.add(branchNamesItem); - return this; - } - - /** - * List the remote branches to configure. Example:[development, production] - * - * @return branchNames - */ - @javax.annotation.Nullable - public List getBranchNames() { - return branchNames; - } - - public void setBranchNames(@javax.annotation.Nullable List branchNames) { - this.branchNames = branchNames; - } - - public CreateConfigRequest commitBranchName( - @javax.annotation.Nullable String commitBranchName) { - this.commitBranchName = commitBranchName; - return this; - } - - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. - * Version: 9.7.0.cl or later - * - * @return commitBranchName - */ - @javax.annotation.Nullable - public String getCommitBranchName() { - return commitBranchName; - } - - public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { - this.commitBranchName = commitBranchName; - } - - public CreateConfigRequest enableGuidMapping( - @javax.annotation.Nullable Boolean enableGuidMapping) { - this.enableGuidMapping = enableGuidMapping; - return this; - } - - /** - * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later - * - * @return enableGuidMapping - */ - @javax.annotation.Nullable - public Boolean getEnableGuidMapping() { - return enableGuidMapping; - } - - public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { - this.enableGuidMapping = enableGuidMapping; - } - - public CreateConfigRequest configurationBranchName( - @javax.annotation.Nullable String configurationBranchName) { - this.configurationBranchName = configurationBranchName; - return this; - } - - /** - * Name of the branch where the configuration files related to operations between Thoughtspot - * and version control repo should be maintained. Note: If no branch name is specified, then by - * default, ts_config_files branch is considered. Ensure this branch exists before - * configuration. Version: 9.7.0.cl or later - * - * @return configurationBranchName - */ - @javax.annotation.Nullable - public String getConfigurationBranchName() { - return configurationBranchName; - } - - public void setConfigurationBranchName( - @javax.annotation.Nullable String configurationBranchName) { - this.configurationBranchName = configurationBranchName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateConfigRequest createConfigRequest = (CreateConfigRequest) o; - return Objects.equals(this.repositoryUrl, createConfigRequest.repositoryUrl) - && Objects.equals(this.username, createConfigRequest.username) - && Objects.equals(this.accessToken, createConfigRequest.accessToken) - && Objects.equals(this.orgIdentifier, createConfigRequest.orgIdentifier) - && Objects.equals(this.branchNames, createConfigRequest.branchNames) - && Objects.equals(this.commitBranchName, createConfigRequest.commitBranchName) - && Objects.equals(this.enableGuidMapping, createConfigRequest.enableGuidMapping) - && Objects.equals( - this.configurationBranchName, createConfigRequest.configurationBranchName); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash( - repositoryUrl, - username, - accessToken, - orgIdentifier, - branchNames, - commitBranchName, - enableGuidMapping, - configurationBranchName); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateConfigRequest {\n"); - sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" branchNames: ").append(toIndentedString(branchNames)).append("\n"); - sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); - sb.append(" enableGuidMapping: ") - .append(toIndentedString(enableGuidMapping)) - .append("\n"); - sb.append(" configurationBranchName: ") - .append(toIndentedString(configurationBranchName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("repository_url"); - openapiFields.add("username"); - openapiFields.add("access_token"); - openapiFields.add("org_identifier"); - openapiFields.add("branch_names"); - openapiFields.add("commit_branch_name"); - openapiFields.add("enable_guid_mapping"); - openapiFields.add("configuration_branch_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("repository_url"); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("access_token"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateConfigRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateConfigRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateConfigRequest is not found in" - + " the empty JSON string", - CreateConfigRequest.openapiRequiredFields.toString())); - } +/** + * CreateConfigRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; + @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) + @javax.annotation.Nonnull + private String repositoryUrl; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + @javax.annotation.Nonnull + private String accessToken; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_BRANCH_NAMES = "branch_names"; + @SerializedName(SERIALIZED_NAME_BRANCH_NAMES) + @javax.annotation.Nullable + private List branchNames; + + public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; + @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) + @javax.annotation.Nullable + private String commitBranchName; + + public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; + @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) + @javax.annotation.Nullable + private Boolean enableGuidMapping = true; + + public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = "configuration_branch_name"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) + @javax.annotation.Nullable + private String configurationBranchName; + + public CreateConfigRequest() { + } + + public CreateConfigRequest repositoryUrl(@javax.annotation.Nonnull String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * URL for connecting to remote repository + * @return repositoryUrl + */ + @javax.annotation.Nonnull + public String getRepositoryUrl() { + return repositoryUrl; + } + + public void setRepositoryUrl(@javax.annotation.Nonnull String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + } + + + public CreateConfigRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username to authenticate connection to remote repository + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public CreateConfigRequest accessToken(@javax.annotation.Nonnull String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Access token corresponding to the user to authenticate connection to remote repository + * @return accessToken + */ + @javax.annotation.Nonnull + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(@javax.annotation.Nonnull String accessToken) { + this.accessToken = accessToken; + } + + + public CreateConfigRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + public CreateConfigRequest branchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + return this; + } + + public CreateConfigRequest addBranchNamesItem(String branchNamesItem) { + if (this.branchNames == null) { + this.branchNames = new ArrayList<>(); + } + this.branchNames.add(branchNamesItem); + return this; + } + + /** + * List the remote branches to configure. Example:[development, production] + * @return branchNames + */ + @javax.annotation.Nullable + public List getBranchNames() { + return branchNames; + } + + public void setBranchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + } + + + public CreateConfigRequest commitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + return this; + } + + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + * @return commitBranchName + */ + @javax.annotation.Nullable + public String getCommitBranchName() { + return commitBranchName; + } + + public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + } + + + public CreateConfigRequest enableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + return this; + } + + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + * @return enableGuidMapping + */ + @javax.annotation.Nullable + public Boolean getEnableGuidMapping() { + return enableGuidMapping; + } + + public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + } + + + public CreateConfigRequest configurationBranchName(@javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + return this; + } + + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + * @return configurationBranchName + */ + @javax.annotation.Nullable + public String getConfigurationBranchName() { + return configurationBranchName; + } + + public void setConfigurationBranchName(@javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConfigRequest createConfigRequest = (CreateConfigRequest) o; + return Objects.equals(this.repositoryUrl, createConfigRequest.repositoryUrl) && + Objects.equals(this.username, createConfigRequest.username) && + Objects.equals(this.accessToken, createConfigRequest.accessToken) && + Objects.equals(this.orgIdentifier, createConfigRequest.orgIdentifier) && + Objects.equals(this.branchNames, createConfigRequest.branchNames) && + Objects.equals(this.commitBranchName, createConfigRequest.commitBranchName) && + Objects.equals(this.enableGuidMapping, createConfigRequest.enableGuidMapping) && + Objects.equals(this.configurationBranchName, createConfigRequest.configurationBranchName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(repositoryUrl, username, accessToken, orgIdentifier, branchNames, commitBranchName, enableGuidMapping, configurationBranchName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConfigRequest {\n"); + sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" branchNames: ").append(toIndentedString(branchNames)).append("\n"); + sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); + sb.append(" enableGuidMapping: ").append(toIndentedString(enableGuidMapping)).append("\n"); + sb.append(" configurationBranchName: ").append(toIndentedString(configurationBranchName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("repository_url"); + openapiFields.add("username"); + openapiFields.add("access_token"); + openapiFields.add("org_identifier"); + openapiFields.add("branch_names"); + openapiFields.add("commit_branch_name"); + openapiFields.add("enable_guid_mapping"); + openapiFields.add("configuration_branch_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("repository_url"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("access_token"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConfigRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateConfigRequest is not found in the empty JSON string", CreateConfigRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateConfigRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateConfigRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateConfigRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateConfigRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateConfigRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConfigRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("repository_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `repository_url` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("repository_url").toString())); - } - if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if (!jsonObj.get("access_token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `access_token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("access_token").toString())); - } - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("branch_names") != null - && !jsonObj.get("branch_names").isJsonNull() - && !jsonObj.get("branch_names").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch_names` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("branch_names").toString())); - } - if ((jsonObj.get("commit_branch_name") != null - && !jsonObj.get("commit_branch_name").isJsonNull()) - && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_branch_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("commit_branch_name").toString())); - } - if ((jsonObj.get("configuration_branch_name") != null - && !jsonObj.get("configuration_branch_name").isJsonNull()) - && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `configuration_branch_name` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("configuration_branch_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateConfigRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateConfigRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateConfigRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateConfigRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateConfigRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateConfigRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateConfigRequest - * @throws IOException if the JSON string is invalid with respect to CreateConfigRequest - */ - public static CreateConfigRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateConfigRequest.class); - } - - /** - * Convert an instance of CreateConfigRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("repository_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `repository_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("repository_url").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("access_token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_token").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("branch_names") != null && !jsonObj.get("branch_names").isJsonNull() && !jsonObj.get("branch_names").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `branch_names` to be an array in the JSON string but got `%s`", jsonObj.get("branch_names").toString())); + } + if ((jsonObj.get("commit_branch_name") != null && !jsonObj.get("commit_branch_name").isJsonNull()) && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_branch_name").toString())); + } + if ((jsonObj.get("configuration_branch_name") != null && !jsonObj.get("configuration_branch_name").isJsonNull()) && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configuration_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configuration_branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateConfigRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConfigRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConfigRequest + * @throws IOException if the JSON string is invalid with respect to CreateConfigRequest + */ + public static CreateConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConfigRequest.class); + } + + /** + * Convert an instance of CreateConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java index 27b811113..40280b7ec 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java @@ -4,685 +4,606 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateConnectionConfigurationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateConnectionConfigurationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; - - /** Type of authentication used for the connection. */ - @JsonAdapter(AuthenticationTypeEnum.Adapter.class) - public enum AuthenticationTypeEnum { - SERVICE_ACCOUNT("SERVICE_ACCOUNT"), - - KEY_PAIR("KEY_PAIR"), - - PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), - - OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), - - OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); - - private String value; - - AuthenticationTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AuthenticationTypeEnum fromValue(String value) { - for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AuthenticationTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AuthenticationTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; - - @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) - @javax.annotation.Nullable - private AuthenticationTypeEnum authenticationType = AuthenticationTypeEnum.SERVICE_ACCOUNT; - - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - @javax.annotation.Nonnull - private Object _configuration; - - /** Type of policy. */ - @JsonAdapter(PolicyTypeEnum.Adapter.class) - public enum PolicyTypeEnum { - NO_POLICY("NO_POLICY"), - - PRINCIPALS("PRINCIPALS"), - - PROCESSES("PROCESSES"); - - private String value; - - PolicyTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyTypeEnum fromValue(String value) { - for (PolicyTypeEnum b : PolicyTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; - - @SerializedName(SERIALIZED_NAME_POLICY_TYPE) - @javax.annotation.Nullable - private PolicyTypeEnum policyType = PolicyTypeEnum.NO_POLICY; - - public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; - - @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) - @javax.annotation.Nullable - private List policyPrincipals; - - /** Gets or Sets policyProcesses */ - @JsonAdapter(PolicyProcessesEnum.Adapter.class) - public enum PolicyProcessesEnum { - SAGE_INDEXING("SAGE_INDEXING"), - - ROW_COUNT_STATS("ROW_COUNT_STATS"); - - private String value; - - PolicyProcessesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyProcessesEnum fromValue(String value) { - for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyProcessesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyProcessesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; - - @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) - @javax.annotation.Nullable - private List policyProcesses; +import com.thoughtspot.client.JSON; - public CreateConnectionConfigurationRequest() {} +/** + * CreateConnectionConfigurationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateConnectionConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; - public CreateConnectionConfigurationRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; - /** - * Unique name for the configuration. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; - public CreateConnectionConfigurationRequest description( - @javax.annotation.Nullable String description) { - this.description = description; - return this; - } + /** + * Type of authentication used for the connection. + */ + @JsonAdapter(AuthenticationTypeEnum.Adapter.class) + public enum AuthenticationTypeEnum { + SERVICE_ACCOUNT("SERVICE_ACCOUNT"), + + KEY_PAIR("KEY_PAIR"), + + PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), + + OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), + + OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); - /** - * Description of the configuration. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } + private String value; - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; + AuthenticationTypeEnum(String value) { + this.value = value; } - public CreateConnectionConfigurationRequest connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; + public String getValue() { + return value; } - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; + @Override + public String toString() { + return String.valueOf(value); } - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; + public static AuthenticationTypeEnum fromValue(String value) { + for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public CreateConnectionConfigurationRequest authenticationType( - @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { - this.authenticationType = authenticationType; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Type of authentication used for the connection. - * - * @return authenticationType - */ - @javax.annotation.Nullable - public AuthenticationTypeEnum getAuthenticationType() { - return authenticationType; + @Override + public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationTypeEnum.fromValue(value); + } } - public void setAuthenticationType( - @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { - this.authenticationType = authenticationType; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthenticationTypeEnum.fromValue(value); } + } - public CreateConnectionConfigurationRequest _configuration( - @javax.annotation.Nonnull Object _configuration) { - this._configuration = _configuration; - return this; - } + public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) + @javax.annotation.Nullable + private AuthenticationTypeEnum authenticationType = AuthenticationTypeEnum.SERVICE_ACCOUNT; - /** - * Configuration properties in JSON. - * - * @return _configuration - */ - @javax.annotation.Nonnull - public Object getConfiguration() { - return _configuration; - } + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nonnull + private Object _configuration; - public void setConfiguration(@javax.annotation.Nonnull Object _configuration) { - this._configuration = _configuration; - } + /** + * Type of policy. + */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); - public CreateConnectionConfigurationRequest policyType( - @javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - return this; - } + private String value; - /** - * Type of policy. - * - * @return policyType - */ - @javax.annotation.Nullable - public PolicyTypeEnum getPolicyType() { - return policyType; + PolicyTypeEnum(String value) { + this.value = value; } - public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; + public String getValue() { + return value; } - public CreateConnectionConfigurationRequest policyPrincipals( - @javax.annotation.Nullable List policyPrincipals) { - this.policyPrincipals = policyPrincipals; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public CreateConnectionConfigurationRequest addPolicyPrincipalsItem( - String policyPrincipalsItem) { - if (this.policyPrincipals == null) { - this.policyPrincipals = new ArrayList<>(); + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.policyPrincipals.add(policyPrincipalsItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Unique ID or name of the User and User Groups. - * - * @return policyPrincipals - */ - @javax.annotation.Nullable - public List getPolicyPrincipals() { - return policyPrincipals; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { - this.policyPrincipals = policyPrincipals; + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } } - public CreateConnectionConfigurationRequest policyProcesses( - @javax.annotation.Nullable List policyProcesses) { - this.policyProcesses = policyProcesses; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); } + } - public CreateConnectionConfigurationRequest addPolicyProcessesItem( - PolicyProcessesEnum policyProcessesItem) { - if (this.policyProcesses == null) { - this.policyProcesses = new ArrayList<>(); - } - this.policyProcesses.add(policyProcessesItem); - return this; - } + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType = PolicyTypeEnum.NO_POLICY; - /** - * Action that the query performed on the data warehouse, such as SAGE_INDEXING and - * ROW_COUNT_STATS. - * - * @return policyProcesses - */ - @javax.annotation.Nullable - public List getPolicyProcesses() { - return policyProcesses; - } + public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; + @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) + @javax.annotation.Nullable + private List policyPrincipals; - public void setPolicyProcesses( - @javax.annotation.Nullable List policyProcesses) { - this.policyProcesses = policyProcesses; - } + /** + * Gets or Sets policyProcesses + */ + @JsonAdapter(PolicyProcessesEnum.Adapter.class) + public enum PolicyProcessesEnum { + SAGE_INDEXING("SAGE_INDEXING"), + + ROW_COUNT_STATS("ROW_COUNT_STATS"); - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateConnectionConfigurationRequest createConnectionConfigurationRequest = - (CreateConnectionConfigurationRequest) o; - return Objects.equals(this.name, createConnectionConfigurationRequest.name) - && Objects.equals( - this.description, createConnectionConfigurationRequest.description) - && Objects.equals( - this.connectionIdentifier, - createConnectionConfigurationRequest.connectionIdentifier) - && Objects.equals( - this.authenticationType, - createConnectionConfigurationRequest.authenticationType) - && Objects.equals( - this._configuration, createConnectionConfigurationRequest._configuration) - && Objects.equals(this.policyType, createConnectionConfigurationRequest.policyType) - && Objects.equals( - this.policyPrincipals, - createConnectionConfigurationRequest.policyPrincipals) - && Objects.equals( - this.policyProcesses, createConnectionConfigurationRequest.policyProcesses); + private String value; + + PolicyProcessesEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - name, - description, - connectionIdentifier, - authenticationType, - _configuration, - policyType, - policyPrincipals, - policyProcesses); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateConnectionConfigurationRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append(" authenticationType: ") - .append(toIndentedString(authenticationType)) - .append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); - sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); - sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PolicyProcessesEnum fromValue(String value) { + for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("connection_identifier"); - openapiFields.add("authentication_type"); - openapiFields.add("configuration"); - openapiFields.add("policy_type"); - openapiFields.add("policy_principals"); - openapiFields.add("policy_processes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("connection_identifier"); - openapiRequiredFields.add("configuration"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyProcessesEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CreateConnectionConfigurationRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateConnectionConfigurationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateConnectionConfigurationRequest" - + " is not found in the empty JSON string", - CreateConnectionConfigurationRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateConnectionConfigurationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateConnectionConfigurationRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateConnectionConfigurationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + PolicyProcessesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; + @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) + @javax.annotation.Nullable + private List policyProcesses; + + public CreateConnectionConfigurationRequest() { + } + + public CreateConnectionConfigurationRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name for the configuration. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateConnectionConfigurationRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the configuration. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateConnectionConfigurationRequest connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + public CreateConnectionConfigurationRequest authenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Type of authentication used for the connection. + * @return authenticationType + */ + @javax.annotation.Nullable + public AuthenticationTypeEnum getAuthenticationType() { + return authenticationType; + } + + public void setAuthenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + } + + + public CreateConnectionConfigurationRequest _configuration(@javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration properties in JSON. + * @return _configuration + */ + @javax.annotation.Nonnull + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + } + + + public CreateConnectionConfigurationRequest policyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Type of policy. + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + + public CreateConnectionConfigurationRequest policyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + return this; + } + + public CreateConnectionConfigurationRequest addPolicyPrincipalsItem(String policyPrincipalsItem) { + if (this.policyPrincipals == null) { + this.policyPrincipals = new ArrayList<>(); + } + this.policyPrincipals.add(policyPrincipalsItem); + return this; + } + + /** + * Unique ID or name of the User and User Groups. + * @return policyPrincipals + */ + @javax.annotation.Nullable + public List getPolicyPrincipals() { + return policyPrincipals; + } + + public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + } + + + public CreateConnectionConfigurationRequest policyProcesses(@javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + return this; + } + + public CreateConnectionConfigurationRequest addPolicyProcessesItem(PolicyProcessesEnum policyProcessesItem) { + if (this.policyProcesses == null) { + this.policyProcesses = new ArrayList<>(); + } + this.policyProcesses.add(policyProcessesItem); + return this; + } + + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + * @return policyProcesses + */ + @javax.annotation.Nullable + public List getPolicyProcesses() { + return policyProcesses; + } + + public void setPolicyProcesses(@javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionConfigurationRequest createConnectionConfigurationRequest = (CreateConnectionConfigurationRequest) o; + return Objects.equals(this.name, createConnectionConfigurationRequest.name) && + Objects.equals(this.description, createConnectionConfigurationRequest.description) && + Objects.equals(this.connectionIdentifier, createConnectionConfigurationRequest.connectionIdentifier) && + Objects.equals(this.authenticationType, createConnectionConfigurationRequest.authenticationType) && + Objects.equals(this._configuration, createConnectionConfigurationRequest._configuration) && + Objects.equals(this.policyType, createConnectionConfigurationRequest.policyType) && + Objects.equals(this.policyPrincipals, createConnectionConfigurationRequest.policyPrincipals) && + Objects.equals(this.policyProcesses, createConnectionConfigurationRequest.policyProcesses); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, connectionIdentifier, authenticationType, _configuration, policyType, policyPrincipals, policyProcesses); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionConfigurationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append(" authenticationType: ").append(toIndentedString(authenticationType)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); + sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("connection_identifier"); + openapiFields.add("authentication_type"); + openapiFields.add("configuration"); + openapiFields.add("policy_type"); + openapiFields.add("policy_principals"); + openapiFields.add("policy_processes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("connection_identifier"); + openapiRequiredFields.add("configuration"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConnectionConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConnectionConfigurationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateConnectionConfigurationRequest is not found in the empty JSON string", CreateConnectionConfigurationRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateConnectionConfigurationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateConnectionConfigurationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConnectionConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - if ((jsonObj.get("authentication_type") != null - && !jsonObj.get("authentication_type").isJsonNull()) - && !jsonObj.get("authentication_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `authentication_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("authentication_type").toString())); - } - // validate the optional field `authentication_type` - if (jsonObj.get("authentication_type") != null - && !jsonObj.get("authentication_type").isJsonNull()) { - AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); - } - if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) - && !jsonObj.get("policy_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("policy_type").toString())); - } - // validate the optional field `policy_type` - if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { - PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("policy_principals") != null - && !jsonObj.get("policy_principals").isJsonNull() - && !jsonObj.get("policy_principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_principals` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("policy_principals").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("policy_processes") != null - && !jsonObj.get("policy_processes").isJsonNull() - && !jsonObj.get("policy_processes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_processes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("policy_processes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateConnectionConfigurationRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateConnectionConfigurationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, CreateConnectionConfigurationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateConnectionConfigurationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateConnectionConfigurationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateConnectionConfigurationRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateConnectionConfigurationRequest - */ - public static CreateConnectionConfigurationRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, CreateConnectionConfigurationRequest.class); - } - - /** - * Convert an instance of CreateConnectionConfigurationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("authentication_type") != null && !jsonObj.get("authentication_type").isJsonNull()) && !jsonObj.get("authentication_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authentication_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authentication_type").toString())); + } + // validate the optional field `authentication_type` + if (jsonObj.get("authentication_type") != null && !jsonObj.get("authentication_type").isJsonNull()) { + AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_principals") != null && !jsonObj.get("policy_principals").isJsonNull() && !jsonObj.get("policy_principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_principals` to be an array in the JSON string but got `%s`", jsonObj.get("policy_principals").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_processes") != null && !jsonObj.get("policy_processes").isJsonNull() && !jsonObj.get("policy_processes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_processes` to be an array in the JSON string but got `%s`", jsonObj.get("policy_processes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConnectionConfigurationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionConfigurationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConnectionConfigurationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateConnectionConfigurationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConnectionConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConnectionConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to CreateConnectionConfigurationRequest + */ + public static CreateConnectionConfigurationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConnectionConfigurationRequest.class); + } + + /** + * Convert an instance of CreateConnectionConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java index f5fbabf3c..ad05b5df9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java @@ -4,477 +4,449 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CreateConnectionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateConnectionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Type of the data warehouse. */ - @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) - public enum DataWarehouseTypeEnum { - SNOWFLAKE("SNOWFLAKE"), - - AMAZON_REDSHIFT("AMAZON_REDSHIFT"), - - GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), - - AZURE_SYNAPSE("AZURE_SYNAPSE"), - - TERADATA("TERADATA"), - - SAP_HANA("SAP_HANA"), - - STARBURST("STARBURST"), - ORACLE_ADW("ORACLE_ADW"), - - DATABRICKS("DATABRICKS"), - - DENODO("DENODO"), - - DREMIO("DREMIO"), - - TRINO("TRINO"), - - PRESTO("PRESTO"), - - POSTGRES("POSTGRES"), - - SQLSERVER("SQLSERVER"), - - MYSQL("MYSQL"), - - GENERIC_JDBC("GENERIC_JDBC"), - - AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), - - AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), - - AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), - - AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), - - LOOKER("LOOKER"), - - AMAZON_ATHENA("AMAZON_ATHENA"), - - SINGLESTORE("SINGLESTORE"), - - GCP_SQLSERVER("GCP_SQLSERVER"), - - GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), - - GCP_POSTGRESQL("GCP_POSTGRESQL"), - - GCP_MYSQL("GCP_MYSQL"), - - MODE("MODE"), - - GOOGLE_SHEETS("GOOGLE_SHEETS"), - - FALCON("FALCON"), - - FALCON_ONPREM("FALCON_ONPREM"), - - CLICKHOUSE("CLICKHOUSE"); - - private String value; - - DataWarehouseTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataWarehouseTypeEnum fromValue(String value) { - for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataWarehouseTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataWarehouseTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) - @javax.annotation.Nonnull - private DataWarehouseTypeEnum dataWarehouseType; - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) - @javax.annotation.Nonnull - private Object dataWarehouseConfig; - - public static final String SERIALIZED_NAME_VALIDATE = "validate"; - - @SerializedName(SERIALIZED_NAME_VALIDATE) - @javax.annotation.Nullable - private Boolean validate = true; - - public CreateConnectionRequest() {} - - public CreateConnectionRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Unique name for the connection. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateConnectionRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the connection. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public CreateConnectionRequest dataWarehouseType( - @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - return this; - } - - /** - * Type of the data warehouse. - * - * @return dataWarehouseType - */ - @javax.annotation.Nonnull - public DataWarehouseTypeEnum getDataWarehouseType() { - return dataWarehouseType; - } - - public void setDataWarehouseType( - @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - } - - public CreateConnectionRequest dataWarehouseConfig( - @javax.annotation.Nonnull Object dataWarehouseConfig) { - this.dataWarehouseConfig = dataWarehouseConfig; - return this; - } - - /** - * Connection configuration attributes in JSON format. To create a connection with tables, - * include table attributes. See the documentation above for sample JSON. - * - * @return dataWarehouseConfig - */ - @javax.annotation.Nonnull - public Object getDataWarehouseConfig() { - return dataWarehouseConfig; - } - - public void setDataWarehouseConfig(@javax.annotation.Nonnull Object dataWarehouseConfig) { - this.dataWarehouseConfig = dataWarehouseConfig; - } +import com.thoughtspot.client.JSON; - public CreateConnectionRequest validate(@javax.annotation.Nullable Boolean validate) { - this.validate = validate; - return this; +/** + * CreateConnectionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Type of the data warehouse. + */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; } - /** - * Validates the connection metadata if tables are included. If you are creating a connection - * without tables, specify `false`. - * - * @return validate - */ - @javax.annotation.Nullable - public Boolean getValidate() { - return validate; + public String getValue() { + return value; } - public void setValidate(@javax.annotation.Nullable Boolean validate) { - this.validate = validate; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest) o; - return Objects.equals(this.name, createConnectionRequest.name) - && Objects.equals(this.description, createConnectionRequest.description) - && Objects.equals(this.dataWarehouseType, createConnectionRequest.dataWarehouseType) - && Objects.equals( - this.dataWarehouseConfig, createConnectionRequest.dataWarehouseConfig) - && Objects.equals(this.validate, createConnectionRequest.validate); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(name, description, dataWarehouseType, dataWarehouseConfig, validate); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nonnull + private DataWarehouseTypeEnum dataWarehouseType; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) + @javax.annotation.Nonnull + private Object dataWarehouseConfig; + + public static final String SERIALIZED_NAME_VALIDATE = "validate"; + @SerializedName(SERIALIZED_NAME_VALIDATE) + @javax.annotation.Nullable + private Boolean validate = true; + + public CreateConnectionRequest() { + } + + public CreateConnectionRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name for the connection. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateConnectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the connection. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateConnectionRequest dataWarehouseType(@javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of the data warehouse. + * @return dataWarehouseType + */ + @javax.annotation.Nonnull + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType(@javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + + public CreateConnectionRequest dataWarehouseConfig(@javax.annotation.Nonnull Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + return this; + } + + /** + * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. + * @return dataWarehouseConfig + */ + @javax.annotation.Nonnull + public Object getDataWarehouseConfig() { + return dataWarehouseConfig; + } + + public void setDataWarehouseConfig(@javax.annotation.Nonnull Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + } + + + public CreateConnectionRequest validate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + return this; + } + + /** + * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + * @return validate + */ + @javax.annotation.Nullable + public Boolean getValidate() { + return validate; + } + + public void setValidate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateConnectionRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dataWarehouseType: ") - .append(toIndentedString(dataWarehouseType)) - .append("\n"); - sb.append(" dataWarehouseConfig: ") - .append(toIndentedString(dataWarehouseConfig)) - .append("\n"); - sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest) o; + return Objects.equals(this.name, createConnectionRequest.name) && + Objects.equals(this.description, createConnectionRequest.description) && + Objects.equals(this.dataWarehouseType, createConnectionRequest.dataWarehouseType) && + Objects.equals(this.dataWarehouseConfig, createConnectionRequest.dataWarehouseConfig) && + Objects.equals(this.validate, createConnectionRequest.validate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, dataWarehouseType, dataWarehouseConfig, validate); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("data_warehouse_type"); - openapiFields.add("data_warehouse_config"); - openapiFields.add("validate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("data_warehouse_type"); - openapiRequiredFields.add("data_warehouse_config"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseType: ").append(toIndentedString(dataWarehouseType)).append("\n"); + sb.append(" dataWarehouseConfig: ").append(toIndentedString(dataWarehouseConfig)).append("\n"); + sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateConnectionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateConnectionRequest is not found" - + " in the empty JSON string", - CreateConnectionRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("data_warehouse_config"); + openapiFields.add("validate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_warehouse_type"); + openapiRequiredFields.add("data_warehouse_config"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConnectionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateConnectionRequest is not found in the empty JSON string", CreateConnectionRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateConnectionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateConnectionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateConnectionRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConnectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_warehouse_type").toString())); - } - // validate the required field `data_warehouse_type` - DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateConnectionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateConnectionRequest - * @throws IOException if the JSON string is invalid with respect to CreateConnectionRequest - */ - public static CreateConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateConnectionRequest.class); - } - - /** - * Convert an instance of CreateConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_warehouse_type").toString())); + } + // validate the required field `data_warehouse_type` + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConnectionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConnectionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConnectionRequest + * @throws IOException if the JSON string is invalid with respect to CreateConnectionRequest + */ + public static CreateConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConnectionRequest.class); + } + + /** + * Convert an instance of CreateConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java index a106ec73d..759558e6c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java @@ -4,443 +4,422 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CreateConnectionResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateConnectionResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - /** Type of data warehouse. */ - @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) - public enum DataWarehouseTypeEnum { - SNOWFLAKE("SNOWFLAKE"), - - AMAZON_REDSHIFT("AMAZON_REDSHIFT"), - - GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), - - AZURE_SYNAPSE("AZURE_SYNAPSE"), - - TERADATA("TERADATA"), - SAP_HANA("SAP_HANA"), - - STARBURST("STARBURST"), - - ORACLE_ADW("ORACLE_ADW"), - - DATABRICKS("DATABRICKS"), - - DENODO("DENODO"), - - DREMIO("DREMIO"), - - TRINO("TRINO"), - - PRESTO("PRESTO"), - - POSTGRES("POSTGRES"), - - SQLSERVER("SQLSERVER"), - - MYSQL("MYSQL"), - - GENERIC_JDBC("GENERIC_JDBC"), - - AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), - - AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), - - AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), - - AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), - - LOOKER("LOOKER"), - - AMAZON_ATHENA("AMAZON_ATHENA"), - - SINGLESTORE("SINGLESTORE"), - - GCP_SQLSERVER("GCP_SQLSERVER"), - - GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), - - GCP_POSTGRESQL("GCP_POSTGRESQL"), - - GCP_MYSQL("GCP_MYSQL"), - - MODE("MODE"), - - GOOGLE_SHEETS("GOOGLE_SHEETS"), - - FALCON("FALCON"), - - FALCON_ONPREM("FALCON_ONPREM"), - - CLICKHOUSE("CLICKHOUSE"); - - private String value; - - DataWarehouseTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataWarehouseTypeEnum fromValue(String value) { - for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataWarehouseTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataWarehouseTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) - @javax.annotation.Nonnull - private DataWarehouseTypeEnum dataWarehouseType; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - - @SerializedName(SERIALIZED_NAME_DETAILS) - @javax.annotation.Nullable - private Object details; - - public CreateConnectionResponse() {} - - public CreateConnectionResponse id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * ID of the connection created. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public CreateConnectionResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the connection. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateConnectionResponse dataWarehouseType( - @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - return this; - } - - /** - * Type of data warehouse. - * - * @return dataWarehouseType - */ - @javax.annotation.Nonnull - public DataWarehouseTypeEnum getDataWarehouseType() { - return dataWarehouseType; - } - - public void setDataWarehouseType( - @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - } +import com.thoughtspot.client.JSON; - public CreateConnectionResponse details(@javax.annotation.Nullable Object details) { - this.details = details; - return this; +/** + * CreateConnectionResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateConnectionResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** + * Type of data warehouse. + */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; } - /** - * Details of the connection. - * - * @return details - */ - @javax.annotation.Nullable - public Object getDetails() { - return details; + public String getValue() { + return value; } - public void setDetails(@javax.annotation.Nullable Object details) { - this.details = details; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateConnectionResponse createConnectionResponse = (CreateConnectionResponse) o; - return Objects.equals(this.id, createConnectionResponse.id) - && Objects.equals(this.name, createConnectionResponse.name) - && Objects.equals( - this.dataWarehouseType, createConnectionResponse.dataWarehouseType) - && Objects.equals(this.details, createConnectionResponse.details); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(id, name, dataWarehouseType, details); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nonnull + private DataWarehouseTypeEnum dataWarehouseType; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private Object details; + + public CreateConnectionResponse() { + } + + public CreateConnectionResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * ID of the connection created. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public CreateConnectionResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the connection. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateConnectionResponse dataWarehouseType(@javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of data warehouse. + * @return dataWarehouseType + */ + @javax.annotation.Nonnull + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType(@javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + + public CreateConnectionResponse details(@javax.annotation.Nullable Object details) { + this.details = details; + return this; + } + + /** + * Details of the connection. + * @return details + */ + @javax.annotation.Nullable + public Object getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable Object details) { + this.details = details; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateConnectionResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" dataWarehouseType: ") - .append(toIndentedString(dataWarehouseType)) - .append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CreateConnectionResponse createConnectionResponse = (CreateConnectionResponse) o; + return Objects.equals(this.id, createConnectionResponse.id) && + Objects.equals(this.name, createConnectionResponse.name) && + Objects.equals(this.dataWarehouseType, createConnectionResponse.dataWarehouseType) && + Objects.equals(this.details, createConnectionResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, dataWarehouseType, details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("data_warehouse_type"); - openapiFields.add("details"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("data_warehouse_type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataWarehouseType: ").append(toIndentedString(dataWarehouseType)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateConnectionResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateConnectionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateConnectionResponse is not found" - + " in the empty JSON string", - CreateConnectionResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_warehouse_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConnectionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConnectionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateConnectionResponse is not found in the empty JSON string", CreateConnectionResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateConnectionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateConnectionResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateConnectionResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateConnectionResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateConnectionResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConnectionResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_warehouse_type").toString())); - } - // validate the required field `data_warehouse_type` - DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateConnectionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateConnectionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateConnectionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateConnectionResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateConnectionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateConnectionResponse - * @throws IOException if the JSON string is invalid with respect to CreateConnectionResponse - */ - public static CreateConnectionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateConnectionResponse.class); - } - - /** - * Convert an instance of CreateConnectionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_warehouse_type").toString())); + } + // validate the required field `data_warehouse_type` + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConnectionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConnectionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConnectionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateConnectionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateConnectionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConnectionResponse + * @throws IOException if the JSON string is invalid with respect to CreateConnectionResponse + */ + public static CreateConnectionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConnectionResponse.class); + } + + /** + * Convert an instance of CreateConnectionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java index a0e3c0697..5bd3434a0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java @@ -4,245 +4,235 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateConversationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateConversationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - public static final String SERIALIZED_NAME_TOKENS = "tokens"; - - @SerializedName(SERIALIZED_NAME_TOKENS) - @javax.annotation.Nullable - private String tokens; - - public CreateConversationRequest() {} - - public CreateConversationRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the - * conversation. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public CreateConversationRequest tokens(@javax.annotation.Nullable String tokens) { - this.tokens = tokens; - return this; - } - - /** - * Token string to set the context for the conversation. For example,`[sales],[item - * type],[state]`. - * - * @return tokens - */ - @javax.annotation.Nullable - public String getTokens() { - return tokens; - } - - public void setTokens(@javax.annotation.Nullable String tokens) { - this.tokens = tokens; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateConversationRequest createConversationRequest = (CreateConversationRequest) o; - return Objects.equals(this.metadataIdentifier, createConversationRequest.metadataIdentifier) - && Objects.equals(this.tokens, createConversationRequest.tokens); +/** + * CreateConversationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateConversationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_TOKENS = "tokens"; + @SerializedName(SERIALIZED_NAME_TOKENS) + @javax.annotation.Nullable + private String tokens; + + public CreateConversationRequest() { + } + + public CreateConversationRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public CreateConversationRequest tokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + return this; + } + + /** + * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. + * @return tokens + */ + @javax.annotation.Nullable + public String getTokens() { + return tokens; + } + + public void setTokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(metadataIdentifier, tokens); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateConversationRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); - sb.append("}"); - return sb.toString(); + CreateConversationRequest createConversationRequest = (CreateConversationRequest) o; + return Objects.equals(this.metadataIdentifier, createConversationRequest.metadataIdentifier) && + Objects.equals(this.tokens, createConversationRequest.tokens); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, tokens); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConversationRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConversationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConversationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateConversationRequest is not found in the empty JSON string", CreateConversationRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("tokens"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateConversationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateConversationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateConversationRequest is not" - + " found in the empty JSON string", - CreateConversationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateConversationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateConversationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateConversationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateConversationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateConversationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConversationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) - && !jsonObj.get("tokens").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokens` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tokens").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateConversationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateConversationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateConversationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateConversationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateConversationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateConversationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateConversationRequest - * @throws IOException if the JSON string is invalid with respect to CreateConversationRequest - */ - public static CreateConversationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateConversationRequest.class); - } - - /** - * Convert an instance of CreateConversationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) && !jsonObj.get("tokens").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tokens` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tokens").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConversationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConversationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateConversationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConversationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateConversationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateConversationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConversationRequest + * @throws IOException if the JSON string is invalid with respect to CreateConversationRequest + */ + public static CreateConversationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConversationRequest.class); + } + + /** + * Convert an instance of CreateConversationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java index 09de4839c..5aed86da2 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java @@ -4,392 +4,359 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionDetailsInputCreate; +import com.thoughtspot.client.model.AssociateMetadataInputCreate; +import com.thoughtspot.client.model.DefaultActionConfigInputCreate; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateCustomActionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateCustomActionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; - - @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) - @javax.annotation.Nonnull - private ActionDetailsInputCreate actionDetails; - - public static final String SERIALIZED_NAME_ASSOCIATE_METADATA = "associate_metadata"; - - @SerializedName(SERIALIZED_NAME_ASSOCIATE_METADATA) - @javax.annotation.Nullable - private List associateMetadata; - - public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) - @javax.annotation.Nullable - private DefaultActionConfigInputCreate defaultActionConfig; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - public CreateCustomActionRequest() {} - - public CreateCustomActionRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the custom action. The custom action name must be unique. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateCustomActionRequest actionDetails( - @javax.annotation.Nonnull ActionDetailsInputCreate actionDetails) { - this.actionDetails = actionDetails; - return this; - } - - /** - * Action details includes `Type` and Configuration data for Custom Actions, either - * Callback or URL is required. - * - * @return actionDetails - */ - @javax.annotation.Nonnull - public ActionDetailsInputCreate getActionDetails() { - return actionDetails; - } - - public void setActionDetails(@javax.annotation.Nonnull ActionDetailsInputCreate actionDetails) { - this.actionDetails = actionDetails; - } - - public CreateCustomActionRequest associateMetadata( - @javax.annotation.Nullable List associateMetadata) { - this.associateMetadata = associateMetadata; - return this; - } +import com.thoughtspot.client.JSON; - public CreateCustomActionRequest addAssociateMetadataItem( - AssociateMetadataInputCreate associateMetadataItem) { - if (this.associateMetadata == null) { - this.associateMetadata = new ArrayList<>(); - } - this.associateMetadata.add(associateMetadataItem); - return this; +/** + * CreateCustomActionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateCustomActionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; + @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) + @javax.annotation.Nonnull + private ActionDetailsInputCreate actionDetails; + + public static final String SERIALIZED_NAME_ASSOCIATE_METADATA = "associate_metadata"; + @SerializedName(SERIALIZED_NAME_ASSOCIATE_METADATA) + @javax.annotation.Nullable + private List associateMetadata; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nullable + private DefaultActionConfigInputCreate defaultActionConfig; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public CreateCustomActionRequest() { + } + + public CreateCustomActionRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the custom action. The custom action name must be unique. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateCustomActionRequest actionDetails(@javax.annotation.Nonnull ActionDetailsInputCreate actionDetails) { + this.actionDetails = actionDetails; + return this; + } + + /** + * Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. + * @return actionDetails + */ + @javax.annotation.Nonnull + public ActionDetailsInputCreate getActionDetails() { + return actionDetails; + } + + public void setActionDetails(@javax.annotation.Nonnull ActionDetailsInputCreate actionDetails) { + this.actionDetails = actionDetails; + } + + + public CreateCustomActionRequest associateMetadata(@javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + return this; + } + + public CreateCustomActionRequest addAssociateMetadataItem(AssociateMetadataInputCreate associateMetadataItem) { + if (this.associateMetadata == null) { + this.associateMetadata = new ArrayList<>(); } - - /** - * Metadata objects to which the custom action needs to be associated. - * - * @return associateMetadata - */ - @javax.annotation.Nullable - public List getAssociateMetadata() { - return associateMetadata; + this.associateMetadata.add(associateMetadataItem); + return this; + } + + /** + * Metadata objects to which the custom action needs to be associated. + * @return associateMetadata + */ + @javax.annotation.Nullable + public List getAssociateMetadata() { + return associateMetadata; + } + + public void setAssociateMetadata(@javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + } + + + public CreateCustomActionRequest defaultActionConfig(@javax.annotation.Nullable DefaultActionConfigInputCreate defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. + * @return defaultActionConfig + */ + @javax.annotation.Nullable + public DefaultActionConfigInputCreate getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig(@javax.annotation.Nullable DefaultActionConfigInputCreate defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + + public CreateCustomActionRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public CreateCustomActionRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } - public void setAssociateMetadata( - @javax.annotation.Nullable List associateMetadata) { - this.associateMetadata = associateMetadata; - } + /** + * Unique ID or name of the groups that can view and access the custom action. + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } - public CreateCustomActionRequest defaultActionConfig( - @javax.annotation.Nullable DefaultActionConfigInputCreate defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - return this; - } + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } - /** - * Default Custom action configuration. This includes if the custom action is available on all - * visualizations. By default, a custom action is added to all visualizations and Answers. - * - * @return defaultActionConfig - */ - @javax.annotation.Nullable - public DefaultActionConfigInputCreate getDefaultActionConfig() { - return defaultActionConfig; - } - public void setDefaultActionConfig( - @javax.annotation.Nullable DefaultActionConfigInputCreate defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - } - - public CreateCustomActionRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; - } - public CreateCustomActionRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); - } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Unique ID or name of the groups that can view and access the custom action. - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; + if (o == null || getClass() != o.getClass()) { + return false; } - - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; + CreateCustomActionRequest createCustomActionRequest = (CreateCustomActionRequest) o; + return Objects.equals(this.name, createCustomActionRequest.name) && + Objects.equals(this.actionDetails, createCustomActionRequest.actionDetails) && + Objects.equals(this.associateMetadata, createCustomActionRequest.associateMetadata) && + Objects.equals(this.defaultActionConfig, createCustomActionRequest.defaultActionConfig) && + Objects.equals(this.groupIdentifiers, createCustomActionRequest.groupIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(name, actionDetails, associateMetadata, defaultActionConfig, groupIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomActionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); + sb.append(" associateMetadata: ").append(toIndentedString(associateMetadata)).append("\n"); + sb.append(" defaultActionConfig: ").append(toIndentedString(defaultActionConfig)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("action_details"); + openapiFields.add("associate_metadata"); + openapiFields.add("default_action_config"); + openapiFields.add("group_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("action_details"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCustomActionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCustomActionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomActionRequest is not found in the empty JSON string", CreateCustomActionRequest.openapiRequiredFields.toString())); } - CreateCustomActionRequest createCustomActionRequest = (CreateCustomActionRequest) o; - return Objects.equals(this.name, createCustomActionRequest.name) - && Objects.equals(this.actionDetails, createCustomActionRequest.actionDetails) - && Objects.equals( - this.associateMetadata, createCustomActionRequest.associateMetadata) - && Objects.equals( - this.defaultActionConfig, createCustomActionRequest.defaultActionConfig) - && Objects.equals( - this.groupIdentifiers, createCustomActionRequest.groupIdentifiers); - } + } - @Override - public int hashCode() { - return Objects.hash( - name, actionDetails, associateMetadata, defaultActionConfig, groupIdentifiers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomActionRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); - sb.append(" associateMetadata: ") - .append(toIndentedString(associateMetadata)) - .append("\n"); - sb.append(" defaultActionConfig: ") - .append(toIndentedString(defaultActionConfig)) - .append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateCustomActionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomActionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } - return o.toString().replace("\n", "\n "); - } + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("action_details"); - openapiFields.add("associate_metadata"); - openapiFields.add("default_action_config"); - openapiFields.add("group_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("action_details"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomActionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomActionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateCustomActionRequest is not" - + " found in the empty JSON string", - CreateCustomActionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomActionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateCustomActionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCustomActionRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCustomActionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - // validate the required field `action_details` - ActionDetailsInputCreate.validateJsonElement(jsonObj.get("action_details")); - if (jsonObj.get("associate_metadata") != null - && !jsonObj.get("associate_metadata").isJsonNull()) { - JsonArray jsonArrayassociateMetadata = jsonObj.getAsJsonArray("associate_metadata"); - if (jsonArrayassociateMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("associate_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `associate_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("associate_metadata").toString())); - } - - // validate the optional field `associate_metadata` (array) - for (int i = 0; i < jsonArrayassociateMetadata.size(); i++) { - AssociateMetadataInputCreate.validateJsonElement( - jsonArrayassociateMetadata.get(i)); - } - ; - } - } - // validate the optional field `default_action_config` - if (jsonObj.get("default_action_config") != null - && !jsonObj.get("default_action_config").isJsonNull()) { - DefaultActionConfigInputCreate.validateJsonElement( - jsonObj.get("default_action_config")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the required field `action_details` + ActionDetailsInputCreate.validateJsonElement(jsonObj.get("action_details")); + if (jsonObj.get("associate_metadata") != null && !jsonObj.get("associate_metadata").isJsonNull()) { + JsonArray jsonArrayassociateMetadata = jsonObj.getAsJsonArray("associate_metadata"); + if (jsonArrayassociateMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("associate_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `associate_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("associate_metadata").toString())); + } + + // validate the optional field `associate_metadata` (array) + for (int i = 0; i < jsonArrayassociateMetadata.size(); i++) { + AssociateMetadataInputCreate.validateJsonElement(jsonArrayassociateMetadata.get(i)); + }; } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomActionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomActionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateCustomActionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomActionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomActionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomActionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomActionRequest - * @throws IOException if the JSON string is invalid with respect to CreateCustomActionRequest - */ - public static CreateCustomActionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomActionRequest.class); - } - - /** - * Convert an instance of CreateCustomActionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + // validate the optional field `default_action_config` + if (jsonObj.get("default_action_config") != null && !jsonObj.get("default_action_config").isJsonNull()) { + DefaultActionConfigInputCreate.validateJsonElement(jsonObj.get("default_action_config")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCustomActionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomActionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomActionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCustomActionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCustomActionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateCustomActionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCustomActionRequest + * @throws IOException if the JSON string is invalid with respect to CreateCustomActionRequest + */ + public static CreateCustomActionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomActionRequest.class); + } + + /** + * Convert an instance of CreateCustomActionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomisationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomisationRequest.java deleted file mode 100644 index 020a9fa89..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomisationRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.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; - -/** CreateEmailCustomisationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateEmailCustomisationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; - - @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) - @javax.annotation.Nonnull - private Object templateProperties; - - public CreateEmailCustomisationRequest() {} - - public CreateEmailCustomisationRequest templateProperties( - @javax.annotation.Nonnull Object templateProperties) { - this.templateProperties = templateProperties; - return this; - } - - /** - * Email customization configuration as key value pair - * - * @return templateProperties - */ - @javax.annotation.Nonnull - public Object getTemplateProperties() { - return templateProperties; - } - - public void setTemplateProperties(@javax.annotation.Nonnull Object templateProperties) { - this.templateProperties = templateProperties; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateEmailCustomisationRequest createEmailCustomisationRequest = - (CreateEmailCustomisationRequest) o; - return Objects.equals( - this.templateProperties, createEmailCustomisationRequest.templateProperties); - } - - @Override - public int hashCode() { - return Objects.hash(templateProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateEmailCustomisationRequest {\n"); - sb.append(" templateProperties: ") - .append(toIndentedString(templateProperties)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("template_properties"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("template_properties"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CreateEmailCustomisationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateEmailCustomisationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateEmailCustomisationRequest is" - + " not found in the empty JSON string", - CreateEmailCustomisationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateEmailCustomisationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateEmailCustomisationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateEmailCustomisationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - 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 (!CreateEmailCustomisationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateEmailCustomisationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateEmailCustomisationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateEmailCustomisationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateEmailCustomisationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateEmailCustomisationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateEmailCustomisationRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateEmailCustomisationRequest - */ - public static CreateEmailCustomisationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateEmailCustomisationRequest.class); - } - - /** - * Convert an instance of CreateEmailCustomisationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomisationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomisationResponse.java deleted file mode 100644 index 97e3d5b5f..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomisationResponse.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.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; - -/** CreateEmailCustomisationResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateEmailCustomisationResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; - - @SerializedName(SERIALIZED_NAME_TENANT_ID) - @javax.annotation.Nonnull - private String tenantId; - - public static final String SERIALIZED_NAME_ORG = "org"; - - @SerializedName(SERIALIZED_NAME_ORG) - @javax.annotation.Nonnull - private OrgType org; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; - - @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) - @javax.annotation.Nonnull - private Object templateProperties; - - public CreateEmailCustomisationResponse() {} - - public CreateEmailCustomisationResponse tenantId(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Tenant ID - * - * @return tenantId - */ - @javax.annotation.Nonnull - public String getTenantId() { - return tenantId; - } - - public void setTenantId(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - } - - public CreateEmailCustomisationResponse org(@javax.annotation.Nonnull OrgType org) { - this.org = org; - return this; - } - - /** - * Get org - * - * @return org - */ - @javax.annotation.Nonnull - public OrgType getOrg() { - return org; - } - - public void setOrg(@javax.annotation.Nonnull OrgType org) { - this.org = org; - } - - public CreateEmailCustomisationResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Email customization name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateEmailCustomisationResponse templateProperties( - @javax.annotation.Nonnull Object templateProperties) { - this.templateProperties = templateProperties; - return this; - } - - /** - * Customization configuration for the email - * - * @return templateProperties - */ - @javax.annotation.Nonnull - public Object getTemplateProperties() { - return templateProperties; - } - - public void setTemplateProperties(@javax.annotation.Nonnull Object templateProperties) { - this.templateProperties = templateProperties; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateEmailCustomisationResponse createEmailCustomisationResponse = - (CreateEmailCustomisationResponse) o; - return Objects.equals(this.tenantId, createEmailCustomisationResponse.tenantId) - && Objects.equals(this.org, createEmailCustomisationResponse.org) - && Objects.equals(this.name, createEmailCustomisationResponse.name) - && Objects.equals( - this.templateProperties, - createEmailCustomisationResponse.templateProperties); - } - - @Override - public int hashCode() { - return Objects.hash(tenantId, org, name, templateProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateEmailCustomisationResponse {\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" templateProperties: ") - .append(toIndentedString(templateProperties)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tenant_id"); - openapiFields.add("org"); - openapiFields.add("name"); - openapiFields.add("template_properties"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tenant_id"); - openapiRequiredFields.add("org"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("template_properties"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CreateEmailCustomisationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateEmailCustomisationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateEmailCustomisationResponse is" - + " not found in the empty JSON string", - CreateEmailCustomisationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateEmailCustomisationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateEmailCustomisationResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateEmailCustomisationResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("tenant_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tenant_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tenant_id").toString())); - } - // validate the required field `org` - OrgType.validateJsonElement(jsonObj.get("org")); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateEmailCustomisationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateEmailCustomisationResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateEmailCustomisationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateEmailCustomisationResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateEmailCustomisationResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateEmailCustomisationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateEmailCustomisationResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateEmailCustomisationResponse - */ - public static CreateEmailCustomisationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateEmailCustomisationResponse.class); - } - - /** - * Convert an instance of CreateEmailCustomisationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java index 5a1c56fd9..c09643f1f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java @@ -4,247 +4,235 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.TemplatePropertiesInputCreate; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateEmailCustomizationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateEmailCustomizationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; - - @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) - @javax.annotation.Nonnull - private TemplatePropertiesInputCreate templateProperties; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - public CreateEmailCustomizationRequest() {} - - public CreateEmailCustomizationRequest templateProperties( - @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { - this.templateProperties = templateProperties; - return this; - } - - /** - * Email customization configuration as key value pair - * - * @return templateProperties - */ - @javax.annotation.Nonnull - public TemplatePropertiesInputCreate getTemplateProperties() { - return templateProperties; - } - - public void setTemplateProperties( - @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { - this.templateProperties = templateProperties; - } - - public CreateEmailCustomizationRequest orgIdentifier( - @javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - - /** - * Unique ID or name of org Version: 10.12.0.cl or later - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateEmailCustomizationRequest createEmailCustomizationRequest = - (CreateEmailCustomizationRequest) o; - return Objects.equals( - this.templateProperties, createEmailCustomizationRequest.templateProperties) - && Objects.equals( - this.orgIdentifier, createEmailCustomizationRequest.orgIdentifier); - } - - @Override - public int hashCode() { - return Objects.hash(templateProperties, orgIdentifier); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateEmailCustomizationRequest {\n"); - sb.append(" templateProperties: ") - .append(toIndentedString(templateProperties)) - .append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * CreateEmailCustomizationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateEmailCustomizationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; + @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) + @javax.annotation.Nonnull + private TemplatePropertiesInputCreate templateProperties; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public CreateEmailCustomizationRequest() { + } + + public CreateEmailCustomizationRequest templateProperties(@javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Email customization configuration as key value pair + * @return templateProperties + */ + @javax.annotation.Nonnull + public TemplatePropertiesInputCreate getTemplateProperties() { + return templateProperties; + } + + public void setTemplateProperties(@javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + } + + + public CreateEmailCustomizationRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of org Version: 10.12.0.cl or later + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("template_properties"); - openapiFields.add("org_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("template_properties"); + CreateEmailCustomizationRequest createEmailCustomizationRequest = (CreateEmailCustomizationRequest) o; + return Objects.equals(this.templateProperties, createEmailCustomizationRequest.templateProperties) && + Objects.equals(this.orgIdentifier, createEmailCustomizationRequest.orgIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(templateProperties, orgIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCustomizationRequest {\n"); + sb.append(" templateProperties: ").append(toIndentedString(templateProperties)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CreateEmailCustomizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateEmailCustomizationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateEmailCustomizationRequest is" - + " not found in the empty JSON string", - CreateEmailCustomizationRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("template_properties"); + openapiFields.add("org_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("template_properties"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateEmailCustomizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateEmailCustomizationRequest is not found in the empty JSON string", CreateEmailCustomizationRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateEmailCustomizationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateEmailCustomizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateEmailCustomizationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateEmailCustomizationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `template_properties` - TemplatePropertiesInputCreate.validateJsonElement(jsonObj.get("template_properties")); - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateEmailCustomizationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateEmailCustomizationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateEmailCustomizationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateEmailCustomizationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateEmailCustomizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateEmailCustomizationRequest - * @throws IOException if the JSON string is invalid with respect to - * CreateEmailCustomizationRequest - */ - public static CreateEmailCustomizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateEmailCustomizationRequest.class); - } - - /** - * Convert an instance of CreateEmailCustomizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `template_properties` + TemplatePropertiesInputCreate.validateJsonElement(jsonObj.get("template_properties")); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateEmailCustomizationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateEmailCustomizationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateEmailCustomizationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateEmailCustomizationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to CreateEmailCustomizationRequest + */ + public static CreateEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateEmailCustomizationRequest.class); + } + + /** + * Convert an instance of CreateEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java index ddd59e4ed..11c68a04b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java @@ -4,310 +4,295 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.OrgType; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateEmailCustomizationResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateEmailCustomizationResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; - - @SerializedName(SERIALIZED_NAME_TENANT_ID) - @javax.annotation.Nonnull - private String tenantId; - - public static final String SERIALIZED_NAME_ORG = "org"; - - @SerializedName(SERIALIZED_NAME_ORG) - @javax.annotation.Nonnull - private OrgType org; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; - - @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) - @javax.annotation.Nonnull - private Object templateProperties; - - public CreateEmailCustomizationResponse() {} - - public CreateEmailCustomizationResponse tenantId(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Tenant ID - * - * @return tenantId - */ - @javax.annotation.Nonnull - public String getTenantId() { - return tenantId; - } - - public void setTenantId(@javax.annotation.Nonnull String tenantId) { - this.tenantId = tenantId; - } - - public CreateEmailCustomizationResponse org(@javax.annotation.Nonnull OrgType org) { - this.org = org; - return this; - } - - /** - * Get org - * - * @return org - */ - @javax.annotation.Nonnull - public OrgType getOrg() { - return org; - } - - public void setOrg(@javax.annotation.Nonnull OrgType org) { - this.org = org; - } - - public CreateEmailCustomizationResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Email customization name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateEmailCustomizationResponse templateProperties( - @javax.annotation.Nonnull Object templateProperties) { - this.templateProperties = templateProperties; - return this; - } - - /** - * Customization configuration for the email - * - * @return templateProperties - */ - @javax.annotation.Nonnull - public Object getTemplateProperties() { - return templateProperties; - } - - public void setTemplateProperties(@javax.annotation.Nonnull Object templateProperties) { - this.templateProperties = templateProperties; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateEmailCustomizationResponse createEmailCustomizationResponse = - (CreateEmailCustomizationResponse) o; - return Objects.equals(this.tenantId, createEmailCustomizationResponse.tenantId) - && Objects.equals(this.org, createEmailCustomizationResponse.org) - && Objects.equals(this.name, createEmailCustomizationResponse.name) - && Objects.equals( - this.templateProperties, - createEmailCustomizationResponse.templateProperties); - } - - @Override - public int hashCode() { - return Objects.hash(tenantId, org, name, templateProperties); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateEmailCustomizationResponse {\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" templateProperties: ") - .append(toIndentedString(templateProperties)) - .append("\n"); - sb.append("}"); - return sb.toString(); +/** + * CreateEmailCustomizationResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateEmailCustomizationResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nonnull + private String tenantId; + + public static final String SERIALIZED_NAME_ORG = "org"; + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nonnull + private OrgType org; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; + @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) + @javax.annotation.Nonnull + private Object templateProperties; + + public CreateEmailCustomizationResponse() { + } + + public CreateEmailCustomizationResponse tenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Tenant ID + * @return tenantId + */ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + + public CreateEmailCustomizationResponse org(@javax.annotation.Nonnull OrgType org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + */ + @javax.annotation.Nonnull + public OrgType getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nonnull OrgType org) { + this.org = org; + } + + + public CreateEmailCustomizationResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Email customization name. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateEmailCustomizationResponse templateProperties(@javax.annotation.Nonnull Object templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Customization configuration for the email + * @return templateProperties + */ + @javax.annotation.Nonnull + public Object getTemplateProperties() { + return templateProperties; + } + + public void setTemplateProperties(@javax.annotation.Nonnull Object templateProperties) { + this.templateProperties = templateProperties; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tenant_id"); - openapiFields.add("org"); - openapiFields.add("name"); - openapiFields.add("template_properties"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tenant_id"); - openapiRequiredFields.add("org"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("template_properties"); + CreateEmailCustomizationResponse createEmailCustomizationResponse = (CreateEmailCustomizationResponse) o; + return Objects.equals(this.tenantId, createEmailCustomizationResponse.tenantId) && + Objects.equals(this.org, createEmailCustomizationResponse.org) && + Objects.equals(this.name, createEmailCustomizationResponse.name) && + Objects.equals(this.templateProperties, createEmailCustomizationResponse.templateProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tenantId, org, name, templateProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCustomizationResponse {\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateProperties: ").append(toIndentedString(templateProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CreateEmailCustomizationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateEmailCustomizationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateEmailCustomizationResponse is" - + " not found in the empty JSON string", - CreateEmailCustomizationResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tenant_id"); + openapiFields.add("org"); + openapiFields.add("name"); + openapiFields.add("template_properties"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("org"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("template_properties"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateEmailCustomizationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateEmailCustomizationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateEmailCustomizationResponse is not found in the empty JSON string", CreateEmailCustomizationResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateEmailCustomizationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateEmailCustomizationResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateEmailCustomizationResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateEmailCustomizationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateEmailCustomizationResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateEmailCustomizationResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("tenant_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tenant_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tenant_id").toString())); - } - // validate the required field `org` - OrgType.validateJsonElement(jsonObj.get("org")); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateEmailCustomizationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateEmailCustomizationResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CreateEmailCustomizationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateEmailCustomizationResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateEmailCustomizationResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateEmailCustomizationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateEmailCustomizationResponse - * @throws IOException if the JSON string is invalid with respect to - * CreateEmailCustomizationResponse - */ - public static CreateEmailCustomizationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateEmailCustomizationResponse.class); - } - - /** - * Convert an instance of CreateEmailCustomizationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + // validate the required field `org` + OrgType.validateJsonElement(jsonObj.get("org")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateEmailCustomizationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateEmailCustomizationResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateEmailCustomizationResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateEmailCustomizationResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateEmailCustomizationResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateEmailCustomizationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateEmailCustomizationResponse + * @throws IOException if the JSON string is invalid with respect to CreateEmailCustomizationResponse + */ + public static CreateEmailCustomizationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateEmailCustomizationResponse.class); + } + + /** + * Convert an instance of CreateEmailCustomizationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java index 2389b8edd..e011563ba 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java @@ -4,239 +4,235 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateOrgRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateOrgRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public CreateOrgRequest() {} - - public CreateOrgRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the Org. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateOrgRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the Org. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateOrgRequest createOrgRequest = (CreateOrgRequest) o; - return Objects.equals(this.name, createOrgRequest.name) - && Objects.equals(this.description, createOrgRequest.description); +/** + * CreateOrgRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateOrgRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public CreateOrgRequest() { + } + + public CreateOrgRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the Org. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateOrgRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(name, description); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateOrgRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append("}"); - return sb.toString(); + CreateOrgRequest createOrgRequest = (CreateOrgRequest) o; + return Objects.equals(this.name, createOrgRequest.name) && + Objects.equals(this.description, createOrgRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(name, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrgRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateOrgRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrgRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrgRequest is not found in the empty JSON string", CreateOrgRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateOrgRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateOrgRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateOrgRequest is not found in the" - + " empty JSON string", - CreateOrgRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateOrgRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateOrgRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateOrgRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateOrgRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateOrgRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateOrgRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateOrgRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateOrgRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateOrgRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateOrgRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateOrgRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateOrgRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateOrgRequest - * @throws IOException if the JSON string is invalid with respect to CreateOrgRequest - */ - public static CreateOrgRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateOrgRequest.class); - } - - /** - * Convert an instance of CreateOrgRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrgRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrgRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrgRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrgRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateOrgRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateOrgRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrgRequest + * @throws IOException if the JSON string is invalid with respect to CreateOrgRequest + */ + public static CreateOrgRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrgRequest.class); + } + + /** + * Convert an instance of CreateOrgRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java index 5477d542f..abf9fad1b 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 @@ -4,457 +4,439 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** CreateRoleRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateRoleRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - BYPASSRLS("BYPASSRLS"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - DEVELOPER("DEVELOPER"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), - - TAGMANAGEMENT("TAGMANAGEMENT"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; - - @SerializedName(SERIALIZED_NAME_READ_ONLY) - @javax.annotation.Nullable - private Boolean readOnly = false; - - public CreateRoleRequest() {} - - public CreateRoleRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Unique name of the Role. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public CreateRoleRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Description of the Role. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; +/** + * CreateRoleRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateRoleRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + BYPASSRLS("BYPASSRLS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_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"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; } - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; + public String getValue() { + return value; } - public CreateRoleRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public CreateRoleRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; - } - - /** - * Privileges granted to the Role. See - * [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for - * supported roles privileges. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } - - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; - } - - public CreateRoleRequest readOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * <div>Version: 10.5.0.cl or later </div> Indicates whether the role is read only. - * A readonly role can neither be updated nor deleted. - * - * @return readOnly - */ - @javax.annotation.Nullable - public Boolean getReadOnly() { - return readOnly; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { - this.readOnly = readOnly; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRoleRequest createRoleRequest = (CreateRoleRequest) o; - return Objects.equals(this.name, createRoleRequest.name) - && Objects.equals(this.description, createRoleRequest.description) - && Objects.equals(this.privileges, createRoleRequest.privileges) - && Objects.equals(this.readOnly, createRoleRequest.readOnly); + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + @javax.annotation.Nullable + private Boolean readOnly = false; + + public CreateRoleRequest() { + } + + public CreateRoleRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name of the Role. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateRoleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Role. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateRoleRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public CreateRoleRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); } - - 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())); + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public CreateRoleRequest readOnly(@javax.annotation.Nullable Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + * @return readOnly + */ + @javax.annotation.Nullable + public Boolean getReadOnly() { + return readOnly; + } + + public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { + this.readOnly = readOnly; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(name, description, privileges, readOnly); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRoleRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CreateRoleRequest createRoleRequest = (CreateRoleRequest) o; + return Objects.equals(this.name, createRoleRequest.name) && + Objects.equals(this.description, createRoleRequest.description) && + Objects.equals(this.privileges, createRoleRequest.privileges) && + Objects.equals(this.readOnly, createRoleRequest.readOnly); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, privileges, readOnly); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("privileges"); - openapiFields.add("read_only"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRoleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRoleRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRoleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateRoleRequest is not found in the" - + " empty JSON string", - CreateRoleRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("privileges"); + openapiFields.add("read_only"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRoleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRoleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRoleRequest is not found in the empty JSON string", CreateRoleRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRoleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateRoleRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRoleRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRoleRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRoleRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRoleRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRoleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRoleRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateRoleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRoleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRoleRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRoleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRoleRequest - * @throws IOException if the JSON string is invalid with respect to CreateRoleRequest - */ - public static CreateRoleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRoleRequest.class); - } - - /** - * Convert an instance of CreateRoleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRoleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRoleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRoleRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRoleRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRoleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateRoleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRoleRequest + * @throws IOException if the JSON string is invalid with respect to CreateRoleRequest + */ + public static CreateRoleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRoleRequest.class); + } + + /** + * Convert an instance of CreateRoleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java index 27f7e895c..2f945c2fb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java @@ -4,1993 +4,1936 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import 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; - -/** CreateScheduleRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateScheduleRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nonnull - private String description; - - /** Type of the metadata object. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LIVEBOARD("LIVEBOARD"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nonnull - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - /** Export file format. */ - @JsonAdapter(FileFormatEnum.Adapter.class) - public enum FileFormatEnum { - CSV("CSV"), - - PDF("PDF"), - - XLSX("XLSX"); - - private String value; - - FileFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FileFormatEnum fromValue(String value) { - for (FileFormatEnum b : FileFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FileFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FileFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FileFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; - - @SerializedName(SERIALIZED_NAME_FILE_FORMAT) - @javax.annotation.Nullable - private FileFormatEnum fileFormat = FileFormatEnum.PDF; - - public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) - @javax.annotation.Nullable - private LiveboardOptionsInput liveboardOptions; - - public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; - - @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) - @javax.annotation.Nullable - private SchedulesPdfOptionsInput pdfOptions; - - /** Time zone */ - @JsonAdapter(TimeZoneEnum.Adapter.class) - public enum TimeZoneEnum { - AFRICA_ABIDJAN("Africa/Abidjan"), - - AFRICA_ACCRA("Africa/Accra"), - - AFRICA_ADDIS_ABABA("Africa/Addis_Ababa"), - - AFRICA_ALGIERS("Africa/Algiers"), - - AFRICA_ASMARA("Africa/Asmara"), - - AFRICA_ASMERA("Africa/Asmera"), - - AFRICA_BAMAKO("Africa/Bamako"), - - AFRICA_BANGUI("Africa/Bangui"), - - AFRICA_BANJUL("Africa/Banjul"), - - AFRICA_BISSAU("Africa/Bissau"), - - AFRICA_BLANTYRE("Africa/Blantyre"), - - AFRICA_BRAZZAVILLE("Africa/Brazzaville"), - - AFRICA_BUJUMBURA("Africa/Bujumbura"), - - AFRICA_CAIRO("Africa/Cairo"), - - AFRICA_CASABLANCA("Africa/Casablanca"), - - AFRICA_CEUTA("Africa/Ceuta"), - - AFRICA_CONAKRY("Africa/Conakry"), - - AFRICA_DAKAR("Africa/Dakar"), - - AFRICA_DAR_ES_SALAAM("Africa/Dar_es_Salaam"), - - AFRICA_DJIBOUTI("Africa/Djibouti"), - - AFRICA_DOUALA("Africa/Douala"), - - AFRICA_EL_AAIUN("Africa/El_Aaiun"), - - AFRICA_FREETOWN("Africa/Freetown"), - - AFRICA_GABORONE("Africa/Gaborone"), - - AFRICA_HARARE("Africa/Harare"), - - AFRICA_JOHANNESBURG("Africa/Johannesburg"), - - AFRICA_JUBA("Africa/Juba"), - - AFRICA_KAMPALA("Africa/Kampala"), - - AFRICA_KHARTOUM("Africa/Khartoum"), - - AFRICA_KIGALI("Africa/Kigali"), - - AFRICA_KINSHASA("Africa/Kinshasa"), - - AFRICA_LAGOS("Africa/Lagos"), - - AFRICA_LIBREVILLE("Africa/Libreville"), - - AFRICA_LOME("Africa/Lome"), - - AFRICA_LUANDA("Africa/Luanda"), - - AFRICA_LUBUMBASHI("Africa/Lubumbashi"), - - AFRICA_LUSAKA("Africa/Lusaka"), - - AFRICA_MALABO("Africa/Malabo"), - - AFRICA_MAPUTO("Africa/Maputo"), - - AFRICA_MASERU("Africa/Maseru"), - - AFRICA_MBABANE("Africa/Mbabane"), - - AFRICA_MOGADISHU("Africa/Mogadishu"), - - AFRICA_MONROVIA("Africa/Monrovia"), - - AFRICA_NAIROBI("Africa/Nairobi"), - - AFRICA_NDJAMENA("Africa/Ndjamena"), - - AFRICA_NIAMEY("Africa/Niamey"), - - AFRICA_NOUAKCHOTT("Africa/Nouakchott"), - - AFRICA_OUAGADOUGOU("Africa/Ouagadougou"), - - AFRICA_PORTO_NOVO("Africa/Porto-Novo"), - - AFRICA_SAO_TOME("Africa/Sao_Tome"), - - AFRICA_TIMBUKTU("Africa/Timbuktu"), - - AFRICA_TRIPOLI("Africa/Tripoli"), - - AFRICA_TUNIS("Africa/Tunis"), - - AFRICA_WINDHOEK("Africa/Windhoek"), - - AMERICA_ADAK("America/Adak"), - - AMERICA_ANCHORAGE("America/Anchorage"), - - AMERICA_ANGUILLA("America/Anguilla"), - - AMERICA_ANTIGUA("America/Antigua"), - - AMERICA_ARAGUAINA("America/Araguaina"), - - AMERICA_ARGENTINA_BUENOS_AIRES("America/Argentina/Buenos_Aires"), - - AMERICA_ARGENTINA_CATAMARCA("America/Argentina/Catamarca"), - - AMERICA_ARGENTINA_COMOD_RIVADAVIA("America/Argentina/ComodRivadavia"), - - AMERICA_ARGENTINA_CORDOBA("America/Argentina/Cordoba"), - - AMERICA_ARGENTINA_JUJUY("America/Argentina/Jujuy"), - - AMERICA_ARGENTINA_LA_RIOJA("America/Argentina/La_Rioja"), - - AMERICA_ARGENTINA_MENDOZA("America/Argentina/Mendoza"), - - AMERICA_ARGENTINA_RIO_GALLEGOS("America/Argentina/Rio_Gallegos"), - - AMERICA_ARGENTINA_SALTA("America/Argentina/Salta"), - - AMERICA_ARGENTINA_SAN_JUAN("America/Argentina/San_Juan"), - - AMERICA_ARGENTINA_SAN_LUIS("America/Argentina/San_Luis"), - - AMERICA_ARGENTINA_TUCUMAN("America/Argentina/Tucuman"), - - AMERICA_ARGENTINA_USHUAIA("America/Argentina/Ushuaia"), - - AMERICA_ARUBA("America/Aruba"), - - AMERICA_ASUNCION("America/Asuncion"), - - AMERICA_ATIKOKAN("America/Atikokan"), - - AMERICA_ATKA("America/Atka"), - - AMERICA_BAHIA("America/Bahia"), - - AMERICA_BAHIA_BANDERAS("America/Bahia_Banderas"), - - AMERICA_BARBADOS("America/Barbados"), - - AMERICA_BELEM("America/Belem"), - - AMERICA_BELIZE("America/Belize"), - - AMERICA_BLANC_SABLON("America/Blanc-Sablon"), - - AMERICA_BOA_VISTA("America/Boa_Vista"), - - AMERICA_BOGOTA("America/Bogota"), - - AMERICA_BOISE("America/Boise"), - - AMERICA_BUENOS_AIRES("America/Buenos_Aires"), - - AMERICA_CAMBRIDGE_BAY("America/Cambridge_Bay"), - - AMERICA_CAMPO_GRANDE("America/Campo_Grande"), - - AMERICA_CANCUN("America/Cancun"), - - AMERICA_CARACAS("America/Caracas"), - - AMERICA_CATAMARCA("America/Catamarca"), - - AMERICA_CAYENNE("America/Cayenne"), - - AMERICA_CAYMAN("America/Cayman"), - - AMERICA_CHICAGO("America/Chicago"), - - AMERICA_CHIHUAHUA("America/Chihuahua"), - - AMERICA_CORAL_HARBOUR("America/Coral_Harbour"), - - AMERICA_CORDOBA("America/Cordoba"), - - AMERICA_COSTA_RICA("America/Costa_Rica"), - - AMERICA_CRESTON("America/Creston"), - - AMERICA_CUIABA("America/Cuiaba"), - - AMERICA_CURACAO("America/Curacao"), - - AMERICA_DANMARKSHAVN("America/Danmarkshavn"), - - AMERICA_DAWSON("America/Dawson"), - - AMERICA_DAWSON_CREEK("America/Dawson_Creek"), - - AMERICA_DENVER("America/Denver"), - - AMERICA_DETROIT("America/Detroit"), - - AMERICA_DOMINICA("America/Dominica"), - - AMERICA_EDMONTON("America/Edmonton"), - - AMERICA_EIRUNEPE("America/Eirunepe"), - - AMERICA_EL_SALVADOR("America/El_Salvador"), - - AMERICA_ENSENADA("America/Ensenada"), - - AMERICA_FORT_NELSON("America/Fort_Nelson"), - - AMERICA_FORT_WAYNE("America/Fort_Wayne"), - - AMERICA_FORTALEZA("America/Fortaleza"), - - AMERICA_GLACE_BAY("America/Glace_Bay"), - - AMERICA_GODTHAB("America/Godthab"), - - AMERICA_GOOSE_BAY("America/Goose_Bay"), - - AMERICA_GRAND_TURK("America/Grand_Turk"), - - AMERICA_GRENADA("America/Grenada"), - - AMERICA_GUADELOUPE("America/Guadeloupe"), - - AMERICA_GUATEMALA("America/Guatemala"), - - AMERICA_GUAYAQUIL("America/Guayaquil"), - - AMERICA_GUYANA("America/Guyana"), - - AMERICA_HALIFAX("America/Halifax"), - - AMERICA_HAVANA("America/Havana"), - - AMERICA_HERMOSILLO("America/Hermosillo"), - - AMERICA_INDIANA_INDIANAPOLIS("America/Indiana/Indianapolis"), - - AMERICA_INDIANA_KNOX("America/Indiana/Knox"), - - AMERICA_INDIANA_MARENGO("America/Indiana/Marengo"), - - AMERICA_INDIANA_PETERSBURG("America/Indiana/Petersburg"), - - AMERICA_INDIANA_TELL_CITY("America/Indiana/Tell_City"), - - AMERICA_INDIANA_VEVAY("America/Indiana/Vevay"), - - AMERICA_INDIANA_VINCENNES("America/Indiana/Vincennes"), - - AMERICA_INDIANA_WINAMAC("America/Indiana/Winamac"), - - AMERICA_INDIANAPOLIS("America/Indianapolis"), - - AMERICA_INUVIK("America/Inuvik"), - - AMERICA_IQALUIT("America/Iqaluit"), - - AMERICA_JAMAICA("America/Jamaica"), - - AMERICA_JUJUY("America/Jujuy"), - - AMERICA_JUNEAU("America/Juneau"), - - AMERICA_KENTUCKY_LOUISVILLE("America/Kentucky/Louisville"), - - AMERICA_KENTUCKY_MONTICELLO("America/Kentucky/Monticello"), - - AMERICA_KNOX_IN("America/Knox_IN"), - - AMERICA_KRALENDIJK("America/Kralendijk"), - - AMERICA_LA_PAZ("America/La_Paz"), - - AMERICA_LIMA("America/Lima"), - - AMERICA_LOS_ANGELES("America/Los_Angeles"), - - AMERICA_LOUISVILLE("America/Louisville"), - - AMERICA_LOWER_PRINCES("America/Lower_Princes"), - - AMERICA_MACEIO("America/Maceio"), - - AMERICA_MANAGUA("America/Managua"), - - AMERICA_MANAUS("America/Manaus"), - - AMERICA_MARIGOT("America/Marigot"), - - AMERICA_MARTINIQUE("America/Martinique"), - - AMERICA_MATAMOROS("America/Matamoros"), - - AMERICA_MAZATLAN("America/Mazatlan"), - - AMERICA_MENDOZA("America/Mendoza"), - - AMERICA_MENOMINEE("America/Menominee"), - - AMERICA_MERIDA("America/Merida"), - - AMERICA_METLAKATLA("America/Metlakatla"), - - AMERICA_MEXICO_CITY("America/Mexico_City"), - - AMERICA_MIQUELON("America/Miquelon"), - - AMERICA_MONCTON("America/Moncton"), - - AMERICA_MONTERREY("America/Monterrey"), - - AMERICA_MONTEVIDEO("America/Montevideo"), - - AMERICA_MONTREAL("America/Montreal"), - - AMERICA_MONTSERRAT("America/Montserrat"), - - AMERICA_NASSAU("America/Nassau"), - - AMERICA_NEW_YORK("America/New_York"), - - AMERICA_NIPIGON("America/Nipigon"), - - AMERICA_NOME("America/Nome"), - - AMERICA_NORONHA("America/Noronha"), - - AMERICA_NORTH_DAKOTA_BEULAH("America/North_Dakota/Beulah"), - - AMERICA_NORTH_DAKOTA_CENTER("America/North_Dakota/Center"), - - AMERICA_NORTH_DAKOTA_NEW_SALEM("America/North_Dakota/New_Salem"), - - AMERICA_NUUK("America/Nuuk"), - - AMERICA_OJINAGA("America/Ojinaga"), - - AMERICA_PANAMA("America/Panama"), - - AMERICA_PANGNIRTUNG("America/Pangnirtung"), - - AMERICA_PARAMARIBO("America/Paramaribo"), - - AMERICA_PHOENIX("America/Phoenix"), - - AMERICA_PORT_AU_PRINCE("America/Port-au-Prince"), - - AMERICA_PORT_OF_SPAIN("America/Port_of_Spain"), - - AMERICA_PORTO_ACRE("America/Porto_Acre"), - - AMERICA_PORTO_VELHO("America/Porto_Velho"), - - AMERICA_PUERTO_RICO("America/Puerto_Rico"), - - AMERICA_PUNTA_ARENAS("America/Punta_Arenas"), - - AMERICA_RAINY_RIVER("America/Rainy_River"), - - AMERICA_RANKIN_INLET("America/Rankin_Inlet"), - - AMERICA_RECIFE("America/Recife"), - - AMERICA_REGINA("America/Regina"), - - AMERICA_RESOLUTE("America/Resolute"), - - AMERICA_RIO_BRANCO("America/Rio_Branco"), - - AMERICA_ROSARIO("America/Rosario"), - - AMERICA_SANTA_ISABEL("America/Santa_Isabel"), - - AMERICA_SANTAREM("America/Santarem"), - - AMERICA_SANTIAGO("America/Santiago"), - - AMERICA_SANTO_DOMINGO("America/Santo_Domingo"), - - AMERICA_SAO_PAULO("America/Sao_Paulo"), - - AMERICA_SCORESBYSUND("America/Scoresbysund"), - - AMERICA_SHIPROCK("America/Shiprock"), - - AMERICA_SITKA("America/Sitka"), - - AMERICA_ST_BARTHELEMY("America/St_Barthelemy"), - - AMERICA_ST_JOHNS("America/St_Johns"), - - AMERICA_ST_KITTS("America/St_Kitts"), - - AMERICA_ST_LUCIA("America/St_Lucia"), - - AMERICA_ST_THOMAS("America/St_Thomas"), - - AMERICA_ST_VINCENT("America/St_Vincent"), - - AMERICA_SWIFT_CURRENT("America/Swift_Current"), - - AMERICA_TEGUCIGALPA("America/Tegucigalpa"), - - AMERICA_THULE("America/Thule"), - - AMERICA_THUNDER_BAY("America/Thunder_Bay"), - - AMERICA_TIJUANA("America/Tijuana"), - - AMERICA_TORONTO("America/Toronto"), - - AMERICA_TORTOLA("America/Tortola"), - - AMERICA_VANCOUVER("America/Vancouver"), - - AMERICA_VIRGIN("America/Virgin"), - - AMERICA_WHITEHORSE("America/Whitehorse"), - - AMERICA_WINNIPEG("America/Winnipeg"), - - AMERICA_YAKUTAT("America/Yakutat"), - - AMERICA_YELLOWKNIFE("America/Yellowknife"), - - ANTARCTICA_CASEY("Antarctica/Casey"), - - ANTARCTICA_DAVIS("Antarctica/Davis"), - - ANTARCTICA_DUMONT_D_URVILLE("Antarctica/DumontDUrville"), - - ANTARCTICA_MACQUARIE("Antarctica/Macquarie"), - - ANTARCTICA_MAWSON("Antarctica/Mawson"), - - ANTARCTICA_MC_MURDO("Antarctica/McMurdo"), - - ANTARCTICA_PALMER("Antarctica/Palmer"), - - ANTARCTICA_ROTHERA("Antarctica/Rothera"), - - ANTARCTICA_SOUTH_POLE("Antarctica/South_Pole"), - - ANTARCTICA_SYOWA("Antarctica/Syowa"), - - ANTARCTICA_TROLL("Antarctica/Troll"), - - ANTARCTICA_VOSTOK("Antarctica/Vostok"), - - ARCTIC_LONGYEARBYEN("Arctic/Longyearbyen"), - - ASIA_ADEN("Asia/Aden"), - - ASIA_ALMATY("Asia/Almaty"), - - ASIA_AMMAN("Asia/Amman"), - - ASIA_ANADYR("Asia/Anadyr"), - - ASIA_AQTAU("Asia/Aqtau"), - - ASIA_AQTOBE("Asia/Aqtobe"), - - ASIA_ASHGABAT("Asia/Ashgabat"), - - ASIA_ASHKHABAD("Asia/Ashkhabad"), - - ASIA_ATYRAU("Asia/Atyrau"), - - ASIA_BAGHDAD("Asia/Baghdad"), - - ASIA_BAHRAIN("Asia/Bahrain"), - - ASIA_BAKU("Asia/Baku"), - - ASIA_BANGKOK("Asia/Bangkok"), - - ASIA_BARNAUL("Asia/Barnaul"), - - ASIA_BEIRUT("Asia/Beirut"), - - ASIA_BISHKEK("Asia/Bishkek"), - - ASIA_BRUNEI("Asia/Brunei"), - - ASIA_CALCUTTA("Asia/Calcutta"), - - ASIA_CHITA("Asia/Chita"), - - ASIA_CHOIBALSAN("Asia/Choibalsan"), - - ASIA_CHONGQING("Asia/Chongqing"), - - ASIA_CHUNGKING("Asia/Chungking"), - - ASIA_COLOMBO("Asia/Colombo"), - - ASIA_DACCA("Asia/Dacca"), - - ASIA_DAMASCUS("Asia/Damascus"), - - ASIA_DHAKA("Asia/Dhaka"), - - ASIA_DILI("Asia/Dili"), - - ASIA_DUBAI("Asia/Dubai"), - - ASIA_DUSHANBE("Asia/Dushanbe"), - - ASIA_FAMAGUSTA("Asia/Famagusta"), - - ASIA_GAZA("Asia/Gaza"), - - ASIA_HARBIN("Asia/Harbin"), - - ASIA_HEBRON("Asia/Hebron"), - - ASIA_HO_CHI_MINH("Asia/Ho_Chi_Minh"), - - ASIA_HONG_KONG("Asia/Hong_Kong"), - - ASIA_HOVD("Asia/Hovd"), - - ASIA_IRKUTSK("Asia/Irkutsk"), - - ASIA_ISTANBUL("Asia/Istanbul"), - - ASIA_JAKARTA("Asia/Jakarta"), - - ASIA_JAYAPURA("Asia/Jayapura"), - - ASIA_JERUSALEM("Asia/Jerusalem"), - - ASIA_KABUL("Asia/Kabul"), - - ASIA_KAMCHATKA("Asia/Kamchatka"), - - ASIA_KARACHI("Asia/Karachi"), - - ASIA_KASHGAR("Asia/Kashgar"), - - ASIA_KATHMANDU("Asia/Kathmandu"), - - ASIA_KATMANDU("Asia/Katmandu"), - - ASIA_KHANDYGA("Asia/Khandyga"), - - ASIA_KOLKATA("Asia/Kolkata"), - - ASIA_KRASNOYARSK("Asia/Krasnoyarsk"), - - ASIA_KUALA_LUMPUR("Asia/Kuala_Lumpur"), - - ASIA_KUCHING("Asia/Kuching"), - - ASIA_KUWAIT("Asia/Kuwait"), - - ASIA_MACAO("Asia/Macao"), - - ASIA_MACAU("Asia/Macau"), - - ASIA_MAGADAN("Asia/Magadan"), - - ASIA_MAKASSAR("Asia/Makassar"), - - ASIA_MANILA("Asia/Manila"), - - ASIA_MUSCAT("Asia/Muscat"), - - ASIA_NICOSIA("Asia/Nicosia"), - - ASIA_NOVOKUZNETSK("Asia/Novokuznetsk"), - - ASIA_NOVOSIBIRSK("Asia/Novosibirsk"), - - ASIA_OMSK("Asia/Omsk"), - - ASIA_ORAL("Asia/Oral"), - - ASIA_PHNOM_PENH("Asia/Phnom_Penh"), - - ASIA_PONTIANAK("Asia/Pontianak"), - - ASIA_PYONGYANG("Asia/Pyongyang"), - - ASIA_QATAR("Asia/Qatar"), - - ASIA_QOSTANAY("Asia/Qostanay"), - - ASIA_QYZYLORDA("Asia/Qyzylorda"), - - ASIA_RANGOON("Asia/Rangoon"), - - ASIA_RIYADH("Asia/Riyadh"), - - ASIA_SAIGON("Asia/Saigon"), - - ASIA_SAKHALIN("Asia/Sakhalin"), - - ASIA_SAMARKAND("Asia/Samarkand"), - - ASIA_SEOUL("Asia/Seoul"), - - ASIA_SHANGHAI("Asia/Shanghai"), - - ASIA_SINGAPORE("Asia/Singapore"), - - ASIA_SREDNEKOLYMSK("Asia/Srednekolymsk"), - - ASIA_TAIPEI("Asia/Taipei"), - - ASIA_TASHKENT("Asia/Tashkent"), - - ASIA_TBILISI("Asia/Tbilisi"), - - ASIA_TEHRAN("Asia/Tehran"), - - ASIA_TEL_AVIV("Asia/Tel_Aviv"), - - ASIA_THIMBU("Asia/Thimbu"), - - ASIA_THIMPHU("Asia/Thimphu"), - - ASIA_TOKYO("Asia/Tokyo"), - - ASIA_TOMSK("Asia/Tomsk"), - - ASIA_UJUNG_PANDANG("Asia/Ujung_Pandang"), - - ASIA_ULAANBAATAR("Asia/Ulaanbaatar"), - - ASIA_ULAN_BATOR("Asia/Ulan_Bator"), - - ASIA_URUMQI("Asia/Urumqi"), - - ASIA_UST_NERA("Asia/Ust-Nera"), - - ASIA_VIENTIANE("Asia/Vientiane"), - - ASIA_VLADIVOSTOK("Asia/Vladivostok"), - - ASIA_YAKUTSK("Asia/Yakutsk"), - - ASIA_YANGON("Asia/Yangon"), - - ASIA_YEKATERINBURG("Asia/Yekaterinburg"), - - ASIA_YEREVAN("Asia/Yerevan"), - - ATLANTIC_AZORES("Atlantic/Azores"), - - ATLANTIC_BERMUDA("Atlantic/Bermuda"), - - ATLANTIC_CANARY("Atlantic/Canary"), - - ATLANTIC_CAPE_VERDE("Atlantic/Cape_Verde"), - - ATLANTIC_FAEROE("Atlantic/Faeroe"), - - ATLANTIC_FAROE("Atlantic/Faroe"), - - ATLANTIC_JAN_MAYEN("Atlantic/Jan_Mayen"), - - ATLANTIC_MADEIRA("Atlantic/Madeira"), - - ATLANTIC_REYKJAVIK("Atlantic/Reykjavik"), - - ATLANTIC_SOUTH_GEORGIA("Atlantic/South_Georgia"), - - ATLANTIC_ST_HELENA("Atlantic/St_Helena"), - - ATLANTIC_STANLEY("Atlantic/Stanley"), - - AUSTRALIA_ACT("Australia/ACT"), - - AUSTRALIA_ADELAIDE("Australia/Adelaide"), - - AUSTRALIA_BRISBANE("Australia/Brisbane"), - - AUSTRALIA_BROKEN_HILL("Australia/Broken_Hill"), - - AUSTRALIA_CANBERRA("Australia/Canberra"), - - AUSTRALIA_CURRIE("Australia/Currie"), - - AUSTRALIA_DARWIN("Australia/Darwin"), - - AUSTRALIA_EUCLA("Australia/Eucla"), - - AUSTRALIA_HOBART("Australia/Hobart"), - - AUSTRALIA_LHI("Australia/LHI"), - - AUSTRALIA_LINDEMAN("Australia/Lindeman"), - - AUSTRALIA_LORD_HOWE("Australia/Lord_Howe"), - - AUSTRALIA_MELBOURNE("Australia/Melbourne"), - - AUSTRALIA_NSW("Australia/NSW"), - - AUSTRALIA_NORTH("Australia/North"), - - AUSTRALIA_PERTH("Australia/Perth"), - - AUSTRALIA_QUEENSLAND("Australia/Queensland"), - - AUSTRALIA_SOUTH("Australia/South"), - - AUSTRALIA_SYDNEY("Australia/Sydney"), - - AUSTRALIA_TASMANIA("Australia/Tasmania"), - - AUSTRALIA_VICTORIA("Australia/Victoria"), - - AUSTRALIA_WEST("Australia/West"), - - AUSTRALIA_YANCOWINNA("Australia/Yancowinna"), - - BRAZIL_ACRE("Brazil/Acre"), - - BRAZIL_DE_NORONHA("Brazil/DeNoronha"), - - BRAZIL_EAST("Brazil/East"), - - BRAZIL_WEST("Brazil/West"), - - CET("CET"), - - CST6_CDT("CST6CDT"), - - CANADA_ATLANTIC("Canada/Atlantic"), - - CANADA_CENTRAL("Canada/Central"), - - CANADA_EASTERN("Canada/Eastern"), - - CANADA_MOUNTAIN("Canada/Mountain"), - - CANADA_NEWFOUNDLAND("Canada/Newfoundland"), - - CANADA_PACIFIC("Canada/Pacific"), - - CANADA_SASKATCHEWAN("Canada/Saskatchewan"), - - CANADA_YUKON("Canada/Yukon"), - - CHILE_CONTINENTAL("Chile/Continental"), - - CHILE_EASTER_ISLAND("Chile/EasterIsland"), - - CUBA("Cuba"), - - EET("EET"), - - EST5_EDT("EST5EDT"), - - EGYPT("Egypt"), - - EIRE("Eire"), - - ETC_GMT("Etc/GMT"), - - ETC_GMT_0("Etc/GMT+0"), - - ETC_GMT_1("Etc/GMT+1"), - - ETC_GMT_10("Etc/GMT+10"), - - ETC_GMT_11("Etc/GMT+11"), - - ETC_GMT_121("Etc/GMT+12"), - - ETC_GMT_2("Etc/GMT+2"), - - ETC_GMT_3("Etc/GMT+3"), - - ETC_GMT_4("Etc/GMT+4"), - - ETC_GMT_5("Etc/GMT+5"), - - ETC_GMT_6("Etc/GMT+6"), - - ETC_GMT_7("Etc/GMT+7"), - - ETC_GMT_8("Etc/GMT+8"), - - ETC_GMT_9("Etc/GMT+9"), - - ETC_GMT_02("Etc/GMT-0"), - - ETC_GMT_12("Etc/GMT-1"), - - ETC_GMT_102("Etc/GMT-10"), - - ETC_GMT_112("Etc/GMT-11"), - - ETC_GMT_122("Etc/GMT-12"), - - ETC_GMT_13("Etc/GMT-13"), - - ETC_GMT_14("Etc/GMT-14"), - - ETC_GMT_22("Etc/GMT-2"), - - ETC_GMT_32("Etc/GMT-3"), - - ETC_GMT_42("Etc/GMT-4"), - - ETC_GMT_52("Etc/GMT-5"), - - ETC_GMT_62("Etc/GMT-6"), - - ETC_GMT_72("Etc/GMT-7"), - - ETC_GMT_82("Etc/GMT-8"), - - ETC_GMT_92("Etc/GMT-9"), - - ETC_GMT0("Etc/GMT0"), - - ETC_GREENWICH("Etc/Greenwich"), - - ETC_UCT("Etc/UCT"), - - ETC_UTC("Etc/UTC"), - - ETC_UNIVERSAL("Etc/Universal"), - - ETC_ZULU("Etc/Zulu"), - - EUROPE_AMSTERDAM("Europe/Amsterdam"), - - EUROPE_ANDORRA("Europe/Andorra"), - - EUROPE_ASTRAKHAN("Europe/Astrakhan"), - - EUROPE_ATHENS("Europe/Athens"), - - EUROPE_BELFAST("Europe/Belfast"), - - EUROPE_BELGRADE("Europe/Belgrade"), - - EUROPE_BERLIN("Europe/Berlin"), - - EUROPE_BRATISLAVA("Europe/Bratislava"), - - EUROPE_BRUSSELS("Europe/Brussels"), - - EUROPE_BUCHAREST("Europe/Bucharest"), - - EUROPE_BUDAPEST("Europe/Budapest"), - - EUROPE_BUSINGEN("Europe/Busingen"), - - EUROPE_CHISINAU("Europe/Chisinau"), - - EUROPE_COPENHAGEN("Europe/Copenhagen"), - - EUROPE_DUBLIN("Europe/Dublin"), - - EUROPE_GIBRALTAR("Europe/Gibraltar"), - - EUROPE_GUERNSEY("Europe/Guernsey"), - - EUROPE_HELSINKI("Europe/Helsinki"), - - EUROPE_ISLE_OF_MAN("Europe/Isle_of_Man"), - - EUROPE_ISTANBUL("Europe/Istanbul"), - - EUROPE_JERSEY("Europe/Jersey"), - - EUROPE_KALININGRAD("Europe/Kaliningrad"), - - EUROPE_KIEV("Europe/Kiev"), - - EUROPE_KIROV("Europe/Kirov"), - - EUROPE_KYIV("Europe/Kyiv"), - - EUROPE_LISBON("Europe/Lisbon"), - - EUROPE_LJUBLJANA("Europe/Ljubljana"), - - EUROPE_LONDON("Europe/London"), - - EUROPE_LUXEMBOURG("Europe/Luxembourg"), - - EUROPE_MADRID("Europe/Madrid"), - - EUROPE_MALTA("Europe/Malta"), - - EUROPE_MARIEHAMN("Europe/Mariehamn"), - - EUROPE_MINSK("Europe/Minsk"), - - EUROPE_MONACO("Europe/Monaco"), - - EUROPE_MOSCOW("Europe/Moscow"), - - EUROPE_NICOSIA("Europe/Nicosia"), - - EUROPE_OSLO("Europe/Oslo"), - - EUROPE_PARIS("Europe/Paris"), - - EUROPE_PODGORICA("Europe/Podgorica"), - - EUROPE_PRAGUE("Europe/Prague"), - - EUROPE_RIGA("Europe/Riga"), - - EUROPE_ROME("Europe/Rome"), - - EUROPE_SAMARA("Europe/Samara"), - - EUROPE_SAN_MARINO("Europe/San_Marino"), - - EUROPE_SARAJEVO("Europe/Sarajevo"), - - EUROPE_SARATOV("Europe/Saratov"), - - EUROPE_SIMFEROPOL("Europe/Simferopol"), - - EUROPE_SKOPJE("Europe/Skopje"), - - EUROPE_SOFIA("Europe/Sofia"), - - EUROPE_STOCKHOLM("Europe/Stockholm"), - - EUROPE_TALLINN("Europe/Tallinn"), - - EUROPE_TIRANE("Europe/Tirane"), - - EUROPE_TIRASPOL("Europe/Tiraspol"), - - EUROPE_ULYANOVSK("Europe/Ulyanovsk"), - - EUROPE_UZHGOROD("Europe/Uzhgorod"), - - EUROPE_VADUZ("Europe/Vaduz"), - - EUROPE_VATICAN("Europe/Vatican"), - - EUROPE_VIENNA("Europe/Vienna"), - - EUROPE_VILNIUS("Europe/Vilnius"), - - EUROPE_VOLGOGRAD("Europe/Volgograd"), - - EUROPE_WARSAW("Europe/Warsaw"), - - EUROPE_ZAGREB("Europe/Zagreb"), - - EUROPE_ZAPOROZHYE("Europe/Zaporozhye"), - - EUROPE_ZURICH("Europe/Zurich"), - - GB("GB"), - - GB_EIRE("GB-Eire"), - - GMT("GMT"), - - GMT0("GMT0"), - - GREENWICH("Greenwich"), - - HONGKONG("Hongkong"), - - ICELAND("Iceland"), - - INDIAN_ANTANANARIVO("Indian/Antananarivo"), - - INDIAN_CHAGOS("Indian/Chagos"), - - INDIAN_CHRISTMAS("Indian/Christmas"), - - INDIAN_COCOS("Indian/Cocos"), - - INDIAN_COMORO("Indian/Comoro"), - - INDIAN_KERGUELEN("Indian/Kerguelen"), - - INDIAN_MAHE("Indian/Mahe"), - - INDIAN_MALDIVES("Indian/Maldives"), - - INDIAN_MAURITIUS("Indian/Mauritius"), - - INDIAN_MAYOTTE("Indian/Mayotte"), - - INDIAN_REUNION("Indian/Reunion"), - - IRAN("Iran"), - - ISRAEL("Israel"), - - JAMAICA("Jamaica"), - - JAPAN("Japan"), - - KWAJALEIN("Kwajalein"), - - LIBYA("Libya"), - - MET("MET"), - - MST7_MDT("MST7MDT"), - - MEXICO_BAJA_NORTE("Mexico/BajaNorte"), - - MEXICO_BAJA_SUR("Mexico/BajaSur"), - - MEXICO_GENERAL("Mexico/General"), - - NZ("NZ"), - - NZ_CHAT("NZ-CHAT"), - - NAVAJO("Navajo"), - - PRC("PRC"), - - PST8_PDT("PST8PDT"), - - PACIFIC_APIA("Pacific/Apia"), - - PACIFIC_AUCKLAND("Pacific/Auckland"), - - PACIFIC_BOUGAINVILLE("Pacific/Bougainville"), - - PACIFIC_CHATHAM("Pacific/Chatham"), - - PACIFIC_CHUUK("Pacific/Chuuk"), - - PACIFIC_EASTER("Pacific/Easter"), - - PACIFIC_EFATE("Pacific/Efate"), - - PACIFIC_ENDERBURY("Pacific/Enderbury"), - - PACIFIC_FAKAOFO("Pacific/Fakaofo"), - - PACIFIC_FIJI("Pacific/Fiji"), - - PACIFIC_FUNAFUTI("Pacific/Funafuti"), - - PACIFIC_GALAPAGOS("Pacific/Galapagos"), - - PACIFIC_GAMBIER("Pacific/Gambier"), - - PACIFIC_GUADALCANAL("Pacific/Guadalcanal"), - - PACIFIC_GUAM("Pacific/Guam"), - - PACIFIC_HONOLULU("Pacific/Honolulu"), - - PACIFIC_JOHNSTON("Pacific/Johnston"), - - PACIFIC_KANTON("Pacific/Kanton"), - - PACIFIC_KIRITIMATI("Pacific/Kiritimati"), - - PACIFIC_KOSRAE("Pacific/Kosrae"), - - PACIFIC_KWAJALEIN("Pacific/Kwajalein"), - - PACIFIC_MAJURO("Pacific/Majuro"), - - PACIFIC_MARQUESAS("Pacific/Marquesas"), - - PACIFIC_MIDWAY("Pacific/Midway"), - - PACIFIC_NAURU("Pacific/Nauru"), - - PACIFIC_NIUE("Pacific/Niue"), - - PACIFIC_NORFOLK("Pacific/Norfolk"), - - PACIFIC_NOUMEA("Pacific/Noumea"), - - PACIFIC_PAGO_PAGO("Pacific/Pago_Pago"), - - PACIFIC_PALAU("Pacific/Palau"), - - PACIFIC_PITCAIRN("Pacific/Pitcairn"), - - PACIFIC_POHNPEI("Pacific/Pohnpei"), - - PACIFIC_PONAPE("Pacific/Ponape"), - - PACIFIC_PORT_MORESBY("Pacific/Port_Moresby"), - - PACIFIC_RAROTONGA("Pacific/Rarotonga"), - - PACIFIC_SAIPAN("Pacific/Saipan"), - - PACIFIC_SAMOA("Pacific/Samoa"), - - PACIFIC_TAHITI("Pacific/Tahiti"), - - PACIFIC_TARAWA("Pacific/Tarawa"), - - PACIFIC_TONGATAPU("Pacific/Tongatapu"), - - PACIFIC_TRUK("Pacific/Truk"), - - PACIFIC_WAKE("Pacific/Wake"), - - PACIFIC_WALLIS("Pacific/Wallis"), - - PACIFIC_YAP("Pacific/Yap"), - - POLAND("Poland"), - - PORTUGAL("Portugal"), - - ROK("ROK"), - - SINGAPORE("Singapore"), - - SYSTEM_V_AST4("SystemV/AST4"), - - SYSTEM_V_AST4_ADT("SystemV/AST4ADT"), - - SYSTEM_V_CST6("SystemV/CST6"), - - SYSTEM_V_CST6_CDT("SystemV/CST6CDT"), - - SYSTEM_V_EST5("SystemV/EST5"), - - SYSTEM_V_EST5_EDT("SystemV/EST5EDT"), - - SYSTEM_V_HST10("SystemV/HST10"), - - SYSTEM_V_MST7("SystemV/MST7"), - - SYSTEM_V_MST7_MDT("SystemV/MST7MDT"), - - SYSTEM_V_PST8("SystemV/PST8"), - - SYSTEM_V_PST8_PDT("SystemV/PST8PDT"), - - SYSTEM_V_YST9("SystemV/YST9"), - - SYSTEM_V_YST9_YDT("SystemV/YST9YDT"), - - TURKEY("Turkey"), - - UCT("UCT"), - - US_ALASKA("US/Alaska"), - - US_ALEUTIAN("US/Aleutian"), - - US_ARIZONA("US/Arizona"), - - US_CENTRAL("US/Central"), - - US_EAST_INDIANA("US/East-Indiana"), - - US_EASTERN("US/Eastern"), - - US_HAWAII("US/Hawaii"), - - US_INDIANA_STARKE("US/Indiana-Starke"), - - US_MICHIGAN("US/Michigan"), - - US_MOUNTAIN("US/Mountain"), - - US_PACIFIC("US/Pacific"), - - US_SAMOA("US/Samoa"), - - UTC("UTC"), - - UNIVERSAL("Universal"), - - W_SU("W-SU"), - - WET("WET"), - - ZULU("Zulu"), - - EST("EST"), - - HST("HST"), - - MST("MST"), - - ACT("ACT"), - - AET("AET"), - - AGT("AGT"), - - ART("ART"), - - AST("AST"), - - BET("BET"), - - BST("BST"), - - CAT("CAT"), - - CNT("CNT"), - - CST("CST"), - - CTT("CTT"), - - EAT("EAT"), - - ECT("ECT"), - - IET("IET"), - - IST("IST"), - - JST("JST"), - - MIT("MIT"), - - NET("NET"), - - NST("NST"), - - PLT("PLT"), - - PNT("PNT"), - - PRT("PRT"), - - PST("PST"), - - SST("SST"), - - VST("VST"); - - private String value; - - TimeZoneEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TimeZoneEnum fromValue(String value) { - for (TimeZoneEnum b : TimeZoneEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TimeZoneEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TimeZoneEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TimeZoneEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TimeZoneEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; - - @SerializedName(SERIALIZED_NAME_TIME_ZONE) - @javax.annotation.Nonnull - private TimeZoneEnum timeZone = TimeZoneEnum.AMERICA_LOS_ANGELES; - - public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; - - @SerializedName(SERIALIZED_NAME_FREQUENCY) - @javax.annotation.Nullable - private FrequencyInput frequency; - - public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; - - @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) - @javax.annotation.Nonnull - private RecipientDetailsInput recipientDetails; - - public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; - - @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) - @javax.annotation.Nullable - private String personalisedViewId; - - public CreateScheduleRequest() {} - - public CreateScheduleRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the scheduled job. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateScheduleRequest description(@javax.annotation.Nonnull String description) { - this.description = description; - return this; - } - - /** - * Description of the job. - * - * @return description - */ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nonnull String description) { - this.description = description; - } - - public CreateScheduleRequest metadataType( - @javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of the metadata object. - * - * @return metadataType - */ - @javax.annotation.Nonnull - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public CreateScheduleRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * Unique ID or name of the metadata object. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public CreateScheduleRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - return this; - } +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FrequencyInput; +import com.thoughtspot.client.model.LiveboardOptionsInput; +import com.thoughtspot.client.model.RecipientDetailsInput; +import com.thoughtspot.client.model.SchedulesPdfOptionsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; - /** - * Export file format. - * - * @return fileFormat - */ - @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { - return fileFormat; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public CreateScheduleRequest liveboardOptions( - @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { - this.liveboardOptions = liveboardOptions; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Options to specify details of Liveboard. - * - * @return liveboardOptions - */ - @javax.annotation.Nullable - public LiveboardOptionsInput getLiveboardOptions() { - return liveboardOptions; - } +/** + * CreateScheduleRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateScheduleRequest implements Serializable { + private static final long serialVersionUID = 1L; - public void setLiveboardOptions( - @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { - this.liveboardOptions = liveboardOptions; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; - public CreateScheduleRequest pdfOptions( - @javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { - this.pdfOptions = pdfOptions; - return this; - } + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; - /** - * PDF layout and orientation settings. Applicable only if the `file_format` is - * specified as `PDF`. - * - * @return pdfOptions - */ - @javax.annotation.Nullable - public SchedulesPdfOptionsInput getPdfOptions() { - return pdfOptions; - } + /** + * Type of the metadata object. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"); - public void setPdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { - this.pdfOptions = pdfOptions; - } + private String value; - public CreateScheduleRequest timeZone(@javax.annotation.Nonnull TimeZoneEnum timeZone) { - this.timeZone = timeZone; - return this; + MetadataTypeEnum(String value) { + this.value = value; } - /** - * Time zone - * - * @return timeZone - */ - @javax.annotation.Nonnull - public TimeZoneEnum getTimeZone() { - return timeZone; + public String getValue() { + return value; } - public void setTimeZone(@javax.annotation.Nonnull TimeZoneEnum timeZone) { - this.timeZone = timeZone; + @Override + public String toString() { + return String.valueOf(value); } - public CreateScheduleRequest frequency(@javax.annotation.Nullable FrequencyInput frequency) { - this.frequency = frequency; - return this; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Frequency settings for the scheduled job. - * - * @return frequency - */ - @javax.annotation.Nullable - public FrequencyInput getFrequency() { - return frequency; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - public void setFrequency(@javax.annotation.Nullable FrequencyInput frequency) { - this.frequency = frequency; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); } - - public CreateScheduleRequest recipientDetails( - @javax.annotation.Nonnull RecipientDetailsInput recipientDetails) { - this.recipientDetails = recipientDetails; - return this; + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** + * Export file format. + */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + CSV("CSV"), + + PDF("PDF"), + + XLSX("XLSX"); + + private String value; + + FileFormatEnum(String value) { + this.value = value; } - /** - * Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users - * or groups as recipients in the `principals` array. If a recipient is not a - * ThoughtSpot user, specify email address. - * - * @return recipientDetails - */ - @javax.annotation.Nonnull - public RecipientDetailsInput getRecipientDetails() { - return recipientDetails; + public String getValue() { + return value; } - public void setRecipientDetails( - @javax.annotation.Nonnull RecipientDetailsInput recipientDetails) { - this.recipientDetails = recipientDetails; + @Override + public String toString() { + return String.valueOf(value); } - public CreateScheduleRequest personalisedViewId( - @javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; - return this; + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Personalised view id of the liveboard to be scheduled. - * - * @return personalisedViewId - */ - @javax.annotation.Nullable - public String getPersonalisedViewId() { - return personalisedViewId; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } } - public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateScheduleRequest createScheduleRequest = (CreateScheduleRequest) o; - return Objects.equals(this.name, createScheduleRequest.name) - && Objects.equals(this.description, createScheduleRequest.description) - && Objects.equals(this.metadataType, createScheduleRequest.metadataType) - && Objects.equals(this.metadataIdentifier, createScheduleRequest.metadataIdentifier) - && Objects.equals(this.fileFormat, createScheduleRequest.fileFormat) - && Objects.equals(this.liveboardOptions, createScheduleRequest.liveboardOptions) - && Objects.equals(this.pdfOptions, createScheduleRequest.pdfOptions) - && Objects.equals(this.timeZone, createScheduleRequest.timeZone) - && Objects.equals(this.frequency, createScheduleRequest.frequency) - && Objects.equals(this.recipientDetails, createScheduleRequest.recipientDetails) - && Objects.equals( - this.personalisedViewId, createScheduleRequest.personalisedViewId); + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat = FileFormatEnum.PDF; + + public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) + @javax.annotation.Nullable + private LiveboardOptionsInput liveboardOptions; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private SchedulesPdfOptionsInput pdfOptions; + + /** + * Time zone + */ + @JsonAdapter(TimeZoneEnum.Adapter.class) + public enum TimeZoneEnum { + AFRICA_ABIDJAN("Africa/Abidjan"), + + AFRICA_ACCRA("Africa/Accra"), + + AFRICA_ADDIS_ABABA("Africa/Addis_Ababa"), + + AFRICA_ALGIERS("Africa/Algiers"), + + AFRICA_ASMARA("Africa/Asmara"), + + AFRICA_ASMERA("Africa/Asmera"), + + AFRICA_BAMAKO("Africa/Bamako"), + + AFRICA_BANGUI("Africa/Bangui"), + + AFRICA_BANJUL("Africa/Banjul"), + + AFRICA_BISSAU("Africa/Bissau"), + + AFRICA_BLANTYRE("Africa/Blantyre"), + + AFRICA_BRAZZAVILLE("Africa/Brazzaville"), + + AFRICA_BUJUMBURA("Africa/Bujumbura"), + + AFRICA_CAIRO("Africa/Cairo"), + + AFRICA_CASABLANCA("Africa/Casablanca"), + + AFRICA_CEUTA("Africa/Ceuta"), + + AFRICA_CONAKRY("Africa/Conakry"), + + AFRICA_DAKAR("Africa/Dakar"), + + AFRICA_DAR_ES_SALAAM("Africa/Dar_es_Salaam"), + + AFRICA_DJIBOUTI("Africa/Djibouti"), + + AFRICA_DOUALA("Africa/Douala"), + + AFRICA_EL_AAIUN("Africa/El_Aaiun"), + + AFRICA_FREETOWN("Africa/Freetown"), + + AFRICA_GABORONE("Africa/Gaborone"), + + AFRICA_HARARE("Africa/Harare"), + + AFRICA_JOHANNESBURG("Africa/Johannesburg"), + + AFRICA_JUBA("Africa/Juba"), + + AFRICA_KAMPALA("Africa/Kampala"), + + AFRICA_KHARTOUM("Africa/Khartoum"), + + AFRICA_KIGALI("Africa/Kigali"), + + AFRICA_KINSHASA("Africa/Kinshasa"), + + AFRICA_LAGOS("Africa/Lagos"), + + AFRICA_LIBREVILLE("Africa/Libreville"), + + AFRICA_LOME("Africa/Lome"), + + AFRICA_LUANDA("Africa/Luanda"), + + AFRICA_LUBUMBASHI("Africa/Lubumbashi"), + + AFRICA_LUSAKA("Africa/Lusaka"), + + AFRICA_MALABO("Africa/Malabo"), + + AFRICA_MAPUTO("Africa/Maputo"), + + AFRICA_MASERU("Africa/Maseru"), + + AFRICA_MBABANE("Africa/Mbabane"), + + AFRICA_MOGADISHU("Africa/Mogadishu"), + + AFRICA_MONROVIA("Africa/Monrovia"), + + AFRICA_NAIROBI("Africa/Nairobi"), + + AFRICA_NDJAMENA("Africa/Ndjamena"), + + AFRICA_NIAMEY("Africa/Niamey"), + + AFRICA_NOUAKCHOTT("Africa/Nouakchott"), + + AFRICA_OUAGADOUGOU("Africa/Ouagadougou"), + + AFRICA_PORTO_NOVO("Africa/Porto-Novo"), + + AFRICA_SAO_TOME("Africa/Sao_Tome"), + + AFRICA_TIMBUKTU("Africa/Timbuktu"), + + AFRICA_TRIPOLI("Africa/Tripoli"), + + AFRICA_TUNIS("Africa/Tunis"), + + AFRICA_WINDHOEK("Africa/Windhoek"), + + AMERICA_ADAK("America/Adak"), + + AMERICA_ANCHORAGE("America/Anchorage"), + + AMERICA_ANGUILLA("America/Anguilla"), + + AMERICA_ANTIGUA("America/Antigua"), + + AMERICA_ARAGUAINA("America/Araguaina"), + + AMERICA_ARGENTINA_BUENOS_AIRES("America/Argentina/Buenos_Aires"), + + AMERICA_ARGENTINA_CATAMARCA("America/Argentina/Catamarca"), + + AMERICA_ARGENTINA_COMOD_RIVADAVIA("America/Argentina/ComodRivadavia"), + + AMERICA_ARGENTINA_CORDOBA("America/Argentina/Cordoba"), + + AMERICA_ARGENTINA_JUJUY("America/Argentina/Jujuy"), + + AMERICA_ARGENTINA_LA_RIOJA("America/Argentina/La_Rioja"), + + AMERICA_ARGENTINA_MENDOZA("America/Argentina/Mendoza"), + + AMERICA_ARGENTINA_RIO_GALLEGOS("America/Argentina/Rio_Gallegos"), + + AMERICA_ARGENTINA_SALTA("America/Argentina/Salta"), + + AMERICA_ARGENTINA_SAN_JUAN("America/Argentina/San_Juan"), + + AMERICA_ARGENTINA_SAN_LUIS("America/Argentina/San_Luis"), + + AMERICA_ARGENTINA_TUCUMAN("America/Argentina/Tucuman"), + + AMERICA_ARGENTINA_USHUAIA("America/Argentina/Ushuaia"), + + AMERICA_ARUBA("America/Aruba"), + + AMERICA_ASUNCION("America/Asuncion"), + + AMERICA_ATIKOKAN("America/Atikokan"), + + AMERICA_ATKA("America/Atka"), + + AMERICA_BAHIA("America/Bahia"), + + AMERICA_BAHIA_BANDERAS("America/Bahia_Banderas"), + + AMERICA_BARBADOS("America/Barbados"), + + AMERICA_BELEM("America/Belem"), + + AMERICA_BELIZE("America/Belize"), + + AMERICA_BLANC_SABLON("America/Blanc-Sablon"), + + AMERICA_BOA_VISTA("America/Boa_Vista"), + + AMERICA_BOGOTA("America/Bogota"), + + AMERICA_BOISE("America/Boise"), + + AMERICA_BUENOS_AIRES("America/Buenos_Aires"), + + AMERICA_CAMBRIDGE_BAY("America/Cambridge_Bay"), + + AMERICA_CAMPO_GRANDE("America/Campo_Grande"), + + AMERICA_CANCUN("America/Cancun"), + + AMERICA_CARACAS("America/Caracas"), + + AMERICA_CATAMARCA("America/Catamarca"), + + AMERICA_CAYENNE("America/Cayenne"), + + AMERICA_CAYMAN("America/Cayman"), + + AMERICA_CHICAGO("America/Chicago"), + + AMERICA_CHIHUAHUA("America/Chihuahua"), + + AMERICA_CORAL_HARBOUR("America/Coral_Harbour"), + + AMERICA_CORDOBA("America/Cordoba"), + + AMERICA_COSTA_RICA("America/Costa_Rica"), + + AMERICA_CRESTON("America/Creston"), + + AMERICA_CUIABA("America/Cuiaba"), + + AMERICA_CURACAO("America/Curacao"), + + AMERICA_DANMARKSHAVN("America/Danmarkshavn"), + + AMERICA_DAWSON("America/Dawson"), + + AMERICA_DAWSON_CREEK("America/Dawson_Creek"), + + AMERICA_DENVER("America/Denver"), + + AMERICA_DETROIT("America/Detroit"), + + AMERICA_DOMINICA("America/Dominica"), + + AMERICA_EDMONTON("America/Edmonton"), + + AMERICA_EIRUNEPE("America/Eirunepe"), + + AMERICA_EL_SALVADOR("America/El_Salvador"), + + AMERICA_ENSENADA("America/Ensenada"), + + AMERICA_FORT_NELSON("America/Fort_Nelson"), + + AMERICA_FORT_WAYNE("America/Fort_Wayne"), + + AMERICA_FORTALEZA("America/Fortaleza"), + + AMERICA_GLACE_BAY("America/Glace_Bay"), + + AMERICA_GODTHAB("America/Godthab"), + + AMERICA_GOOSE_BAY("America/Goose_Bay"), + + AMERICA_GRAND_TURK("America/Grand_Turk"), + + AMERICA_GRENADA("America/Grenada"), + + AMERICA_GUADELOUPE("America/Guadeloupe"), + + AMERICA_GUATEMALA("America/Guatemala"), + + AMERICA_GUAYAQUIL("America/Guayaquil"), + + AMERICA_GUYANA("America/Guyana"), + + AMERICA_HALIFAX("America/Halifax"), + + AMERICA_HAVANA("America/Havana"), + + AMERICA_HERMOSILLO("America/Hermosillo"), + + AMERICA_INDIANA_INDIANAPOLIS("America/Indiana/Indianapolis"), + + AMERICA_INDIANA_KNOX("America/Indiana/Knox"), + + AMERICA_INDIANA_MARENGO("America/Indiana/Marengo"), + + AMERICA_INDIANA_PETERSBURG("America/Indiana/Petersburg"), + + AMERICA_INDIANA_TELL_CITY("America/Indiana/Tell_City"), + + AMERICA_INDIANA_VEVAY("America/Indiana/Vevay"), + + AMERICA_INDIANA_VINCENNES("America/Indiana/Vincennes"), + + AMERICA_INDIANA_WINAMAC("America/Indiana/Winamac"), + + AMERICA_INDIANAPOLIS("America/Indianapolis"), + + AMERICA_INUVIK("America/Inuvik"), + + AMERICA_IQALUIT("America/Iqaluit"), + + AMERICA_JAMAICA("America/Jamaica"), + + AMERICA_JUJUY("America/Jujuy"), + + AMERICA_JUNEAU("America/Juneau"), + + AMERICA_KENTUCKY_LOUISVILLE("America/Kentucky/Louisville"), + + AMERICA_KENTUCKY_MONTICELLO("America/Kentucky/Monticello"), + + AMERICA_KNOX_IN("America/Knox_IN"), + + AMERICA_KRALENDIJK("America/Kralendijk"), + + AMERICA_LA_PAZ("America/La_Paz"), + + AMERICA_LIMA("America/Lima"), + + AMERICA_LOS_ANGELES("America/Los_Angeles"), + + AMERICA_LOUISVILLE("America/Louisville"), + + AMERICA_LOWER_PRINCES("America/Lower_Princes"), + + AMERICA_MACEIO("America/Maceio"), + + AMERICA_MANAGUA("America/Managua"), + + AMERICA_MANAUS("America/Manaus"), + + AMERICA_MARIGOT("America/Marigot"), + + AMERICA_MARTINIQUE("America/Martinique"), + + AMERICA_MATAMOROS("America/Matamoros"), + + AMERICA_MAZATLAN("America/Mazatlan"), + + AMERICA_MENDOZA("America/Mendoza"), + + AMERICA_MENOMINEE("America/Menominee"), + + AMERICA_MERIDA("America/Merida"), + + AMERICA_METLAKATLA("America/Metlakatla"), + + AMERICA_MEXICO_CITY("America/Mexico_City"), + + AMERICA_MIQUELON("America/Miquelon"), + + AMERICA_MONCTON("America/Moncton"), + + AMERICA_MONTERREY("America/Monterrey"), + + AMERICA_MONTEVIDEO("America/Montevideo"), + + AMERICA_MONTREAL("America/Montreal"), + + AMERICA_MONTSERRAT("America/Montserrat"), + + AMERICA_NASSAU("America/Nassau"), + + AMERICA_NEW_YORK("America/New_York"), + + AMERICA_NIPIGON("America/Nipigon"), + + AMERICA_NOME("America/Nome"), + + AMERICA_NORONHA("America/Noronha"), + + AMERICA_NORTH_DAKOTA_BEULAH("America/North_Dakota/Beulah"), + + AMERICA_NORTH_DAKOTA_CENTER("America/North_Dakota/Center"), + + AMERICA_NORTH_DAKOTA_NEW_SALEM("America/North_Dakota/New_Salem"), + + AMERICA_NUUK("America/Nuuk"), + + AMERICA_OJINAGA("America/Ojinaga"), + + AMERICA_PANAMA("America/Panama"), + + AMERICA_PANGNIRTUNG("America/Pangnirtung"), + + AMERICA_PARAMARIBO("America/Paramaribo"), + + AMERICA_PHOENIX("America/Phoenix"), + + AMERICA_PORT_AU_PRINCE("America/Port-au-Prince"), + + AMERICA_PORT_OF_SPAIN("America/Port_of_Spain"), + + AMERICA_PORTO_ACRE("America/Porto_Acre"), + + AMERICA_PORTO_VELHO("America/Porto_Velho"), + + AMERICA_PUERTO_RICO("America/Puerto_Rico"), + + AMERICA_PUNTA_ARENAS("America/Punta_Arenas"), + + AMERICA_RAINY_RIVER("America/Rainy_River"), + + AMERICA_RANKIN_INLET("America/Rankin_Inlet"), + + AMERICA_RECIFE("America/Recife"), + + AMERICA_REGINA("America/Regina"), + + AMERICA_RESOLUTE("America/Resolute"), + + AMERICA_RIO_BRANCO("America/Rio_Branco"), + + AMERICA_ROSARIO("America/Rosario"), + + AMERICA_SANTA_ISABEL("America/Santa_Isabel"), + + AMERICA_SANTAREM("America/Santarem"), + + AMERICA_SANTIAGO("America/Santiago"), + + AMERICA_SANTO_DOMINGO("America/Santo_Domingo"), + + AMERICA_SAO_PAULO("America/Sao_Paulo"), + + AMERICA_SCORESBYSUND("America/Scoresbysund"), + + AMERICA_SHIPROCK("America/Shiprock"), + + AMERICA_SITKA("America/Sitka"), + + AMERICA_ST_BARTHELEMY("America/St_Barthelemy"), + + AMERICA_ST_JOHNS("America/St_Johns"), + + AMERICA_ST_KITTS("America/St_Kitts"), + + AMERICA_ST_LUCIA("America/St_Lucia"), + + AMERICA_ST_THOMAS("America/St_Thomas"), + + AMERICA_ST_VINCENT("America/St_Vincent"), + + AMERICA_SWIFT_CURRENT("America/Swift_Current"), + + AMERICA_TEGUCIGALPA("America/Tegucigalpa"), + + AMERICA_THULE("America/Thule"), + + AMERICA_THUNDER_BAY("America/Thunder_Bay"), + + AMERICA_TIJUANA("America/Tijuana"), + + AMERICA_TORONTO("America/Toronto"), + + AMERICA_TORTOLA("America/Tortola"), + + AMERICA_VANCOUVER("America/Vancouver"), + + AMERICA_VIRGIN("America/Virgin"), + + AMERICA_WHITEHORSE("America/Whitehorse"), + + AMERICA_WINNIPEG("America/Winnipeg"), + + AMERICA_YAKUTAT("America/Yakutat"), + + AMERICA_YELLOWKNIFE("America/Yellowknife"), + + ANTARCTICA_CASEY("Antarctica/Casey"), + + ANTARCTICA_DAVIS("Antarctica/Davis"), + + ANTARCTICA_DUMONT_D_URVILLE("Antarctica/DumontDUrville"), + + ANTARCTICA_MACQUARIE("Antarctica/Macquarie"), + + ANTARCTICA_MAWSON("Antarctica/Mawson"), + + ANTARCTICA_MC_MURDO("Antarctica/McMurdo"), + + ANTARCTICA_PALMER("Antarctica/Palmer"), + + ANTARCTICA_ROTHERA("Antarctica/Rothera"), + + ANTARCTICA_SOUTH_POLE("Antarctica/South_Pole"), + + ANTARCTICA_SYOWA("Antarctica/Syowa"), + + ANTARCTICA_TROLL("Antarctica/Troll"), + + ANTARCTICA_VOSTOK("Antarctica/Vostok"), + + ARCTIC_LONGYEARBYEN("Arctic/Longyearbyen"), + + ASIA_ADEN("Asia/Aden"), + + ASIA_ALMATY("Asia/Almaty"), + + ASIA_AMMAN("Asia/Amman"), + + ASIA_ANADYR("Asia/Anadyr"), + + ASIA_AQTAU("Asia/Aqtau"), + + ASIA_AQTOBE("Asia/Aqtobe"), + + ASIA_ASHGABAT("Asia/Ashgabat"), + + ASIA_ASHKHABAD("Asia/Ashkhabad"), + + ASIA_ATYRAU("Asia/Atyrau"), + + ASIA_BAGHDAD("Asia/Baghdad"), + + ASIA_BAHRAIN("Asia/Bahrain"), + + ASIA_BAKU("Asia/Baku"), + + ASIA_BANGKOK("Asia/Bangkok"), + + ASIA_BARNAUL("Asia/Barnaul"), + + ASIA_BEIRUT("Asia/Beirut"), + + ASIA_BISHKEK("Asia/Bishkek"), + + ASIA_BRUNEI("Asia/Brunei"), + + ASIA_CALCUTTA("Asia/Calcutta"), + + ASIA_CHITA("Asia/Chita"), + + ASIA_CHOIBALSAN("Asia/Choibalsan"), + + ASIA_CHONGQING("Asia/Chongqing"), + + ASIA_CHUNGKING("Asia/Chungking"), + + ASIA_COLOMBO("Asia/Colombo"), + + ASIA_DACCA("Asia/Dacca"), + + ASIA_DAMASCUS("Asia/Damascus"), + + ASIA_DHAKA("Asia/Dhaka"), + + ASIA_DILI("Asia/Dili"), + + ASIA_DUBAI("Asia/Dubai"), + + ASIA_DUSHANBE("Asia/Dushanbe"), + + ASIA_FAMAGUSTA("Asia/Famagusta"), + + ASIA_GAZA("Asia/Gaza"), + + ASIA_HARBIN("Asia/Harbin"), + + ASIA_HEBRON("Asia/Hebron"), + + ASIA_HO_CHI_MINH("Asia/Ho_Chi_Minh"), + + ASIA_HONG_KONG("Asia/Hong_Kong"), + + ASIA_HOVD("Asia/Hovd"), + + ASIA_IRKUTSK("Asia/Irkutsk"), + + ASIA_ISTANBUL("Asia/Istanbul"), + + ASIA_JAKARTA("Asia/Jakarta"), + + ASIA_JAYAPURA("Asia/Jayapura"), + + ASIA_JERUSALEM("Asia/Jerusalem"), + + ASIA_KABUL("Asia/Kabul"), + + ASIA_KAMCHATKA("Asia/Kamchatka"), + + ASIA_KARACHI("Asia/Karachi"), + + ASIA_KASHGAR("Asia/Kashgar"), + + ASIA_KATHMANDU("Asia/Kathmandu"), + + ASIA_KATMANDU("Asia/Katmandu"), + + ASIA_KHANDYGA("Asia/Khandyga"), + + ASIA_KOLKATA("Asia/Kolkata"), + + ASIA_KRASNOYARSK("Asia/Krasnoyarsk"), + + ASIA_KUALA_LUMPUR("Asia/Kuala_Lumpur"), + + ASIA_KUCHING("Asia/Kuching"), + + ASIA_KUWAIT("Asia/Kuwait"), + + ASIA_MACAO("Asia/Macao"), + + ASIA_MACAU("Asia/Macau"), + + ASIA_MAGADAN("Asia/Magadan"), + + ASIA_MAKASSAR("Asia/Makassar"), + + ASIA_MANILA("Asia/Manila"), + + ASIA_MUSCAT("Asia/Muscat"), + + ASIA_NICOSIA("Asia/Nicosia"), + + ASIA_NOVOKUZNETSK("Asia/Novokuznetsk"), + + ASIA_NOVOSIBIRSK("Asia/Novosibirsk"), + + ASIA_OMSK("Asia/Omsk"), + + ASIA_ORAL("Asia/Oral"), + + ASIA_PHNOM_PENH("Asia/Phnom_Penh"), + + ASIA_PONTIANAK("Asia/Pontianak"), + + ASIA_PYONGYANG("Asia/Pyongyang"), + + ASIA_QATAR("Asia/Qatar"), + + ASIA_QOSTANAY("Asia/Qostanay"), + + ASIA_QYZYLORDA("Asia/Qyzylorda"), + + ASIA_RANGOON("Asia/Rangoon"), + + ASIA_RIYADH("Asia/Riyadh"), + + ASIA_SAIGON("Asia/Saigon"), + + ASIA_SAKHALIN("Asia/Sakhalin"), + + ASIA_SAMARKAND("Asia/Samarkand"), + + ASIA_SEOUL("Asia/Seoul"), + + ASIA_SHANGHAI("Asia/Shanghai"), + + ASIA_SINGAPORE("Asia/Singapore"), + + ASIA_SREDNEKOLYMSK("Asia/Srednekolymsk"), + + ASIA_TAIPEI("Asia/Taipei"), + + ASIA_TASHKENT("Asia/Tashkent"), + + ASIA_TBILISI("Asia/Tbilisi"), + + ASIA_TEHRAN("Asia/Tehran"), + + ASIA_TEL_AVIV("Asia/Tel_Aviv"), + + ASIA_THIMBU("Asia/Thimbu"), + + ASIA_THIMPHU("Asia/Thimphu"), + + ASIA_TOKYO("Asia/Tokyo"), + + ASIA_TOMSK("Asia/Tomsk"), + + ASIA_UJUNG_PANDANG("Asia/Ujung_Pandang"), + + ASIA_ULAANBAATAR("Asia/Ulaanbaatar"), + + ASIA_ULAN_BATOR("Asia/Ulan_Bator"), + + ASIA_URUMQI("Asia/Urumqi"), + + ASIA_UST_NERA("Asia/Ust-Nera"), + + ASIA_VIENTIANE("Asia/Vientiane"), + + ASIA_VLADIVOSTOK("Asia/Vladivostok"), + + ASIA_YAKUTSK("Asia/Yakutsk"), + + ASIA_YANGON("Asia/Yangon"), + + ASIA_YEKATERINBURG("Asia/Yekaterinburg"), + + ASIA_YEREVAN("Asia/Yerevan"), + + ATLANTIC_AZORES("Atlantic/Azores"), + + ATLANTIC_BERMUDA("Atlantic/Bermuda"), + + ATLANTIC_CANARY("Atlantic/Canary"), + + ATLANTIC_CAPE_VERDE("Atlantic/Cape_Verde"), + + ATLANTIC_FAEROE("Atlantic/Faeroe"), + + ATLANTIC_FAROE("Atlantic/Faroe"), + + ATLANTIC_JAN_MAYEN("Atlantic/Jan_Mayen"), + + ATLANTIC_MADEIRA("Atlantic/Madeira"), + + ATLANTIC_REYKJAVIK("Atlantic/Reykjavik"), + + ATLANTIC_SOUTH_GEORGIA("Atlantic/South_Georgia"), + + ATLANTIC_ST_HELENA("Atlantic/St_Helena"), + + ATLANTIC_STANLEY("Atlantic/Stanley"), + + AUSTRALIA_ACT("Australia/ACT"), + + AUSTRALIA_ADELAIDE("Australia/Adelaide"), + + AUSTRALIA_BRISBANE("Australia/Brisbane"), + + AUSTRALIA_BROKEN_HILL("Australia/Broken_Hill"), + + AUSTRALIA_CANBERRA("Australia/Canberra"), + + AUSTRALIA_CURRIE("Australia/Currie"), + + AUSTRALIA_DARWIN("Australia/Darwin"), + + AUSTRALIA_EUCLA("Australia/Eucla"), + + AUSTRALIA_HOBART("Australia/Hobart"), + + AUSTRALIA_LHI("Australia/LHI"), + + AUSTRALIA_LINDEMAN("Australia/Lindeman"), + + AUSTRALIA_LORD_HOWE("Australia/Lord_Howe"), + + AUSTRALIA_MELBOURNE("Australia/Melbourne"), + + AUSTRALIA_NSW("Australia/NSW"), + + AUSTRALIA_NORTH("Australia/North"), + + AUSTRALIA_PERTH("Australia/Perth"), + + AUSTRALIA_QUEENSLAND("Australia/Queensland"), + + AUSTRALIA_SOUTH("Australia/South"), + + AUSTRALIA_SYDNEY("Australia/Sydney"), + + AUSTRALIA_TASMANIA("Australia/Tasmania"), + + AUSTRALIA_VICTORIA("Australia/Victoria"), + + AUSTRALIA_WEST("Australia/West"), + + AUSTRALIA_YANCOWINNA("Australia/Yancowinna"), + + BRAZIL_ACRE("Brazil/Acre"), + + BRAZIL_DE_NORONHA("Brazil/DeNoronha"), + + BRAZIL_EAST("Brazil/East"), + + BRAZIL_WEST("Brazil/West"), + + CET("CET"), + + CST6_CDT("CST6CDT"), + + CANADA_ATLANTIC("Canada/Atlantic"), + + CANADA_CENTRAL("Canada/Central"), + + CANADA_EASTERN("Canada/Eastern"), + + CANADA_MOUNTAIN("Canada/Mountain"), + + CANADA_NEWFOUNDLAND("Canada/Newfoundland"), + + CANADA_PACIFIC("Canada/Pacific"), + + CANADA_SASKATCHEWAN("Canada/Saskatchewan"), + + CANADA_YUKON("Canada/Yukon"), + + CHILE_CONTINENTAL("Chile/Continental"), + + CHILE_EASTER_ISLAND("Chile/EasterIsland"), + + CUBA("Cuba"), + + EET("EET"), + + EST5_EDT("EST5EDT"), + + EGYPT("Egypt"), + + EIRE("Eire"), + + ETC_GMT("Etc/GMT"), + + ETC_GMT_0("Etc/GMT+0"), + + ETC_GMT_1("Etc/GMT+1"), + + ETC_GMT_10("Etc/GMT+10"), + + ETC_GMT_11("Etc/GMT+11"), + + ETC_GMT_121("Etc/GMT+12"), + + ETC_GMT_2("Etc/GMT+2"), + + ETC_GMT_3("Etc/GMT+3"), + + ETC_GMT_4("Etc/GMT+4"), + + ETC_GMT_5("Etc/GMT+5"), + + ETC_GMT_6("Etc/GMT+6"), + + ETC_GMT_7("Etc/GMT+7"), + + ETC_GMT_8("Etc/GMT+8"), + + ETC_GMT_9("Etc/GMT+9"), + + ETC_GMT_02("Etc/GMT-0"), + + ETC_GMT_12("Etc/GMT-1"), + + ETC_GMT_102("Etc/GMT-10"), + + ETC_GMT_112("Etc/GMT-11"), + + ETC_GMT_122("Etc/GMT-12"), + + ETC_GMT_13("Etc/GMT-13"), + + ETC_GMT_14("Etc/GMT-14"), + + ETC_GMT_22("Etc/GMT-2"), + + ETC_GMT_32("Etc/GMT-3"), + + ETC_GMT_42("Etc/GMT-4"), + + ETC_GMT_52("Etc/GMT-5"), + + ETC_GMT_62("Etc/GMT-6"), + + ETC_GMT_72("Etc/GMT-7"), + + ETC_GMT_82("Etc/GMT-8"), + + ETC_GMT_92("Etc/GMT-9"), + + ETC_GMT0("Etc/GMT0"), + + ETC_GREENWICH("Etc/Greenwich"), + + ETC_UCT("Etc/UCT"), + + ETC_UTC("Etc/UTC"), + + ETC_UNIVERSAL("Etc/Universal"), + + ETC_ZULU("Etc/Zulu"), + + EUROPE_AMSTERDAM("Europe/Amsterdam"), + + EUROPE_ANDORRA("Europe/Andorra"), + + EUROPE_ASTRAKHAN("Europe/Astrakhan"), + + EUROPE_ATHENS("Europe/Athens"), + + EUROPE_BELFAST("Europe/Belfast"), + + EUROPE_BELGRADE("Europe/Belgrade"), + + EUROPE_BERLIN("Europe/Berlin"), + + EUROPE_BRATISLAVA("Europe/Bratislava"), + + EUROPE_BRUSSELS("Europe/Brussels"), + + EUROPE_BUCHAREST("Europe/Bucharest"), + + EUROPE_BUDAPEST("Europe/Budapest"), + + EUROPE_BUSINGEN("Europe/Busingen"), + + EUROPE_CHISINAU("Europe/Chisinau"), + + EUROPE_COPENHAGEN("Europe/Copenhagen"), + + EUROPE_DUBLIN("Europe/Dublin"), + + EUROPE_GIBRALTAR("Europe/Gibraltar"), + + EUROPE_GUERNSEY("Europe/Guernsey"), + + EUROPE_HELSINKI("Europe/Helsinki"), + + EUROPE_ISLE_OF_MAN("Europe/Isle_of_Man"), + + EUROPE_ISTANBUL("Europe/Istanbul"), + + EUROPE_JERSEY("Europe/Jersey"), + + EUROPE_KALININGRAD("Europe/Kaliningrad"), + + EUROPE_KIEV("Europe/Kiev"), + + EUROPE_KIROV("Europe/Kirov"), + + EUROPE_KYIV("Europe/Kyiv"), + + EUROPE_LISBON("Europe/Lisbon"), + + EUROPE_LJUBLJANA("Europe/Ljubljana"), + + EUROPE_LONDON("Europe/London"), + + EUROPE_LUXEMBOURG("Europe/Luxembourg"), + + EUROPE_MADRID("Europe/Madrid"), + + EUROPE_MALTA("Europe/Malta"), + + EUROPE_MARIEHAMN("Europe/Mariehamn"), + + EUROPE_MINSK("Europe/Minsk"), + + EUROPE_MONACO("Europe/Monaco"), + + EUROPE_MOSCOW("Europe/Moscow"), + + EUROPE_NICOSIA("Europe/Nicosia"), + + EUROPE_OSLO("Europe/Oslo"), + + EUROPE_PARIS("Europe/Paris"), + + EUROPE_PODGORICA("Europe/Podgorica"), + + EUROPE_PRAGUE("Europe/Prague"), + + EUROPE_RIGA("Europe/Riga"), + + EUROPE_ROME("Europe/Rome"), + + EUROPE_SAMARA("Europe/Samara"), + + EUROPE_SAN_MARINO("Europe/San_Marino"), + + EUROPE_SARAJEVO("Europe/Sarajevo"), + + EUROPE_SARATOV("Europe/Saratov"), + + EUROPE_SIMFEROPOL("Europe/Simferopol"), + + EUROPE_SKOPJE("Europe/Skopje"), + + EUROPE_SOFIA("Europe/Sofia"), + + EUROPE_STOCKHOLM("Europe/Stockholm"), + + EUROPE_TALLINN("Europe/Tallinn"), + + EUROPE_TIRANE("Europe/Tirane"), + + EUROPE_TIRASPOL("Europe/Tiraspol"), + + EUROPE_ULYANOVSK("Europe/Ulyanovsk"), + + EUROPE_UZHGOROD("Europe/Uzhgorod"), + + EUROPE_VADUZ("Europe/Vaduz"), + + EUROPE_VATICAN("Europe/Vatican"), + + EUROPE_VIENNA("Europe/Vienna"), + + EUROPE_VILNIUS("Europe/Vilnius"), + + EUROPE_VOLGOGRAD("Europe/Volgograd"), + + EUROPE_WARSAW("Europe/Warsaw"), + + EUROPE_ZAGREB("Europe/Zagreb"), + + EUROPE_ZAPOROZHYE("Europe/Zaporozhye"), + + EUROPE_ZURICH("Europe/Zurich"), + + GB("GB"), + + GB_EIRE("GB-Eire"), + + GMT("GMT"), + + GMT0("GMT0"), + + GREENWICH("Greenwich"), + + HONGKONG("Hongkong"), + + ICELAND("Iceland"), + + INDIAN_ANTANANARIVO("Indian/Antananarivo"), + + INDIAN_CHAGOS("Indian/Chagos"), + + INDIAN_CHRISTMAS("Indian/Christmas"), + + INDIAN_COCOS("Indian/Cocos"), + + INDIAN_COMORO("Indian/Comoro"), + + INDIAN_KERGUELEN("Indian/Kerguelen"), + + INDIAN_MAHE("Indian/Mahe"), + + INDIAN_MALDIVES("Indian/Maldives"), + + INDIAN_MAURITIUS("Indian/Mauritius"), + + INDIAN_MAYOTTE("Indian/Mayotte"), + + INDIAN_REUNION("Indian/Reunion"), + + IRAN("Iran"), + + ISRAEL("Israel"), + + JAMAICA("Jamaica"), + + JAPAN("Japan"), + + KWAJALEIN("Kwajalein"), + + LIBYA("Libya"), + + MET("MET"), + + MST7_MDT("MST7MDT"), + + MEXICO_BAJA_NORTE("Mexico/BajaNorte"), + + MEXICO_BAJA_SUR("Mexico/BajaSur"), + + MEXICO_GENERAL("Mexico/General"), + + NZ("NZ"), + + NZ_CHAT("NZ-CHAT"), + + NAVAJO("Navajo"), + + PRC("PRC"), + + PST8_PDT("PST8PDT"), + + PACIFIC_APIA("Pacific/Apia"), + + PACIFIC_AUCKLAND("Pacific/Auckland"), + + PACIFIC_BOUGAINVILLE("Pacific/Bougainville"), + + PACIFIC_CHATHAM("Pacific/Chatham"), + + PACIFIC_CHUUK("Pacific/Chuuk"), + + PACIFIC_EASTER("Pacific/Easter"), + + PACIFIC_EFATE("Pacific/Efate"), + + PACIFIC_ENDERBURY("Pacific/Enderbury"), + + PACIFIC_FAKAOFO("Pacific/Fakaofo"), + + PACIFIC_FIJI("Pacific/Fiji"), + + PACIFIC_FUNAFUTI("Pacific/Funafuti"), + + PACIFIC_GALAPAGOS("Pacific/Galapagos"), + + PACIFIC_GAMBIER("Pacific/Gambier"), + + PACIFIC_GUADALCANAL("Pacific/Guadalcanal"), + + PACIFIC_GUAM("Pacific/Guam"), + + PACIFIC_HONOLULU("Pacific/Honolulu"), + + PACIFIC_JOHNSTON("Pacific/Johnston"), + + PACIFIC_KANTON("Pacific/Kanton"), + + PACIFIC_KIRITIMATI("Pacific/Kiritimati"), + + PACIFIC_KOSRAE("Pacific/Kosrae"), + + PACIFIC_KWAJALEIN("Pacific/Kwajalein"), + + PACIFIC_MAJURO("Pacific/Majuro"), + + PACIFIC_MARQUESAS("Pacific/Marquesas"), + + PACIFIC_MIDWAY("Pacific/Midway"), + + PACIFIC_NAURU("Pacific/Nauru"), + + PACIFIC_NIUE("Pacific/Niue"), + + PACIFIC_NORFOLK("Pacific/Norfolk"), + + PACIFIC_NOUMEA("Pacific/Noumea"), + + PACIFIC_PAGO_PAGO("Pacific/Pago_Pago"), + + PACIFIC_PALAU("Pacific/Palau"), + + PACIFIC_PITCAIRN("Pacific/Pitcairn"), + + PACIFIC_POHNPEI("Pacific/Pohnpei"), + + PACIFIC_PONAPE("Pacific/Ponape"), + + PACIFIC_PORT_MORESBY("Pacific/Port_Moresby"), + + PACIFIC_RAROTONGA("Pacific/Rarotonga"), + + PACIFIC_SAIPAN("Pacific/Saipan"), + + PACIFIC_SAMOA("Pacific/Samoa"), + + PACIFIC_TAHITI("Pacific/Tahiti"), + + PACIFIC_TARAWA("Pacific/Tarawa"), + + PACIFIC_TONGATAPU("Pacific/Tongatapu"), + + PACIFIC_TRUK("Pacific/Truk"), + + PACIFIC_WAKE("Pacific/Wake"), + + PACIFIC_WALLIS("Pacific/Wallis"), + + PACIFIC_YAP("Pacific/Yap"), + + POLAND("Poland"), + + PORTUGAL("Portugal"), + + ROK("ROK"), + + SINGAPORE("Singapore"), + + SYSTEM_V_AST4("SystemV/AST4"), + + SYSTEM_V_AST4_ADT("SystemV/AST4ADT"), + + SYSTEM_V_CST6("SystemV/CST6"), + + SYSTEM_V_CST6_CDT("SystemV/CST6CDT"), + + SYSTEM_V_EST5("SystemV/EST5"), + + SYSTEM_V_EST5_EDT("SystemV/EST5EDT"), + + SYSTEM_V_HST10("SystemV/HST10"), + + SYSTEM_V_MST7("SystemV/MST7"), + + SYSTEM_V_MST7_MDT("SystemV/MST7MDT"), + + SYSTEM_V_PST8("SystemV/PST8"), + + SYSTEM_V_PST8_PDT("SystemV/PST8PDT"), + + SYSTEM_V_YST9("SystemV/YST9"), + + SYSTEM_V_YST9_YDT("SystemV/YST9YDT"), + + TURKEY("Turkey"), + + UCT("UCT"), + + US_ALASKA("US/Alaska"), + + US_ALEUTIAN("US/Aleutian"), + + US_ARIZONA("US/Arizona"), + + US_CENTRAL("US/Central"), + + US_EAST_INDIANA("US/East-Indiana"), + + US_EASTERN("US/Eastern"), + + US_HAWAII("US/Hawaii"), + + US_INDIANA_STARKE("US/Indiana-Starke"), + + US_MICHIGAN("US/Michigan"), + + US_MOUNTAIN("US/Mountain"), + + US_PACIFIC("US/Pacific"), + + US_SAMOA("US/Samoa"), + + UTC("UTC"), + + UNIVERSAL("Universal"), + + W_SU("W-SU"), + + WET("WET"), + + ZULU("Zulu"), + + EST("EST"), + + HST("HST"), + + MST("MST"), + + ACT("ACT"), + + AET("AET"), + + AGT("AGT"), + + ART("ART"), + + AST("AST"), + + BET("BET"), + + BST("BST"), + + CAT("CAT"), + + CNT("CNT"), + + CST("CST"), + + CTT("CTT"), + + EAT("EAT"), + + ECT("ECT"), + + IET("IET"), + + IST("IST"), + + JST("JST"), + + MIT("MIT"), + + NET("NET"), + + NST("NST"), + + PLT("PLT"), + + PNT("PNT"), + + PRT("PRT"), + + PST("PST"), + + SST("SST"), + + VST("VST"); + + private String value; + + TimeZoneEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - name, - description, - metadataType, - metadataIdentifier, - fileFormat, - liveboardOptions, - pdfOptions, - timeZone, - frequency, - recipientDetails, - personalisedViewId); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateScheduleRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); - sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); - sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); - sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); - sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); - sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); - sb.append(" personalisedViewId: ") - .append(toIndentedString(personalisedViewId)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static TimeZoneEnum fromValue(String value) { + for (TimeZoneEnum b : TimeZoneEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("metadata_type"); - openapiFields.add("metadata_identifier"); - openapiFields.add("file_format"); - openapiFields.add("liveboard_options"); - openapiFields.add("pdf_options"); - openapiFields.add("time_zone"); - openapiFields.add("frequency"); - openapiFields.add("recipient_details"); - openapiFields.add("personalised_view_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("metadata_type"); - openapiRequiredFields.add("metadata_identifier"); - openapiRequiredFields.add("time_zone"); - openapiRequiredFields.add("recipient_details"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TimeZoneEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeZoneEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeZoneEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateScheduleRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateScheduleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateScheduleRequest is not found in" - + " the empty JSON string", - CreateScheduleRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + TimeZoneEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nonnull + private TimeZoneEnum timeZone = TimeZoneEnum.AMERICA_LOS_ANGELES; + + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nullable + private FrequencyInput frequency; + + public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) + @javax.annotation.Nonnull + private RecipientDetailsInput recipientDetails; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public CreateScheduleRequest() { + } + + public CreateScheduleRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the scheduled job. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateScheduleRequest description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description of the job. + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public CreateScheduleRequest metadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata object. + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public CreateScheduleRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public CreateScheduleRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + + public CreateScheduleRequest liveboardOptions(@javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + return this; + } + + /** + * Options to specify details of Liveboard. + * @return liveboardOptions + */ + @javax.annotation.Nullable + public LiveboardOptionsInput getLiveboardOptions() { + return liveboardOptions; + } + + public void setLiveboardOptions(@javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + } + + + public CreateScheduleRequest pdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. + * @return pdfOptions + */ + @javax.annotation.Nullable + public SchedulesPdfOptionsInput getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + } + + + public CreateScheduleRequest timeZone(@javax.annotation.Nonnull TimeZoneEnum timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Time zone + * @return timeZone + */ + @javax.annotation.Nonnull + public TimeZoneEnum getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nonnull TimeZoneEnum timeZone) { + this.timeZone = timeZone; + } + + + public CreateScheduleRequest frequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + return this; + } + + /** + * Frequency settings for the scheduled job. + * @return frequency + */ + @javax.annotation.Nullable + public FrequencyInput getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + } + + + public CreateScheduleRequest recipientDetails(@javax.annotation.Nonnull RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + return this; + } + + /** + * Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. + * @return recipientDetails + */ + @javax.annotation.Nonnull + public RecipientDetailsInput getRecipientDetails() { + return recipientDetails; + } + + public void setRecipientDetails(@javax.annotation.Nonnull RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + } + + + public CreateScheduleRequest personalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Personalised view id of the liveboard to be scheduled. + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateScheduleRequest createScheduleRequest = (CreateScheduleRequest) o; + return Objects.equals(this.name, createScheduleRequest.name) && + Objects.equals(this.description, createScheduleRequest.description) && + Objects.equals(this.metadataType, createScheduleRequest.metadataType) && + Objects.equals(this.metadataIdentifier, createScheduleRequest.metadataIdentifier) && + Objects.equals(this.fileFormat, createScheduleRequest.fileFormat) && + Objects.equals(this.liveboardOptions, createScheduleRequest.liveboardOptions) && + Objects.equals(this.pdfOptions, createScheduleRequest.pdfOptions) && + Objects.equals(this.timeZone, createScheduleRequest.timeZone) && + Objects.equals(this.frequency, createScheduleRequest.frequency) && + Objects.equals(this.recipientDetails, createScheduleRequest.recipientDetails) && + Objects.equals(this.personalisedViewId, createScheduleRequest.personalisedViewId); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, metadataType, metadataIdentifier, fileFormat, liveboardOptions, pdfOptions, timeZone, frequency, recipientDetails, personalisedViewId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateScheduleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); + sb.append(" personalisedViewId: ").append(toIndentedString(personalisedViewId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("file_format"); + openapiFields.add("liveboard_options"); + openapiFields.add("pdf_options"); + openapiFields.add("time_zone"); + openapiFields.add("frequency"); + openapiFields.add("recipient_details"); + openapiFields.add("personalised_view_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("time_zone"); + openapiRequiredFields.add("recipient_details"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateScheduleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateScheduleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateScheduleRequest is not found in the empty JSON string", CreateScheduleRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateScheduleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateScheduleRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateScheduleRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateScheduleRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateScheduleRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateScheduleRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (!jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the required field `metadata_type` - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) - && !jsonObj.get("file_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_format").toString())); - } - // validate the optional field `file_format` - if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { - FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); - } - // validate the optional field `liveboard_options` - if (jsonObj.get("liveboard_options") != null - && !jsonObj.get("liveboard_options").isJsonNull()) { - LiveboardOptionsInput.validateJsonElement(jsonObj.get("liveboard_options")); - } - // validate the optional field `pdf_options` - if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { - SchedulesPdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); - } - if (!jsonObj.get("time_zone").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `time_zone` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("time_zone").toString())); - } - // validate the required field `time_zone` - TimeZoneEnum.validateJsonElement(jsonObj.get("time_zone")); - // validate the optional field `frequency` - if (jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) { - FrequencyInput.validateJsonElement(jsonObj.get("frequency")); - } - // validate the required field `recipient_details` - RecipientDetailsInput.validateJsonElement(jsonObj.get("recipient_details")); - if ((jsonObj.get("personalised_view_id") != null - && !jsonObj.get("personalised_view_id").isJsonNull()) - && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `personalised_view_id` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("personalised_view_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateScheduleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateScheduleRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateScheduleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateScheduleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateScheduleRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateScheduleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateScheduleRequest - * @throws IOException if the JSON string is invalid with respect to CreateScheduleRequest - */ - public static CreateScheduleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateScheduleRequest.class); - } - - /** - * Convert an instance of CreateScheduleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `liveboard_options` + if (jsonObj.get("liveboard_options") != null && !jsonObj.get("liveboard_options").isJsonNull()) { + LiveboardOptionsInput.validateJsonElement(jsonObj.get("liveboard_options")); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + SchedulesPdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); + } + if (!jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_zone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_zone").toString())); + } + // validate the required field `time_zone` + TimeZoneEnum.validateJsonElement(jsonObj.get("time_zone")); + // validate the optional field `frequency` + if (jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) { + FrequencyInput.validateJsonElement(jsonObj.get("frequency")); + } + // validate the required field `recipient_details` + RecipientDetailsInput.validateJsonElement(jsonObj.get("recipient_details")); + if ((jsonObj.get("personalised_view_id") != null && !jsonObj.get("personalised_view_id").isJsonNull()) && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `personalised_view_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateScheduleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateScheduleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateScheduleRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateScheduleRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateScheduleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateScheduleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateScheduleRequest + * @throws IOException if the JSON string is invalid with respect to CreateScheduleRequest + */ + public static CreateScheduleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateScheduleRequest.class); + } + + /** + * Convert an instance of CreateScheduleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java index 86785ffcb..e75dc0f21 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java @@ -4,239 +4,235 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateTagRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateTagRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_COLOR = "color"; - - @SerializedName(SERIALIZED_NAME_COLOR) - @javax.annotation.Nullable - private String color; - - public CreateTagRequest() {} - - public CreateTagRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the tag. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateTagRequest color(@javax.annotation.Nullable String color) { - this.color = color; - return this; - } - - /** - * Hex color code to be assigned to the tag. For example, #ff78a9. - * - * @return color - */ - @javax.annotation.Nullable - public String getColor() { - return color; - } - - public void setColor(@javax.annotation.Nullable String color) { - this.color = color; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateTagRequest createTagRequest = (CreateTagRequest) o; - return Objects.equals(this.name, createTagRequest.name) - && Objects.equals(this.color, createTagRequest.color); +/** + * CreateTagRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateTagRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_COLOR = "color"; + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public CreateTagRequest() { + } + + public CreateTagRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the tag. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateTagRequest color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(name, color); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateTagRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); + CreateTagRequest createTagRequest = (CreateTagRequest) o; + return Objects.equals(this.name, createTagRequest.name) && + Objects.equals(this.color, createTagRequest.color); + } + + @Override + public int hashCode() { + return Objects.hash(name, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTagRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateTagRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTagRequest is not found in the empty JSON string", CreateTagRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("color"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateTagRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateTagRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateTagRequest is not found in the" - + " empty JSON string", - CreateTagRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateTagRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateTagRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateTagRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTagRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateTagRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateTagRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) - && !jsonObj.get("color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `color` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("color").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateTagRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateTagRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateTagRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateTagRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateTagRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateTagRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateTagRequest - * @throws IOException if the JSON string is invalid with respect to CreateTagRequest - */ - public static CreateTagRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateTagRequest.class); - } - - /** - * Convert an instance of CreateTagRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateTagRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateTagRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateTagRequest + * @throws IOException if the JSON string is invalid with respect to CreateTagRequest + */ + public static CreateTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateTagRequest.class); + } + + /** + * Convert an instance of CreateTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java index bbd009979..31bb49369 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 @@ -4,829 +4,749 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** CreateUserGroupRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateUserGroupRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nonnull - private String displayName; - - public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = - "default_liveboard_identifiers"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) - @javax.annotation.Nullable - private List defaultLiveboardIdentifiers; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DEVELOPER("DEVELOPER"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; - - @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List subGroupIdentifiers; - - /** Group type. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOCAL_GROUP("LOCAL_GROUP"), - - LDAP_GROUP("LDAP_GROUP"), - - TEAM_GROUP("TEAM_GROUP"), - - TENANT_GROUP("TENANT_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type = TypeEnum.LOCAL_GROUP; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - /** - * Visibility of the group. To make a group visible to other users and groups, set the - * visibility to SHAREABLE. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility = VisibilityEnum.SHARABLE; - - public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; - - @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) - @javax.annotation.Nullable - private List roleIdentifiers; - - public CreateUserGroupRequest() {} - - public CreateUserGroupRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the group. The group name must be unique. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateUserGroupRequest displayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Display name for the group. - * - * @return displayName - */ - @javax.annotation.Nonnull - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - } - - public CreateUserGroupRequest defaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - return this; - } - - public CreateUserGroupRequest addDefaultLiveboardIdentifiersItem( - String defaultLiveboardIdentifiersItem) { - if (this.defaultLiveboardIdentifiers == null) { - this.defaultLiveboardIdentifiers = new ArrayList<>(); - } - this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); - return this; - } - - /** - * GUID of the Liveboards to assign as default Liveboards to the users in the group. - * - * @return defaultLiveboardIdentifiers - */ - @javax.annotation.Nullable - public List getDefaultLiveboardIdentifiers() { - return defaultLiveboardIdentifiers; - } - - public void setDefaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - } - - public CreateUserGroupRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the group - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } +import com.thoughtspot.client.JSON; - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; +/** + * CreateUserGroupRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateUserGroupRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = "default_liveboard_identifiers"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_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"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public CreateUserGroupRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public CreateUserGroupRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Privileges to assign to the group - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public CreateUserGroupRequest subGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public CreateUserGroupRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { - if (this.subGroupIdentifiers == null) { - this.subGroupIdentifiers = new ArrayList<>(); - } - this.subGroupIdentifiers.add(subGroupIdentifiersItem); - return this; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - * - * @return subGroupIdentifiers - */ - @javax.annotation.Nullable - public List getSubGroupIdentifiers() { - return subGroupIdentifiers; - } + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; - public void setSubGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - } + /** + * Group type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); - public CreateUserGroupRequest type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } + private String value; - /** - * Group type. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + TypeEnum(String value) { + this.value = value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public String getValue() { + return value; } - public CreateUserGroupRequest userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public CreateUserGroupRequest addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.userIdentifiers.add(userIdentifiersItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * GUID or name of the users to assign to the group. - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } } - public CreateUserGroupRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } + } - /** - * Visibility of the group. To make a group visible to other users and groups, set the - * visibility to SHAREABLE. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; - } + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type = TypeEnum.LOCAL_GROUP; - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; - public CreateUserGroupRequest roleIdentifiers( - @javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - return this; - } + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - public CreateUserGroupRequest addRoleIdentifiersItem(String roleIdentifiersItem) { - if (this.roleIdentifiers == null) { - this.roleIdentifiers = new ArrayList<>(); - } - this.roleIdentifiers.add(roleIdentifiersItem); - return this; - } - - /** - * Role identifiers of the roles that should be assigned to the group. - * - * @return roleIdentifiers - */ - @javax.annotation.Nullable - public List getRoleIdentifiers() { - return roleIdentifiers; - } + private String value; - public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateUserGroupRequest createUserGroupRequest = (CreateUserGroupRequest) o; - return Objects.equals(this.name, createUserGroupRequest.name) - && Objects.equals(this.displayName, createUserGroupRequest.displayName) - && Objects.equals( - this.defaultLiveboardIdentifiers, - createUserGroupRequest.defaultLiveboardIdentifiers) - && Objects.equals(this.description, createUserGroupRequest.description) - && Objects.equals(this.privileges, createUserGroupRequest.privileges) - && Objects.equals( - this.subGroupIdentifiers, createUserGroupRequest.subGroupIdentifiers) - && Objects.equals(this.type, createUserGroupRequest.type) - && Objects.equals(this.userIdentifiers, createUserGroupRequest.userIdentifiers) - && Objects.equals(this.visibility, createUserGroupRequest.visibility) - && Objects.equals(this.roleIdentifiers, createUserGroupRequest.roleIdentifiers); + VisibilityEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - name, - displayName, - defaultLiveboardIdentifiers, - description, - privileges, - subGroupIdentifiers, - type, - userIdentifiers, - visibility, - roleIdentifiers); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateUserGroupRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" defaultLiveboardIdentifiers: ") - .append(toIndentedString(defaultLiveboardIdentifiers)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" subGroupIdentifiers: ") - .append(toIndentedString(subGroupIdentifiers)) - .append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("display_name"); - openapiFields.add("default_liveboard_identifiers"); - openapiFields.add("description"); - openapiFields.add("privileges"); - openapiFields.add("sub_group_identifiers"); - openapiFields.add("type"); - openapiFields.add("user_identifiers"); - openapiFields.add("visibility"); - openapiFields.add("role_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("display_name"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateUserGroupRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateUserGroupRequest is not found" - + " in the empty JSON string", - CreateUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateUserGroupRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateUserGroupRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility = VisibilityEnum.SHARABLE; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public CreateUserGroupRequest() { + } + + public CreateUserGroupRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the group. The group name must be unique. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateUserGroupRequest displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name for the group. + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public CreateUserGroupRequest defaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public CreateUserGroupRequest addDefaultLiveboardIdentifiersItem(String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + + public CreateUserGroupRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateUserGroupRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public CreateUserGroupRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges to assign to the group + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public CreateUserGroupRequest subGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public CreateUserGroupRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + + public CreateUserGroupRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Group type. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public CreateUserGroupRequest userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public CreateUserGroupRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users to assign to the group. + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + + public CreateUserGroupRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public CreateUserGroupRequest roleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public CreateUserGroupRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Role identifiers of the roles that should be assigned to the group. + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserGroupRequest createUserGroupRequest = (CreateUserGroupRequest) o; + return Objects.equals(this.name, createUserGroupRequest.name) && + Objects.equals(this.displayName, createUserGroupRequest.displayName) && + Objects.equals(this.defaultLiveboardIdentifiers, createUserGroupRequest.defaultLiveboardIdentifiers) && + Objects.equals(this.description, createUserGroupRequest.description) && + Objects.equals(this.privileges, createUserGroupRequest.privileges) && + Objects.equals(this.subGroupIdentifiers, createUserGroupRequest.subGroupIdentifiers) && + Objects.equals(this.type, createUserGroupRequest.type) && + Objects.equals(this.userIdentifiers, createUserGroupRequest.userIdentifiers) && + Objects.equals(this.visibility, createUserGroupRequest.visibility) && + Objects.equals(this.roleIdentifiers, createUserGroupRequest.roleIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(name, displayName, defaultLiveboardIdentifiers, description, privileges, subGroupIdentifiers, type, userIdentifiers, visibility, roleIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserGroupRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" defaultLiveboardIdentifiers: ").append(toIndentedString(defaultLiveboardIdentifiers)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ").append(toIndentedString(subGroupIdentifiers)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("role_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("display_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateUserGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateUserGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateUserGroupRequest is not found in the empty JSON string", CreateUserGroupRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateUserGroupRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateUserGroupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateUserGroupRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("default_liveboard_identifiers") != null - && !jsonObj.get("default_liveboard_identifiers").isJsonNull() - && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_liveboard_identifiers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("default_liveboard_identifiers").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("sub_group_identifiers") != null - && !jsonObj.get("sub_group_identifiers").isJsonNull() - && !jsonObj.get("sub_group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sub_group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("sub_group_identifiers").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("role_identifiers") != null - && !jsonObj.get("role_identifiers").isJsonNull() - && !jsonObj.get("role_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `role_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("role_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateUserGroupRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to CreateUserGroupRequest - */ - public static CreateUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateUserGroupRequest.class); - } - - /** - * Convert an instance of CreateUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null && !jsonObj.get("default_liveboard_identifiers").isJsonNull() && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `default_liveboard_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null && !jsonObj.get("sub_group_identifiers").isJsonNull() && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null && !jsonObj.get("role_identifiers").isJsonNull() && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `role_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("role_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateUserGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateUserGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateUserGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateUserGroupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateUserGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateUserGroupRequest + * @throws IOException if the JSON string is invalid with respect to CreateUserGroupRequest + */ + public static CreateUserGroupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateUserGroupRequest.class); + } + + /** + * Convert an instance of CreateUserGroupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java index c417b8a65..e5835ed9d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java @@ -4,1217 +4,1066 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CreateUserRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateUserRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nonnull - private String displayName; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nonnull - private String email; - - /** Type of the account. */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - LOCAL_USER("LOCAL_USER"), - - LDAP_USER("LDAP_USER"), - - SAML_USER("SAML_USER"), - - OIDC_USER("OIDC_USER"), - - REMOTE_USER("REMOTE_USER"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - @javax.annotation.Nullable - private AccountTypeEnum accountType = AccountTypeEnum.LOCAL_USER; - - /** - * Current status of the user account. The `SUSPENDED` user state indicates a - * transitional state applicable to IAMv2 users only. - */ - @JsonAdapter(AccountStatusEnum.Adapter.class) - public enum AccountStatusEnum { - ACTIVE("ACTIVE"), - - INACTIVE("INACTIVE"), - - EXPIRED("EXPIRED"), - - LOCKED("LOCKED"), - - PENDING("PENDING"), - - SUSPENDED("SUSPENDED"); - - private String value; - - AccountStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountStatusEnum fromValue(String value) { - for (AccountStatusEnum b : AccountStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) - @javax.annotation.Nullable - private AccountStatusEnum accountStatus = AccountStatusEnum.ACTIVE; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups - * when they try to share an object. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility = VisibilityEnum.SHARABLE; - - public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; - - @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) - @javax.annotation.Nullable - private Boolean notifyOnShare = true; - - public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = - "show_onboarding_experience"; - - @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) - @javax.annotation.Nullable - private Boolean showOnboardingExperience = true; - - public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = - "onboarding_experience_completed"; - - @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) - @javax.annotation.Nullable - private Boolean onboardingExperienceCompleted = false; - - public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = - "home_liveboard_identifier"; - - @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) - @javax.annotation.Nullable - private String homeLiveboardIdentifier; - - public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; - - @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) - @javax.annotation.Nullable - private List favoriteMetadata; - - /** Locale for the user. */ - @JsonAdapter(PreferredLocaleEnum.Adapter.class) - public enum PreferredLocaleEnum { - EN_CA("en-CA"), - - EN_GB("en-GB"), - - EN_US("en-US"), - - DE_DE("de-DE"), - - JA_JP("ja-JP"), - - ZH_CN("zh-CN"), - - PT_BR("pt-BR"), - - FR_FR("fr-FR"), - - FR_CA("fr-CA"), - - ES_US("es-US"), - - DA_DK("da-DK"), - - ES_ES("es-ES"), - - FI_FI("fi-FI"), - - SV_SE("sv-SE"), - - NB_NO("nb-NO"), - - PT_PT("pt-PT"), - - NL_NL("nl-NL"), - - IT_IT("it-IT"), - - RU_RU("ru-RU"), - - EN_IN("en-IN"), - - DE_CH("de-CH"), - - EN_NZ("en-NZ"), - - ES_MX("es-MX"), - - EN_AU("en-AU"), - - ZH_HANT("zh-Hant"), - - KO_KR("ko-KR"), - - EN_DE("en-DE"); - - private String value; - - PreferredLocaleEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PreferredLocaleEnum fromValue(String value) { - for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PreferredLocaleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PreferredLocaleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; - - @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) - @javax.annotation.Nullable - private PreferredLocaleEnum preferredLocale; - - public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; - - @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) - @javax.annotation.Nullable - private Object extendedProperties; - - public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; - - @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) - @javax.annotation.Nullable - private Object extendedPreferences; - - public static final String SERIALIZED_NAME_TRIGGER_WELCOME_EMAIL = "trigger_welcome_email"; - - @SerializedName(SERIALIZED_NAME_TRIGGER_WELCOME_EMAIL) - @javax.annotation.Nullable - private Boolean triggerWelcomeEmail; - - public static final String SERIALIZED_NAME_TRIGGER_ACTIVATION_EMAIL = - "trigger_activation_email"; - - @SerializedName(SERIALIZED_NAME_TRIGGER_ACTIVATION_EMAIL) - @javax.annotation.Nullable - private Boolean triggerActivationEmail; - - public CreateUserRequest() {} - - public CreateUserRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the user. The username string must be unique. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public CreateUserRequest displayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - return this; - } - - /** - * A unique display name string for the user account, usually their first and last name - * - * @return displayName - */ - @javax.annotation.Nonnull - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - } - - public CreateUserRequest password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password for the user account. For IAMv2 users, you must set this password if you do not want - * to trigger an activation email. - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public CreateUserRequest email(@javax.annotation.Nonnull String email) { - this.email = email; - return this; - } - - /** - * Email of the user account - * - * @return email - */ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nonnull String email) { - this.email = email; - } - - public CreateUserRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Type of the account. - * - * @return accountType - */ - @javax.annotation.Nullable - public AccountTypeEnum getAccountType() { - return accountType; - } +/** + * CreateUserRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; - public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; - public CreateUserRequest accountStatus( - @javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - return this; - } + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; - /** - * Current status of the user account. The `SUSPENDED` user state indicates a - * transitional state applicable to IAMv2 users only. - * - * @return accountStatus - */ - @javax.annotation.Nullable - public AccountStatusEnum getAccountStatus() { - return accountStatus; - } + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; - public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - } + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nonnull + private String email; - public CreateUserRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; - } + /** + * Type of the account. + */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); - public CreateUserRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } + private String value; - /** - * List of Org IDs to which the user belongs. - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; + AccountTypeEnum(String value) { + this.value = value; } - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; + public String getValue() { + return value; } - public CreateUserRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public CreateUserRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } - - /** - * GUIDs or names of the groups to which the newly created user belongs. - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; - } - - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - } - - public CreateUserRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups - * when they try to share an object. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } - - public CreateUserRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a - * metadata object such as Answer, Liveboard, or Worksheet. - * - * @return notifyOnShare - */ - @javax.annotation.Nullable - public Boolean getNotifyOnShare() { - return notifyOnShare; - } - - public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } - - public CreateUserRequest showOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * The user preference for revisiting the onboarding experience. - * - * @return showOnboardingExperience - */ - @javax.annotation.Nullable - public Boolean getShowOnboardingExperience() { - return showOnboardingExperience; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setShowOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } } - public CreateUserRequest onboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); } + } - /** - * flag to get the on-boarding experience is completed or not. - * - * @return onboardingExperienceCompleted - */ - @javax.annotation.Nullable - public Boolean getOnboardingExperienceCompleted() { - return onboardingExperienceCompleted; - } + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType = AccountTypeEnum.LOCAL_USER; - public void setOnboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - } + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); - public CreateUserRequest homeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; - return this; - } + private String value; - /** - * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this - * Liveboard on the Home page when the user logs in. - * - * @return homeLiveboardIdentifier - */ - @javax.annotation.Nullable - public String getHomeLiveboardIdentifier() { - return homeLiveboardIdentifier; + AccountStatusEnum(String value) { + this.value = value; } - public void setHomeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; + public String getValue() { + return value; } - public CreateUserRequest favoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public CreateUserRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { - if (this.favoriteMetadata == null) { - this.favoriteMetadata = new ArrayList<>(); + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.favoriteMetadata.add(favoriteMetadataItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Metadata objects to add to the user's favorites list. - * - * @return favoriteMetadata - */ - @javax.annotation.Nullable - public List getFavoriteMetadata() { - return favoriteMetadata; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setFavoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } } - public CreateUserRequest preferredLocale( - @javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } - - /** - * Locale for the user. - * - * @return preferredLocale - */ - @javax.annotation.Nullable - public PreferredLocaleEnum getPreferredLocale() { - return preferredLocale; - } - - public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { - this.preferredLocale = preferredLocale; - } - - public CreateUserRequest extendedProperties( - @javax.annotation.Nullable Object extendedProperties) { - this.extendedProperties = extendedProperties; - return this; - } - - /** - * Properties for the user - * - * @return extendedProperties - */ - @javax.annotation.Nullable - public Object getExtendedProperties() { - return extendedProperties; - } - - public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { - this.extendedProperties = extendedProperties; - } - - public CreateUserRequest extendedPreferences( - @javax.annotation.Nullable Object extendedPreferences) { - this.extendedPreferences = extendedPreferences; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); } + } - /** - * Preferences for the user - * - * @return extendedPreferences - */ - @javax.annotation.Nullable - public Object getExtendedPreferences() { - return extendedPreferences; - } + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus = AccountStatusEnum.ACTIVE; - public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { - this.extendedPreferences = extendedPreferences; - } + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; - public CreateUserRequest triggerWelcomeEmail( - @javax.annotation.Nullable Boolean triggerWelcomeEmail) { - this.triggerWelcomeEmail = triggerWelcomeEmail; - return this; - } + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; - /** - * Flag to indicate whether welcome email should be sent to user. This parameter is applied only - * on clusters on which IAM is disabled. - * - * @return triggerWelcomeEmail - */ - @javax.annotation.Nullable - public Boolean getTriggerWelcomeEmail() { - return triggerWelcomeEmail; - } + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - public void setTriggerWelcomeEmail(@javax.annotation.Nullable Boolean triggerWelcomeEmail) { - this.triggerWelcomeEmail = triggerWelcomeEmail; - } + private String value; - public CreateUserRequest triggerActivationEmail( - @javax.annotation.Nullable Boolean triggerActivationEmail) { - this.triggerActivationEmail = triggerActivationEmail; - return this; + VisibilityEnum(String value) { + this.value = value; } - /** - * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 - * users is set to true. Users must either set this to false, or enter a valid password if they - * do not want to trigger an activation email. - * - * @return triggerActivationEmail - */ - @javax.annotation.Nullable - public Boolean getTriggerActivationEmail() { - return triggerActivationEmail; + public String getValue() { + return value; } - public void setTriggerActivationEmail( - @javax.annotation.Nullable Boolean triggerActivationEmail) { - this.triggerActivationEmail = triggerActivationEmail; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateUserRequest createUserRequest = (CreateUserRequest) o; - return Objects.equals(this.name, createUserRequest.name) - && Objects.equals(this.displayName, createUserRequest.displayName) - && Objects.equals(this.password, createUserRequest.password) - && Objects.equals(this.email, createUserRequest.email) - && Objects.equals(this.accountType, createUserRequest.accountType) - && Objects.equals(this.accountStatus, createUserRequest.accountStatus) - && Objects.equals(this.orgIdentifiers, createUserRequest.orgIdentifiers) - && Objects.equals(this.groupIdentifiers, createUserRequest.groupIdentifiers) - && Objects.equals(this.visibility, createUserRequest.visibility) - && Objects.equals(this.notifyOnShare, createUserRequest.notifyOnShare) - && Objects.equals( - this.showOnboardingExperience, createUserRequest.showOnboardingExperience) - && Objects.equals( - this.onboardingExperienceCompleted, - createUserRequest.onboardingExperienceCompleted) - && Objects.equals( - this.homeLiveboardIdentifier, createUserRequest.homeLiveboardIdentifier) - && Objects.equals(this.favoriteMetadata, createUserRequest.favoriteMetadata) - && Objects.equals(this.preferredLocale, createUserRequest.preferredLocale) - && Objects.equals(this.extendedProperties, createUserRequest.extendedProperties) - && Objects.equals(this.extendedPreferences, createUserRequest.extendedPreferences) - && Objects.equals(this.triggerWelcomeEmail, createUserRequest.triggerWelcomeEmail) - && Objects.equals( - this.triggerActivationEmail, createUserRequest.triggerActivationEmail); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - @Override - public int hashCode() { - return Objects.hash( - name, - displayName, - password, - email, - accountType, - accountStatus, - orgIdentifiers, - groupIdentifiers, - visibility, - notifyOnShare, - showOnboardingExperience, - onboardingExperienceCompleted, - homeLiveboardIdentifier, - favoriteMetadata, - preferredLocale, - extendedProperties, - extendedPreferences, - triggerWelcomeEmail, - triggerActivationEmail); + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility = VisibilityEnum.SHARABLE; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare = true; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = "show_onboarding_experience"; + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience = true; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = "onboarding_experience_completed"; + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted = false; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = "home_liveboard_identifier"; + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + /** + * Locale for the user. + */ + @JsonAdapter(PreferredLocaleEnum.Adapter.class) + public enum PreferredLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + PreferredLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateUserRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); - sb.append(" showOnboardingExperience: ") - .append(toIndentedString(showOnboardingExperience)) - .append("\n"); - sb.append(" onboardingExperienceCompleted: ") - .append(toIndentedString(onboardingExperienceCompleted)) - .append("\n"); - sb.append(" homeLiveboardIdentifier: ") - .append(toIndentedString(homeLiveboardIdentifier)) - .append("\n"); - sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); - sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); - sb.append(" extendedProperties: ") - .append(toIndentedString(extendedProperties)) - .append("\n"); - sb.append(" extendedPreferences: ") - .append(toIndentedString(extendedPreferences)) - .append("\n"); - sb.append(" triggerWelcomeEmail: ") - .append(toIndentedString(triggerWelcomeEmail)) - .append("\n"); - sb.append(" triggerActivationEmail: ") - .append(toIndentedString(triggerActivationEmail)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PreferredLocaleEnum fromValue(String value) { + for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("display_name"); - openapiFields.add("password"); - openapiFields.add("email"); - openapiFields.add("account_type"); - openapiFields.add("account_status"); - openapiFields.add("org_identifiers"); - openapiFields.add("group_identifiers"); - openapiFields.add("visibility"); - openapiFields.add("notify_on_share"); - openapiFields.add("show_onboarding_experience"); - openapiFields.add("onboarding_experience_completed"); - openapiFields.add("home_liveboard_identifier"); - openapiFields.add("favorite_metadata"); - openapiFields.add("preferred_locale"); - openapiFields.add("extended_properties"); - openapiFields.add("extended_preferences"); - openapiFields.add("trigger_welcome_email"); - openapiFields.add("trigger_activation_email"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("display_name"); - openapiRequiredFields.add("email"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PreferredLocaleEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateUserRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateUserRequest is not found in the" - + " empty JSON string", - CreateUserRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PreferredLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private PreferredLocaleEnum preferredLocale; + + public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) + @javax.annotation.Nullable + private Object extendedProperties; + + public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) + @javax.annotation.Nullable + private Object extendedPreferences; + + public static final String SERIALIZED_NAME_TRIGGER_WELCOME_EMAIL = "trigger_welcome_email"; + @SerializedName(SERIALIZED_NAME_TRIGGER_WELCOME_EMAIL) + @javax.annotation.Nullable + private Boolean triggerWelcomeEmail; + + public static final String SERIALIZED_NAME_TRIGGER_ACTIVATION_EMAIL = "trigger_activation_email"; + @SerializedName(SERIALIZED_NAME_TRIGGER_ACTIVATION_EMAIL) + @javax.annotation.Nullable + private Boolean triggerActivationEmail; + + public CreateUserRequest() { + } + + public CreateUserRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. The username string must be unique. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateUserRequest displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A unique display name string for the user account, usually their first and last name + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public CreateUserRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public CreateUserRequest email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Email of the user account + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + + public CreateUserRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the account. + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public CreateUserRequest accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + + public CreateUserRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public CreateUserRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * List of Org IDs to which the user belongs. + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public CreateUserRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public CreateUserRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the groups to which the newly created user belongs. + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public CreateUserRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public CreateUserRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + + public CreateUserRequest showOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * The user preference for revisiting the onboarding experience. + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + + public CreateUserRequest onboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * flag to get the on-boarding experience is completed or not. + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + + public CreateUserRequest homeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + + public CreateUserRequest favoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public CreateUserRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the user's favorites list. + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + + public CreateUserRequest preferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. + * @return preferredLocale + */ + @javax.annotation.Nullable + public PreferredLocaleEnum getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + } + + + public CreateUserRequest extendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Properties for the user + * @return extendedProperties + */ + @javax.annotation.Nullable + public Object getExtendedProperties() { + return extendedProperties; + } + + public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + } + + + public CreateUserRequest extendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + return this; + } + + /** + * Preferences for the user + * @return extendedPreferences + */ + @javax.annotation.Nullable + public Object getExtendedPreferences() { + return extendedPreferences; + } + + public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + } + + + public CreateUserRequest triggerWelcomeEmail(@javax.annotation.Nullable Boolean triggerWelcomeEmail) { + this.triggerWelcomeEmail = triggerWelcomeEmail; + return this; + } + + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. + * @return triggerWelcomeEmail + */ + @javax.annotation.Nullable + public Boolean getTriggerWelcomeEmail() { + return triggerWelcomeEmail; + } + + public void setTriggerWelcomeEmail(@javax.annotation.Nullable Boolean triggerWelcomeEmail) { + this.triggerWelcomeEmail = triggerWelcomeEmail; + } + + + public CreateUserRequest triggerActivationEmail(@javax.annotation.Nullable Boolean triggerActivationEmail) { + this.triggerActivationEmail = triggerActivationEmail; + return this; + } + + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. + * @return triggerActivationEmail + */ + @javax.annotation.Nullable + public Boolean getTriggerActivationEmail() { + return triggerActivationEmail; + } + + public void setTriggerActivationEmail(@javax.annotation.Nullable Boolean triggerActivationEmail) { + this.triggerActivationEmail = triggerActivationEmail; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserRequest createUserRequest = (CreateUserRequest) o; + return Objects.equals(this.name, createUserRequest.name) && + Objects.equals(this.displayName, createUserRequest.displayName) && + Objects.equals(this.password, createUserRequest.password) && + Objects.equals(this.email, createUserRequest.email) && + Objects.equals(this.accountType, createUserRequest.accountType) && + Objects.equals(this.accountStatus, createUserRequest.accountStatus) && + Objects.equals(this.orgIdentifiers, createUserRequest.orgIdentifiers) && + Objects.equals(this.groupIdentifiers, createUserRequest.groupIdentifiers) && + Objects.equals(this.visibility, createUserRequest.visibility) && + Objects.equals(this.notifyOnShare, createUserRequest.notifyOnShare) && + Objects.equals(this.showOnboardingExperience, createUserRequest.showOnboardingExperience) && + Objects.equals(this.onboardingExperienceCompleted, createUserRequest.onboardingExperienceCompleted) && + Objects.equals(this.homeLiveboardIdentifier, createUserRequest.homeLiveboardIdentifier) && + Objects.equals(this.favoriteMetadata, createUserRequest.favoriteMetadata) && + Objects.equals(this.preferredLocale, createUserRequest.preferredLocale) && + Objects.equals(this.extendedProperties, createUserRequest.extendedProperties) && + Objects.equals(this.extendedPreferences, createUserRequest.extendedPreferences) && + Objects.equals(this.triggerWelcomeEmail, createUserRequest.triggerWelcomeEmail) && + Objects.equals(this.triggerActivationEmail, createUserRequest.triggerActivationEmail); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, displayName, password, email, accountType, accountStatus, orgIdentifiers, groupIdentifiers, visibility, notifyOnShare, showOnboardingExperience, onboardingExperienceCompleted, homeLiveboardIdentifier, favoriteMetadata, preferredLocale, extendedProperties, extendedPreferences, triggerWelcomeEmail, triggerActivationEmail); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ").append(toIndentedString(showOnboardingExperience)).append("\n"); + sb.append(" onboardingExperienceCompleted: ").append(toIndentedString(onboardingExperienceCompleted)).append("\n"); + sb.append(" homeLiveboardIdentifier: ").append(toIndentedString(homeLiveboardIdentifier)).append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" extendedProperties: ").append(toIndentedString(extendedProperties)).append("\n"); + sb.append(" extendedPreferences: ").append(toIndentedString(extendedPreferences)).append("\n"); + sb.append(" triggerWelcomeEmail: ").append(toIndentedString(triggerWelcomeEmail)).append("\n"); + sb.append(" triggerActivationEmail: ").append(toIndentedString(triggerActivationEmail)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("password"); + openapiFields.add("email"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("org_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("preferred_locale"); + openapiFields.add("extended_properties"); + openapiFields.add("extended_preferences"); + openapiFields.add("trigger_welcome_email"); + openapiFields.add("trigger_activation_email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("email"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateUserRequest is not found in the empty JSON string", CreateUserRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateUserRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateUserRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateUserRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateUserRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateUserRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) - && !jsonObj.get("account_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_type").toString())); - } - // validate the optional field `account_type` - if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { - AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); - } - if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) - && !jsonObj.get("account_status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_status` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("account_status").toString())); - } - // validate the optional field `account_status` - if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { - AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("home_liveboard_identifier") != null && !jsonObj.get("home_liveboard_identifier").isJsonNull()) && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `home_liveboard_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `favorite_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + }; } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - if ((jsonObj.get("home_liveboard_identifier") != null - && !jsonObj.get("home_liveboard_identifier").isJsonNull()) - && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `home_liveboard_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("home_liveboard_identifier").toString())); - } - if (jsonObj.get("favorite_metadata") != null - && !jsonObj.get("favorite_metadata").isJsonNull()) { - JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); - if (jsonArrayfavoriteMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("favorite_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `favorite_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("favorite_metadata").toString())); - } - - // validate the optional field `favorite_metadata` (array) - for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { - FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); - } - ; - } - } - if ((jsonObj.get("preferred_locale") != null - && !jsonObj.get("preferred_locale").isJsonNull()) - && !jsonObj.get("preferred_locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `preferred_locale` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("preferred_locale").toString())); - } - // validate the optional field `preferred_locale` - if (jsonObj.get("preferred_locale") != null - && !jsonObj.get("preferred_locale").isJsonNull()) { - PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateUserRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateUserRequest - * @throws IOException if the JSON string is invalid with respect to CreateUserRequest - */ - public static CreateUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateUserRequest.class); - } - - /** - * Convert an instance of CreateUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + if ((jsonObj.get("preferred_locale") != null && !jsonObj.get("preferred_locale").isJsonNull()) && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `preferred_locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("preferred_locale").toString())); + } + // validate the optional field `preferred_locale` + if (jsonObj.get("preferred_locale") != null && !jsonObj.get("preferred_locale").isJsonNull()) { + PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateUserRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateUserRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateUserRequest + * @throws IOException if the JSON string is invalid with respect to CreateUserRequest + */ + public static CreateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateUserRequest.class); + } + + /** + * Convert an instance of CreateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java index 13346e1bb..e7c39db5e 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 @@ -4,400 +4,425 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** CreateVariableRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CreateVariableRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of variable */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CONNECTION_PROPERTY("CONNECTION_PROPERTY"), - - TABLE_MAPPING("TABLE_MAPPING"), - - CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private TypeEnum type; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_SENSITIVE = "sensitive"; - - @SerializedName(SERIALIZED_NAME_SENSITIVE) - @javax.annotation.Nullable - private Boolean sensitive = false; - - public static final String SERIALIZED_NAME_VALUES = "values"; - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nullable - private List values; - - public CreateVariableRequest() {} - - public CreateVariableRequest type(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of variable - * - * @return type - */ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - } - - public CreateVariableRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Name of the variable. This is unique across the cluster. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; +/** + * CreateVariableRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateVariableRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of variable + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CONNECTION_PROPERTY("CONNECTION_PROPERTY"), + + TABLE_MAPPING("TABLE_MAPPING"), + + CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; + public String getValue() { + return value; } - public CreateVariableRequest sensitive(@javax.annotation.Nullable Boolean sensitive) { - this.sensitive = sensitive; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * If the variable contains sensitive values like passwords - * - * @return sensitive - */ - @javax.annotation.Nullable - public Boolean getSensitive() { - return sensitive; + 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 void setSensitive(@javax.annotation.Nullable Boolean sensitive) { - this.sensitive = sensitive; + 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 CreateVariableRequest values( - @javax.annotation.Nullable List values) { - this.values = values; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - public CreateVariableRequest addValuesItem(InputVariableValue valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_IS_SENSITIVE = "is_sensitive"; + @SerializedName(SERIALIZED_NAME_IS_SENSITIVE) + @javax.annotation.Nullable + private Boolean isSensitive = false; + + /** + * Variable Data Type + */ + @JsonAdapter(DataTypeEnum.Adapter.class) + public enum DataTypeEnum { + VARCHAR("VARCHAR"), + + INT32("INT32"), + + INT64("INT64"), + + DOUBLE("DOUBLE"), + + DATE("DATE"), + + DATE_TIME("DATE_TIME"); + + private String value; + + DataTypeEnum(String value) { + this.value = value; } - /** - * Values of variable - * - * @return values - */ - @javax.annotation.Nullable - public List getValues() { - return values; + public String getValue() { + return value; } - public void setValues(@javax.annotation.Nullable List values) { - this.values = values; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static DataTypeEnum fromValue(String value) { + for (DataTypeEnum b : DataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateVariableRequest createVariableRequest = (CreateVariableRequest) o; - return Objects.equals(this.type, createVariableRequest.type) - && Objects.equals(this.name, createVariableRequest.name) - && Objects.equals(this.sensitive, createVariableRequest.sensitive) - && Objects.equals(this.values, createVariableRequest.values); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, name, sensitive, values); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_DATA_TYPE = "data_type"; + @SerializedName(SERIALIZED_NAME_DATA_TYPE) + @javax.annotation.Nullable + private DataTypeEnum dataType; + + public CreateVariableRequest() { + } + + public CreateVariableRequest type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of variable + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public CreateVariableRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the variable. This is unique across the cluster. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateVariableRequest isSensitive(@javax.annotation.Nullable Boolean isSensitive) { + this.isSensitive = isSensitive; + return this; + } + + /** + * If the variable contains sensitive values like passwords + * @return isSensitive + */ + @javax.annotation.Nullable + public Boolean getIsSensitive() { + return isSensitive; + } + + public void setIsSensitive(@javax.annotation.Nullable Boolean isSensitive) { + this.isSensitive = isSensitive; + } + + + public CreateVariableRequest dataType(@javax.annotation.Nullable DataTypeEnum dataType) { + this.dataType = dataType; + return this; + } + + /** + * Variable Data Type + * @return dataType + */ + @javax.annotation.Nullable + public DataTypeEnum getDataType() { + return dataType; + } + + public void setDataType(@javax.annotation.Nullable DataTypeEnum dataType) { + this.dataType = dataType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateVariableRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" sensitive: ").append(toIndentedString(sensitive)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CreateVariableRequest createVariableRequest = (CreateVariableRequest) o; + return Objects.equals(this.type, createVariableRequest.type) && + Objects.equals(this.name, createVariableRequest.name) && + Objects.equals(this.isSensitive, createVariableRequest.isSensitive) && + Objects.equals(this.dataType, createVariableRequest.dataType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, isSensitive, dataType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("name"); - openapiFields.add("sensitive"); - openapiFields.add("values"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("name"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateVariableRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isSensitive: ").append(toIndentedString(isSensitive)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateVariableRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateVariableRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CreateVariableRequest is not found in" - + " the empty JSON string", - CreateVariableRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("name"); + openapiFields.add("is_sensitive"); + openapiFields.add("data_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateVariableRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateVariableRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateVariableRequest is not found in the empty JSON string", CreateVariableRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateVariableRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CreateVariableRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateVariableRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateVariableRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateVariableRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateVariableRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (jsonObj.get("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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateVariableRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateVariableRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateVariableRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateVariableRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateVariableRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CreateVariableRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVariableRequest - * @throws IOException if the JSON string is invalid with respect to CreateVariableRequest - */ - public static CreateVariableRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateVariableRequest.class); - } - - /** - * Convert an instance of CreateVariableRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("data_type") != null && !jsonObj.get("data_type").isJsonNull()) && !jsonObj.get("data_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_type").toString())); + } + // validate the optional field `data_type` + if (jsonObj.get("data_type") != null && !jsonObj.get("data_type").isJsonNull()) { + DataTypeEnum.validateJsonElement(jsonObj.get("data_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateVariableRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateVariableRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateVariableRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateVariableRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateVariableRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CreateVariableRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateVariableRequest + * @throws IOException if the JSON string is invalid with respect to CreateVariableRequest + */ + public static CreateVariableRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateVariableRequest.class); + } + + /** + * Convert an instance of CreateVariableRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java new file mode 100644 index 000000000..56891e5d8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java @@ -0,0 +1,454 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthenticationInput; +import com.thoughtspot.client.model.WebhookSignatureVerificationInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/CronExpression.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpression.java index 2570f570d..f0a5ec843 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpression.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpression.java @@ -4,382 +4,360 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Schedule selected cron expression. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CronExpression implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; - - @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) - @javax.annotation.Nonnull - private String dayOfMonth; - - public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; - - @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) - @javax.annotation.Nonnull - private String dayOfWeek; - - public static final String SERIALIZED_NAME_HOUR = "hour"; - - @SerializedName(SERIALIZED_NAME_HOUR) - @javax.annotation.Nonnull - private String hour; - - public static final String SERIALIZED_NAME_MINUTE = "minute"; - - @SerializedName(SERIALIZED_NAME_MINUTE) - @javax.annotation.Nonnull - private String minute; - - public static final String SERIALIZED_NAME_MONTH = "month"; - - @SerializedName(SERIALIZED_NAME_MONTH) - @javax.annotation.Nonnull - private String month; - - public static final String SERIALIZED_NAME_SECOND = "second"; - - @SerializedName(SERIALIZED_NAME_SECOND) - @javax.annotation.Nonnull - private String second; - - public CronExpression() {} - - public CronExpression dayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { - this.dayOfMonth = dayOfMonth; - return this; - } - - /** - * Day of month of the object. - * - * @return dayOfMonth - */ - @javax.annotation.Nonnull - public String getDayOfMonth() { - return dayOfMonth; - } - - public void setDayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { - this.dayOfMonth = dayOfMonth; - } - - public CronExpression dayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Day of Week of the object. - * - * @return dayOfWeek - */ - @javax.annotation.Nonnull - public String getDayOfWeek() { - return dayOfWeek; - } - - public void setDayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - public CronExpression hour(@javax.annotation.Nonnull String hour) { - this.hour = hour; - return this; - } - - /** - * Hour of the object. - * - * @return hour - */ - @javax.annotation.Nonnull - public String getHour() { - return hour; - } - - public void setHour(@javax.annotation.Nonnull String hour) { - this.hour = hour; - } - - public CronExpression minute(@javax.annotation.Nonnull String minute) { - this.minute = minute; - return this; - } - - /** - * Minute of the object. - * - * @return minute - */ - @javax.annotation.Nonnull - public String getMinute() { - return minute; - } - - public void setMinute(@javax.annotation.Nonnull String minute) { - this.minute = minute; - } - - public CronExpression month(@javax.annotation.Nonnull String month) { - this.month = month; - return this; - } - - /** - * Month of the object. - * - * @return month - */ - @javax.annotation.Nonnull - public String getMonth() { - return month; - } - - public void setMonth(@javax.annotation.Nonnull String month) { - this.month = month; - } - - public CronExpression second(@javax.annotation.Nonnull String second) { - this.second = second; - return this; - } - - /** - * Second of the object. - * - * @return second - */ - @javax.annotation.Nonnull - public String getSecond() { - return second; - } - - public void setSecond(@javax.annotation.Nonnull String second) { - this.second = second; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CronExpression cronExpression = (CronExpression) o; - return Objects.equals(this.dayOfMonth, cronExpression.dayOfMonth) - && Objects.equals(this.dayOfWeek, cronExpression.dayOfWeek) - && Objects.equals(this.hour, cronExpression.hour) - && Objects.equals(this.minute, cronExpression.minute) - && Objects.equals(this.month, cronExpression.month) - && Objects.equals(this.second, cronExpression.second); - } - - @Override - public int hashCode() { - return Objects.hash(dayOfMonth, dayOfWeek, hour, minute, month, second); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CronExpression {\n"); - sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); - sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); - sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); - sb.append(" month: ").append(toIndentedString(month)).append("\n"); - sb.append(" second: ").append(toIndentedString(second)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Schedule selected cron expression. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CronExpression implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; + @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) + @javax.annotation.Nonnull + private String dayOfMonth; + + public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; + @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) + @javax.annotation.Nonnull + private String dayOfWeek; + + public static final String SERIALIZED_NAME_HOUR = "hour"; + @SerializedName(SERIALIZED_NAME_HOUR) + @javax.annotation.Nonnull + private String hour; + + public static final String SERIALIZED_NAME_MINUTE = "minute"; + @SerializedName(SERIALIZED_NAME_MINUTE) + @javax.annotation.Nonnull + private String minute; + + public static final String SERIALIZED_NAME_MONTH = "month"; + @SerializedName(SERIALIZED_NAME_MONTH) + @javax.annotation.Nonnull + private String month; + + public static final String SERIALIZED_NAME_SECOND = "second"; + @SerializedName(SERIALIZED_NAME_SECOND) + @javax.annotation.Nonnull + private String second; + + public CronExpression() { + } + + public CronExpression dayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Day of month of the object. + * @return dayOfMonth + */ + @javax.annotation.Nonnull + public String getDayOfMonth() { + return dayOfMonth; + } + + public void setDayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + + public CronExpression dayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Day of Week of the object. + * @return dayOfWeek + */ + @javax.annotation.Nonnull + public String getDayOfWeek() { + return dayOfWeek; + } + + public void setDayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + } + + + public CronExpression hour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + return this; + } + + /** + * Hour of the object. + * @return hour + */ + @javax.annotation.Nonnull + public String getHour() { + return hour; + } + + public void setHour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + } + + + public CronExpression minute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + return this; + } + + /** + * Minute of the object. + * @return minute + */ + @javax.annotation.Nonnull + public String getMinute() { + return minute; + } + + public void setMinute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + } + + + public CronExpression month(@javax.annotation.Nonnull String month) { + this.month = month; + return this; + } + + /** + * Month of the object. + * @return month + */ + @javax.annotation.Nonnull + public String getMonth() { + return month; + } + + public void setMonth(@javax.annotation.Nonnull String month) { + this.month = month; + } + + + public CronExpression second(@javax.annotation.Nonnull String second) { + this.second = second; + return this; + } + + /** + * Second of the object. + * @return second + */ + @javax.annotation.Nonnull + public String getSecond() { + return second; + } + + public void setSecond(@javax.annotation.Nonnull String second) { + this.second = second; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("day_of_month"); - openapiFields.add("day_of_week"); - openapiFields.add("hour"); - openapiFields.add("minute"); - openapiFields.add("month"); - openapiFields.add("second"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("day_of_month"); - openapiRequiredFields.add("day_of_week"); - openapiRequiredFields.add("hour"); - openapiRequiredFields.add("minute"); - openapiRequiredFields.add("month"); - openapiRequiredFields.add("second"); + CronExpression cronExpression = (CronExpression) o; + return Objects.equals(this.dayOfMonth, cronExpression.dayOfMonth) && + Objects.equals(this.dayOfWeek, cronExpression.dayOfWeek) && + Objects.equals(this.hour, cronExpression.hour) && + Objects.equals(this.minute, cronExpression.minute) && + Objects.equals(this.month, cronExpression.month) && + Objects.equals(this.second, cronExpression.second); + } + + @Override + public int hashCode() { + return Objects.hash(dayOfMonth, dayOfWeek, hour, minute, month, second); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CronExpression {\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append(" second: ").append(toIndentedString(second)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CronExpression - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CronExpression.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CronExpression is not found in the" - + " empty JSON string", - CronExpression.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("day_of_month"); + openapiFields.add("day_of_week"); + openapiFields.add("hour"); + openapiFields.add("minute"); + openapiFields.add("month"); + openapiFields.add("second"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("day_of_month"); + openapiRequiredFields.add("day_of_week"); + openapiRequiredFields.add("hour"); + openapiRequiredFields.add("minute"); + openapiRequiredFields.add("month"); + openapiRequiredFields.add("second"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CronExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CronExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CronExpression is not found in the empty JSON string", CronExpression.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CronExpression.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CronExpression` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CronExpression.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CronExpression` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CronExpression.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CronExpression.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("day_of_month").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `day_of_month` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("day_of_month").toString())); - } - if (!jsonObj.get("day_of_week").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `day_of_week` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("day_of_week").toString())); - } - if (!jsonObj.get("hour").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `hour` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("hour").toString())); - } - if (!jsonObj.get("minute").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minute` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("minute").toString())); - } - if (!jsonObj.get("month").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `month` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("month").toString())); - } - if (!jsonObj.get("second").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `second` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("second").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CronExpression.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CronExpression' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CronExpression.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CronExpression value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CronExpression read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CronExpression given an JSON string - * - * @param jsonString JSON string - * @return An instance of CronExpression - * @throws IOException if the JSON string is invalid with respect to CronExpression - */ - public static CronExpression fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CronExpression.class); - } - - /** - * Convert an instance of CronExpression to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("day_of_month").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `day_of_month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day_of_month").toString())); + } + if (!jsonObj.get("day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `day_of_week` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day_of_week").toString())); + } + if (!jsonObj.get("hour").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hour` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hour").toString())); + } + if (!jsonObj.get("minute").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `minute` to be a primitive type in the JSON string but got `%s`", jsonObj.get("minute").toString())); + } + if (!jsonObj.get("month").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month").toString())); + } + if (!jsonObj.get("second").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `second` to be a primitive type in the JSON string but got `%s`", jsonObj.get("second").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CronExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CronExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CronExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CronExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CronExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CronExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of CronExpression + * @throws IOException if the JSON string is invalid with respect to CronExpression + */ + public static CronExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CronExpression.class); + } + + /** + * Convert an instance of CronExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java index 13243969f..998b7164d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java @@ -4,383 +4,360 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Schedule selected cron expression. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CronExpressionInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; - - @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) - @javax.annotation.Nonnull - private String dayOfMonth; - - public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; - - @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) - @javax.annotation.Nonnull - private String dayOfWeek; - - public static final String SERIALIZED_NAME_HOUR = "hour"; - - @SerializedName(SERIALIZED_NAME_HOUR) - @javax.annotation.Nonnull - private String hour; - - public static final String SERIALIZED_NAME_MINUTE = "minute"; - - @SerializedName(SERIALIZED_NAME_MINUTE) - @javax.annotation.Nonnull - private String minute; - - public static final String SERIALIZED_NAME_MONTH = "month"; - - @SerializedName(SERIALIZED_NAME_MONTH) - @javax.annotation.Nonnull - private String month; - - public static final String SERIALIZED_NAME_SECOND = "second"; - - @SerializedName(SERIALIZED_NAME_SECOND) - @javax.annotation.Nonnull - private String second; - - public CronExpressionInput() {} - - public CronExpressionInput dayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { - this.dayOfMonth = dayOfMonth; - return this; - } - - /** - * Day of month of the object. - * - * @return dayOfMonth - */ - @javax.annotation.Nonnull - public String getDayOfMonth() { - return dayOfMonth; - } - - public void setDayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { - this.dayOfMonth = dayOfMonth; - } - - public CronExpressionInput dayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Day of Week of the object. - * - * @return dayOfWeek - */ - @javax.annotation.Nonnull - public String getDayOfWeek() { - return dayOfWeek; - } - - public void setDayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - public CronExpressionInput hour(@javax.annotation.Nonnull String hour) { - this.hour = hour; - return this; - } - - /** - * Hour of the object. - * - * @return hour - */ - @javax.annotation.Nonnull - public String getHour() { - return hour; - } - - public void setHour(@javax.annotation.Nonnull String hour) { - this.hour = hour; - } - - public CronExpressionInput minute(@javax.annotation.Nonnull String minute) { - this.minute = minute; - return this; - } - - /** - * Minute of the object. - * - * @return minute - */ - @javax.annotation.Nonnull - public String getMinute() { - return minute; - } - - public void setMinute(@javax.annotation.Nonnull String minute) { - this.minute = minute; - } - - public CronExpressionInput month(@javax.annotation.Nonnull String month) { - this.month = month; - return this; - } - - /** - * Month of the object. - * - * @return month - */ - @javax.annotation.Nonnull - public String getMonth() { - return month; - } - - public void setMonth(@javax.annotation.Nonnull String month) { - this.month = month; - } - - public CronExpressionInput second(@javax.annotation.Nonnull String second) { - this.second = second; - return this; - } - - /** - * Second of the object. - * - * @return second - */ - @javax.annotation.Nonnull - public String getSecond() { - return second; - } - - public void setSecond(@javax.annotation.Nonnull String second) { - this.second = second; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CronExpressionInput cronExpressionInput = (CronExpressionInput) o; - return Objects.equals(this.dayOfMonth, cronExpressionInput.dayOfMonth) - && Objects.equals(this.dayOfWeek, cronExpressionInput.dayOfWeek) - && Objects.equals(this.hour, cronExpressionInput.hour) - && Objects.equals(this.minute, cronExpressionInput.minute) - && Objects.equals(this.month, cronExpressionInput.month) - && Objects.equals(this.second, cronExpressionInput.second); - } - - @Override - public int hashCode() { - return Objects.hash(dayOfMonth, dayOfWeek, hour, minute, month, second); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CronExpressionInput {\n"); - sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); - sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); - sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); - sb.append(" month: ").append(toIndentedString(month)).append("\n"); - sb.append(" second: ").append(toIndentedString(second)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Schedule selected cron expression. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CronExpressionInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; + @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) + @javax.annotation.Nonnull + private String dayOfMonth; + + public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; + @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) + @javax.annotation.Nonnull + private String dayOfWeek; + + public static final String SERIALIZED_NAME_HOUR = "hour"; + @SerializedName(SERIALIZED_NAME_HOUR) + @javax.annotation.Nonnull + private String hour; + + public static final String SERIALIZED_NAME_MINUTE = "minute"; + @SerializedName(SERIALIZED_NAME_MINUTE) + @javax.annotation.Nonnull + private String minute; + + public static final String SERIALIZED_NAME_MONTH = "month"; + @SerializedName(SERIALIZED_NAME_MONTH) + @javax.annotation.Nonnull + private String month; + + public static final String SERIALIZED_NAME_SECOND = "second"; + @SerializedName(SERIALIZED_NAME_SECOND) + @javax.annotation.Nonnull + private String second; + + public CronExpressionInput() { + } + + public CronExpressionInput dayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Day of month of the object. + * @return dayOfMonth + */ + @javax.annotation.Nonnull + public String getDayOfMonth() { + return dayOfMonth; + } + + public void setDayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + + public CronExpressionInput dayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Day of Week of the object. + * @return dayOfWeek + */ + @javax.annotation.Nonnull + public String getDayOfWeek() { + return dayOfWeek; + } + + public void setDayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + } + + + public CronExpressionInput hour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + return this; + } + + /** + * Hour of the object. + * @return hour + */ + @javax.annotation.Nonnull + public String getHour() { + return hour; + } + + public void setHour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + } + + + public CronExpressionInput minute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + return this; + } + + /** + * Minute of the object. + * @return minute + */ + @javax.annotation.Nonnull + public String getMinute() { + return minute; + } + + public void setMinute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + } + + + public CronExpressionInput month(@javax.annotation.Nonnull String month) { + this.month = month; + return this; + } + + /** + * Month of the object. + * @return month + */ + @javax.annotation.Nonnull + public String getMonth() { + return month; + } + + public void setMonth(@javax.annotation.Nonnull String month) { + this.month = month; + } + + + public CronExpressionInput second(@javax.annotation.Nonnull String second) { + this.second = second; + return this; + } + + /** + * Second of the object. + * @return second + */ + @javax.annotation.Nonnull + public String getSecond() { + return second; + } + + public void setSecond(@javax.annotation.Nonnull String second) { + this.second = second; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("day_of_month"); - openapiFields.add("day_of_week"); - openapiFields.add("hour"); - openapiFields.add("minute"); - openapiFields.add("month"); - openapiFields.add("second"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("day_of_month"); - openapiRequiredFields.add("day_of_week"); - openapiRequiredFields.add("hour"); - openapiRequiredFields.add("minute"); - openapiRequiredFields.add("month"); - openapiRequiredFields.add("second"); + CronExpressionInput cronExpressionInput = (CronExpressionInput) o; + return Objects.equals(this.dayOfMonth, cronExpressionInput.dayOfMonth) && + Objects.equals(this.dayOfWeek, cronExpressionInput.dayOfWeek) && + Objects.equals(this.hour, cronExpressionInput.hour) && + Objects.equals(this.minute, cronExpressionInput.minute) && + Objects.equals(this.month, cronExpressionInput.month) && + Objects.equals(this.second, cronExpressionInput.second); + } + + @Override + public int hashCode() { + return Objects.hash(dayOfMonth, dayOfWeek, hour, minute, month, second); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CronExpressionInput {\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append(" second: ").append(toIndentedString(second)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CronExpressionInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CronExpressionInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CronExpressionInput is not found in" - + " the empty JSON string", - CronExpressionInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("day_of_month"); + openapiFields.add("day_of_week"); + openapiFields.add("hour"); + openapiFields.add("minute"); + openapiFields.add("month"); + openapiFields.add("second"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("day_of_month"); + openapiRequiredFields.add("day_of_week"); + openapiRequiredFields.add("hour"); + openapiRequiredFields.add("minute"); + openapiRequiredFields.add("month"); + openapiRequiredFields.add("second"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CronExpressionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CronExpressionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CronExpressionInput is not found in the empty JSON string", CronExpressionInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CronExpressionInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CronExpressionInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CronExpressionInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CronExpressionInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CronExpressionInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CronExpressionInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("day_of_month").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `day_of_month` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("day_of_month").toString())); - } - if (!jsonObj.get("day_of_week").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `day_of_week` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("day_of_week").toString())); - } - if (!jsonObj.get("hour").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `hour` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("hour").toString())); - } - if (!jsonObj.get("minute").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `minute` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("minute").toString())); - } - if (!jsonObj.get("month").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `month` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("month").toString())); - } - if (!jsonObj.get("second").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `second` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("second").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CronExpressionInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CronExpressionInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CronExpressionInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CronExpressionInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CronExpressionInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CronExpressionInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of CronExpressionInput - * @throws IOException if the JSON string is invalid with respect to CronExpressionInput - */ - public static CronExpressionInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CronExpressionInput.class); - } - - /** - * Convert an instance of CronExpressionInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("day_of_month").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `day_of_month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day_of_month").toString())); + } + if (!jsonObj.get("day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `day_of_week` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day_of_week").toString())); + } + if (!jsonObj.get("hour").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hour` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hour").toString())); + } + if (!jsonObj.get("minute").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `minute` to be a primitive type in the JSON string but got `%s`", jsonObj.get("minute").toString())); + } + if (!jsonObj.get("month").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month").toString())); + } + if (!jsonObj.get("second").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `second` to be a primitive type in the JSON string but got `%s`", jsonObj.get("second").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CronExpressionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CronExpressionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CronExpressionInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CronExpressionInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CronExpressionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CronExpressionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CronExpressionInput + * @throws IOException if the JSON string is invalid with respect to CronExpressionInput + */ + public static CronExpressionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CronExpressionInput.class); + } + + /** + * Convert an instance of CronExpressionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java index f6687f122..b6e2ab014 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java @@ -4,325 +4,305 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataType InputType used in Custom Action API's */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class CustomActionMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - VISUALIZATION("VISUALIZATION"), - - ANSWER("ANSWER"), - - WORKSHEET("WORKSHEET"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public CustomActionMetadataTypeInput() {} - - public CustomActionMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public CustomActionMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; +/** + * MetadataType InputType used in Custom Action API's + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CustomActionMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + VISUALIZATION("VISUALIZATION"), + + ANSWER("ANSWER"), + + WORKSHEET("WORKSHEET"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Unique ID or name of the metadata object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomActionMetadataTypeInput customActionMetadataTypeInput = - (CustomActionMetadataTypeInput) o; - return Objects.equals(this.type, customActionMetadataTypeInput.type) - && Objects.equals(this.identifier, customActionMetadataTypeInput.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public CustomActionMetadataTypeInput() { + } + + public CustomActionMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public CustomActionMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomActionMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + CustomActionMetadataTypeInput customActionMetadataTypeInput = (CustomActionMetadataTypeInput) o; + return Objects.equals(this.type, customActionMetadataTypeInput.type) && + Objects.equals(this.identifier, customActionMetadataTypeInput.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomActionMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * CustomActionMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomActionMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in CustomActionMetadataTypeInput is not" - + " found in the empty JSON string", - CustomActionMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CustomActionMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CustomActionMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CustomActionMetadataTypeInput is not found in the empty JSON string", CustomActionMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomActionMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `CustomActionMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CustomActionMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomActionMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomActionMetadataTypeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CustomActionMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomActionMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomActionMetadataTypeInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(CustomActionMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomActionMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomActionMetadataTypeInput read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of CustomActionMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomActionMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to - * CustomActionMetadataTypeInput - */ - public static CustomActionMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomActionMetadataTypeInput.class); - } - - /** - * Convert an instance of CustomActionMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CustomActionMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CustomActionMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CustomActionMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CustomActionMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CustomActionMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of CustomActionMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CustomActionMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to CustomActionMetadataTypeInput + */ + public static CustomActionMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CustomActionMetadataTypeInput.class); + } + + /** + * Convert an instance of CustomActionMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java index 07f8fc89b..921ee9665 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java @@ -4,270 +4,268 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EntityHeader; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** DataSource */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DataSource implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; - - @SerializedName(SERIALIZED_NAME_CONFIDENCE) - @javax.annotation.Nullable - private Float confidence; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - - @SerializedName(SERIALIZED_NAME_DETAILS) - @javax.annotation.Nullable - private EntityHeader details; - - public static final String SERIALIZED_NAME_REASONING = "reasoning"; - - @SerializedName(SERIALIZED_NAME_REASONING) - @javax.annotation.Nullable - private String reasoning; - - public DataSource() {} - - public DataSource confidence(@javax.annotation.Nullable Float confidence) { - this.confidence = confidence; - return this; - } - - /** - * Confidence score for the data source suggestion. - * - * @return confidence - */ - @javax.annotation.Nullable - public Float getConfidence() { - return confidence; - } - - public void setConfidence(@javax.annotation.Nullable Float confidence) { - this.confidence = confidence; - } - - public DataSource details(@javax.annotation.Nullable EntityHeader details) { - this.details = details; - return this; - } - - /** - * Get details - * - * @return details - */ - @javax.annotation.Nullable - public EntityHeader getDetails() { - return details; - } - - public void setDetails(@javax.annotation.Nullable EntityHeader details) { - this.details = details; - } - - public DataSource reasoning(@javax.annotation.Nullable String reasoning) { - this.reasoning = reasoning; - return this; - } - /** - * LLM reasoning for the data source. - * - * @return reasoning - */ - @javax.annotation.Nullable - public String getReasoning() { - return reasoning; - } +import com.thoughtspot.client.JSON; - public void setReasoning(@javax.annotation.Nullable String reasoning) { - this.reasoning = reasoning; +/** + * DataSource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DataSource implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; + @SerializedName(SERIALIZED_NAME_CONFIDENCE) + @javax.annotation.Nullable + private Float confidence; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private EntityHeader details; + + public static final String SERIALIZED_NAME_REASONING = "reasoning"; + @SerializedName(SERIALIZED_NAME_REASONING) + @javax.annotation.Nullable + private String reasoning; + + public DataSource() { + } + + public DataSource confidence(@javax.annotation.Nullable Float confidence) { + this.confidence = confidence; + return this; + } + + /** + * Confidence score for the data source suggestion. + * @return confidence + */ + @javax.annotation.Nullable + public Float getConfidence() { + return confidence; + } + + public void setConfidence(@javax.annotation.Nullable Float confidence) { + this.confidence = confidence; + } + + + public DataSource details(@javax.annotation.Nullable EntityHeader details) { + this.details = details; + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + public EntityHeader getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable EntityHeader details) { + this.details = details; + } + + + public DataSource reasoning(@javax.annotation.Nullable String reasoning) { + this.reasoning = reasoning; + return this; + } + + /** + * LLM reasoning for the data source. + * @return reasoning + */ + @javax.annotation.Nullable + public String getReasoning() { + return reasoning; + } + + public void setReasoning(@javax.annotation.Nullable String reasoning) { + this.reasoning = reasoning; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataSource dataSource = (DataSource) o; - return Objects.equals(this.confidence, dataSource.confidence) - && Objects.equals(this.details, dataSource.details) - && Objects.equals(this.reasoning, dataSource.reasoning); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + DataSource dataSource = (DataSource) o; + return Objects.equals(this.confidence, dataSource.confidence) && + Objects.equals(this.details, dataSource.details) && + Objects.equals(this.reasoning, dataSource.reasoning); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(confidence, details, reasoning); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(confidence, details, reasoning); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSource {\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("confidence"); + openapiFields.add("details"); + openapiFields.add("reasoning"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataSource + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DataSource is not found in the empty JSON string", DataSource.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataSource {\n"); - sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("confidence"); - openapiFields.add("details"); - openapiFields.add("reasoning"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DataSource - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DataSource.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DataSource is not found in the empty" - + " JSON string", - DataSource.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DataSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DataSource` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DataSource.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DataSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `details` - if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { - EntityHeader.validateJsonElement(jsonObj.get("details")); - } - if ((jsonObj.get("reasoning") != null && !jsonObj.get("reasoning").isJsonNull()) - && !jsonObj.get("reasoning").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reasoning` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reasoning").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DataSource.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DataSource' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DataSource.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DataSource value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DataSource read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DataSource given an JSON string - * - * @param jsonString JSON string - * @return An instance of DataSource - * @throws IOException if the JSON string is invalid with respect to DataSource - */ - public static DataSource fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DataSource.class); - } - - /** - * Convert an instance of DataSource to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `details` + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + EntityHeader.validateJsonElement(jsonObj.get("details")); + } + if ((jsonObj.get("reasoning") != null && !jsonObj.get("reasoning").isJsonNull()) && !jsonObj.get("reasoning").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reasoning` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasoning").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataSource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataSource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DataSource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DataSource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DataSource read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DataSource given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataSource + * @throws IOException if the JSON string is invalid with respect to DataSource + */ + public static DataSource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataSource.class); + } + + /** + * Convert an instance of DataSource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java index 1f51e7e91..ea86fcd14 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java @@ -4,203 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DataSourceContextInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DataSourceContextInput implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_GUID = "guid"; +/** + * DataSourceContextInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DataSourceContextInput implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_GUID) - @javax.annotation.Nonnull - private String guid; + public static final String SERIALIZED_NAME_GUID = "guid"; + @SerializedName(SERIALIZED_NAME_GUID) + @javax.annotation.Nonnull + private String guid; - public DataSourceContextInput() {} + public DataSourceContextInput() { + } - public DataSourceContextInput guid(@javax.annotation.Nonnull String guid) { - this.guid = guid; - return this; - } + public DataSourceContextInput guid(@javax.annotation.Nonnull String guid) { + this.guid = guid; + return this; + } - /** - * Unique identifier of the data source. - * - * @return guid - */ - @javax.annotation.Nonnull - public String getGuid() { - return guid; - } + /** + * Unique identifier of the data source. + * @return guid + */ + @javax.annotation.Nonnull + public String getGuid() { + return guid; + } - public void setGuid(@javax.annotation.Nonnull String guid) { - this.guid = guid; - } + public void setGuid(@javax.annotation.Nonnull String guid) { + this.guid = guid; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataSourceContextInput dataSourceContextInput = (DataSourceContextInput) o; - return Objects.equals(this.guid, dataSourceContextInput.guid); - } - @Override - public int hashCode() { - return Objects.hash(guid); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataSourceContextInput {\n"); - sb.append(" guid: ").append(toIndentedString(guid)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("guid"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("guid"); + DataSourceContextInput dataSourceContextInput = (DataSourceContextInput) o; + return Objects.equals(this.guid, dataSourceContextInput.guid); + } + + @Override + public int hashCode() { + return Objects.hash(guid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSourceContextInput {\n"); + sb.append(" guid: ").append(toIndentedString(guid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DataSourceContextInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DataSourceContextInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DataSourceContextInput is not found" - + " in the empty JSON string", - DataSourceContextInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("guid"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("guid"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataSourceContextInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataSourceContextInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DataSourceContextInput is not found in the empty JSON string", DataSourceContextInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DataSourceContextInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DataSourceContextInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DataSourceContextInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DataSourceContextInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DataSourceContextInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DataSourceContextInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + 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("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())); - } - } + if (!jsonObj.get("guid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `guid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("guid").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DataSourceContextInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DataSourceContextInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DataSourceContextInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DataSourceContextInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DataSourceContextInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DataSourceContextInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DataSourceContextInput - * @throws IOException if the JSON string is invalid with respect to DataSourceContextInput - */ - public static DataSourceContextInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DataSourceContextInput.class); - } - - /** - * Convert an instance of DataSourceContextInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataSourceContextInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataSourceContextInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DataSourceContextInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DataSourceContextInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DataSourceContextInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DataSourceContextInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataSourceContextInput + * @throws IOException if the JSON string is invalid with respect to DataSourceContextInput + */ + public static DataSourceContextInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataSourceContextInput.class); + } + + /** + * Convert an instance of DataSourceContextInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java index acabef81f..660188419 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java @@ -4,320 +4,299 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** DataWarehouseObjectInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DataWarehouseObjectInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DATABASE = "database"; - - @SerializedName(SERIALIZED_NAME_DATABASE) - @javax.annotation.Nullable - private String database; - - public static final String SERIALIZED_NAME_SCHEMA = "schema"; - - @SerializedName(SERIALIZED_NAME_SCHEMA) - @javax.annotation.Nullable - private String schema; - - public static final String SERIALIZED_NAME_TABLE = "table"; - - @SerializedName(SERIALIZED_NAME_TABLE) - @javax.annotation.Nullable - private String table; - - public static final String SERIALIZED_NAME_COLUMN = "column"; - - @SerializedName(SERIALIZED_NAME_COLUMN) - @javax.annotation.Nullable - private String column; - - public DataWarehouseObjectInput() {} - - public DataWarehouseObjectInput database(@javax.annotation.Nullable String database) { - this.database = database; - return this; - } - - /** - * Name of the database. - * - * @return database - */ - @javax.annotation.Nullable - public String getDatabase() { - return database; - } - - public void setDatabase(@javax.annotation.Nullable String database) { - this.database = database; - } - - public DataWarehouseObjectInput schema(@javax.annotation.Nullable String schema) { - this.schema = schema; - return this; - } - - /** - * Name of the schema within the database. - * - * @return schema - */ - @javax.annotation.Nullable - public String getSchema() { - return schema; - } - - public void setSchema(@javax.annotation.Nullable String schema) { - this.schema = schema; - } - - public DataWarehouseObjectInput table(@javax.annotation.Nullable String table) { - this.table = table; - return this; - } - /** - * Name of the table within the schema. - * - * @return table - */ - @javax.annotation.Nullable - public String getTable() { - return table; - } - - public void setTable(@javax.annotation.Nullable String table) { - this.table = table; - } - - public DataWarehouseObjectInput column(@javax.annotation.Nullable String column) { - this.column = column; - return this; - } - - /** - * Name of the column within the table. - * - * @return column - */ - @javax.annotation.Nullable - public String getColumn() { - return column; - } - - public void setColumn(@javax.annotation.Nullable String column) { - this.column = column; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataWarehouseObjectInput dataWarehouseObjectInput = (DataWarehouseObjectInput) o; - return Objects.equals(this.database, dataWarehouseObjectInput.database) - && Objects.equals(this.schema, dataWarehouseObjectInput.schema) - && Objects.equals(this.table, dataWarehouseObjectInput.table) - && Objects.equals(this.column, dataWarehouseObjectInput.column); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(database, schema, table, column); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * DataWarehouseObjectInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DataWarehouseObjectInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATABASE = "database"; + @SerializedName(SERIALIZED_NAME_DATABASE) + @javax.annotation.Nullable + private String database; + + public static final String SERIALIZED_NAME_SCHEMA = "schema"; + @SerializedName(SERIALIZED_NAME_SCHEMA) + @javax.annotation.Nullable + private String schema; + + public static final String SERIALIZED_NAME_TABLE = "table"; + @SerializedName(SERIALIZED_NAME_TABLE) + @javax.annotation.Nullable + private String table; + + public static final String SERIALIZED_NAME_COLUMN = "column"; + @SerializedName(SERIALIZED_NAME_COLUMN) + @javax.annotation.Nullable + private String column; + + public DataWarehouseObjectInput() { + } + + public DataWarehouseObjectInput database(@javax.annotation.Nullable String database) { + this.database = database; + return this; + } + + /** + * Name of the database. + * @return database + */ + @javax.annotation.Nullable + public String getDatabase() { + return database; + } + + public void setDatabase(@javax.annotation.Nullable String database) { + this.database = database; + } + + + public DataWarehouseObjectInput schema(@javax.annotation.Nullable String schema) { + this.schema = schema; + return this; + } + + /** + * Name of the schema within the database. + * @return schema + */ + @javax.annotation.Nullable + public String getSchema() { + return schema; + } + + public void setSchema(@javax.annotation.Nullable String schema) { + this.schema = schema; + } + + + public DataWarehouseObjectInput table(@javax.annotation.Nullable String table) { + this.table = table; + return this; + } + + /** + * Name of the table within the schema. + * @return table + */ + @javax.annotation.Nullable + public String getTable() { + return table; + } + + public void setTable(@javax.annotation.Nullable String table) { + this.table = table; + } + + + public DataWarehouseObjectInput column(@javax.annotation.Nullable String column) { + this.column = column; + return this; + } + + /** + * Name of the column within the table. + * @return column + */ + @javax.annotation.Nullable + public String getColumn() { + return column; + } + + public void setColumn(@javax.annotation.Nullable String column) { + this.column = column; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataWarehouseObjectInput {\n"); - sb.append(" database: ").append(toIndentedString(database)).append("\n"); - sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); - sb.append(" table: ").append(toIndentedString(table)).append("\n"); - sb.append(" column: ").append(toIndentedString(column)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DataWarehouseObjectInput dataWarehouseObjectInput = (DataWarehouseObjectInput) o; + return Objects.equals(this.database, dataWarehouseObjectInput.database) && + Objects.equals(this.schema, dataWarehouseObjectInput.schema) && + Objects.equals(this.table, dataWarehouseObjectInput.table) && + Objects.equals(this.column, dataWarehouseObjectInput.column); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(database, schema, table, column); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("database"); - openapiFields.add("schema"); - openapiFields.add("table"); - openapiFields.add("column"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataWarehouseObjectInput {\n"); + sb.append(" database: ").append(toIndentedString(database)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DataWarehouseObjectInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DataWarehouseObjectInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DataWarehouseObjectInput is not found" - + " in the empty JSON string", - DataWarehouseObjectInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("database"); + openapiFields.add("schema"); + openapiFields.add("table"); + openapiFields.add("column"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataWarehouseObjectInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataWarehouseObjectInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DataWarehouseObjectInput is not found in the empty JSON string", DataWarehouseObjectInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DataWarehouseObjectInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DataWarehouseObjectInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DataWarehouseObjectInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DataWarehouseObjectInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("database") != null && !jsonObj.get("database").isJsonNull()) - && !jsonObj.get("database").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `database` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("database").toString())); - } - if ((jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) - && !jsonObj.get("schema").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `schema` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("schema").toString())); - } - if ((jsonObj.get("table") != null && !jsonObj.get("table").isJsonNull()) - && !jsonObj.get("table").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `table` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("table").toString())); - } - if ((jsonObj.get("column") != null && !jsonObj.get("column").isJsonNull()) - && !jsonObj.get("column").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("column").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DataWarehouseObjectInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DataWarehouseObjectInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DataWarehouseObjectInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DataWarehouseObjectInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DataWarehouseObjectInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DataWarehouseObjectInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DataWarehouseObjectInput - * @throws IOException if the JSON string is invalid with respect to DataWarehouseObjectInput - */ - public static DataWarehouseObjectInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DataWarehouseObjectInput.class); - } - - /** - * Convert an instance of DataWarehouseObjectInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("database") != null && !jsonObj.get("database").isJsonNull()) && !jsonObj.get("database").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `database` to be a primitive type in the JSON string but got `%s`", jsonObj.get("database").toString())); + } + if ((jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) && !jsonObj.get("schema").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `schema` to be a primitive type in the JSON string but got `%s`", jsonObj.get("schema").toString())); + } + if ((jsonObj.get("table") != null && !jsonObj.get("table").isJsonNull()) && !jsonObj.get("table").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `table` to be a primitive type in the JSON string but got `%s`", jsonObj.get("table").toString())); + } + if ((jsonObj.get("column") != null && !jsonObj.get("column").isJsonNull()) && !jsonObj.get("column").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `column` to be a primitive type in the JSON string but got `%s`", jsonObj.get("column").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataWarehouseObjectInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataWarehouseObjectInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DataWarehouseObjectInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DataWarehouseObjectInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DataWarehouseObjectInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DataWarehouseObjectInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataWarehouseObjectInput + * @throws IOException if the JSON string is invalid with respect to DataWarehouseObjectInput + */ + public static DataWarehouseObjectInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataWarehouseObjectInput.class); + } + + /** + * Convert an instance of DataWarehouseObjectInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java index d96b543fd..7c351c4c1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java @@ -4,222 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Database; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DataWarehouseObjects */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * DataWarehouseObjects + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DataWarehouseObjects implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_DATABASES = "databases"; + public static final String SERIALIZED_NAME_DATABASES = "databases"; + @SerializedName(SERIALIZED_NAME_DATABASES) + @javax.annotation.Nonnull + private List databases; - @SerializedName(SERIALIZED_NAME_DATABASES) - @javax.annotation.Nonnull - private List databases; + public DataWarehouseObjects() { + } - public DataWarehouseObjects() {} + public DataWarehouseObjects databases(@javax.annotation.Nonnull List databases) { + this.databases = databases; + return this; + } - public DataWarehouseObjects databases(@javax.annotation.Nonnull List databases) { - this.databases = databases; - return this; + public DataWarehouseObjects addDatabasesItem(Database databasesItem) { + if (this.databases == null) { + this.databases = new ArrayList<>(); } + this.databases.add(databasesItem); + return this; + } - public DataWarehouseObjects addDatabasesItem(Database databasesItem) { - if (this.databases == null) { - this.databases = new ArrayList<>(); - } - this.databases.add(databasesItem); - return this; - } + /** + * Databases of the connection. + * @return databases + */ + @javax.annotation.Nonnull + public List getDatabases() { + return databases; + } - /** - * Databases of the connection. - * - * @return databases - */ - @javax.annotation.Nonnull - public List getDatabases() { - return databases; - } + public void setDatabases(@javax.annotation.Nonnull List databases) { + this.databases = databases; + } - public void setDatabases(@javax.annotation.Nonnull List databases) { - this.databases = databases; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataWarehouseObjects dataWarehouseObjects = (DataWarehouseObjects) o; - return Objects.equals(this.databases, dataWarehouseObjects.databases); - } - @Override - public int hashCode() { - return Objects.hash(databases); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataWarehouseObjects {\n"); - sb.append(" databases: ").append(toIndentedString(databases)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("databases"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("databases"); + DataWarehouseObjects dataWarehouseObjects = (DataWarehouseObjects) o; + return Objects.equals(this.databases, dataWarehouseObjects.databases); + } + + @Override + public int hashCode() { + return Objects.hash(databases); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataWarehouseObjects {\n"); + sb.append(" databases: ").append(toIndentedString(databases)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DataWarehouseObjects - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DataWarehouseObjects.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DataWarehouseObjects is not found in" - + " the empty JSON string", - DataWarehouseObjects.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("databases"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("databases"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataWarehouseObjects + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataWarehouseObjects.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DataWarehouseObjects is not found in the empty JSON string", DataWarehouseObjects.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DataWarehouseObjects.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DataWarehouseObjects` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DataWarehouseObjects.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DataWarehouseObjects` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DataWarehouseObjects.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DataWarehouseObjects.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("databases").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `databases` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("databases").toString())); - } - - JsonArray jsonArraydatabases = jsonObj.getAsJsonArray("databases"); - // validate the required field `databases` (array) - for (int i = 0; i < jsonArraydatabases.size(); i++) { - Database.validateJsonElement(jsonArraydatabases.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DataWarehouseObjects.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DataWarehouseObjects' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DataWarehouseObjects.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DataWarehouseObjects value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DataWarehouseObjects read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DataWarehouseObjects given an JSON string - * - * @param jsonString JSON string - * @return An instance of DataWarehouseObjects - * @throws IOException if the JSON string is invalid with respect to DataWarehouseObjects - */ - public static DataWarehouseObjects fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DataWarehouseObjects.class); - } - - /** - * Convert an instance of DataWarehouseObjects to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("databases").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `databases` to be an array in the JSON string but got `%s`", jsonObj.get("databases").toString())); + } + + JsonArray jsonArraydatabases = jsonObj.getAsJsonArray("databases"); + // validate the required field `databases` (array) + for (int i = 0; i < jsonArraydatabases.size(); i++) { + Database.validateJsonElement(jsonArraydatabases.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataWarehouseObjects.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataWarehouseObjects' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DataWarehouseObjects.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DataWarehouseObjects value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DataWarehouseObjects read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DataWarehouseObjects given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataWarehouseObjects + * @throws IOException if the JSON string is invalid with respect to DataWarehouseObjects + */ + public static DataWarehouseObjects fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataWarehouseObjects.class); + } + + /** + * Convert an instance of DataWarehouseObjects to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java index ffe4225f2..1eace4ca8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java @@ -4,306 +4,296 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SchemaObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Database */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Database implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_SCHEMAS = "schemas"; - - @SerializedName(SERIALIZED_NAME_SCHEMAS) - @javax.annotation.Nullable - private List schemas; - - public static final String SERIALIZED_NAME_AUTO_CREATED = "auto_created"; - - @SerializedName(SERIALIZED_NAME_AUTO_CREATED) - @javax.annotation.Nullable - private Boolean autoCreated; - - public Database() {} - public Database name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the database. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public Database schemas(@javax.annotation.Nullable List schemas) { - this.schemas = schemas; - return this; - } - - public Database addSchemasItem(SchemaObject schemasItem) { - if (this.schemas == null) { - this.schemas = new ArrayList<>(); - } - this.schemas.add(schemasItem); - return this; - } - - /** - * Schemas of the database. - * - * @return schemas - */ - @javax.annotation.Nullable - public List getSchemas() { - return schemas; - } - - public void setSchemas(@javax.annotation.Nullable List schemas) { - this.schemas = schemas; - } - - public Database autoCreated(@javax.annotation.Nullable Boolean autoCreated) { - this.autoCreated = autoCreated; - return this; - } - - /** - * Determines if the object is auto created. - * - * @return autoCreated - */ - @javax.annotation.Nullable - public Boolean getAutoCreated() { - return autoCreated; - } - - public void setAutoCreated(@javax.annotation.Nullable Boolean autoCreated) { - this.autoCreated = autoCreated; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Database database = (Database) o; - return Objects.equals(this.name, database.name) - && Objects.equals(this.schemas, database.schemas) - && Objects.equals(this.autoCreated, database.autoCreated); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(name, schemas, autoCreated); +/** + * Database + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Database implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_SCHEMAS = "schemas"; + @SerializedName(SERIALIZED_NAME_SCHEMAS) + @javax.annotation.Nullable + private List schemas; + + public static final String SERIALIZED_NAME_AUTO_CREATED = "auto_created"; + @SerializedName(SERIALIZED_NAME_AUTO_CREATED) + @javax.annotation.Nullable + private Boolean autoCreated; + + public Database() { + } + + public Database name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the database. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Database schemas(@javax.annotation.Nullable List schemas) { + this.schemas = schemas; + return this; + } + + public Database addSchemasItem(SchemaObject schemasItem) { + if (this.schemas == null) { + this.schemas = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.schemas.add(schemasItem); + return this; + } + + /** + * Schemas of the database. + * @return schemas + */ + @javax.annotation.Nullable + public List getSchemas() { + return schemas; + } + + public void setSchemas(@javax.annotation.Nullable List schemas) { + this.schemas = schemas; + } + + + public Database autoCreated(@javax.annotation.Nullable Boolean autoCreated) { + this.autoCreated = autoCreated; + return this; + } + + /** + * Determines if the object is auto created. + * @return autoCreated + */ + @javax.annotation.Nullable + public Boolean getAutoCreated() { + return autoCreated; + } + + public void setAutoCreated(@javax.annotation.Nullable Boolean autoCreated) { + this.autoCreated = autoCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Database {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" schemas: ").append(toIndentedString(schemas)).append("\n"); - sb.append(" autoCreated: ").append(toIndentedString(autoCreated)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + Database database = (Database) o; + return Objects.equals(this.name, database.name) && + Objects.equals(this.schemas, database.schemas) && + Objects.equals(this.autoCreated, database.autoCreated); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, schemas, autoCreated); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("schemas"); - openapiFields.add("auto_created"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Database {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" schemas: ").append(toIndentedString(schemas)).append("\n"); + sb.append(" autoCreated: ").append(toIndentedString(autoCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Database - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Database.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Database is not found in the empty" - + " JSON string", - Database.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("schemas"); + openapiFields.add("auto_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Database + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Database.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Database is not found in the empty JSON string", Database.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Database.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Database` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Database.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Database` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Database.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Database.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (jsonObj.get("schemas") != null && !jsonObj.get("schemas").isJsonNull()) { - JsonArray jsonArrayschemas = jsonObj.getAsJsonArray("schemas"); - if (jsonArrayschemas != null) { - // ensure the json data is an array - if (!jsonObj.get("schemas").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `schemas` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("schemas").toString())); - } - - // validate the optional field `schemas` (array) - for (int i = 0; i < jsonArrayschemas.size(); i++) { - SchemaObject.validateJsonElement(jsonArrayschemas.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Database.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Database' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Database.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Database value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Database read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("schemas") != null && !jsonObj.get("schemas").isJsonNull()) { + JsonArray jsonArrayschemas = jsonObj.getAsJsonArray("schemas"); + if (jsonArrayschemas != null) { + // ensure the json data is an array + if (!jsonObj.get("schemas").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `schemas` to be an array in the JSON string but got `%s`", jsonObj.get("schemas").toString())); + } + + // validate the optional field `schemas` (array) + for (int i = 0; i < jsonArrayschemas.size(); i++) { + SchemaObject.validateJsonElement(jsonArrayschemas.get(i)); + }; } - } - - /** - * Create an instance of Database given an JSON string - * - * @param jsonString JSON string - * @return An instance of Database - * @throws IOException if the JSON string is invalid with respect to Database - */ - public static Database fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Database.class); - } + } + } - /** - * Convert an instance of Database to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Database.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Database' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Database.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Database value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Database read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Database given an JSON string + * + * @param jsonString JSON string + * @return An instance of Database + * @throws IOException if the JSON string is invalid with respect to Database + */ + public static Database fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Database.class); + } + + /** + * Convert an instance of Database to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtConnectionRequest.java deleted file mode 100644 index da070b96b..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtConnectionRequest.java +++ /dev/null @@ -1,590 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import com.google.gson.Gson; -import 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.File; -import java.io.IOException; -import java.io.Serializable; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -/** DbtConnectionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DbtConnectionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) - @javax.annotation.Nonnull - private String connectionName; - - public static final String SERIALIZED_NAME_DATABASE_NAME = "database_name"; - - @SerializedName(SERIALIZED_NAME_DATABASE_NAME) - @javax.annotation.Nonnull - private String databaseName; - - /** Mention type of Import */ - @JsonAdapter(ImportTypeEnum.Adapter.class) - public enum ImportTypeEnum { - DBT_CLOUD("DBT_CLOUD"), - - ZIP_FILE("ZIP_FILE"); - - private String value; - - ImportTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ImportTypeEnum fromValue(String value) { - for (ImportTypeEnum b : ImportTypeEnum.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 ImportTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ImportTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ImportTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ImportTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_IMPORT_TYPE = "import_type"; - - @SerializedName(SERIALIZED_NAME_IMPORT_TYPE) - @javax.annotation.Nullable - private ImportTypeEnum importType = ImportTypeEnum.DBT_CLOUD; - - public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; - - @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) - @javax.annotation.Nullable - private String accessToken; - - public static final String SERIALIZED_NAME_DBT_URL = "dbt_url"; - - @SerializedName(SERIALIZED_NAME_DBT_URL) - @javax.annotation.Nullable - private String dbtUrl; - - public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - @javax.annotation.Nullable - private String accountId; - - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - @javax.annotation.Nullable - private String projectId; - - public static final String SERIALIZED_NAME_DBT_ENV_ID = "dbt_env_id"; - - @SerializedName(SERIALIZED_NAME_DBT_ENV_ID) - @javax.annotation.Nullable - private String dbtEnvId; - - public static final String SERIALIZED_NAME_PROJECT_NAME = "project_name"; - - @SerializedName(SERIALIZED_NAME_PROJECT_NAME) - @javax.annotation.Nullable - private String projectName; - - public static final String SERIALIZED_NAME_FILE_CONTENT = "file_content"; - - @SerializedName(SERIALIZED_NAME_FILE_CONTENT) - @javax.annotation.Nullable - private File fileContent; - - public DbtConnectionRequest() {} - - public DbtConnectionRequest connectionName(@javax.annotation.Nonnull String connectionName) { - this.connectionName = connectionName; - return this; - } - - /** - * Name of the connection. - * - * @return connectionName - */ - @javax.annotation.Nonnull - public String getConnectionName() { - return connectionName; - } - - public void setConnectionName(@javax.annotation.Nonnull String connectionName) { - this.connectionName = connectionName; - } - - public DbtConnectionRequest databaseName(@javax.annotation.Nonnull String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Name of the Database. - * - * @return databaseName - */ - @javax.annotation.Nonnull - public String getDatabaseName() { - return databaseName; - } - - public void setDatabaseName(@javax.annotation.Nonnull String databaseName) { - this.databaseName = databaseName; - } - - public DbtConnectionRequest importType(@javax.annotation.Nullable ImportTypeEnum importType) { - this.importType = importType; - return this; - } - - /** - * Mention type of Import - * - * @return importType - */ - @javax.annotation.Nullable - public ImportTypeEnum getImportType() { - return importType; - } - - public void setImportType(@javax.annotation.Nullable ImportTypeEnum importType) { - this.importType = importType; - } - - public DbtConnectionRequest accessToken(@javax.annotation.Nullable String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Access token is mandatory when Import_Type is DBT_CLOUD. - * - * @return accessToken - */ - @javax.annotation.Nullable - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(@javax.annotation.Nullable String accessToken) { - this.accessToken = accessToken; - } - - public DbtConnectionRequest dbtUrl(@javax.annotation.Nullable String dbtUrl) { - this.dbtUrl = dbtUrl; - return this; - } - - /** - * DBT URL is mandatory when Import_Type is DBT_CLOUD. - * - * @return dbtUrl - */ - @javax.annotation.Nullable - public String getDbtUrl() { - return dbtUrl; - } - - public void setDbtUrl(@javax.annotation.Nullable String dbtUrl) { - this.dbtUrl = dbtUrl; - } - - public DbtConnectionRequest accountId(@javax.annotation.Nullable String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account ID is mandatory when Import_Type is DBT_CLOUD - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(@javax.annotation.Nullable String accountId) { - this.accountId = accountId; - } - - public DbtConnectionRequest projectId(@javax.annotation.Nullable String projectId) { - this.projectId = projectId; - return this; - } - - /** - * Project ID is mandatory when Import_Type is DBT_CLOUD - * - * @return projectId - */ - @javax.annotation.Nullable - public String getProjectId() { - return projectId; - } - - public void setProjectId(@javax.annotation.Nullable String projectId) { - this.projectId = projectId; - } - - public DbtConnectionRequest dbtEnvId(@javax.annotation.Nullable String dbtEnvId) { - this.dbtEnvId = dbtEnvId; - return this; - } - - /** - * DBT Environment ID\" - * - * @return dbtEnvId - */ - @javax.annotation.Nullable - public String getDbtEnvId() { - return dbtEnvId; - } - - public void setDbtEnvId(@javax.annotation.Nullable String dbtEnvId) { - this.dbtEnvId = dbtEnvId; - } - - public DbtConnectionRequest projectName(@javax.annotation.Nullable String projectName) { - this.projectName = projectName; - return this; - } - - /** - * Name of the project - * - * @return projectName - */ - @javax.annotation.Nullable - public String getProjectName() { - return projectName; - } - - public void setProjectName(@javax.annotation.Nullable String projectName) { - this.projectName = projectName; - } - - public DbtConnectionRequest fileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - return this; - } - - /** - * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when - * Import Type is 'ZIP_FILE' - * - * @return fileContent - */ - @javax.annotation.Nullable - public File getFileContent() { - return fileContent; - } - - public void setFileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DbtConnectionRequest dbtConnectionRequest = (DbtConnectionRequest) o; - return Objects.equals(this.connectionName, dbtConnectionRequest.connectionName) - && Objects.equals(this.databaseName, dbtConnectionRequest.databaseName) - && Objects.equals(this.importType, dbtConnectionRequest.importType) - && Objects.equals(this.accessToken, dbtConnectionRequest.accessToken) - && Objects.equals(this.dbtUrl, dbtConnectionRequest.dbtUrl) - && Objects.equals(this.accountId, dbtConnectionRequest.accountId) - && Objects.equals(this.projectId, dbtConnectionRequest.projectId) - && Objects.equals(this.dbtEnvId, dbtConnectionRequest.dbtEnvId) - && Objects.equals(this.projectName, dbtConnectionRequest.projectName) - && Objects.equals(this.fileContent, dbtConnectionRequest.fileContent); - } - - @Override - public int hashCode() { - return Objects.hash( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DbtConnectionRequest {\n"); - sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); - sb.append(" databaseName: ").append(toIndentedString(databaseName)).append("\n"); - sb.append(" importType: ").append(toIndentedString(importType)).append("\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" dbtUrl: ").append(toIndentedString(dbtUrl)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" dbtEnvId: ").append(toIndentedString(dbtEnvId)).append("\n"); - sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); - sb.append(" fileContent: ").append(toIndentedString(fileContent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_name"); - openapiFields.add("database_name"); - openapiFields.add("import_type"); - openapiFields.add("access_token"); - openapiFields.add("dbt_url"); - openapiFields.add("account_id"); - openapiFields.add("project_id"); - openapiFields.add("dbt_env_id"); - openapiFields.add("project_name"); - openapiFields.add("file_content"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("connection_name"); - openapiRequiredFields.add("database_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 DbtConnectionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DbtConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DbtConnectionRequest is not found in" - + " the empty JSON string", - DbtConnectionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DbtConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DbtConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DbtConnectionRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("connection_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("connection_name").toString())); - } - if (!jsonObj.get("database_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `database_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("database_name").toString())); - } - if ((jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) - && !jsonObj.get("import_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("import_type").toString())); - } - // validate the optional field `import_type` - if (jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) { - ImportTypeEnum.validateJsonElement(jsonObj.get("import_type")); - } - if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) - && !jsonObj.get("access_token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `access_token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("access_token").toString())); - } - if ((jsonObj.get("dbt_url") != null && !jsonObj.get("dbt_url").isJsonNull()) - && !jsonObj.get("dbt_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_url` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("dbt_url").toString())); - } - if ((jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonNull()) - && !jsonObj.get("account_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_id").toString())); - } - if ((jsonObj.get("project_id") != null && !jsonObj.get("project_id").isJsonNull()) - && !jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `project_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("project_id").toString())); - } - if ((jsonObj.get("dbt_env_id") != null && !jsonObj.get("dbt_env_id").isJsonNull()) - && !jsonObj.get("dbt_env_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_env_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("dbt_env_id").toString())); - } - if ((jsonObj.get("project_name") != null && !jsonObj.get("project_name").isJsonNull()) - && !jsonObj.get("project_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `project_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("project_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DbtConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DbtConnectionRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DbtConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DbtConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DbtConnectionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DbtConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DbtConnectionRequest - * @throws IOException if the JSON string is invalid with respect to DbtConnectionRequest - */ - public static DbtConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DbtConnectionRequest.class); - } - - /** - * Convert an instance of DbtConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtGenerateSyncTmlRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtGenerateSyncTmlRequest.java deleted file mode 100644 index 1896b16cb..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtGenerateSyncTmlRequest.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; -import java.io.File; -import java.io.IOException; -import java.io.Serializable; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -/** DbtGenerateSyncTmlRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DbtGenerateSyncTmlRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER = - "dbt_connection_identifier"; - - @SerializedName(SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String dbtConnectionIdentifier; - - public static final String SERIALIZED_NAME_FILE_CONTENT = "file_content"; - - @SerializedName(SERIALIZED_NAME_FILE_CONTENT) - @javax.annotation.Nullable - private File fileContent; - - public DbtGenerateSyncTmlRequest() {} - - public DbtGenerateSyncTmlRequest dbtConnectionIdentifier( - @javax.annotation.Nonnull String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - return this; - } - - /** - * Unique ID of the DBT connection. - * - * @return dbtConnectionIdentifier - */ - @javax.annotation.Nonnull - public String getDbtConnectionIdentifier() { - return dbtConnectionIdentifier; - } - - public void setDbtConnectionIdentifier( - @javax.annotation.Nonnull String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - } - - public DbtGenerateSyncTmlRequest fileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - return this; - } - - /** - * 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’ - * - * @return fileContent - */ - @javax.annotation.Nullable - public File getFileContent() { - return fileContent; - } - - public void setFileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DbtGenerateSyncTmlRequest dbtGenerateSyncTmlRequest = (DbtGenerateSyncTmlRequest) o; - return Objects.equals( - this.dbtConnectionIdentifier, - dbtGenerateSyncTmlRequest.dbtConnectionIdentifier) - && Objects.equals(this.fileContent, dbtGenerateSyncTmlRequest.fileContent); - } - - @Override - public int hashCode() { - return Objects.hash(dbtConnectionIdentifier, fileContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DbtGenerateSyncTmlRequest {\n"); - sb.append(" dbtConnectionIdentifier: ") - .append(toIndentedString(dbtConnectionIdentifier)) - .append("\n"); - sb.append(" fileContent: ").append(toIndentedString(fileContent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dbt_connection_identifier"); - openapiFields.add("file_content"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("dbt_connection_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DbtGenerateSyncTmlRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DbtGenerateSyncTmlRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DbtGenerateSyncTmlRequest is not" - + " found in the empty JSON string", - DbtGenerateSyncTmlRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DbtGenerateSyncTmlRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DbtGenerateSyncTmlRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DbtGenerateSyncTmlRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - 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("dbt_connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_connection_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("dbt_connection_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DbtGenerateSyncTmlRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DbtGenerateSyncTmlRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DbtGenerateSyncTmlRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DbtGenerateSyncTmlRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DbtGenerateSyncTmlRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DbtGenerateSyncTmlRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DbtGenerateSyncTmlRequest - * @throws IOException if the JSON string is invalid with respect to DbtGenerateSyncTmlRequest - */ - public static DbtGenerateSyncTmlRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DbtGenerateSyncTmlRequest.class); - } - - /** - * Convert an instance of DbtGenerateSyncTmlRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtGenerateTmlRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtGenerateTmlRequest.java deleted file mode 100644 index 6b87fce15..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtGenerateTmlRequest.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * NOTE: This 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.File; -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; - -/** DbtGenerateTmlRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DbtGenerateTmlRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER = - "dbt_connection_identifier"; - - @SerializedName(SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String dbtConnectionIdentifier; - - public static final String SERIALIZED_NAME_MODEL_TABLES = "model_tables"; - - @SerializedName(SERIALIZED_NAME_MODEL_TABLES) - @javax.annotation.Nullable - private List modelTables; - - /** Mention the worksheet tmls to import */ - @JsonAdapter(ImportWorksheetsEnum.Adapter.class) - public enum ImportWorksheetsEnum { - ALL("ALL"), - - NONE("NONE"), - - SELECTED("SELECTED"); - - private String value; - - ImportWorksheetsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ImportWorksheetsEnum fromValue(String value) { - for (ImportWorksheetsEnum b : ImportWorksheetsEnum.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 ImportWorksheetsEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ImportWorksheetsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ImportWorksheetsEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ImportWorksheetsEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_IMPORT_WORKSHEETS = "import_worksheets"; - - @SerializedName(SERIALIZED_NAME_IMPORT_WORKSHEETS) - @javax.annotation.Nonnull - private ImportWorksheetsEnum importWorksheets; - - public static final String SERIALIZED_NAME_WORKSHEETS = "worksheets"; - - @SerializedName(SERIALIZED_NAME_WORKSHEETS) - @javax.annotation.Nullable - private List worksheets; - - public static final String SERIALIZED_NAME_FILE_CONTENT = "file_content"; - - @SerializedName(SERIALIZED_NAME_FILE_CONTENT) - @javax.annotation.Nullable - private File fileContent; - - public DbtGenerateTmlRequest() {} - - public DbtGenerateTmlRequest dbtConnectionIdentifier( - @javax.annotation.Nonnull String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - return this; - } - - /** - * Unique ID of the DBT connection. - * - * @return dbtConnectionIdentifier - */ - @javax.annotation.Nonnull - public String getDbtConnectionIdentifier() { - return dbtConnectionIdentifier; - } - - public void setDbtConnectionIdentifier( - @javax.annotation.Nonnull String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - } - - public DbtGenerateTmlRequest modelTables( - @javax.annotation.Nullable List modelTables) { - this.modelTables = modelTables; - return this; - } - - public DbtGenerateTmlRequest addModelTablesItem(ModelTableList modelTablesItem) { - if (this.modelTables == null) { - this.modelTables = new ArrayList<>(); - } - this.modelTables.add(modelTablesItem); - return this; - } - - /** - * List of Models and their respective Tables - * - * @return modelTables - */ - @javax.annotation.Nullable - public List getModelTables() { - return modelTables; - } - - public void setModelTables(@javax.annotation.Nullable List modelTables) { - this.modelTables = modelTables; - } - - public DbtGenerateTmlRequest importWorksheets( - @javax.annotation.Nonnull ImportWorksheetsEnum importWorksheets) { - this.importWorksheets = importWorksheets; - return this; - } - - /** - * Mention the worksheet tmls to import - * - * @return importWorksheets - */ - @javax.annotation.Nonnull - public ImportWorksheetsEnum getImportWorksheets() { - return importWorksheets; - } - - public void setImportWorksheets( - @javax.annotation.Nonnull ImportWorksheetsEnum importWorksheets) { - this.importWorksheets = importWorksheets; - } - - public DbtGenerateTmlRequest worksheets(@javax.annotation.Nullable List worksheets) { - this.worksheets = worksheets; - return this; - } - - public DbtGenerateTmlRequest addWorksheetsItem(String worksheetsItem) { - if (this.worksheets == null) { - this.worksheets = new ArrayList<>(); - } - this.worksheets.add(worksheetsItem); - return this; - } - - /** - * List of worksheets is mandatory when import_Worksheets is type SELECTED - * - * @return worksheets - */ - @javax.annotation.Nullable - public List getWorksheets() { - return worksheets; - } - - public void setWorksheets(@javax.annotation.Nullable List worksheets) { - this.worksheets = worksheets; - } - - public DbtGenerateTmlRequest fileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - return this; - } - - /** - * 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’ - * - * @return fileContent - */ - @javax.annotation.Nullable - public File getFileContent() { - return fileContent; - } - - public void setFileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DbtGenerateTmlRequest dbtGenerateTmlRequest = (DbtGenerateTmlRequest) o; - return Objects.equals( - this.dbtConnectionIdentifier, dbtGenerateTmlRequest.dbtConnectionIdentifier) - && Objects.equals(this.modelTables, dbtGenerateTmlRequest.modelTables) - && Objects.equals(this.importWorksheets, dbtGenerateTmlRequest.importWorksheets) - && Objects.equals(this.worksheets, dbtGenerateTmlRequest.worksheets) - && Objects.equals(this.fileContent, dbtGenerateTmlRequest.fileContent); - } - - @Override - public int hashCode() { - return Objects.hash( - dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DbtGenerateTmlRequest {\n"); - sb.append(" dbtConnectionIdentifier: ") - .append(toIndentedString(dbtConnectionIdentifier)) - .append("\n"); - sb.append(" modelTables: ").append(toIndentedString(modelTables)).append("\n"); - sb.append(" importWorksheets: ").append(toIndentedString(importWorksheets)).append("\n"); - sb.append(" worksheets: ").append(toIndentedString(worksheets)).append("\n"); - sb.append(" fileContent: ").append(toIndentedString(fileContent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dbt_connection_identifier"); - openapiFields.add("model_tables"); - openapiFields.add("import_worksheets"); - openapiFields.add("worksheets"); - openapiFields.add("file_content"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("dbt_connection_identifier"); - openapiRequiredFields.add("import_worksheets"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DbtGenerateTmlRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DbtGenerateTmlRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DbtGenerateTmlRequest is not found in" - + " the empty JSON string", - DbtGenerateTmlRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DbtGenerateTmlRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DbtGenerateTmlRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DbtGenerateTmlRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - 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("dbt_connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_connection_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("dbt_connection_identifier").toString())); - } - if (jsonObj.get("model_tables") != null && !jsonObj.get("model_tables").isJsonNull()) { - JsonArray jsonArraymodelTables = jsonObj.getAsJsonArray("model_tables"); - if (jsonArraymodelTables != null) { - // ensure the json data is an array - if (!jsonObj.get("model_tables").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `model_tables` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("model_tables").toString())); - } - - // validate the optional field `model_tables` (array) - for (int i = 0; i < jsonArraymodelTables.size(); i++) { - ModelTableList.validateJsonElement(jsonArraymodelTables.get(i)); - } - ; - } - } - if (!jsonObj.get("import_worksheets").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_worksheets` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("import_worksheets").toString())); - } - // validate the required field `import_worksheets` - ImportWorksheetsEnum.validateJsonElement(jsonObj.get("import_worksheets")); - // ensure the optional json data is an array if present - if (jsonObj.get("worksheets") != null - && !jsonObj.get("worksheets").isJsonNull() - && !jsonObj.get("worksheets").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `worksheets` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("worksheets").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DbtGenerateTmlRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DbtGenerateTmlRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DbtGenerateTmlRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DbtGenerateTmlRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DbtGenerateTmlRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DbtGenerateTmlRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DbtGenerateTmlRequest - * @throws IOException if the JSON string is invalid with respect to DbtGenerateTmlRequest - */ - public static DbtGenerateTmlRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DbtGenerateTmlRequest.class); - } - - /** - * Convert an instance of DbtGenerateTmlRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java index 5e02a57cd..f039a639b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java @@ -4,441 +4,389 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** DbtSearchResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DbtSearchResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER = - "dbt_connection_identifier"; - - @SerializedName(SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER) - @javax.annotation.Nullable - private String dbtConnectionIdentifier; - - public static final String SERIALIZED_NAME_PROJECT_NAME = "project_name"; - - @SerializedName(SERIALIZED_NAME_PROJECT_NAME) - @javax.annotation.Nullable - private String projectName; - - public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_ID) - @javax.annotation.Nullable - private String connectionId; - - public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) - @javax.annotation.Nullable - private String connectionName; - - public static final String SERIALIZED_NAME_CDW_DATABASE = "cdw_database"; - - @SerializedName(SERIALIZED_NAME_CDW_DATABASE) - @javax.annotation.Nullable - private String cdwDatabase; - - public static final String SERIALIZED_NAME_IMPORT_TYPE = "import_type"; - - @SerializedName(SERIALIZED_NAME_IMPORT_TYPE) - @javax.annotation.Nullable - private String importType; - - public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) - @javax.annotation.Nullable - private String authorName; - - public DbtSearchResponse() {} - - public DbtSearchResponse dbtConnectionIdentifier( - @javax.annotation.Nullable String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - return this; - } - - /** - * Get dbtConnectionIdentifier - * - * @return dbtConnectionIdentifier - */ - @javax.annotation.Nullable - public String getDbtConnectionIdentifier() { - return dbtConnectionIdentifier; - } - - public void setDbtConnectionIdentifier( - @javax.annotation.Nullable String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - } - - public DbtSearchResponse projectName(@javax.annotation.Nullable String projectName) { - this.projectName = projectName; - return this; - } - - /** - * Get projectName - * - * @return projectName - */ - @javax.annotation.Nullable - public String getProjectName() { - return projectName; - } - - public void setProjectName(@javax.annotation.Nullable String projectName) { - this.projectName = projectName; - } - - public DbtSearchResponse connectionId(@javax.annotation.Nullable String connectionId) { - this.connectionId = connectionId; - return this; - } - - /** - * Get connectionId - * - * @return connectionId - */ - @javax.annotation.Nullable - public String getConnectionId() { - return connectionId; - } - - public void setConnectionId(@javax.annotation.Nullable String connectionId) { - this.connectionId = connectionId; - } - - public DbtSearchResponse connectionName(@javax.annotation.Nullable String connectionName) { - this.connectionName = connectionName; - return this; - } - - /** - * Get connectionName - * - * @return connectionName - */ - @javax.annotation.Nullable - public String getConnectionName() { - return connectionName; - } - - public void setConnectionName(@javax.annotation.Nullable String connectionName) { - this.connectionName = connectionName; - } - - public DbtSearchResponse cdwDatabase(@javax.annotation.Nullable String cdwDatabase) { - this.cdwDatabase = cdwDatabase; - return this; - } - - /** - * Get cdwDatabase - * - * @return cdwDatabase - */ - @javax.annotation.Nullable - public String getCdwDatabase() { - return cdwDatabase; - } - - public void setCdwDatabase(@javax.annotation.Nullable String cdwDatabase) { - this.cdwDatabase = cdwDatabase; - } - - public DbtSearchResponse importType(@javax.annotation.Nullable String importType) { - this.importType = importType; - return this; - } - - /** - * Get importType - * - * @return importType - */ - @javax.annotation.Nullable - public String getImportType() { - return importType; - } - - public void setImportType(@javax.annotation.Nullable String importType) { - this.importType = importType; - } - - public DbtSearchResponse authorName(@javax.annotation.Nullable String authorName) { - this.authorName = authorName; - return this; - } - /** - * Get authorName - * - * @return authorName - */ - @javax.annotation.Nullable - public String getAuthorName() { - return authorName; - } - - public void setAuthorName(@javax.annotation.Nullable String authorName) { - this.authorName = authorName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DbtSearchResponse dbtSearchResponse = (DbtSearchResponse) o; - return Objects.equals( - this.dbtConnectionIdentifier, dbtSearchResponse.dbtConnectionIdentifier) - && Objects.equals(this.projectName, dbtSearchResponse.projectName) - && Objects.equals(this.connectionId, dbtSearchResponse.connectionId) - && Objects.equals(this.connectionName, dbtSearchResponse.connectionName) - && Objects.equals(this.cdwDatabase, dbtSearchResponse.cdwDatabase) - && Objects.equals(this.importType, dbtSearchResponse.importType) - && Objects.equals(this.authorName, dbtSearchResponse.authorName); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - dbtConnectionIdentifier, - projectName, - connectionId, - connectionName, - cdwDatabase, - importType, - authorName); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DbtSearchResponse {\n"); - sb.append(" dbtConnectionIdentifier: ") - .append(toIndentedString(dbtConnectionIdentifier)) - .append("\n"); - sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); - sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); - sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); - sb.append(" cdwDatabase: ").append(toIndentedString(cdwDatabase)).append("\n"); - sb.append(" importType: ").append(toIndentedString(importType)).append("\n"); - sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dbt_connection_identifier"); - openapiFields.add("project_name"); - openapiFields.add("connection_id"); - openapiFields.add("connection_name"); - openapiFields.add("cdw_database"); - openapiFields.add("import_type"); - openapiFields.add("author_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DbtSearchResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DbtSearchResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DbtSearchResponse is not found in the" - + " empty JSON string", - DbtSearchResponse.openapiRequiredFields.toString())); - } +/** + * DbtSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DbtSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER = "dbt_connection_identifier"; + @SerializedName(SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER) + @javax.annotation.Nullable + private String dbtConnectionIdentifier; + + public static final String SERIALIZED_NAME_PROJECT_NAME = "project_name"; + @SerializedName(SERIALIZED_NAME_PROJECT_NAME) + @javax.annotation.Nullable + private String projectName; + + public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; + @SerializedName(SERIALIZED_NAME_CONNECTION_ID) + @javax.annotation.Nullable + private String connectionId; + + public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; + @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) + @javax.annotation.Nullable + private String connectionName; + + public static final String SERIALIZED_NAME_CDW_DATABASE = "cdw_database"; + @SerializedName(SERIALIZED_NAME_CDW_DATABASE) + @javax.annotation.Nullable + private String cdwDatabase; + + public static final String SERIALIZED_NAME_IMPORT_TYPE = "import_type"; + @SerializedName(SERIALIZED_NAME_IMPORT_TYPE) + @javax.annotation.Nullable + private String importType; + + public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; + @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable + private String authorName; + + public DbtSearchResponse() { + } + + public DbtSearchResponse dbtConnectionIdentifier(@javax.annotation.Nullable String dbtConnectionIdentifier) { + this.dbtConnectionIdentifier = dbtConnectionIdentifier; + return this; + } + + /** + * Get dbtConnectionIdentifier + * @return dbtConnectionIdentifier + */ + @javax.annotation.Nullable + public String getDbtConnectionIdentifier() { + return dbtConnectionIdentifier; + } + + public void setDbtConnectionIdentifier(@javax.annotation.Nullable String dbtConnectionIdentifier) { + this.dbtConnectionIdentifier = dbtConnectionIdentifier; + } + + + public DbtSearchResponse projectName(@javax.annotation.Nullable String projectName) { + this.projectName = projectName; + return this; + } + + /** + * Get projectName + * @return projectName + */ + @javax.annotation.Nullable + public String getProjectName() { + return projectName; + } + + public void setProjectName(@javax.annotation.Nullable String projectName) { + this.projectName = projectName; + } + + + public DbtSearchResponse connectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Get connectionId + * @return connectionId + */ + @javax.annotation.Nullable + public String getConnectionId() { + return connectionId; + } + + public void setConnectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + } + + + public DbtSearchResponse connectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + */ + @javax.annotation.Nullable + public String getConnectionName() { + return connectionName; + } + + public void setConnectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + } + + + public DbtSearchResponse cdwDatabase(@javax.annotation.Nullable String cdwDatabase) { + this.cdwDatabase = cdwDatabase; + return this; + } + + /** + * Get cdwDatabase + * @return cdwDatabase + */ + @javax.annotation.Nullable + public String getCdwDatabase() { + return cdwDatabase; + } + + public void setCdwDatabase(@javax.annotation.Nullable String cdwDatabase) { + this.cdwDatabase = cdwDatabase; + } + + + public DbtSearchResponse importType(@javax.annotation.Nullable String importType) { + this.importType = importType; + return this; + } + + /** + * Get importType + * @return importType + */ + @javax.annotation.Nullable + public String getImportType() { + return importType; + } + + public void setImportType(@javax.annotation.Nullable String importType) { + this.importType = importType; + } + + + public DbtSearchResponse authorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Get authorName + * @return authorName + */ + @javax.annotation.Nullable + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DbtSearchResponse dbtSearchResponse = (DbtSearchResponse) o; + return Objects.equals(this.dbtConnectionIdentifier, dbtSearchResponse.dbtConnectionIdentifier) && + Objects.equals(this.projectName, dbtSearchResponse.projectName) && + Objects.equals(this.connectionId, dbtSearchResponse.connectionId) && + Objects.equals(this.connectionName, dbtSearchResponse.connectionName) && + Objects.equals(this.cdwDatabase, dbtSearchResponse.cdwDatabase) && + Objects.equals(this.importType, dbtSearchResponse.importType) && + Objects.equals(this.authorName, dbtSearchResponse.authorName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dbtConnectionIdentifier, projectName, connectionId, connectionName, cdwDatabase, importType, authorName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DbtSearchResponse {\n"); + sb.append(" dbtConnectionIdentifier: ").append(toIndentedString(dbtConnectionIdentifier)).append("\n"); + sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" cdwDatabase: ").append(toIndentedString(cdwDatabase)).append("\n"); + sb.append(" importType: ").append(toIndentedString(importType)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dbt_connection_identifier"); + openapiFields.add("project_name"); + openapiFields.add("connection_id"); + openapiFields.add("connection_name"); + openapiFields.add("cdw_database"); + openapiFields.add("import_type"); + openapiFields.add("author_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DbtSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DbtSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DbtSearchResponse is not found in the empty JSON string", DbtSearchResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DbtSearchResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DbtSearchResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DbtSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DbtSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dbt_connection_identifier") != null - && !jsonObj.get("dbt_connection_identifier").isJsonNull()) - && !jsonObj.get("dbt_connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_connection_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("dbt_connection_identifier").toString())); - } - if ((jsonObj.get("project_name") != null && !jsonObj.get("project_name").isJsonNull()) - && !jsonObj.get("project_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `project_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("project_name").toString())); - } - if ((jsonObj.get("connection_id") != null && !jsonObj.get("connection_id").isJsonNull()) - && !jsonObj.get("connection_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("connection_id").toString())); - } - if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) - && !jsonObj.get("connection_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("connection_name").toString())); - } - if ((jsonObj.get("cdw_database") != null && !jsonObj.get("cdw_database").isJsonNull()) - && !jsonObj.get("cdw_database").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cdw_database` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("cdw_database").toString())); - } - if ((jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) - && !jsonObj.get("import_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("import_type").toString())); - } - if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) - && !jsonObj.get("author_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DbtSearchResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DbtSearchResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DbtSearchResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DbtSearchResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DbtSearchResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DbtSearchResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DbtSearchResponse - * @throws IOException if the JSON string is invalid with respect to DbtSearchResponse - */ - public static DbtSearchResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DbtSearchResponse.class); - } - - /** - * Convert an instance of DbtSearchResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("dbt_connection_identifier") != null && !jsonObj.get("dbt_connection_identifier").isJsonNull()) && !jsonObj.get("dbt_connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dbt_connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbt_connection_identifier").toString())); + } + if ((jsonObj.get("project_name") != null && !jsonObj.get("project_name").isJsonNull()) && !jsonObj.get("project_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `project_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_name").toString())); + } + if ((jsonObj.get("connection_id") != null && !jsonObj.get("connection_id").isJsonNull()) && !jsonObj.get("connection_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_id").toString())); + } + if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) && !jsonObj.get("connection_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_name").toString())); + } + if ((jsonObj.get("cdw_database") != null && !jsonObj.get("cdw_database").isJsonNull()) && !jsonObj.get("cdw_database").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cdw_database` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cdw_database").toString())); + } + if ((jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) && !jsonObj.get("import_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `import_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("import_type").toString())); + } + if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) && !jsonObj.get("author_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DbtSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DbtSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DbtSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DbtSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DbtSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DbtSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DbtSearchResponse + * @throws IOException if the JSON string is invalid with respect to DbtSearchResponse + */ + public static DbtSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DbtSearchResponse.class); + } + + /** + * Convert an instance of DbtSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java index ebacf13d3..e8161f303 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java @@ -4,239 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DeactivateUserRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeactivateUserRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nonnull - private String userIdentifier; - - public static final String SERIALIZED_NAME_BASE_URL = "base_url"; - - @SerializedName(SERIALIZED_NAME_BASE_URL) - @javax.annotation.Nonnull - private String baseUrl; - - public DeactivateUserRequest() {} - - public DeactivateUserRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * Unique ID or name of the user. - * - * @return userIdentifier - */ - @javax.annotation.Nonnull - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - public DeactivateUserRequest baseUrl(@javax.annotation.Nonnull String baseUrl) { - this.baseUrl = baseUrl; - return this; - } - - /** - * Base url of the cluster. - * - * @return baseUrl - */ - @javax.annotation.Nonnull - public String getBaseUrl() { - return baseUrl; - } - - public void setBaseUrl(@javax.annotation.Nonnull String baseUrl) { - this.baseUrl = baseUrl; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeactivateUserRequest deactivateUserRequest = (DeactivateUserRequest) o; - return Objects.equals(this.userIdentifier, deactivateUserRequest.userIdentifier) - && Objects.equals(this.baseUrl, deactivateUserRequest.baseUrl); +/** + * DeactivateUserRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeactivateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_BASE_URL = "base_url"; + @SerializedName(SERIALIZED_NAME_BASE_URL) + @javax.annotation.Nonnull + private String baseUrl; + + public DeactivateUserRequest() { + } + + public DeactivateUserRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Unique ID or name of the user. + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + public DeactivateUserRequest baseUrl(@javax.annotation.Nonnull String baseUrl) { + this.baseUrl = baseUrl; + return this; + } + + /** + * Base url of the cluster. + * @return baseUrl + */ + @javax.annotation.Nonnull + public String getBaseUrl() { + return baseUrl; + } + + public void setBaseUrl(@javax.annotation.Nonnull String baseUrl) { + this.baseUrl = baseUrl; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(userIdentifier, baseUrl); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeactivateUserRequest {\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append(" baseUrl: ").append(toIndentedString(baseUrl)).append("\n"); - sb.append("}"); - return sb.toString(); + DeactivateUserRequest deactivateUserRequest = (DeactivateUserRequest) o; + return Objects.equals(this.userIdentifier, deactivateUserRequest.userIdentifier) && + Objects.equals(this.baseUrl, deactivateUserRequest.baseUrl); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, baseUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeactivateUserRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" baseUrl: ").append(toIndentedString(baseUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("base_url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_identifier"); + openapiRequiredFields.add("base_url"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeactivateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeactivateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeactivateUserRequest is not found in the empty JSON string", DeactivateUserRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_identifier"); - openapiFields.add("base_url"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("user_identifier"); - openapiRequiredFields.add("base_url"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeactivateUserRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeactivateUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeactivateUserRequest is not found in" - + " the empty JSON string", - DeactivateUserRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeactivateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeactivateUserRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeactivateUserRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeactivateUserRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeactivateUserRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeactivateUserRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - if (!jsonObj.get("base_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `base_url` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("base_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeactivateUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeactivateUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeactivateUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeactivateUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeactivateUserRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeactivateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeactivateUserRequest - * @throws IOException if the JSON string is invalid with respect to DeactivateUserRequest - */ - public static DeactivateUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeactivateUserRequest.class); - } - - /** - * Convert an instance of DeactivateUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + if (!jsonObj.get("base_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `base_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("base_url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeactivateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeactivateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeactivateUserRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeactivateUserRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeactivateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeactivateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeactivateUserRequest + * @throws IOException if the JSON string is invalid with respect to DeactivateUserRequest + */ + public static DeactivateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeactivateUserRequest.class); + } + + /** + * Convert an instance of DeactivateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java index b13489247..c2212d008 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java @@ -4,208 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Default Custom action configuration. This includes the custom action's visibility across all - * visualizations and Answers. By default, a custom action is added to all visualizations and - * Answers. + * Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DefaultActionConfig implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility; + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; - public DefaultActionConfig() {} + public DefaultActionConfig() { + } - public DefaultActionConfig visibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; - } - - /** - * Custom action is available on all visualizations. Earlier , the naming convention: - * LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; - } + public DefaultActionConfig visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - } + /** + * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultActionConfig defaultActionConfig = (DefaultActionConfig) o; - return Objects.equals(this.visibility, defaultActionConfig.visibility); - } + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(visibility); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DefaultActionConfig {\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DefaultActionConfig defaultActionConfig = (DefaultActionConfig) o; + return Objects.equals(this.visibility, defaultActionConfig.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfig {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfig - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DefaultActionConfig.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DefaultActionConfig is not found in" - + " the empty JSON string", - DefaultActionConfig.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultActionConfig is not found in the empty JSON string", DefaultActionConfig.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DefaultActionConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DefaultActionConfig` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DefaultActionConfig.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DefaultActionConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DefaultActionConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DefaultActionConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfig.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DefaultActionConfig value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DefaultActionConfig read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DefaultActionConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of DefaultActionConfig - * @throws IOException if the JSON string is invalid with respect to DefaultActionConfig - */ - public static DefaultActionConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DefaultActionConfig.class); - } + } - /** - * Convert an instance of DefaultActionConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DefaultActionConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfig + * @throws IOException if the JSON string is invalid with respect to DefaultActionConfig + */ + public static DefaultActionConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfig.class); + } + + /** + * Convert an instance of DefaultActionConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java index eb3dad4e1..e6240d31d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java @@ -4,209 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Default Custom action configuration. This includes the custom action's visibility across all - * visualizations and Answers. By default, a custom action is added to all visualizations and - * Answers. + * Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DefaultActionConfigInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility; + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; - public DefaultActionConfigInput() {} + public DefaultActionConfigInput() { + } - public DefaultActionConfigInput visibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; - } - - /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. - * TRUE signifies GLOBAL for backward compatibility. - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; - } + public DefaultActionConfigInput visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - } + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultActionConfigInput defaultActionConfigInput = (DefaultActionConfigInput) o; - return Objects.equals(this.visibility, defaultActionConfigInput.visibility); - } + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(visibility); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DefaultActionConfigInput {\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DefaultActionConfigInput defaultActionConfigInput = (DefaultActionConfigInput) o; + return Objects.equals(this.visibility, defaultActionConfigInput.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfigInput {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfigInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DefaultActionConfigInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DefaultActionConfigInput is not found" - + " in the empty JSON string", - DefaultActionConfigInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfigInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultActionConfigInput is not found in the empty JSON string", DefaultActionConfigInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DefaultActionConfigInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DefaultActionConfigInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DefaultActionConfigInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DefaultActionConfigInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DefaultActionConfigInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DefaultActionConfigInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfigInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DefaultActionConfigInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DefaultActionConfigInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DefaultActionConfigInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DefaultActionConfigInput - * @throws IOException if the JSON string is invalid with respect to DefaultActionConfigInput - */ - public static DefaultActionConfigInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DefaultActionConfigInput.class); - } + } - /** - * Convert an instance of DefaultActionConfigInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfigInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfigInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfigInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DefaultActionConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfigInput + * @throws IOException if the JSON string is invalid with respect to DefaultActionConfigInput + */ + public static DefaultActionConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfigInput.class); + } + + /** + * Convert an instance of DefaultActionConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java index aa1a67bf2..a6ff00694 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java @@ -4,215 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Default Custom action configuration. This includes the custom action's visibility across all - * visualizations and Answers. By default, a custom action is added to all visualizations and - * Answers. + * Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DefaultActionConfigInputCreate implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility = true; + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility = true; - public DefaultActionConfigInputCreate() {} + public DefaultActionConfigInputCreate() { + } - public DefaultActionConfigInputCreate visibility( - @javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; - } - - /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. - * TRUE signifies GLOBAL for backward compatibility. Default: true - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; - } + public DefaultActionConfigInputCreate visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - } + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultActionConfigInputCreate defaultActionConfigInputCreate = - (DefaultActionConfigInputCreate) o; - return Objects.equals(this.visibility, defaultActionConfigInputCreate.visibility); - } + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(visibility); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DefaultActionConfigInputCreate {\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DefaultActionConfigInputCreate defaultActionConfigInputCreate = (DefaultActionConfigInputCreate) o; + return Objects.equals(this.visibility, defaultActionConfigInputCreate.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfigInputCreate {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DefaultActionConfigInputCreate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DefaultActionConfigInputCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DefaultActionConfigInputCreate is not" - + " found in the empty JSON string", - DefaultActionConfigInputCreate.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfigInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfigInputCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultActionConfigInputCreate is not found in the empty JSON string", DefaultActionConfigInputCreate.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DefaultActionConfigInputCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DefaultActionConfigInputCreate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DefaultActionConfigInputCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DefaultActionConfigInputCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DefaultActionConfigInputCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DefaultActionConfigInputCreate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DefaultActionConfigInputCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DefaultActionConfigInputCreate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DefaultActionConfigInputCreate read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DefaultActionConfigInputCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of DefaultActionConfigInputCreate - * @throws IOException if the JSON string is invalid with respect to - * DefaultActionConfigInputCreate - */ - public static DefaultActionConfigInputCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DefaultActionConfigInputCreate.class); - } + } - /** - * Convert an instance of DefaultActionConfigInputCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfigInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfigInputCreate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfigInputCreate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfigInputCreate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfigInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DefaultActionConfigInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfigInputCreate + * @throws IOException if the JSON string is invalid with respect to DefaultActionConfigInputCreate + */ + public static DefaultActionConfigInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfigInputCreate.class); + } + + /** + * Convert an instance of DefaultActionConfigInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java index 68f8106a1..e11ee8284 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java @@ -4,215 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Default Custom action configuration. This includes the custom action's visibility across all - * visualizations and Answers. By default, a custom action is added to all visualizations and - * Answers. + * Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DefaultActionConfigSearchInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private Boolean visibility; + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; - public DefaultActionConfigSearchInput() {} + public DefaultActionConfigSearchInput() { + } - public DefaultActionConfigSearchInput visibility( - @javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - return this; - } - - /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. - * TRUE signifies GLOBAL for backward compatibility. - * - * @return visibility - */ - @javax.annotation.Nullable - public Boolean getVisibility() { - return visibility; - } + public DefaultActionConfigSearchInput visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } - public void setVisibility(@javax.annotation.Nullable Boolean visibility) { - this.visibility = visibility; - } + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultActionConfigSearchInput defaultActionConfigSearchInput = - (DefaultActionConfigSearchInput) o; - return Objects.equals(this.visibility, defaultActionConfigSearchInput.visibility); - } + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(visibility); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DefaultActionConfigSearchInput {\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DefaultActionConfigSearchInput defaultActionConfigSearchInput = (DefaultActionConfigSearchInput) o; + return Objects.equals(this.visibility, defaultActionConfigSearchInput.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfigSearchInput {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DefaultActionConfigSearchInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DefaultActionConfigSearchInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DefaultActionConfigSearchInput is not" - + " found in the empty JSON string", - DefaultActionConfigSearchInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfigSearchInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfigSearchInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DefaultActionConfigSearchInput is not found in the empty JSON string", DefaultActionConfigSearchInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DefaultActionConfigSearchInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DefaultActionConfigSearchInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DefaultActionConfigSearchInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DefaultActionConfigSearchInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DefaultActionConfigSearchInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DefaultActionConfigSearchInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DefaultActionConfigSearchInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DefaultActionConfigSearchInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DefaultActionConfigSearchInput read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DefaultActionConfigSearchInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DefaultActionConfigSearchInput - * @throws IOException if the JSON string is invalid with respect to - * DefaultActionConfigSearchInput - */ - public static DefaultActionConfigSearchInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DefaultActionConfigSearchInput.class); - } + } - /** - * Convert an instance of DefaultActionConfigSearchInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfigSearchInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfigSearchInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfigSearchInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfigSearchInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfigSearchInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DefaultActionConfigSearchInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfigSearchInput + * @throws IOException if the JSON string is invalid with respect to DefaultActionConfigSearchInput + */ + public static DefaultActionConfigSearchInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfigSearchInput.class); + } + + /** + * Convert an instance of DefaultActionConfigSearchInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java index 3ca4e6c73..39f5a4d46 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java @@ -4,206 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** DeleteConfigRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * DeleteConfigRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DeleteConfigRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_CLUSTER_LEVEL = "cluster_level"; + public static final String SERIALIZED_NAME_CLUSTER_LEVEL = "cluster_level"; + @SerializedName(SERIALIZED_NAME_CLUSTER_LEVEL) + @javax.annotation.Nullable + private Boolean clusterLevel; - @SerializedName(SERIALIZED_NAME_CLUSTER_LEVEL) - @javax.annotation.Nullable - private Boolean clusterLevel; + public DeleteConfigRequest() { + } - public DeleteConfigRequest() {} + public DeleteConfigRequest clusterLevel(@javax.annotation.Nullable Boolean clusterLevel) { + this.clusterLevel = clusterLevel; + return this; + } - public DeleteConfigRequest clusterLevel(@javax.annotation.Nullable Boolean clusterLevel) { - this.clusterLevel = clusterLevel; - return this; - } + /** + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later + * @return clusterLevel + */ + @javax.annotation.Nullable + public Boolean getClusterLevel() { + return clusterLevel; + } - /** - * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org - * level config. Set it to false to delete configuration from current org. If set to true, then - * the configuration at cluster level and orgs that inherited the configuration from cluster - * level will be deleted. Version: 9.5.0.cl or later - * - * @return clusterLevel - */ - @javax.annotation.Nullable - public Boolean getClusterLevel() { - return clusterLevel; - } + public void setClusterLevel(@javax.annotation.Nullable Boolean clusterLevel) { + this.clusterLevel = clusterLevel; + } - public void setClusterLevel(@javax.annotation.Nullable Boolean clusterLevel) { - this.clusterLevel = clusterLevel; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteConfigRequest deleteConfigRequest = (DeleteConfigRequest) o; - return Objects.equals(this.clusterLevel, deleteConfigRequest.clusterLevel); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(clusterLevel); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + DeleteConfigRequest deleteConfigRequest = (DeleteConfigRequest) o; + return Objects.equals(this.clusterLevel, deleteConfigRequest.clusterLevel); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(clusterLevel); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteConfigRequest {\n"); - sb.append(" clusterLevel: ").append(toIndentedString(clusterLevel)).append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteConfigRequest {\n"); + sb.append(" clusterLevel: ").append(toIndentedString(clusterLevel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_level"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteConfigRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteConfigRequest is not found in the empty JSON string", DeleteConfigRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cluster_level"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeleteConfigRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeleteConfigRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteConfigRequest is not found in" - + " the empty JSON string", - DeleteConfigRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeleteConfigRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteConfigRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteConfigRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteConfigRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteConfigRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteConfigRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteConfigRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteConfigRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteConfigRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteConfigRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteConfigRequest - * @throws IOException if the JSON string is invalid with respect to DeleteConfigRequest - */ - public static DeleteConfigRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteConfigRequest.class); - } + } - /** - * Convert an instance of DeleteConfigRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteConfigRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteConfigRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeleteConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteConfigRequest + * @throws IOException if the JSON string is invalid with respect to DeleteConfigRequest + */ + public static DeleteConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteConfigRequest.class); + } + + /** + * Convert an instance of DeleteConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java index 496068545..ba62d7ad3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java @@ -4,261 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DeleteConnectionConfigurationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeleteConnectionConfigurationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = - "configuration_identifier"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) - @javax.annotation.Nonnull - private String configurationIdentifier; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; - - public DeleteConnectionConfigurationRequest() {} - - public DeleteConnectionConfigurationRequest configurationIdentifier( - @javax.annotation.Nonnull String configurationIdentifier) { - this.configurationIdentifier = configurationIdentifier; - return this; - } - - /** - * Unique ID or name of the configuration. - * - * @return configurationIdentifier - */ - @javax.annotation.Nonnull - public String getConfigurationIdentifier() { - return configurationIdentifier; - } - - public void setConfigurationIdentifier( - @javax.annotation.Nonnull String configurationIdentifier) { - this.configurationIdentifier = configurationIdentifier; - } - - public DeleteConnectionConfigurationRequest connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; - } - - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest = - (DeleteConnectionConfigurationRequest) o; - return Objects.equals( - this.configurationIdentifier, - deleteConnectionConfigurationRequest.configurationIdentifier) - && Objects.equals( - this.connectionIdentifier, - deleteConnectionConfigurationRequest.connectionIdentifier); +/** + * DeleteConnectionConfigurationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeleteConnectionConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = "configuration_identifier"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) + @javax.annotation.Nonnull + private String configurationIdentifier; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public DeleteConnectionConfigurationRequest() { + } + + public DeleteConnectionConfigurationRequest configurationIdentifier(@javax.annotation.Nonnull String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + return this; + } + + /** + * Unique ID or name of the configuration. + * @return configurationIdentifier + */ + @javax.annotation.Nonnull + public String getConfigurationIdentifier() { + return configurationIdentifier; + } + + public void setConfigurationIdentifier(@javax.annotation.Nonnull String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + } + + + public DeleteConnectionConfigurationRequest connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(configurationIdentifier, connectionIdentifier); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteConnectionConfigurationRequest {\n"); - sb.append(" configurationIdentifier: ") - .append(toIndentedString(configurationIdentifier)) - .append("\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest = (DeleteConnectionConfigurationRequest) o; + return Objects.equals(this.configurationIdentifier, deleteConnectionConfigurationRequest.configurationIdentifier) && + Objects.equals(this.connectionIdentifier, deleteConnectionConfigurationRequest.connectionIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(configurationIdentifier, connectionIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteConnectionConfigurationRequest {\n"); + sb.append(" configurationIdentifier: ").append(toIndentedString(configurationIdentifier)).append("\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration_identifier"); + openapiFields.add("connection_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("configuration_identifier"); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteConnectionConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteConnectionConfigurationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteConnectionConfigurationRequest is not found in the empty JSON string", DeleteConnectionConfigurationRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("configuration_identifier"); - openapiFields.add("connection_identifier"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("configuration_identifier"); - openapiRequiredFields.add("connection_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DeleteConnectionConfigurationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeleteConnectionConfigurationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteConnectionConfigurationRequest" - + " is not found in the empty JSON string", - DeleteConnectionConfigurationRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeleteConnectionConfigurationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteConnectionConfigurationRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteConnectionConfigurationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteConnectionConfigurationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteConnectionConfigurationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteConnectionConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("configuration_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `configuration_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("configuration_identifier").toString())); - } - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteConnectionConfigurationRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteConnectionConfigurationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, DeleteConnectionConfigurationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteConnectionConfigurationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteConnectionConfigurationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteConnectionConfigurationRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteConnectionConfigurationRequest - */ - public static DeleteConnectionConfigurationRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteConnectionConfigurationRequest.class); - } - - /** - * Convert an instance of DeleteConnectionConfigurationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("configuration_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configuration_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configuration_identifier").toString())); + } + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteConnectionConfigurationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteConnectionConfigurationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteConnectionConfigurationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteConnectionConfigurationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeleteConnectionConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteConnectionConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to DeleteConnectionConfigurationRequest + */ + public static DeleteConnectionConfigurationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteConnectionConfigurationRequest.class); + } + + /** + * Convert an instance of DeleteConnectionConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java index 5db51189d..13ca10ab8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java @@ -4,208 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DeleteConnectionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeleteConnectionRequest implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; +/** + * DeleteConnectionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeleteConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; - public DeleteConnectionRequest() {} + public DeleteConnectionRequest() { + } - public DeleteConnectionRequest connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } + public DeleteConnectionRequest connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; - } + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteConnectionRequest deleteConnectionRequest = (DeleteConnectionRequest) o; - return Objects.equals( - this.connectionIdentifier, deleteConnectionRequest.connectionIdentifier); - } - @Override - public int hashCode() { - return Objects.hash(connectionIdentifier); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteConnectionRequest {\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("connection_identifier"); + DeleteConnectionRequest deleteConnectionRequest = (DeleteConnectionRequest) o; + return Objects.equals(this.connectionIdentifier, deleteConnectionRequest.connectionIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteConnectionRequest {\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeleteConnectionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeleteConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteConnectionRequest is not found" - + " in the empty JSON string", - DeleteConnectionRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteConnectionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteConnectionRequest is not found in the empty JSON string", DeleteConnectionRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeleteConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteConnectionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteConnectionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteConnectionRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteConnectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - } + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteConnectionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteConnectionRequest - * @throws IOException if the JSON string is invalid with respect to DeleteConnectionRequest - */ - public static DeleteConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteConnectionRequest.class); - } - - /** - * Convert an instance of DeleteConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteConnectionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteConnectionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteConnectionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeleteConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteConnectionRequest + * @throws IOException if the JSON string is invalid with respect to DeleteConnectionRequest + */ + public static DeleteConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteConnectionRequest.class); + } + + /** + * Convert an instance of DeleteConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java index edd1d3340..6bac3b708 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java @@ -4,273 +4,262 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DeleteMetadataTypeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** DeleteMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeleteMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - - public static final String SERIALIZED_NAME_DELETE_DISABLED_OBJECTS = "delete_disabled_objects"; - - @SerializedName(SERIALIZED_NAME_DELETE_DISABLED_OBJECTS) - @javax.annotation.Nullable - private Boolean deleteDisabledObjects = false; - - public DeleteMetadataRequest() {} - - public DeleteMetadataRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; - } - - public DeleteMetadataRequest addMetadataItem(DeleteMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata objects. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } +import com.thoughtspot.client.JSON; - public DeleteMetadataRequest deleteDisabledObjects( - @javax.annotation.Nullable Boolean deleteDisabledObjects) { - this.deleteDisabledObjects = deleteDisabledObjects; - return this; - } +/** + * DeleteMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeleteMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * Indicates whether to delete disabled metadata objects. - * - * @return deleteDisabledObjects - */ - @javax.annotation.Nullable - public Boolean getDeleteDisabledObjects() { - return deleteDisabledObjects; - } + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; - public void setDeleteDisabledObjects(@javax.annotation.Nullable Boolean deleteDisabledObjects) { - this.deleteDisabledObjects = deleteDisabledObjects; - } + public static final String SERIALIZED_NAME_DELETE_DISABLED_OBJECTS = "delete_disabled_objects"; + @SerializedName(SERIALIZED_NAME_DELETE_DISABLED_OBJECTS) + @javax.annotation.Nullable + private Boolean deleteDisabledObjects = false; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteMetadataRequest deleteMetadataRequest = (DeleteMetadataRequest) o; - return Objects.equals(this.metadata, deleteMetadataRequest.metadata) - && Objects.equals( - this.deleteDisabledObjects, deleteMetadataRequest.deleteDisabledObjects); - } + public DeleteMetadataRequest() { + } - 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())); - } + public DeleteMetadataRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } - @Override - public int hashCode() { - return Objects.hash(metadata, deleteDisabledObjects); + public DeleteMetadataRequest addMetadataItem(DeleteMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public DeleteMetadataRequest deleteDisabledObjects(@javax.annotation.Nullable Boolean deleteDisabledObjects) { + this.deleteDisabledObjects = deleteDisabledObjects; + return this; + } + + /** + * Indicates whether to delete disabled metadata objects. + * @return deleteDisabledObjects + */ + @javax.annotation.Nullable + public Boolean getDeleteDisabledObjects() { + return deleteDisabledObjects; + } + + public void setDeleteDisabledObjects(@javax.annotation.Nullable Boolean deleteDisabledObjects) { + this.deleteDisabledObjects = deleteDisabledObjects; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteMetadataRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" deleteDisabledObjects: ") - .append(toIndentedString(deleteDisabledObjects)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DeleteMetadataRequest deleteMetadataRequest = (DeleteMetadataRequest) o; + return Objects.equals(this.metadata, deleteMetadataRequest.metadata) && + Objects.equals(this.deleteDisabledObjects, deleteMetadataRequest.deleteDisabledObjects); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, deleteDisabledObjects); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("delete_disabled_objects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" deleteDisabledObjects: ").append(toIndentedString(deleteDisabledObjects)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeleteMetadataRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeleteMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteMetadataRequest is not found in" - + " the empty JSON string", - DeleteMetadataRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("delete_disabled_objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteMetadataRequest is not found in the empty JSON string", DeleteMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeleteMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - DeleteMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteMetadataRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteMetadataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteMetadataRequest - * @throws IOException if the JSON string is invalid with respect to DeleteMetadataRequest - */ - public static DeleteMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteMetadataRequest.class); - } - - /** - * Convert an instance of DeleteMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + DeleteMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeleteMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteMetadataRequest + * @throws IOException if the JSON string is invalid with respect to DeleteMetadataRequest + */ + public static DeleteMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteMetadataRequest.class); + } + + /** + * Convert an instance of DeleteMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java index 71d604815..f453e6a1b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java @@ -4,324 +4,309 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataType InputType used in Delete MetadataType API */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeleteMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public DeleteMetadataTypeInput() {} - - public DeleteMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public DeleteMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; +/** + * MetadataType InputType used in Delete MetadataType API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeleteMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Unique ID or name of the metadata object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - DeleteMetadataTypeInput deleteMetadataTypeInput = (DeleteMetadataTypeInput) o; - return Objects.equals(this.type, deleteMetadataTypeInput.type) - && Objects.equals(this.identifier, deleteMetadataTypeInput.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public DeleteMetadataTypeInput() { + } + + public DeleteMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public DeleteMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DeleteMetadataTypeInput deleteMetadataTypeInput = (DeleteMetadataTypeInput) o; + return Objects.equals(this.type, deleteMetadataTypeInput.type) && + Objects.equals(this.identifier, deleteMetadataTypeInput.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeleteMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeleteMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteMetadataTypeInput is not found" - + " in the empty JSON string", - DeleteMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteMetadataTypeInput is not found in the empty JSON string", DeleteMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeleteMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteMetadataTypeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteMetadataTypeInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeleteMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteMetadataTypeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to DeleteMetadataTypeInput - */ - public static DeleteMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteMetadataTypeInput.class); - } - - /** - * Convert an instance of DeleteMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeleteMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to DeleteMetadataTypeInput + */ + public static DeleteMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteMetadataTypeInput.class); + } + + /** + * Convert an instance of DeleteMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java index fa8436b08..386b382d4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java @@ -4,215 +4,208 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DeleteOrgEmailCustomizationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * DeleteOrgEmailCustomizationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DeleteOrgEmailCustomizationRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; + public DeleteOrgEmailCustomizationRequest() { + } - public DeleteOrgEmailCustomizationRequest() {} + public DeleteOrgEmailCustomizationRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } - public DeleteOrgEmailCustomizationRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; + public DeleteOrgEmailCustomizationRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } - public DeleteOrgEmailCustomizationRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } + /** + * Unique identifier of the organization. + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } - /** - * Unique identifier of the organization. - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; - } + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest = - (DeleteOrgEmailCustomizationRequest) o; - return Objects.equals( - this.orgIdentifiers, deleteOrgEmailCustomizationRequest.orgIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(orgIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteOrgEmailCustomizationRequest {\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest = (DeleteOrgEmailCustomizationRequest) o; + return Objects.equals(this.orgIdentifiers, deleteOrgEmailCustomizationRequest.orgIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteOrgEmailCustomizationRequest {\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * DeleteOrgEmailCustomizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeleteOrgEmailCustomizationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeleteOrgEmailCustomizationRequest is" - + " not found in the empty JSON string", - DeleteOrgEmailCustomizationRequest.openapiRequiredFields - .toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteOrgEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteOrgEmailCustomizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteOrgEmailCustomizationRequest is not found in the empty JSON string", DeleteOrgEmailCustomizationRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeleteOrgEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeleteOrgEmailCustomizationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteOrgEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteOrgEmailCustomizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteOrgEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteOrgEmailCustomizationRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(DeleteOrgEmailCustomizationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteOrgEmailCustomizationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteOrgEmailCustomizationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteOrgEmailCustomizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteOrgEmailCustomizationRequest - * @throws IOException if the JSON string is invalid with respect to - * DeleteOrgEmailCustomizationRequest - */ - public static DeleteOrgEmailCustomizationRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteOrgEmailCustomizationRequest.class); - } - - /** - * Convert an instance of DeleteOrgEmailCustomizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteOrgEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteOrgEmailCustomizationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteOrgEmailCustomizationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteOrgEmailCustomizationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteOrgEmailCustomizationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeleteOrgEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteOrgEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to DeleteOrgEmailCustomizationRequest + */ + public static DeleteOrgEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteOrgEmailCustomizationRequest.class); + } + + /** + * Convert an instance of DeleteOrgEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java new file mode 100644 index 000000000..a6222089c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java @@ -0,0 +1,221 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/DeployCommitRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java index 2b627468c..86b1ecde4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java @@ -4,436 +4,409 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** DeployCommitRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeployCommitRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; - - @SerializedName(SERIALIZED_NAME_COMMIT_ID) - @javax.annotation.Nullable - private String commitId; - - public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; - - @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - @javax.annotation.Nonnull - private String branchName; - - /** - * Indicates if all files or only modified file at specified commit point should be considered - */ - @JsonAdapter(DeployTypeEnum.Adapter.class) - public enum DeployTypeEnum { - FULL("FULL"), - - DELTA("DELTA"); - - private String value; - - DeployTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeployTypeEnum fromValue(String value) { - for (DeployTypeEnum b : DeployTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeployTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeployTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeployTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DeployTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEPLOY_TYPE = "deploy_type"; - - @SerializedName(SERIALIZED_NAME_DEPLOY_TYPE) - @javax.annotation.Nullable - private DeployTypeEnum deployType = DeployTypeEnum.DELTA; - - /** - * Define the policy to follow while importing TML in the ThoughtSpot environment. Use - * “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them - * fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even - * if other objects in the same deploy operations fail to import. - */ - @JsonAdapter(DeployPolicyEnum.Adapter.class) - public enum DeployPolicyEnum { - ALL_OR_NONE("ALL_OR_NONE"), - - PARTIAL("PARTIAL"), - - VALIDATE_ONLY("VALIDATE_ONLY"); - - private String value; - - DeployPolicyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeployPolicyEnum fromValue(String value) { - for (DeployPolicyEnum b : DeployPolicyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeployPolicyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeployPolicyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeployPolicyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DeployPolicyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEPLOY_POLICY = "deploy_policy"; - - @SerializedName(SERIALIZED_NAME_DEPLOY_POLICY) - @javax.annotation.Nullable - private DeployPolicyEnum deployPolicy = DeployPolicyEnum.ALL_OR_NONE; - - public DeployCommitRequest() {} - - public DeployCommitRequest commitId(@javax.annotation.Nullable String commitId) { - this.commitId = commitId; - return this; - } - - /** - * Commit_id against which the files should be picked to deploy. Note: If no commit_id is - * specified, then the head of the branch is considered. - * - * @return commitId - */ - @javax.annotation.Nullable - public String getCommitId() { - return commitId; - } - - public void setCommitId(@javax.annotation.Nullable String commitId) { - this.commitId = commitId; - } - - public DeployCommitRequest branchName(@javax.annotation.Nonnull String branchName) { - this.branchName = branchName; - return this; - } - - /** - * Name of the remote branch where changes should be picked - * - * @return branchName - */ - @javax.annotation.Nonnull - public String getBranchName() { - return branchName; - } - - public void setBranchName(@javax.annotation.Nonnull String branchName) { - this.branchName = branchName; - } +import com.thoughtspot.client.JSON; - public DeployCommitRequest deployType(@javax.annotation.Nullable DeployTypeEnum deployType) { - this.deployType = deployType; - return this; +/** + * DeployCommitRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeployCommitRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nullable + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nonnull + private String branchName; + + /** + * Indicates if all files or only modified file at specified commit point should be considered + */ + @JsonAdapter(DeployTypeEnum.Adapter.class) + public enum DeployTypeEnum { + FULL("FULL"), + + DELTA("DELTA"); + + private String value; + + DeployTypeEnum(String value) { + this.value = value; } - /** - * Indicates if all files or only modified file at specified commit point should be considered - * - * @return deployType - */ - @javax.annotation.Nullable - public DeployTypeEnum getDeployType() { - return deployType; + public String getValue() { + return value; } - public void setDeployType(@javax.annotation.Nullable DeployTypeEnum deployType) { - this.deployType = deployType; + @Override + public String toString() { + return String.valueOf(value); } - public DeployCommitRequest deployPolicy( - @javax.annotation.Nullable DeployPolicyEnum deployPolicy) { - this.deployPolicy = deployPolicy; - return this; + public static DeployTypeEnum fromValue(String value) { + for (DeployTypeEnum b : DeployTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Define the policy to follow while importing TML in the ThoughtSpot environment. Use - * “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them - * fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even - * if other objects in the same deploy operations fail to import. - * - * @return deployPolicy - */ - @javax.annotation.Nullable - public DeployPolicyEnum getDeployPolicy() { - return deployPolicy; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeployTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeployTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeployTypeEnum.fromValue(value); + } } - public void setDeployPolicy(@javax.annotation.Nullable DeployPolicyEnum deployPolicy) { - this.deployPolicy = deployPolicy; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DeployTypeEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeployCommitRequest deployCommitRequest = (DeployCommitRequest) o; - return Objects.equals(this.commitId, deployCommitRequest.commitId) - && Objects.equals(this.branchName, deployCommitRequest.branchName) - && Objects.equals(this.deployType, deployCommitRequest.deployType) - && Objects.equals(this.deployPolicy, deployCommitRequest.deployPolicy); + } + + public static final String SERIALIZED_NAME_DEPLOY_TYPE = "deploy_type"; + @SerializedName(SERIALIZED_NAME_DEPLOY_TYPE) + @javax.annotation.Nullable + private DeployTypeEnum deployType = DeployTypeEnum.DELTA; + + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + */ + @JsonAdapter(DeployPolicyEnum.Adapter.class) + public enum DeployPolicyEnum { + ALL_OR_NONE("ALL_OR_NONE"), + + PARTIAL("PARTIAL"), + + VALIDATE_ONLY("VALIDATE_ONLY"); + + private String value; + + DeployPolicyEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(commitId, branchName, deployType, deployPolicy); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeployCommitRequest {\n"); - sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" deployType: ").append(toIndentedString(deployType)).append("\n"); - sb.append(" deployPolicy: ").append(toIndentedString(deployPolicy)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static DeployPolicyEnum fromValue(String value) { + for (DeployPolicyEnum b : DeployPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("commit_id"); - openapiFields.add("branch_name"); - openapiFields.add("deploy_type"); - openapiFields.add("deploy_policy"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("branch_name"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeployPolicyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeployPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeployPolicyEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeployCommitRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeployCommitRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeployCommitRequest is not found in" - + " the empty JSON string", - DeployCommitRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + DeployPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DEPLOY_POLICY = "deploy_policy"; + @SerializedName(SERIALIZED_NAME_DEPLOY_POLICY) + @javax.annotation.Nullable + private DeployPolicyEnum deployPolicy = DeployPolicyEnum.ALL_OR_NONE; + + public DeployCommitRequest() { + } + + public DeployCommitRequest commitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + return this; + } + + /** + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. + * @return commitId + */ + @javax.annotation.Nullable + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + } + + + public DeployCommitRequest branchName(@javax.annotation.Nonnull String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the remote branch where changes should be picked + * @return branchName + */ + @javax.annotation.Nonnull + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nonnull String branchName) { + this.branchName = branchName; + } + + + public DeployCommitRequest deployType(@javax.annotation.Nullable DeployTypeEnum deployType) { + this.deployType = deployType; + return this; + } + + /** + * Indicates if all files or only modified file at specified commit point should be considered + * @return deployType + */ + @javax.annotation.Nullable + public DeployTypeEnum getDeployType() { + return deployType; + } + + public void setDeployType(@javax.annotation.Nullable DeployTypeEnum deployType) { + this.deployType = deployType; + } + + + public DeployCommitRequest deployPolicy(@javax.annotation.Nullable DeployPolicyEnum deployPolicy) { + this.deployPolicy = deployPolicy; + return this; + } + + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + * @return deployPolicy + */ + @javax.annotation.Nullable + public DeployPolicyEnum getDeployPolicy() { + return deployPolicy; + } + + public void setDeployPolicy(@javax.annotation.Nullable DeployPolicyEnum deployPolicy) { + this.deployPolicy = deployPolicy; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployCommitRequest deployCommitRequest = (DeployCommitRequest) o; + return Objects.equals(this.commitId, deployCommitRequest.commitId) && + Objects.equals(this.branchName, deployCommitRequest.branchName) && + Objects.equals(this.deployType, deployCommitRequest.deployType) && + Objects.equals(this.deployPolicy, deployCommitRequest.deployPolicy); + } + + @Override + public int hashCode() { + return Objects.hash(commitId, branchName, deployType, deployPolicy); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployCommitRequest {\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" deployType: ").append(toIndentedString(deployType)).append("\n"); + sb.append(" deployPolicy: ").append(toIndentedString(deployPolicy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("commit_id"); + openapiFields.add("branch_name"); + openapiFields.add("deploy_type"); + openapiFields.add("deploy_policy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("branch_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeployCommitRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeployCommitRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeployCommitRequest is not found in the empty JSON string", DeployCommitRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeployCommitRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeployCommitRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeployCommitRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeployCommitRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeployCommitRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeployCommitRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) - && !jsonObj.get("commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_id").toString())); - } - if (!jsonObj.get("branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("branch_name").toString())); - } - if ((jsonObj.get("deploy_type") != null && !jsonObj.get("deploy_type").isJsonNull()) - && !jsonObj.get("deploy_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `deploy_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("deploy_type").toString())); - } - // validate the optional field `deploy_type` - if (jsonObj.get("deploy_type") != null && !jsonObj.get("deploy_type").isJsonNull()) { - DeployTypeEnum.validateJsonElement(jsonObj.get("deploy_type")); - } - if ((jsonObj.get("deploy_policy") != null && !jsonObj.get("deploy_policy").isJsonNull()) - && !jsonObj.get("deploy_policy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `deploy_policy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("deploy_policy").toString())); - } - // validate the optional field `deploy_policy` - if (jsonObj.get("deploy_policy") != null && !jsonObj.get("deploy_policy").isJsonNull()) { - DeployPolicyEnum.validateJsonElement(jsonObj.get("deploy_policy")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeployCommitRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeployCommitRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeployCommitRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeployCommitRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeployCommitRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeployCommitRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeployCommitRequest - * @throws IOException if the JSON string is invalid with respect to DeployCommitRequest - */ - public static DeployCommitRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeployCommitRequest.class); - } - - /** - * Convert an instance of DeployCommitRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) && !jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_id").toString())); + } + if (!jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch_name").toString())); + } + if ((jsonObj.get("deploy_type") != null && !jsonObj.get("deploy_type").isJsonNull()) && !jsonObj.get("deploy_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deploy_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deploy_type").toString())); + } + // validate the optional field `deploy_type` + if (jsonObj.get("deploy_type") != null && !jsonObj.get("deploy_type").isJsonNull()) { + DeployTypeEnum.validateJsonElement(jsonObj.get("deploy_type")); + } + if ((jsonObj.get("deploy_policy") != null && !jsonObj.get("deploy_policy").isJsonNull()) && !jsonObj.get("deploy_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deploy_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deploy_policy").toString())); + } + // validate the optional field `deploy_policy` + if (jsonObj.get("deploy_policy") != null && !jsonObj.get("deploy_policy").isJsonNull()) { + DeployPolicyEnum.validateJsonElement(jsonObj.get("deploy_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeployCommitRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeployCommitRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeployCommitRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeployCommitRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeployCommitRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeployCommitRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeployCommitRequest + * @throws IOException if the JSON string is invalid with respect to DeployCommitRequest + */ + public static DeployCommitRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeployCommitRequest.class); + } + + /** + * Convert an instance of DeployCommitRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java index 1a0a958e3..aeaef92e9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java @@ -4,354 +4,329 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** DeployResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class DeployResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; - - @SerializedName(SERIALIZED_NAME_FILE_NAME) - @javax.annotation.Nullable - private String fileName; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nullable - private String metadataName; - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nullable - private String metadataType; - - public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; - - @SerializedName(SERIALIZED_NAME_STATUS_CODE) - @javax.annotation.Nullable - private String statusCode; - - public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; - - @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) - @javax.annotation.Nullable - private String statusMessage; - - public DeployResponse() {} - - public DeployResponse fileName(@javax.annotation.Nullable String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Name of the file deployed - * - * @return fileName - */ - @javax.annotation.Nullable - public String getFileName() { - return fileName; - } - - public void setFileName(@javax.annotation.Nullable String fileName) { - this.fileName = fileName; - } - - public DeployResponse metadataName(@javax.annotation.Nullable String metadataName) { - this.metadataName = metadataName; - return this; - } - - /** - * Name of the metadata object - * - * @return metadataName - */ - @javax.annotation.Nullable - public String getMetadataName() { - return metadataName; - } - - public void setMetadataName(@javax.annotation.Nullable String metadataName) { - this.metadataName = metadataName; - } - - public DeployResponse metadataType(@javax.annotation.Nullable String metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of the metadata object - * - * @return metadataType - */ - @javax.annotation.Nullable - public String getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nullable String metadataType) { - this.metadataType = metadataType; - } - - public DeployResponse statusCode(@javax.annotation.Nullable String statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Indicates the status of deployment for the file - * - * @return statusCode - */ - @javax.annotation.Nullable - public String getStatusCode() { - return statusCode; - } - - public void setStatusCode(@javax.annotation.Nullable String statusCode) { - this.statusCode = statusCode; - } - - public DeployResponse statusMessage(@javax.annotation.Nullable String statusMessage) { - this.statusMessage = statusMessage; - return this; - } - - /** - * Any error or warning with the deployment - * - * @return statusMessage - */ - @javax.annotation.Nullable - public String getStatusMessage() { - return statusMessage; - } - - public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { - this.statusMessage = statusMessage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeployResponse deployResponse = (DeployResponse) o; - return Objects.equals(this.fileName, deployResponse.fileName) - && Objects.equals(this.metadataName, deployResponse.metadataName) - && Objects.equals(this.metadataType, deployResponse.metadataType) - && Objects.equals(this.statusCode, deployResponse.statusCode) - && Objects.equals(this.statusMessage, deployResponse.statusMessage); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fileName, metadataName, metadataType, statusCode, statusMessage); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * DeployResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeployResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nullable + private String fileName; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nullable + private String metadataName; + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private String metadataType; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nullable + private String statusCode; + + public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; + @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nullable + private String statusMessage; + + public DeployResponse() { + } + + public DeployResponse fileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the file deployed + * @return fileName + */ + @javax.annotation.Nullable + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + } + + + public DeployResponse metadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * @return metadataName + */ + @javax.annotation.Nullable + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + } + + + public DeployResponse metadataType(@javax.annotation.Nullable String metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata object + * @return metadataType + */ + @javax.annotation.Nullable + public String getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable String metadataType) { + this.metadataType = metadataType; + } + + + public DeployResponse statusCode(@javax.annotation.Nullable String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Indicates the status of deployment for the file + * @return statusCode + */ + @javax.annotation.Nullable + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nullable String statusCode) { + this.statusCode = statusCode; + } + + + public DeployResponse statusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + return this; + } + + /** + * Any error or warning with the deployment + * @return statusMessage + */ + @javax.annotation.Nullable + public String getStatusMessage() { + return statusMessage; + } + + public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeployResponse {\n"); - sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + DeployResponse deployResponse = (DeployResponse) o; + return Objects.equals(this.fileName, deployResponse.fileName) && + Objects.equals(this.metadataName, deployResponse.metadataName) && + Objects.equals(this.metadataType, deployResponse.metadataType) && + Objects.equals(this.statusCode, deployResponse.statusCode) && + Objects.equals(this.statusMessage, deployResponse.statusMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fileName, metadataName, metadataType, statusCode, statusMessage); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("file_name"); - openapiFields.add("metadata_name"); - openapiFields.add("metadata_type"); - openapiFields.add("status_code"); - openapiFields.add("status_message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployResponse {\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeployResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeployResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in DeployResponse is not found in the" - + " empty JSON string", - DeployResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("file_name"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("status_code"); + openapiFields.add("status_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeployResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeployResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeployResponse is not found in the empty JSON string", DeployResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeployResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `DeployResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeployResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeployResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("file_name") != null && !jsonObj.get("file_name").isJsonNull()) - && !jsonObj.get("file_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_name").toString())); - } - if ((jsonObj.get("metadata_name") != null && !jsonObj.get("metadata_name").isJsonNull()) - && !jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) - && !jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - if ((jsonObj.get("status_code") != null && !jsonObj.get("status_code").isJsonNull()) - && !jsonObj.get("status_code").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_code` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("status_code").toString())); - } - if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) - && !jsonObj.get("status_message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_message` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("status_message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeployResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeployResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(DeployResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, DeployResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeployResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of DeployResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeployResponse - * @throws IOException if the JSON string is invalid with respect to DeployResponse - */ - public static DeployResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeployResponse.class); - } - - /** - * Convert an instance of DeployResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("file_name") != null && !jsonObj.get("file_name").isJsonNull()) && !jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_name").toString())); + } + if ((jsonObj.get("metadata_name") != null && !jsonObj.get("metadata_name").isJsonNull()) && !jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + if ((jsonObj.get("status_code") != null && !jsonObj.get("status_code").isJsonNull()) && !jsonObj.get("status_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_code").toString())); + } + if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) && !jsonObj.get("status_message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeployResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeployResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeployResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeployResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeployResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of DeployResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeployResponse + * @throws IOException if the JSON string is invalid with respect to DeployResponse + */ + public static DeployResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeployResponse.class); + } + + /** + * Convert an instance of DeployResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java index 9817ab1ef..90961263a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java @@ -4,287 +4,269 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** EntityHeader */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class EntityHeader implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_DATA_SOURCE_NAME = "data_source_name"; - - @SerializedName(SERIALIZED_NAME_DATA_SOURCE_NAME) - @javax.annotation.Nullable - private String dataSourceName; - - public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; - - @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) - @javax.annotation.Nullable - private String dataSourceIdentifier; - - public EntityHeader() {} - - public EntityHeader description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the data source. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public EntityHeader dataSourceName(@javax.annotation.Nullable String dataSourceName) { - this.dataSourceName = dataSourceName; - return this; - } - - /** - * Display name of the data source. - * - * @return dataSourceName - */ - @javax.annotation.Nullable - public String getDataSourceName() { - return dataSourceName; - } - - public void setDataSourceName(@javax.annotation.Nullable String dataSourceName) { - this.dataSourceName = dataSourceName; - } - public EntityHeader dataSourceIdentifier( - @javax.annotation.Nullable String dataSourceIdentifier) { - this.dataSourceIdentifier = dataSourceIdentifier; - return this; - } - - /** - * Unique identifier of the data source. - * - * @return dataSourceIdentifier - */ - @javax.annotation.Nullable - public String getDataSourceIdentifier() { - return dataSourceIdentifier; - } +import com.thoughtspot.client.JSON; - public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { - this.dataSourceIdentifier = dataSourceIdentifier; +/** + * EntityHeader + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EntityHeader implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DATA_SOURCE_NAME = "data_source_name"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_NAME) + @javax.annotation.Nullable + private String dataSourceName; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nullable + private String dataSourceIdentifier; + + public EntityHeader() { + } + + public EntityHeader description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the data source. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public EntityHeader dataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + return this; + } + + /** + * Display name of the data source. + * @return dataSourceName + */ + @javax.annotation.Nullable + public String getDataSourceName() { + return dataSourceName; + } + + public void setDataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + + public EntityHeader dataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique identifier of the data source. + * @return dataSourceIdentifier + */ + @javax.annotation.Nullable + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EntityHeader entityHeader = (EntityHeader) o; - return Objects.equals(this.description, entityHeader.description) - && Objects.equals(this.dataSourceName, entityHeader.dataSourceName) - && Objects.equals(this.dataSourceIdentifier, entityHeader.dataSourceIdentifier); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + EntityHeader entityHeader = (EntityHeader) o; + return Objects.equals(this.description, entityHeader.description) && + Objects.equals(this.dataSourceName, entityHeader.dataSourceName) && + Objects.equals(this.dataSourceIdentifier, entityHeader.dataSourceIdentifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(description, dataSourceName, dataSourceIdentifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(description, dataSourceName, dataSourceIdentifier); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityHeader {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n"); + sb.append(" dataSourceIdentifier: ").append(toIndentedString(dataSourceIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("data_source_name"); + openapiFields.add("data_source_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EntityHeader + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EntityHeader.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EntityHeader is not found in the empty JSON string", EntityHeader.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EntityHeader {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n"); - sb.append(" dataSourceIdentifier: ") - .append(toIndentedString(dataSourceIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("data_source_name"); - openapiFields.add("data_source_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EntityHeader - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EntityHeader.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EntityHeader is not found in the" - + " empty JSON string", - EntityHeader.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EntityHeader.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EntityHeader` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EntityHeader.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EntityHeader` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if ((jsonObj.get("data_source_name") != null - && !jsonObj.get("data_source_name").isJsonNull()) - && !jsonObj.get("data_source_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_source_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("data_source_name").toString())); - } - if ((jsonObj.get("data_source_identifier") != null - && !jsonObj.get("data_source_identifier").isJsonNull()) - && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_source_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_source_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EntityHeader.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EntityHeader' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(EntityHeader.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EntityHeader value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EntityHeader read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EntityHeader given an JSON string - * - * @param jsonString JSON string - * @return An instance of EntityHeader - * @throws IOException if the JSON string is invalid with respect to EntityHeader - */ - public static EntityHeader fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EntityHeader.class); - } - - /** - * Convert an instance of EntityHeader to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("data_source_name") != null && !jsonObj.get("data_source_name").isJsonNull()) && !jsonObj.get("data_source_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_source_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_source_name").toString())); + } + if ((jsonObj.get("data_source_identifier") != null && !jsonObj.get("data_source_identifier").isJsonNull()) && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_source_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_source_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EntityHeader.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EntityHeader' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EntityHeader.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EntityHeader value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EntityHeader read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EntityHeader given an JSON string + * + * @param jsonString JSON string + * @return An instance of EntityHeader + * @throws IOException if the JSON string is invalid with respect to EntityHeader + */ + public static EntityHeader fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EntityHeader.class); + } + + /** + * Convert an instance of EntityHeader to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java index 48aa2a03b..ef81f73b4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java @@ -4,202 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** ErrorResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * ErrorResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ErrorResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_ERROR = "error"; + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nullable + private Object error; - @SerializedName(SERIALIZED_NAME_ERROR) - @javax.annotation.Nullable - private Object error; + public ErrorResponse() { + } - public ErrorResponse() {} + public ErrorResponse error(@javax.annotation.Nullable Object error) { + this.error = error; + return this; + } - public ErrorResponse error(@javax.annotation.Nullable Object error) { - this.error = error; - return this; - } + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + public Object getError() { + return error; + } - /** - * Get error - * - * @return error - */ - @javax.annotation.Nullable - public Object getError() { - return error; - } + public void setError(@javax.annotation.Nullable Object error) { + this.error = error; + } - public void setError(@javax.annotation.Nullable Object error) { - this.error = error; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorResponse errorResponse = (ErrorResponse) o; - return Objects.equals(this.error, errorResponse.error); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(error); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.error, errorResponse.error); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(error); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorResponse {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponse is not found in the empty JSON string", ErrorResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("error"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ErrorResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ErrorResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ErrorResponse is not found in the" - + " empty JSON string", - ErrorResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ErrorResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ErrorResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ErrorResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ErrorResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ErrorResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ErrorResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ErrorResponse - * @throws IOException if the JSON string is invalid with respect to ErrorResponse - */ - public static ErrorResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ErrorResponse.class); - } + } - /** - * Convert an instance of ErrorResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponse + * @throws IOException if the JSON string is invalid with respect to ErrorResponse + */ + public static ErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponse.class); + } + + /** + * Convert an instance of ErrorResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java index 53399c88a..a613b93f0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java @@ -4,242 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DataSource; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** EurekaDataSourceSuggestionResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * EurekaDataSourceSuggestionResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EurekaDataSourceSuggestionResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_DATA_SOURCES = "data_sources"; + public static final String SERIALIZED_NAME_DATA_SOURCES = "data_sources"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCES) + @javax.annotation.Nullable + private List dataSources; - @SerializedName(SERIALIZED_NAME_DATA_SOURCES) - @javax.annotation.Nullable - private List dataSources; + public EurekaDataSourceSuggestionResponse() { + } - public EurekaDataSourceSuggestionResponse() {} + public EurekaDataSourceSuggestionResponse dataSources(@javax.annotation.Nullable List dataSources) { + this.dataSources = dataSources; + return this; + } - public EurekaDataSourceSuggestionResponse dataSources( - @javax.annotation.Nullable List dataSources) { - this.dataSources = dataSources; - return this; + public EurekaDataSourceSuggestionResponse addDataSourcesItem(DataSource dataSourcesItem) { + if (this.dataSources == null) { + this.dataSources = new ArrayList<>(); } + this.dataSources.add(dataSourcesItem); + return this; + } - public EurekaDataSourceSuggestionResponse addDataSourcesItem(DataSource dataSourcesItem) { - if (this.dataSources == null) { - this.dataSources = new ArrayList<>(); - } - this.dataSources.add(dataSourcesItem); - return this; - } + /** + * List of data sources suggested. + * @return dataSources + */ + @javax.annotation.Nullable + public List getDataSources() { + return dataSources; + } - /** - * List of data sources suggested. - * - * @return dataSources - */ - @javax.annotation.Nullable - public List getDataSources() { - return dataSources; - } + public void setDataSources(@javax.annotation.Nullable List dataSources) { + this.dataSources = dataSources; + } - public void setDataSources(@javax.annotation.Nullable List dataSources) { - this.dataSources = dataSources; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EurekaDataSourceSuggestionResponse eurekaDataSourceSuggestionResponse = - (EurekaDataSourceSuggestionResponse) o; - return Objects.equals(this.dataSources, eurekaDataSourceSuggestionResponse.dataSources); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(dataSources); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + EurekaDataSourceSuggestionResponse eurekaDataSourceSuggestionResponse = (EurekaDataSourceSuggestionResponse) o; + return Objects.equals(this.dataSources, eurekaDataSourceSuggestionResponse.dataSources); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dataSources); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EurekaDataSourceSuggestionResponse {\n"); - sb.append(" dataSources: ").append(toIndentedString(dataSources)).append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaDataSourceSuggestionResponse {\n"); + sb.append(" dataSources: ").append(toIndentedString(dataSources)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_sources"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaDataSourceSuggestionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaDataSourceSuggestionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EurekaDataSourceSuggestionResponse is not found in the empty JSON string", EurekaDataSourceSuggestionResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data_sources"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * EurekaDataSourceSuggestionResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EurekaDataSourceSuggestionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EurekaDataSourceSuggestionResponse is" - + " not found in the empty JSON string", - EurekaDataSourceSuggestionResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EurekaDataSourceSuggestionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EurekaDataSourceSuggestionResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EurekaDataSourceSuggestionResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EurekaDataSourceSuggestionResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data_sources") != null && !jsonObj.get("data_sources").isJsonNull()) { - JsonArray jsonArraydataSources = jsonObj.getAsJsonArray("data_sources"); - if (jsonArraydataSources != null) { - // ensure the json data is an array - if (!jsonObj.get("data_sources").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_sources` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("data_sources").toString())); - } - - // validate the optional field `data_sources` (array) - for (int i = 0; i < jsonArraydataSources.size(); i++) { - DataSource.validateJsonElement(jsonArraydataSources.get(i)); - } - ; - } + if (jsonObj.get("data_sources") != null && !jsonObj.get("data_sources").isJsonNull()) { + JsonArray jsonArraydataSources = jsonObj.getAsJsonArray("data_sources"); + if (jsonArraydataSources != null) { + // ensure the json data is an array + if (!jsonObj.get("data_sources").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data_sources` to be an array in the JSON string but got `%s`", jsonObj.get("data_sources").toString())); + } + + // validate the optional field `data_sources` (array) + for (int i = 0; i < jsonArraydataSources.size(); i++) { + DataSource.validateJsonElement(jsonArraydataSources.get(i)); + }; } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EurekaDataSourceSuggestionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EurekaDataSourceSuggestionResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(EurekaDataSourceSuggestionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EurekaDataSourceSuggestionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EurekaDataSourceSuggestionResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EurekaDataSourceSuggestionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of EurekaDataSourceSuggestionResponse - * @throws IOException if the JSON string is invalid with respect to - * EurekaDataSourceSuggestionResponse - */ - public static EurekaDataSourceSuggestionResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, EurekaDataSourceSuggestionResponse.class); - } - - /** - * Convert an instance of EurekaDataSourceSuggestionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaDataSourceSuggestionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaDataSourceSuggestionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EurekaDataSourceSuggestionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaDataSourceSuggestionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EurekaDataSourceSuggestionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EurekaDataSourceSuggestionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaDataSourceSuggestionResponse + * @throws IOException if the JSON string is invalid with respect to EurekaDataSourceSuggestionResponse + */ + public static EurekaDataSourceSuggestionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaDataSourceSuggestionResponse.class); + } + + /** + * Convert an instance of EurekaDataSourceSuggestionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java index 3b7a9cddc..bc899d996 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java @@ -4,202 +4,199 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EurekaLLMDecomposeQueryResponse; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** EurekaDecomposeQueryResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * EurekaDecomposeQueryResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EurekaDecomposeQueryResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_DECOMPOSED_QUERY_RESPONSE = - "decomposedQueryResponse"; + public static final String SERIALIZED_NAME_DECOMPOSED_QUERY_RESPONSE = "decomposedQueryResponse"; + @SerializedName(SERIALIZED_NAME_DECOMPOSED_QUERY_RESPONSE) + @javax.annotation.Nullable + private EurekaLLMDecomposeQueryResponse decomposedQueryResponse; - @SerializedName(SERIALIZED_NAME_DECOMPOSED_QUERY_RESPONSE) - @javax.annotation.Nullable - private EurekaLLMDecomposeQueryResponse decomposedQueryResponse; + public EurekaDecomposeQueryResponse() { + } - public EurekaDecomposeQueryResponse() {} + public EurekaDecomposeQueryResponse decomposedQueryResponse(@javax.annotation.Nullable EurekaLLMDecomposeQueryResponse decomposedQueryResponse) { + this.decomposedQueryResponse = decomposedQueryResponse; + return this; + } - public EurekaDecomposeQueryResponse decomposedQueryResponse( - @javax.annotation.Nullable EurekaLLMDecomposeQueryResponse decomposedQueryResponse) { - this.decomposedQueryResponse = decomposedQueryResponse; - return this; - } + /** + * Get decomposedQueryResponse + * @return decomposedQueryResponse + */ + @javax.annotation.Nullable + public EurekaLLMDecomposeQueryResponse getDecomposedQueryResponse() { + return decomposedQueryResponse; + } - /** - * Get decomposedQueryResponse - * - * @return decomposedQueryResponse - */ - @javax.annotation.Nullable - public EurekaLLMDecomposeQueryResponse getDecomposedQueryResponse() { - return decomposedQueryResponse; - } + public void setDecomposedQueryResponse(@javax.annotation.Nullable EurekaLLMDecomposeQueryResponse decomposedQueryResponse) { + this.decomposedQueryResponse = decomposedQueryResponse; + } - public void setDecomposedQueryResponse( - @javax.annotation.Nullable EurekaLLMDecomposeQueryResponse decomposedQueryResponse) { - this.decomposedQueryResponse = decomposedQueryResponse; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EurekaDecomposeQueryResponse eurekaDecomposeQueryResponse = - (EurekaDecomposeQueryResponse) o; - return Objects.equals( - this.decomposedQueryResponse, eurekaDecomposeQueryResponse.decomposedQueryResponse); - } - @Override - public int hashCode() { - return Objects.hash(decomposedQueryResponse); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EurekaDecomposeQueryResponse {\n"); - sb.append(" decomposedQueryResponse: ") - .append(toIndentedString(decomposedQueryResponse)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("decomposedQueryResponse"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + EurekaDecomposeQueryResponse eurekaDecomposeQueryResponse = (EurekaDecomposeQueryResponse) o; + return Objects.equals(this.decomposedQueryResponse, eurekaDecomposeQueryResponse.decomposedQueryResponse); + } + + @Override + public int hashCode() { + return Objects.hash(decomposedQueryResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaDecomposeQueryResponse {\n"); + sb.append(" decomposedQueryResponse: ").append(toIndentedString(decomposedQueryResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * EurekaDecomposeQueryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EurekaDecomposeQueryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EurekaDecomposeQueryResponse is not" - + " found in the empty JSON string", - EurekaDecomposeQueryResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("decomposedQueryResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaDecomposeQueryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaDecomposeQueryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EurekaDecomposeQueryResponse is not found in the empty JSON string", EurekaDecomposeQueryResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EurekaDecomposeQueryResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EurekaDecomposeQueryResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EurekaDecomposeQueryResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EurekaDecomposeQueryResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `decomposedQueryResponse` - if (jsonObj.get("decomposedQueryResponse") != null - && !jsonObj.get("decomposedQueryResponse").isJsonNull()) { - EurekaLLMDecomposeQueryResponse.validateJsonElement( - jsonObj.get("decomposedQueryResponse")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EurekaDecomposeQueryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EurekaDecomposeQueryResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(EurekaDecomposeQueryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EurekaDecomposeQueryResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EurekaDecomposeQueryResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EurekaDecomposeQueryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of EurekaDecomposeQueryResponse - * @throws IOException if the JSON string is invalid with respect to - * EurekaDecomposeQueryResponse - */ - public static EurekaDecomposeQueryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EurekaDecomposeQueryResponse.class); - } - - /** - * Convert an instance of EurekaDecomposeQueryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the optional field `decomposedQueryResponse` + if (jsonObj.get("decomposedQueryResponse") != null && !jsonObj.get("decomposedQueryResponse").isJsonNull()) { + EurekaLLMDecomposeQueryResponse.validateJsonElement(jsonObj.get("decomposedQueryResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaDecomposeQueryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaDecomposeQueryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EurekaDecomposeQueryResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaDecomposeQueryResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EurekaDecomposeQueryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EurekaDecomposeQueryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaDecomposeQueryResponse + * @throws IOException if the JSON string is invalid with respect to EurekaDecomposeQueryResponse + */ + public static EurekaDecomposeQueryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaDecomposeQueryResponse.class); + } + + /** + * Convert an instance of EurekaDecomposeQueryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java index 29a5c6e8c..fb55bf881 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java @@ -4,248 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EurekaRelevantQuestion; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** EurekaGetRelevantQuestionsResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * EurekaGetRelevantQuestionsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EurekaGetRelevantQuestionsResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_RELEVANT_QUESTIONS = "relevant_questions"; + public static final String SERIALIZED_NAME_RELEVANT_QUESTIONS = "relevant_questions"; + @SerializedName(SERIALIZED_NAME_RELEVANT_QUESTIONS) + @javax.annotation.Nullable + private List relevantQuestions; - @SerializedName(SERIALIZED_NAME_RELEVANT_QUESTIONS) - @javax.annotation.Nullable - private List relevantQuestions; + public EurekaGetRelevantQuestionsResponse() { + } - public EurekaGetRelevantQuestionsResponse() {} + public EurekaGetRelevantQuestionsResponse relevantQuestions(@javax.annotation.Nullable List relevantQuestions) { + this.relevantQuestions = relevantQuestions; + return this; + } - public EurekaGetRelevantQuestionsResponse relevantQuestions( - @javax.annotation.Nullable List relevantQuestions) { - this.relevantQuestions = relevantQuestions; - return this; + public EurekaGetRelevantQuestionsResponse addRelevantQuestionsItem(EurekaRelevantQuestion relevantQuestionsItem) { + if (this.relevantQuestions == null) { + this.relevantQuestions = new ArrayList<>(); } + this.relevantQuestions.add(relevantQuestionsItem); + return this; + } - public EurekaGetRelevantQuestionsResponse addRelevantQuestionsItem( - EurekaRelevantQuestion relevantQuestionsItem) { - if (this.relevantQuestions == null) { - this.relevantQuestions = new ArrayList<>(); - } - this.relevantQuestions.add(relevantQuestionsItem); - return this; - } + /** + * List of relevant questions that can be run on their respective data sources. + * @return relevantQuestions + */ + @javax.annotation.Nullable + public List getRelevantQuestions() { + return relevantQuestions; + } - /** - * List of relevant questions that can be run on their respective data sources. - * - * @return relevantQuestions - */ - @javax.annotation.Nullable - public List getRelevantQuestions() { - return relevantQuestions; - } + public void setRelevantQuestions(@javax.annotation.Nullable List relevantQuestions) { + this.relevantQuestions = relevantQuestions; + } - public void setRelevantQuestions( - @javax.annotation.Nullable List relevantQuestions) { - this.relevantQuestions = relevantQuestions; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EurekaGetRelevantQuestionsResponse eurekaGetRelevantQuestionsResponse = - (EurekaGetRelevantQuestionsResponse) o; - return Objects.equals( - this.relevantQuestions, eurekaGetRelevantQuestionsResponse.relevantQuestions); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(relevantQuestions); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + EurekaGetRelevantQuestionsResponse eurekaGetRelevantQuestionsResponse = (EurekaGetRelevantQuestionsResponse) o; + return Objects.equals(this.relevantQuestions, eurekaGetRelevantQuestionsResponse.relevantQuestions); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(relevantQuestions); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EurekaGetRelevantQuestionsResponse {\n"); - sb.append(" relevantQuestions: ") - .append(toIndentedString(relevantQuestions)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaGetRelevantQuestionsResponse {\n"); + sb.append(" relevantQuestions: ").append(toIndentedString(relevantQuestions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("relevant_questions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaGetRelevantQuestionsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaGetRelevantQuestionsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EurekaGetRelevantQuestionsResponse is not found in the empty JSON string", EurekaGetRelevantQuestionsResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("relevant_questions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * EurekaGetRelevantQuestionsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EurekaGetRelevantQuestionsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EurekaGetRelevantQuestionsResponse is" - + " not found in the empty JSON string", - EurekaGetRelevantQuestionsResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EurekaGetRelevantQuestionsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EurekaGetRelevantQuestionsResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EurekaGetRelevantQuestionsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EurekaGetRelevantQuestionsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("relevant_questions") != null - && !jsonObj.get("relevant_questions").isJsonNull()) { - JsonArray jsonArrayrelevantQuestions = jsonObj.getAsJsonArray("relevant_questions"); - if (jsonArrayrelevantQuestions != null) { - // ensure the json data is an array - if (!jsonObj.get("relevant_questions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `relevant_questions` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("relevant_questions").toString())); - } - - // validate the optional field `relevant_questions` (array) - for (int i = 0; i < jsonArrayrelevantQuestions.size(); i++) { - EurekaRelevantQuestion.validateJsonElement(jsonArrayrelevantQuestions.get(i)); - } - ; - } + if (jsonObj.get("relevant_questions") != null && !jsonObj.get("relevant_questions").isJsonNull()) { + JsonArray jsonArrayrelevantQuestions = jsonObj.getAsJsonArray("relevant_questions"); + if (jsonArrayrelevantQuestions != null) { + // ensure the json data is an array + if (!jsonObj.get("relevant_questions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `relevant_questions` to be an array in the JSON string but got `%s`", jsonObj.get("relevant_questions").toString())); + } + + // validate the optional field `relevant_questions` (array) + for (int i = 0; i < jsonArrayrelevantQuestions.size(); i++) { + EurekaRelevantQuestion.validateJsonElement(jsonArrayrelevantQuestions.get(i)); + }; } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EurekaGetRelevantQuestionsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EurekaGetRelevantQuestionsResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(EurekaGetRelevantQuestionsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EurekaGetRelevantQuestionsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EurekaGetRelevantQuestionsResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EurekaGetRelevantQuestionsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of EurekaGetRelevantQuestionsResponse - * @throws IOException if the JSON string is invalid with respect to - * EurekaGetRelevantQuestionsResponse - */ - public static EurekaGetRelevantQuestionsResponse fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, EurekaGetRelevantQuestionsResponse.class); - } - - /** - * Convert an instance of EurekaGetRelevantQuestionsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaGetRelevantQuestionsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaGetRelevantQuestionsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EurekaGetRelevantQuestionsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaGetRelevantQuestionsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EurekaGetRelevantQuestionsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EurekaGetRelevantQuestionsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaGetRelevantQuestionsResponse + * @throws IOException if the JSON string is invalid with respect to EurekaGetRelevantQuestionsResponse + */ + public static EurekaGetRelevantQuestionsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaGetRelevantQuestionsResponse.class); + } + + /** + * Convert an instance of EurekaGetRelevantQuestionsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java index b8641942b..e117ac4ca 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java @@ -4,246 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EurekaLLMSuggestedQuery; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** EurekaLLMDecomposeQueryResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * EurekaLLMDecomposeQueryResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EurekaLLMDecomposeQueryResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_DECOMPOSED_QUERIES = "decomposedQueries"; + public static final String SERIALIZED_NAME_DECOMPOSED_QUERIES = "decomposedQueries"; + @SerializedName(SERIALIZED_NAME_DECOMPOSED_QUERIES) + @javax.annotation.Nullable + private List decomposedQueries; - @SerializedName(SERIALIZED_NAME_DECOMPOSED_QUERIES) - @javax.annotation.Nullable - private List decomposedQueries; + public EurekaLLMDecomposeQueryResponse() { + } - public EurekaLLMDecomposeQueryResponse() {} + public EurekaLLMDecomposeQueryResponse decomposedQueries(@javax.annotation.Nullable List decomposedQueries) { + this.decomposedQueries = decomposedQueries; + return this; + } - public EurekaLLMDecomposeQueryResponse decomposedQueries( - @javax.annotation.Nullable List decomposedQueries) { - this.decomposedQueries = decomposedQueries; - return this; + public EurekaLLMDecomposeQueryResponse addDecomposedQueriesItem(EurekaLLMSuggestedQuery decomposedQueriesItem) { + if (this.decomposedQueries == null) { + this.decomposedQueries = new ArrayList<>(); } + this.decomposedQueries.add(decomposedQueriesItem); + return this; + } - public EurekaLLMDecomposeQueryResponse addDecomposedQueriesItem( - EurekaLLMSuggestedQuery decomposedQueriesItem) { - if (this.decomposedQueries == null) { - this.decomposedQueries = new ArrayList<>(); - } - this.decomposedQueries.add(decomposedQueriesItem); - return this; - } + /** + * List of analytical questions that can be run on their respective worksheet/data sources. + * @return decomposedQueries + */ + @javax.annotation.Nullable + public List getDecomposedQueries() { + return decomposedQueries; + } - /** - * List of analytical questions that can be run on their respective worksheet/data sources. - * - * @return decomposedQueries - */ - @javax.annotation.Nullable - public List getDecomposedQueries() { - return decomposedQueries; - } + public void setDecomposedQueries(@javax.annotation.Nullable List decomposedQueries) { + this.decomposedQueries = decomposedQueries; + } - public void setDecomposedQueries( - @javax.annotation.Nullable List decomposedQueries) { - this.decomposedQueries = decomposedQueries; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EurekaLLMDecomposeQueryResponse eurekaLLMDecomposeQueryResponse = - (EurekaLLMDecomposeQueryResponse) o; - return Objects.equals( - this.decomposedQueries, eurekaLLMDecomposeQueryResponse.decomposedQueries); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(decomposedQueries); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + EurekaLLMDecomposeQueryResponse eurekaLLMDecomposeQueryResponse = (EurekaLLMDecomposeQueryResponse) o; + return Objects.equals(this.decomposedQueries, eurekaLLMDecomposeQueryResponse.decomposedQueries); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(decomposedQueries); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EurekaLLMDecomposeQueryResponse {\n"); - sb.append(" decomposedQueries: ") - .append(toIndentedString(decomposedQueries)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaLLMDecomposeQueryResponse {\n"); + sb.append(" decomposedQueries: ").append(toIndentedString(decomposedQueries)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("decomposedQueries"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaLLMDecomposeQueryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaLLMDecomposeQueryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EurekaLLMDecomposeQueryResponse is not found in the empty JSON string", EurekaLLMDecomposeQueryResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("decomposedQueries"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * EurekaLLMDecomposeQueryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EurekaLLMDecomposeQueryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EurekaLLMDecomposeQueryResponse is" - + " not found in the empty JSON string", - EurekaLLMDecomposeQueryResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EurekaLLMDecomposeQueryResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EurekaLLMDecomposeQueryResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EurekaLLMDecomposeQueryResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EurekaLLMDecomposeQueryResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("decomposedQueries") != null - && !jsonObj.get("decomposedQueries").isJsonNull()) { - JsonArray jsonArraydecomposedQueries = jsonObj.getAsJsonArray("decomposedQueries"); - if (jsonArraydecomposedQueries != null) { - // ensure the json data is an array - if (!jsonObj.get("decomposedQueries").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `decomposedQueries` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("decomposedQueries").toString())); - } - - // validate the optional field `decomposedQueries` (array) - for (int i = 0; i < jsonArraydecomposedQueries.size(); i++) { - EurekaLLMSuggestedQuery.validateJsonElement(jsonArraydecomposedQueries.get(i)); - } - ; - } + if (jsonObj.get("decomposedQueries") != null && !jsonObj.get("decomposedQueries").isJsonNull()) { + JsonArray jsonArraydecomposedQueries = jsonObj.getAsJsonArray("decomposedQueries"); + if (jsonArraydecomposedQueries != null) { + // ensure the json data is an array + if (!jsonObj.get("decomposedQueries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `decomposedQueries` to be an array in the JSON string but got `%s`", jsonObj.get("decomposedQueries").toString())); + } + + // validate the optional field `decomposedQueries` (array) + for (int i = 0; i < jsonArraydecomposedQueries.size(); i++) { + EurekaLLMSuggestedQuery.validateJsonElement(jsonArraydecomposedQueries.get(i)); + }; } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EurekaLLMDecomposeQueryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EurekaLLMDecomposeQueryResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(EurekaLLMDecomposeQueryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EurekaLLMDecomposeQueryResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EurekaLLMDecomposeQueryResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EurekaLLMDecomposeQueryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of EurekaLLMDecomposeQueryResponse - * @throws IOException if the JSON string is invalid with respect to - * EurekaLLMDecomposeQueryResponse - */ - public static EurekaLLMDecomposeQueryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EurekaLLMDecomposeQueryResponse.class); - } - - /** - * Convert an instance of EurekaLLMDecomposeQueryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaLLMDecomposeQueryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaLLMDecomposeQueryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EurekaLLMDecomposeQueryResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaLLMDecomposeQueryResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EurekaLLMDecomposeQueryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EurekaLLMDecomposeQueryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaLLMDecomposeQueryResponse + * @throws IOException if the JSON string is invalid with respect to EurekaLLMDecomposeQueryResponse + */ + public static EurekaLLMDecomposeQueryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaLLMDecomposeQueryResponse.class); + } + + /** + * Convert an instance of EurekaLLMDecomposeQueryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java index 1856d616b..4fcc4d202 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java @@ -4,285 +4,269 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** EurekaLLMSuggestedQuery */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class EurekaLLMSuggestedQuery implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) - @javax.annotation.Nullable - private String query; - - public static final String SERIALIZED_NAME_WORKSHEET_ID = "worksheetId"; - - @SerializedName(SERIALIZED_NAME_WORKSHEET_ID) - @javax.annotation.Nullable - private String worksheetId; - - public static final String SERIALIZED_NAME_WORKSHEET_NAME = "worksheetName"; - - @SerializedName(SERIALIZED_NAME_WORKSHEET_NAME) - @javax.annotation.Nullable - private String worksheetName; - - public EurekaLLMSuggestedQuery() {} - - public EurekaLLMSuggestedQuery query(@javax.annotation.Nullable String query) { - this.query = query; - return this; - } - - /** - * NL query that can be run using spotter aka natural language search to get an AI generated - * answer. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public void setQuery(@javax.annotation.Nullable String query) { - this.query = query; - } - - public EurekaLLMSuggestedQuery worksheetId(@javax.annotation.Nullable String worksheetId) { - this.worksheetId = worksheetId; - return this; - } - - /** - * Unique identifier of the worksheet on which this query can be run on. - * - * @return worksheetId - */ - @javax.annotation.Nullable - public String getWorksheetId() { - return worksheetId; - } - - public void setWorksheetId(@javax.annotation.Nullable String worksheetId) { - this.worksheetId = worksheetId; - } - public EurekaLLMSuggestedQuery worksheetName(@javax.annotation.Nullable String worksheetName) { - this.worksheetName = worksheetName; - return this; - } - - /** - * Display name of the worksheet on which this query can be run on. - * - * @return worksheetName - */ - @javax.annotation.Nullable - public String getWorksheetName() { - return worksheetName; - } +import com.thoughtspot.client.JSON; - public void setWorksheetName(@javax.annotation.Nullable String worksheetName) { - this.worksheetName = worksheetName; +/** + * EurekaLLMSuggestedQuery + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EurekaLLMSuggestedQuery implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable + private String query; + + public static final String SERIALIZED_NAME_WORKSHEET_ID = "worksheetId"; + @SerializedName(SERIALIZED_NAME_WORKSHEET_ID) + @javax.annotation.Nullable + private String worksheetId; + + public static final String SERIALIZED_NAME_WORKSHEET_NAME = "worksheetName"; + @SerializedName(SERIALIZED_NAME_WORKSHEET_NAME) + @javax.annotation.Nullable + private String worksheetName; + + public EurekaLLMSuggestedQuery() { + } + + public EurekaLLMSuggestedQuery query(@javax.annotation.Nullable String query) { + this.query = query; + return this; + } + + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + * @return query + */ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nullable String query) { + this.query = query; + } + + + public EurekaLLMSuggestedQuery worksheetId(@javax.annotation.Nullable String worksheetId) { + this.worksheetId = worksheetId; + return this; + } + + /** + * Unique identifier of the worksheet on which this query can be run on. + * @return worksheetId + */ + @javax.annotation.Nullable + public String getWorksheetId() { + return worksheetId; + } + + public void setWorksheetId(@javax.annotation.Nullable String worksheetId) { + this.worksheetId = worksheetId; + } + + + public EurekaLLMSuggestedQuery worksheetName(@javax.annotation.Nullable String worksheetName) { + this.worksheetName = worksheetName; + return this; + } + + /** + * Display name of the worksheet on which this query can be run on. + * @return worksheetName + */ + @javax.annotation.Nullable + public String getWorksheetName() { + return worksheetName; + } + + public void setWorksheetName(@javax.annotation.Nullable String worksheetName) { + this.worksheetName = worksheetName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EurekaLLMSuggestedQuery eurekaLLMSuggestedQuery = (EurekaLLMSuggestedQuery) o; - return Objects.equals(this.query, eurekaLLMSuggestedQuery.query) - && Objects.equals(this.worksheetId, eurekaLLMSuggestedQuery.worksheetId) - && Objects.equals(this.worksheetName, eurekaLLMSuggestedQuery.worksheetName); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + EurekaLLMSuggestedQuery eurekaLLMSuggestedQuery = (EurekaLLMSuggestedQuery) o; + return Objects.equals(this.query, eurekaLLMSuggestedQuery.query) && + Objects.equals(this.worksheetId, eurekaLLMSuggestedQuery.worksheetId) && + Objects.equals(this.worksheetName, eurekaLLMSuggestedQuery.worksheetName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(query, worksheetId, worksheetName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(query, worksheetId, worksheetName); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaLLMSuggestedQuery {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" worksheetId: ").append(toIndentedString(worksheetId)).append("\n"); + sb.append(" worksheetName: ").append(toIndentedString(worksheetName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("worksheetId"); + openapiFields.add("worksheetName"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaLLMSuggestedQuery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaLLMSuggestedQuery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EurekaLLMSuggestedQuery is not found in the empty JSON string", EurekaLLMSuggestedQuery.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EurekaLLMSuggestedQuery {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" worksheetId: ").append(toIndentedString(worksheetId)).append("\n"); - sb.append(" worksheetName: ").append(toIndentedString(worksheetName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - openapiFields.add("worksheetId"); - openapiFields.add("worksheetName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EurekaLLMSuggestedQuery - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EurekaLLMSuggestedQuery.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EurekaLLMSuggestedQuery is not found" - + " in the empty JSON string", - EurekaLLMSuggestedQuery.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EurekaLLMSuggestedQuery.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EurekaLLMSuggestedQuery` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EurekaLLMSuggestedQuery.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EurekaLLMSuggestedQuery` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) - && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("query").toString())); - } - if ((jsonObj.get("worksheetId") != null && !jsonObj.get("worksheetId").isJsonNull()) - && !jsonObj.get("worksheetId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `worksheetId` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("worksheetId").toString())); - } - if ((jsonObj.get("worksheetName") != null && !jsonObj.get("worksheetName").isJsonNull()) - && !jsonObj.get("worksheetName").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `worksheetName` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("worksheetName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EurekaLLMSuggestedQuery.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EurekaLLMSuggestedQuery' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(EurekaLLMSuggestedQuery.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EurekaLLMSuggestedQuery value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EurekaLLMSuggestedQuery read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EurekaLLMSuggestedQuery given an JSON string - * - * @param jsonString JSON string - * @return An instance of EurekaLLMSuggestedQuery - * @throws IOException if the JSON string is invalid with respect to EurekaLLMSuggestedQuery - */ - public static EurekaLLMSuggestedQuery fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EurekaLLMSuggestedQuery.class); - } - - /** - * Convert an instance of EurekaLLMSuggestedQuery to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + if ((jsonObj.get("worksheetId") != null && !jsonObj.get("worksheetId").isJsonNull()) && !jsonObj.get("worksheetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `worksheetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worksheetId").toString())); + } + if ((jsonObj.get("worksheetName") != null && !jsonObj.get("worksheetName").isJsonNull()) && !jsonObj.get("worksheetName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `worksheetName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worksheetName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaLLMSuggestedQuery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaLLMSuggestedQuery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EurekaLLMSuggestedQuery.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaLLMSuggestedQuery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EurekaLLMSuggestedQuery read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EurekaLLMSuggestedQuery given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaLLMSuggestedQuery + * @throws IOException if the JSON string is invalid with respect to EurekaLLMSuggestedQuery + */ + public static EurekaLLMSuggestedQuery fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaLLMSuggestedQuery.class); + } + + /** + * Convert an instance of EurekaLLMSuggestedQuery to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java index f3953b1f0..048bc86d6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java @@ -4,290 +4,269 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** EurekaRelevantQuestion */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class EurekaRelevantQuestion implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) - @javax.annotation.Nullable - private String query; - - public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; - - @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) - @javax.annotation.Nullable - private String dataSourceIdentifier; - - public static final String SERIALIZED_NAME_DATA_SOURCE_NAME = "data_source_name"; - - @SerializedName(SERIALIZED_NAME_DATA_SOURCE_NAME) - @javax.annotation.Nullable - private String dataSourceName; - - public EurekaRelevantQuestion() {} - - public EurekaRelevantQuestion query(@javax.annotation.Nullable String query) { - this.query = query; - return this; - } - - /** - * NL query that can be run using spotter aka natural language search to get an AI generated - * answer. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public void setQuery(@javax.annotation.Nullable String query) { - this.query = query; - } - - public EurekaRelevantQuestion dataSourceIdentifier( - @javax.annotation.Nullable String dataSourceIdentifier) { - this.dataSourceIdentifier = dataSourceIdentifier; - return this; - } - - /** - * Unique identifier of the data source on which this query can be run on. - * - * @return dataSourceIdentifier - */ - @javax.annotation.Nullable - public String getDataSourceIdentifier() { - return dataSourceIdentifier; - } - - public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { - this.dataSourceIdentifier = dataSourceIdentifier; - } - public EurekaRelevantQuestion dataSourceName(@javax.annotation.Nullable String dataSourceName) { - this.dataSourceName = dataSourceName; - return this; - } - - /** - * Display name of the data source on which this query can be run on. - * - * @return dataSourceName - */ - @javax.annotation.Nullable - public String getDataSourceName() { - return dataSourceName; - } +import com.thoughtspot.client.JSON; - public void setDataSourceName(@javax.annotation.Nullable String dataSourceName) { - this.dataSourceName = dataSourceName; +/** + * EurekaRelevantQuestion + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EurekaRelevantQuestion implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable + private String query; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nullable + private String dataSourceIdentifier; + + public static final String SERIALIZED_NAME_DATA_SOURCE_NAME = "data_source_name"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_NAME) + @javax.annotation.Nullable + private String dataSourceName; + + public EurekaRelevantQuestion() { + } + + public EurekaRelevantQuestion query(@javax.annotation.Nullable String query) { + this.query = query; + return this; + } + + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + * @return query + */ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nullable String query) { + this.query = query; + } + + + public EurekaRelevantQuestion dataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique identifier of the data source on which this query can be run on. + * @return dataSourceIdentifier + */ + @javax.annotation.Nullable + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + + public EurekaRelevantQuestion dataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + return this; + } + + /** + * Display name of the data source on which this query can be run on. + * @return dataSourceName + */ + @javax.annotation.Nullable + public String getDataSourceName() { + return dataSourceName; + } + + public void setDataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EurekaRelevantQuestion eurekaRelevantQuestion = (EurekaRelevantQuestion) o; - return Objects.equals(this.query, eurekaRelevantQuestion.query) - && Objects.equals( - this.dataSourceIdentifier, eurekaRelevantQuestion.dataSourceIdentifier) - && Objects.equals(this.dataSourceName, eurekaRelevantQuestion.dataSourceName); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + EurekaRelevantQuestion eurekaRelevantQuestion = (EurekaRelevantQuestion) o; + return Objects.equals(this.query, eurekaRelevantQuestion.query) && + Objects.equals(this.dataSourceIdentifier, eurekaRelevantQuestion.dataSourceIdentifier) && + Objects.equals(this.dataSourceName, eurekaRelevantQuestion.dataSourceName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(query, dataSourceIdentifier, dataSourceName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(query, dataSourceIdentifier, dataSourceName); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaRelevantQuestion {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" dataSourceIdentifier: ").append(toIndentedString(dataSourceIdentifier)).append("\n"); + sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("data_source_identifier"); + openapiFields.add("data_source_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaRelevantQuestion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaRelevantQuestion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EurekaRelevantQuestion is not found in the empty JSON string", EurekaRelevantQuestion.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EurekaRelevantQuestion {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" dataSourceIdentifier: ") - .append(toIndentedString(dataSourceIdentifier)) - .append("\n"); - sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - openapiFields.add("data_source_identifier"); - openapiFields.add("data_source_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EurekaRelevantQuestion - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EurekaRelevantQuestion.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in EurekaRelevantQuestion is not found" - + " in the empty JSON string", - EurekaRelevantQuestion.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EurekaRelevantQuestion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `EurekaRelevantQuestion` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EurekaRelevantQuestion.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EurekaRelevantQuestion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) - && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("query").toString())); - } - if ((jsonObj.get("data_source_identifier") != null - && !jsonObj.get("data_source_identifier").isJsonNull()) - && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_source_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_source_identifier").toString())); - } - if ((jsonObj.get("data_source_name") != null - && !jsonObj.get("data_source_name").isJsonNull()) - && !jsonObj.get("data_source_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_source_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("data_source_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EurekaRelevantQuestion.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EurekaRelevantQuestion' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(EurekaRelevantQuestion.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, EurekaRelevantQuestion value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EurekaRelevantQuestion read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of EurekaRelevantQuestion given an JSON string - * - * @param jsonString JSON string - * @return An instance of EurekaRelevantQuestion - * @throws IOException if the JSON string is invalid with respect to EurekaRelevantQuestion - */ - public static EurekaRelevantQuestion fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EurekaRelevantQuestion.class); - } - - /** - * Convert an instance of EurekaRelevantQuestion to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + if ((jsonObj.get("data_source_identifier") != null && !jsonObj.get("data_source_identifier").isJsonNull()) && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_source_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_source_identifier").toString())); + } + if ((jsonObj.get("data_source_name") != null && !jsonObj.get("data_source_name").isJsonNull()) && !jsonObj.get("data_source_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_source_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_source_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaRelevantQuestion.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaRelevantQuestion' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EurekaRelevantQuestion.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaRelevantQuestion value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EurekaRelevantQuestion read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of EurekaRelevantQuestion given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaRelevantQuestion + * @throws IOException if the JSON string is invalid with respect to EurekaRelevantQuestion + */ + public static EurekaRelevantQuestion fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaRelevantQuestion.class); + } + + /** + * Convert an instance of EurekaRelevantQuestion to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java new file mode 100644 index 000000000..24d76f3fe --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java @@ -0,0 +1,356 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..540536b3a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfigInput.java @@ -0,0 +1,356 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/ExcludeMetadataListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java index 58428d5c9..65bed384c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java @@ -4,328 +4,306 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ExcludeMetadataListItemInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExcludeMetadataListItemInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is - * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. - * LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a - * column of any data object such as table, worksheet or view 5. CONNECTION for connection - * objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. - * LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data - * object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"), - - TAG("TAG"), - - USER("USER"), - - USER_GROUP("USER_GROUP"), - - LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), - - INSIGHT_SPEC("INSIGHT_SPEC"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private TypeEnum type; - - public ExcludeMetadataListItemInput() {} - - public ExcludeMetadataListItemInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } - - public ExcludeMetadataListItemInput type(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is - * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. - * LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a - * column of any data object such as table, worksheet or view 5. CONNECTION for connection - * objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. - * LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data - * object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects - * - * @return type - */ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExcludeMetadataListItemInput excludeMetadataListItemInput = - (ExcludeMetadataListItemInput) o; - return Objects.equals(this.identifier, excludeMetadataListItemInput.identifier) - && Objects.equals(this.type, excludeMetadataListItemInput.type); +/** + * ExcludeMetadataListItemInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExcludeMetadataListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), + + INSIGHT_SPEC("INSIGHT_SPEC"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExcludeMetadataListItemInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); - openapiRequiredFields.add("type"); + 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); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExcludeMetadataListItemInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExcludeMetadataListItemInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExcludeMetadataListItemInput is not" - + " found in the empty JSON string", - ExcludeMetadataListItemInput.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public ExcludeMetadataListItemInput() { + } + + public ExcludeMetadataListItemInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public ExcludeMetadataListItemInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExcludeMetadataListItemInput excludeMetadataListItemInput = (ExcludeMetadataListItemInput) o; + return Objects.equals(this.identifier, excludeMetadataListItemInput.identifier) && + Objects.equals(this.type, excludeMetadataListItemInput.type); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExcludeMetadataListItemInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExcludeMetadataListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExcludeMetadataListItemInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExcludeMetadataListItemInput is not found in the empty JSON string", ExcludeMetadataListItemInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExcludeMetadataListItemInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExcludeMetadataListItemInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExcludeMetadataListItemInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExcludeMetadataListItemInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExcludeMetadataListItemInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExcludeMetadataListItemInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExcludeMetadataListItemInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExcludeMetadataListItemInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExcludeMetadataListItemInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExcludeMetadataListItemInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExcludeMetadataListItemInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExcludeMetadataListItemInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExcludeMetadataListItemInput - * @throws IOException if the JSON string is invalid with respect to - * ExcludeMetadataListItemInput - */ - public static ExcludeMetadataListItemInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExcludeMetadataListItemInput.class); - } - - /** - * Convert an instance of ExcludeMetadataListItemInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExcludeMetadataListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExcludeMetadataListItemInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExcludeMetadataListItemInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExcludeMetadataListItemInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExcludeMetadataListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ExcludeMetadataListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExcludeMetadataListItemInput + * @throws IOException if the JSON string is invalid with respect to ExcludeMetadataListItemInput + */ + public static ExcludeMetadataListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExcludeMetadataListItemInput.class); + } + + /** + * Convert an instance of ExcludeMetadataListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java index 90bab7be9..07fcb7e9f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java @@ -4,499 +4,457 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.RegionalSettingsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ExportAnswerReportRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExportAnswerReportRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nullable - private String metadataIdentifier; - - public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; - - @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) - @javax.annotation.Nullable - private String sessionIdentifier; - - public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; - - @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) - @javax.annotation.Nullable - private Integer generationNumber; - - /** Export file format. */ - @JsonAdapter(FileFormatEnum.Adapter.class) - public enum FileFormatEnum { - CSV("CSV"), - - PDF("PDF"), - - XLSX("XLSX"), - - PNG("PNG"); - - private String value; - - FileFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FileFormatEnum fromValue(String value) { - for (FileFormatEnum b : FileFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FileFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FileFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FileFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; - - @SerializedName(SERIALIZED_NAME_FILE_FORMAT) - @javax.annotation.Nullable - private FileFormatEnum fileFormat = FileFormatEnum.CSV; - - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; - - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; - - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; - - public static final String SERIALIZED_NAME_REGIONAL_SETTINGS = "regional_settings"; - - @SerializedName(SERIALIZED_NAME_REGIONAL_SETTINGS) - @javax.annotation.Nullable - private RegionalSettingsInput regionalSettings; - - public ExportAnswerReportRequest() {} - - public ExportAnswerReportRequest metadataIdentifier( - @javax.annotation.Nullable String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * Unique ID or name of the metadata object. - * - * @return metadataIdentifier - */ - @javax.annotation.Nullable - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public ExportAnswerReportRequest sessionIdentifier( - @javax.annotation.Nullable String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - return this; - } - - /** - * Unique ID of the answer session. - * - * @return sessionIdentifier - */ - @javax.annotation.Nullable - public String getSessionIdentifier() { - return sessionIdentifier; - } - - public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - } - - public ExportAnswerReportRequest generationNumber( - @javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - return this; - } - - /** - * Generation number of the answer session. - * - * @return generationNumber - */ - @javax.annotation.Nullable - public Integer getGenerationNumber() { - return generationNumber; - } - - public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - } - - public ExportAnswerReportRequest fileFormat( - @javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - return this; - } - - /** - * Export file format. - * - * @return fileFormat - */ - @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { - return fileFormat; - } - - public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - } - - public ExportAnswerReportRequest runtimeFilter( - @javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } - - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } - - public ExportAnswerReportRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } - - /** - * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } - - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } +import com.thoughtspot.client.JSON; - public ExportAnswerReportRequest runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } +/** + * ExportAnswerReportRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExportAnswerReportRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * JSON object for setting values of parameters in runtime. - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nullable + private String metadataIdentifier; - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - } + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nullable + private String sessionIdentifier; - public ExportAnswerReportRequest regionalSettings( - @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { - this.regionalSettings = regionalSettings; - return this; - } + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; - /** - * Options for specific region specific overrides to support date/number/string/currency - * formatting. - * - * @return regionalSettings - */ - @javax.annotation.Nullable - public RegionalSettingsInput getRegionalSettings() { - return regionalSettings; - } + /** + * Export file format. + */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + CSV("CSV"), + + PDF("PDF"), + + XLSX("XLSX"), + + PNG("PNG"); - public void setRegionalSettings( - @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { - this.regionalSettings = regionalSettings; - } + private String value; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExportAnswerReportRequest exportAnswerReportRequest = (ExportAnswerReportRequest) o; - return Objects.equals(this.metadataIdentifier, exportAnswerReportRequest.metadataIdentifier) - && Objects.equals( - this.sessionIdentifier, exportAnswerReportRequest.sessionIdentifier) - && Objects.equals(this.generationNumber, exportAnswerReportRequest.generationNumber) - && Objects.equals(this.fileFormat, exportAnswerReportRequest.fileFormat) - && Objects.equals(this.runtimeFilter, exportAnswerReportRequest.runtimeFilter) - && Objects.equals(this.runtimeSort, exportAnswerReportRequest.runtimeSort) - && Objects.equals( - this.runtimeParamOverride, exportAnswerReportRequest.runtimeParamOverride) - && Objects.equals( - this.regionalSettings, exportAnswerReportRequest.regionalSettings); + FileFormatEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - metadataIdentifier, - sessionIdentifier, - generationNumber, - fileFormat, - runtimeFilter, - runtimeSort, - runtimeParamOverride, - regionalSettings); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportAnswerReportRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" sessionIdentifier: ") - .append(toIndentedString(sessionIdentifier)) - .append("\n"); - sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); - sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append(" regionalSettings: ").append(toIndentedString(regionalSettings)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("session_identifier"); - openapiFields.add("generation_number"); - openapiFields.add("file_format"); - openapiFields.add("runtime_filter"); - openapiFields.add("runtime_sort"); - openapiFields.add("runtime_param_override"); - openapiFields.add("regional_settings"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExportAnswerReportRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportAnswerReportRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExportAnswerReportRequest is not" - + " found in the empty JSON string", - ExportAnswerReportRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat = FileFormatEnum.CSV; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public static final String SERIALIZED_NAME_REGIONAL_SETTINGS = "regional_settings"; + @SerializedName(SERIALIZED_NAME_REGIONAL_SETTINGS) + @javax.annotation.Nullable + private RegionalSettingsInput regionalSettings; + + public ExportAnswerReportRequest() { + } + + public ExportAnswerReportRequest metadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return metadataIdentifier + */ + @javax.annotation.Nullable + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public ExportAnswerReportRequest sessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique ID of the answer session. + * @return sessionIdentifier + */ + @javax.annotation.Nullable + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + + public ExportAnswerReportRequest generationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation number of the answer session. + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + + public ExportAnswerReportRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + + public ExportAnswerReportRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + + public ExportAnswerReportRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + + public ExportAnswerReportRequest runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters in runtime. + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + + public ExportAnswerReportRequest regionalSettings(@javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + return this; + } + + /** + * Options for specific region specific overrides to support date/number/string/currency formatting. + * @return regionalSettings + */ + @javax.annotation.Nullable + public RegionalSettingsInput getRegionalSettings() { + return regionalSettings; + } + + public void setRegionalSettings(@javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportAnswerReportRequest exportAnswerReportRequest = (ExportAnswerReportRequest) o; + return Objects.equals(this.metadataIdentifier, exportAnswerReportRequest.metadataIdentifier) && + Objects.equals(this.sessionIdentifier, exportAnswerReportRequest.sessionIdentifier) && + Objects.equals(this.generationNumber, exportAnswerReportRequest.generationNumber) && + Objects.equals(this.fileFormat, exportAnswerReportRequest.fileFormat) && + Objects.equals(this.runtimeFilter, exportAnswerReportRequest.runtimeFilter) && + Objects.equals(this.runtimeSort, exportAnswerReportRequest.runtimeSort) && + Objects.equals(this.runtimeParamOverride, exportAnswerReportRequest.runtimeParamOverride) && + Objects.equals(this.regionalSettings, exportAnswerReportRequest.regionalSettings); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, sessionIdentifier, generationNumber, fileFormat, runtimeFilter, runtimeSort, runtimeParamOverride, regionalSettings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportAnswerReportRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" sessionIdentifier: ").append(toIndentedString(sessionIdentifier)).append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append(" regionalSettings: ").append(toIndentedString(regionalSettings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + openapiFields.add("file_format"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + openapiFields.add("regional_settings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportAnswerReportRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportAnswerReportRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExportAnswerReportRequest is not found in the empty JSON string", ExportAnswerReportRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportAnswerReportRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExportAnswerReportRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExportAnswerReportRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportAnswerReportRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_identifier") != null - && !jsonObj.get("metadata_identifier").isJsonNull()) - && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("session_identifier") != null - && !jsonObj.get("session_identifier").isJsonNull()) - && !jsonObj.get("session_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `session_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("session_identifier").toString())); - } - if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) - && !jsonObj.get("file_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_format").toString())); - } - // validate the optional field `file_format` - if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { - FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); - } - // validate the optional field `regional_settings` - if (jsonObj.get("regional_settings") != null - && !jsonObj.get("regional_settings").isJsonNull()) { - RegionalSettingsInput.validateJsonElement(jsonObj.get("regional_settings")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportAnswerReportRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportAnswerReportRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExportAnswerReportRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportAnswerReportRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportAnswerReportRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExportAnswerReportRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportAnswerReportRequest - * @throws IOException if the JSON string is invalid with respect to ExportAnswerReportRequest - */ - public static ExportAnswerReportRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportAnswerReportRequest.class); - } - - /** - * Convert an instance of ExportAnswerReportRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("metadata_identifier") != null && !jsonObj.get("metadata_identifier").isJsonNull()) && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("session_identifier") != null && !jsonObj.get("session_identifier").isJsonNull()) && !jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `session_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("session_identifier").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `regional_settings` + if (jsonObj.get("regional_settings") != null && !jsonObj.get("regional_settings").isJsonNull()) { + RegionalSettingsInput.validateJsonElement(jsonObj.get("regional_settings")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportAnswerReportRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportAnswerReportRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExportAnswerReportRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportAnswerReportRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExportAnswerReportRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExportAnswerReportRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportAnswerReportRequest + * @throws IOException if the JSON string is invalid with respect to ExportAnswerReportRequest + */ + public static ExportAnswerReportRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportAnswerReportRequest.class); + } + + /** + * Convert an instance of ExportAnswerReportRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java index 90b804b32..c1c455f89 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java @@ -4,748 +4,635 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PdfOptionsInput; +import com.thoughtspot.client.model.PngOptionsInput; +import com.thoughtspot.client.model.RegionalSettingsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ExportLiveboardReportRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExportLiveboardReportRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - public static final String SERIALIZED_NAME_TAB_IDENTIFIERS = "tab_identifiers"; - - @SerializedName(SERIALIZED_NAME_TAB_IDENTIFIERS) - @javax.annotation.Nullable - private List tabIdentifiers; - - public static final String SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER = - "personalised_view_identifier"; - - @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER) - @javax.annotation.Nullable - private String personalisedViewIdentifier; - - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = - "visualization_identifiers"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) - @javax.annotation.Nullable - private List visualizationIdentifiers; - - public static final String SERIALIZED_NAME_TRANSIENT_CONTENT = "transient_content"; - - @SerializedName(SERIALIZED_NAME_TRANSIENT_CONTENT) - @javax.annotation.Nullable - private String transientContent; - - /** Export file format. */ - @JsonAdapter(FileFormatEnum.Adapter.class) - public enum FileFormatEnum { - PDF("PDF"), - - PNG("PNG"); - - private String value; - - FileFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FileFormatEnum fromValue(String value) { - for (FileFormatEnum b : FileFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FileFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FileFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FileFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; - - @SerializedName(SERIALIZED_NAME_FILE_FORMAT) - @javax.annotation.Nullable - private FileFormatEnum fileFormat = FileFormatEnum.PDF; - - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; - - public static final String SERIALIZED_NAME_OVERRIDE_FILTERS = "override_filters"; - - @SerializedName(SERIALIZED_NAME_OVERRIDE_FILTERS) - @javax.annotation.Nullable - private Object overrideFilters; - - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; - - public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; - - @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) - @javax.annotation.Nullable - private PdfOptionsInput pdfOptions; - - public static final String SERIALIZED_NAME_PNG_OPTIONS = "png_options"; - - @SerializedName(SERIALIZED_NAME_PNG_OPTIONS) - @javax.annotation.Nullable - private PngOptionsInput pngOptions; - - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; - - public static final String SERIALIZED_NAME_REGIONAL_SETTINGS = "regional_settings"; - - @SerializedName(SERIALIZED_NAME_REGIONAL_SETTINGS) - @javax.annotation.Nullable - private RegionalSettingsInput regionalSettings; - - public ExportLiveboardReportRequest() {} - - public ExportLiveboardReportRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * GUID or name of the Liveboard object. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public ExportLiveboardReportRequest tabIdentifiers( - @javax.annotation.Nullable List tabIdentifiers) { - this.tabIdentifiers = tabIdentifiers; - return this; - } - - public ExportLiveboardReportRequest addTabIdentifiersItem(String tabIdentifiersItem) { - if (this.tabIdentifiers == null) { - this.tabIdentifiers = new ArrayList<>(); - } - this.tabIdentifiers.add(tabIdentifiersItem); - return this; - } - - /** - * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later - * - * @return tabIdentifiers - */ - @javax.annotation.Nullable - public List getTabIdentifiers() { - return tabIdentifiers; - } - - public void setTabIdentifiers(@javax.annotation.Nullable List tabIdentifiers) { - this.tabIdentifiers = tabIdentifiers; - } - - public ExportLiveboardReportRequest personalisedViewIdentifier( - @javax.annotation.Nullable String personalisedViewIdentifier) { - this.personalisedViewIdentifier = personalisedViewIdentifier; - return this; - } - - /** - * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later - * - * @return personalisedViewIdentifier - */ - @javax.annotation.Nullable - public String getPersonalisedViewIdentifier() { - return personalisedViewIdentifier; - } - - public void setPersonalisedViewIdentifier( - @javax.annotation.Nullable String personalisedViewIdentifier) { - this.personalisedViewIdentifier = personalisedViewIdentifier; - } - - public ExportLiveboardReportRequest visualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - return this; - } - - public ExportLiveboardReportRequest addVisualizationIdentifiersItem( - String visualizationIdentifiersItem) { - if (this.visualizationIdentifiers == null) { - this.visualizationIdentifiers = new ArrayList<>(); - } - this.visualizationIdentifiers.add(visualizationIdentifiersItem); - return this; - } - - /** - * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API - * returns a report with all visualizations saved on a Liveboard. - * - * @return visualizationIdentifiers - */ - @javax.annotation.Nullable - public List getVisualizationIdentifiers() { - return visualizationIdentifiers; - } - - public void setVisualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - } - - public ExportLiveboardReportRequest transientContent( - @javax.annotation.Nullable String transientContent) { - this.transientContent = transientContent; - return this; - } - - /** - * Transient content of the Liveboard. - * - * @return transientContent - */ - @javax.annotation.Nullable - public String getTransientContent() { - return transientContent; - } - - public void setTransientContent(@javax.annotation.Nullable String transientContent) { - this.transientContent = transientContent; - } - - public ExportLiveboardReportRequest fileFormat( - @javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - return this; - } - - /** - * Export file format. - * - * @return fileFormat - */ - @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { - return fileFormat; - } - - public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - } - - public ExportLiveboardReportRequest runtimeFilter( - @javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * JSON object with representing filter condition to apply filters at runtime. For example, - * {\"col1\": \"region\", \"op1\": \"EQ\", - * \"val1\": \"northeast\" }. You can add multiple keys by incrementing the - * number at the end, for example, col2, op2, val2. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } - - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } - - public ExportLiveboardReportRequest overrideFilters( - @javax.annotation.Nullable Object overrideFilters) { - this.overrideFilters = overrideFilters; - return this; - } - - /** - * Applied to the liveboard and overrides any filters already applied on the same columns in - * liveboard. Following example illustrate different kinds of filters: { - * \"override_filters\": [ { \"column_name\": \"Color\", - * \"generic_filter\": { \"op\": \"IN\", \"values\": [ - * \"almond\", \"turquoise\" ] }, \"negate\": false }, { - * \"column_name\": \"Commit Date\", \"date_filter\": { - * \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": - * \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { - * \"column_name\": \"Sales\", \"generic_filter\": { - * \"op\": \"BW_INC\", \"values\": [ \"100000\", - * \"70000\" ] }, \"negate\": true } ] } - * - * @return overrideFilters - */ - @javax.annotation.Nullable - public Object getOverrideFilters() { - return overrideFilters; - } - - public void setOverrideFilters(@javax.annotation.Nullable Object overrideFilters) { - this.overrideFilters = overrideFilters; - } - - public ExportLiveboardReportRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } - - /** - * JSON string representing runtime sort. For example, {\"sortCol1\": - * \"region\", \"asc1\" : true}. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } - - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } - - public ExportLiveboardReportRequest pdfOptions( - @javax.annotation.Nullable PdfOptionsInput pdfOptions) { - this.pdfOptions = pdfOptions; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Options for PDF export. - * - * @return pdfOptions - */ - @javax.annotation.Nullable - public PdfOptionsInput getPdfOptions() { - return pdfOptions; - } +/** + * ExportLiveboardReportRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExportLiveboardReportRequest implements Serializable { + private static final long serialVersionUID = 1L; - public void setPdfOptions(@javax.annotation.Nullable PdfOptionsInput pdfOptions) { - this.pdfOptions = pdfOptions; - } + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; - public ExportLiveboardReportRequest pngOptions( - @javax.annotation.Nullable PngOptionsInput pngOptions) { - this.pngOptions = pngOptions; - return this; - } + public static final String SERIALIZED_NAME_TAB_IDENTIFIERS = "tab_identifiers"; + @SerializedName(SERIALIZED_NAME_TAB_IDENTIFIERS) + @javax.annotation.Nullable + private List tabIdentifiers; - /** - * Options for PNG export. - * - * @return pngOptions - */ - @javax.annotation.Nullable - public PngOptionsInput getPngOptions() { - return pngOptions; - } + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER = "personalised_view_identifier"; + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER) + @javax.annotation.Nullable + private String personalisedViewIdentifier; - public void setPngOptions(@javax.annotation.Nullable PngOptionsInput pngOptions) { - this.pngOptions = pngOptions; - } + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = "visualization_identifiers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; - public ExportLiveboardReportRequest runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } + public static final String SERIALIZED_NAME_TRANSIENT_CONTENT = "transient_content"; + @SerializedName(SERIALIZED_NAME_TRANSIENT_CONTENT) + @javax.annotation.Nullable + private String transientContent; - /** - * JSON object for setting values of parameters at runtime. For example, <code> - * {\"param1\": \"Double List Param\", \"paramVal1\": - * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for - * example, param2, paramVal2. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } + /** + * Export file format. + */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + PDF("PDF"), + + PNG("PNG"); - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - } + private String value; - public ExportLiveboardReportRequest regionalSettings( - @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { - this.regionalSettings = regionalSettings; - return this; + FileFormatEnum(String value) { + this.value = value; } - /** - * Options for specific region specific overrides to support date/number/string/currency - * formatting. - * - * @return regionalSettings - */ - @javax.annotation.Nullable - public RegionalSettingsInput getRegionalSettings() { - return regionalSettings; - } - - public void setRegionalSettings( - @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { - this.regionalSettings = regionalSettings; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExportLiveboardReportRequest exportLiveboardReportRequest = - (ExportLiveboardReportRequest) o; - return Objects.equals( - this.metadataIdentifier, exportLiveboardReportRequest.metadataIdentifier) - && Objects.equals(this.tabIdentifiers, exportLiveboardReportRequest.tabIdentifiers) - && Objects.equals( - this.personalisedViewIdentifier, - exportLiveboardReportRequest.personalisedViewIdentifier) - && Objects.equals( - this.visualizationIdentifiers, - exportLiveboardReportRequest.visualizationIdentifiers) - && Objects.equals( - this.transientContent, exportLiveboardReportRequest.transientContent) - && Objects.equals(this.fileFormat, exportLiveboardReportRequest.fileFormat) - && Objects.equals(this.runtimeFilter, exportLiveboardReportRequest.runtimeFilter) - && Objects.equals( - this.overrideFilters, exportLiveboardReportRequest.overrideFilters) - && Objects.equals(this.runtimeSort, exportLiveboardReportRequest.runtimeSort) - && Objects.equals(this.pdfOptions, exportLiveboardReportRequest.pdfOptions) - && Objects.equals(this.pngOptions, exportLiveboardReportRequest.pngOptions) - && Objects.equals( - this.runtimeParamOverride, - exportLiveboardReportRequest.runtimeParamOverride) - && Objects.equals( - this.regionalSettings, exportLiveboardReportRequest.regionalSettings); - } - - @Override - public int hashCode() { - return Objects.hash( - metadataIdentifier, - tabIdentifiers, - personalisedViewIdentifier, - visualizationIdentifiers, - transientContent, - fileFormat, - runtimeFilter, - overrideFilters, - runtimeSort, - pdfOptions, - pngOptions, - runtimeParamOverride, - regionalSettings); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportLiveboardReportRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" tabIdentifiers: ").append(toIndentedString(tabIdentifiers)).append("\n"); - sb.append(" personalisedViewIdentifier: ") - .append(toIndentedString(personalisedViewIdentifier)) - .append("\n"); - sb.append(" visualizationIdentifiers: ") - .append(toIndentedString(visualizationIdentifiers)) - .append("\n"); - sb.append(" transientContent: ").append(toIndentedString(transientContent)).append("\n"); - sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append(" overrideFilters: ").append(toIndentedString(overrideFilters)).append("\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); - sb.append(" pngOptions: ").append(toIndentedString(pngOptions)).append("\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append(" regionalSettings: ").append(toIndentedString(regionalSettings)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("tab_identifiers"); - openapiFields.add("personalised_view_identifier"); - openapiFields.add("visualization_identifiers"); - openapiFields.add("transient_content"); - openapiFields.add("file_format"); - openapiFields.add("runtime_filter"); - openapiFields.add("override_filters"); - openapiFields.add("runtime_sort"); - openapiFields.add("pdf_options"); - openapiFields.add("png_options"); - openapiFields.add("runtime_param_override"); - openapiFields.add("regional_settings"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExportLiveboardReportRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportLiveboardReportRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExportLiveboardReportRequest is not" - + " found in the empty JSON string", - ExportLiveboardReportRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat = FileFormatEnum.PDF; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_OVERRIDE_FILTERS = "override_filters"; + @SerializedName(SERIALIZED_NAME_OVERRIDE_FILTERS) + @javax.annotation.Nullable + private Object overrideFilters; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private PdfOptionsInput pdfOptions; + + public static final String SERIALIZED_NAME_PNG_OPTIONS = "png_options"; + @SerializedName(SERIALIZED_NAME_PNG_OPTIONS) + @javax.annotation.Nullable + private PngOptionsInput pngOptions; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public static final String SERIALIZED_NAME_REGIONAL_SETTINGS = "regional_settings"; + @SerializedName(SERIALIZED_NAME_REGIONAL_SETTINGS) + @javax.annotation.Nullable + private RegionalSettingsInput regionalSettings; + + public ExportLiveboardReportRequest() { + } + + public ExportLiveboardReportRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the Liveboard object. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public ExportLiveboardReportRequest tabIdentifiers(@javax.annotation.Nullable List tabIdentifiers) { + this.tabIdentifiers = tabIdentifiers; + return this; + } + + public ExportLiveboardReportRequest addTabIdentifiersItem(String tabIdentifiersItem) { + if (this.tabIdentifiers == null) { + this.tabIdentifiers = new ArrayList<>(); + } + this.tabIdentifiers.add(tabIdentifiersItem); + return this; + } + + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + * @return tabIdentifiers + */ + @javax.annotation.Nullable + public List getTabIdentifiers() { + return tabIdentifiers; + } + + public void setTabIdentifiers(@javax.annotation.Nullable List tabIdentifiers) { + this.tabIdentifiers = tabIdentifiers; + } + + + public ExportLiveboardReportRequest personalisedViewIdentifier(@javax.annotation.Nullable String personalisedViewIdentifier) { + this.personalisedViewIdentifier = personalisedViewIdentifier; + return this; + } + + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + * @return personalisedViewIdentifier + */ + @javax.annotation.Nullable + public String getPersonalisedViewIdentifier() { + return personalisedViewIdentifier; + } + + public void setPersonalisedViewIdentifier(@javax.annotation.Nullable String personalisedViewIdentifier) { + this.personalisedViewIdentifier = personalisedViewIdentifier; + } + + + public ExportLiveboardReportRequest visualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public ExportLiveboardReportRequest addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + + public ExportLiveboardReportRequest transientContent(@javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + return this; + } + + /** + * Transient content of the Liveboard. + * @return transientContent + */ + @javax.annotation.Nullable + public String getTransientContent() { + return transientContent; + } + + public void setTransientContent(@javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + } + + + public ExportLiveboardReportRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + + public ExportLiveboardReportRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + + public ExportLiveboardReportRequest overrideFilters(@javax.annotation.Nullable Object overrideFilters) { + this.overrideFilters = overrideFilters; + return this; + } + + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } + * @return overrideFilters + */ + @javax.annotation.Nullable + public Object getOverrideFilters() { + return overrideFilters; + } + + public void setOverrideFilters(@javax.annotation.Nullable Object overrideFilters) { + this.overrideFilters = overrideFilters; + } + + + public ExportLiveboardReportRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + + public ExportLiveboardReportRequest pdfOptions(@javax.annotation.Nullable PdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * Options for PDF export. + * @return pdfOptions + */ + @javax.annotation.Nullable + public PdfOptionsInput getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable PdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + } + + + public ExportLiveboardReportRequest pngOptions(@javax.annotation.Nullable PngOptionsInput pngOptions) { + this.pngOptions = pngOptions; + return this; + } + + /** + * Options for PNG export. + * @return pngOptions + */ + @javax.annotation.Nullable + public PngOptionsInput getPngOptions() { + return pngOptions; + } + + public void setPngOptions(@javax.annotation.Nullable PngOptionsInput pngOptions) { + this.pngOptions = pngOptions; + } + + + public ExportLiveboardReportRequest runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + + public ExportLiveboardReportRequest regionalSettings(@javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + return this; + } + + /** + * Options for specific region specific overrides to support date/number/string/currency formatting. + * @return regionalSettings + */ + @javax.annotation.Nullable + public RegionalSettingsInput getRegionalSettings() { + return regionalSettings; + } + + public void setRegionalSettings(@javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportLiveboardReportRequest exportLiveboardReportRequest = (ExportLiveboardReportRequest) o; + return Objects.equals(this.metadataIdentifier, exportLiveboardReportRequest.metadataIdentifier) && + Objects.equals(this.tabIdentifiers, exportLiveboardReportRequest.tabIdentifiers) && + Objects.equals(this.personalisedViewIdentifier, exportLiveboardReportRequest.personalisedViewIdentifier) && + Objects.equals(this.visualizationIdentifiers, exportLiveboardReportRequest.visualizationIdentifiers) && + Objects.equals(this.transientContent, exportLiveboardReportRequest.transientContent) && + Objects.equals(this.fileFormat, exportLiveboardReportRequest.fileFormat) && + Objects.equals(this.runtimeFilter, exportLiveboardReportRequest.runtimeFilter) && + Objects.equals(this.overrideFilters, exportLiveboardReportRequest.overrideFilters) && + Objects.equals(this.runtimeSort, exportLiveboardReportRequest.runtimeSort) && + Objects.equals(this.pdfOptions, exportLiveboardReportRequest.pdfOptions) && + Objects.equals(this.pngOptions, exportLiveboardReportRequest.pngOptions) && + Objects.equals(this.runtimeParamOverride, exportLiveboardReportRequest.runtimeParamOverride) && + Objects.equals(this.regionalSettings, exportLiveboardReportRequest.regionalSettings); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, tabIdentifiers, personalisedViewIdentifier, visualizationIdentifiers, transientContent, fileFormat, runtimeFilter, overrideFilters, runtimeSort, pdfOptions, pngOptions, runtimeParamOverride, regionalSettings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportLiveboardReportRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" tabIdentifiers: ").append(toIndentedString(tabIdentifiers)).append("\n"); + sb.append(" personalisedViewIdentifier: ").append(toIndentedString(personalisedViewIdentifier)).append("\n"); + sb.append(" visualizationIdentifiers: ").append(toIndentedString(visualizationIdentifiers)).append("\n"); + sb.append(" transientContent: ").append(toIndentedString(transientContent)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" overrideFilters: ").append(toIndentedString(overrideFilters)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" pngOptions: ").append(toIndentedString(pngOptions)).append("\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append(" regionalSettings: ").append(toIndentedString(regionalSettings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("tab_identifiers"); + openapiFields.add("personalised_view_identifier"); + openapiFields.add("visualization_identifiers"); + openapiFields.add("transient_content"); + openapiFields.add("file_format"); + openapiFields.add("runtime_filter"); + openapiFields.add("override_filters"); + openapiFields.add("runtime_sort"); + openapiFields.add("pdf_options"); + openapiFields.add("png_options"); + openapiFields.add("runtime_param_override"); + openapiFields.add("regional_settings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportLiveboardReportRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportLiveboardReportRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExportLiveboardReportRequest is not found in the empty JSON string", ExportLiveboardReportRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportLiveboardReportRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExportLiveboardReportRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExportLiveboardReportRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportLiveboardReportRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportLiveboardReportRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportLiveboardReportRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tab_identifiers") != null - && !jsonObj.get("tab_identifiers").isJsonNull() - && !jsonObj.get("tab_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tab_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("tab_identifiers").toString())); - } - if ((jsonObj.get("personalised_view_identifier") != null - && !jsonObj.get("personalised_view_identifier").isJsonNull()) - && !jsonObj.get("personalised_view_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `personalised_view_identifier` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("personalised_view_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("visualization_identifiers") != null - && !jsonObj.get("visualization_identifiers").isJsonNull() - && !jsonObj.get("visualization_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_identifiers").toString())); - } - if ((jsonObj.get("transient_content") != null - && !jsonObj.get("transient_content").isJsonNull()) - && !jsonObj.get("transient_content").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `transient_content` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("transient_content").toString())); - } - if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) - && !jsonObj.get("file_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_format").toString())); - } - // validate the optional field `file_format` - if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { - FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); - } - // validate the optional field `pdf_options` - if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { - PdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); - } - // validate the optional field `png_options` - if (jsonObj.get("png_options") != null && !jsonObj.get("png_options").isJsonNull()) { - PngOptionsInput.validateJsonElement(jsonObj.get("png_options")); - } - // validate the optional field `regional_settings` - if (jsonObj.get("regional_settings") != null - && !jsonObj.get("regional_settings").isJsonNull()) { - RegionalSettingsInput.validateJsonElement(jsonObj.get("regional_settings")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportLiveboardReportRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportLiveboardReportRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExportLiveboardReportRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportLiveboardReportRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportLiveboardReportRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExportLiveboardReportRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportLiveboardReportRequest - * @throws IOException if the JSON string is invalid with respect to - * ExportLiveboardReportRequest - */ - public static ExportLiveboardReportRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportLiveboardReportRequest.class); - } - - /** - * Convert an instance of ExportLiveboardReportRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("tab_identifiers") != null && !jsonObj.get("tab_identifiers").isJsonNull() && !jsonObj.get("tab_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tab_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("tab_identifiers").toString())); + } + if ((jsonObj.get("personalised_view_identifier") != null && !jsonObj.get("personalised_view_identifier").isJsonNull()) && !jsonObj.get("personalised_view_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `personalised_view_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("personalised_view_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null && !jsonObj.get("visualization_identifiers").isJsonNull() && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_identifiers").toString())); + } + if ((jsonObj.get("transient_content") != null && !jsonObj.get("transient_content").isJsonNull()) && !jsonObj.get("transient_content").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `transient_content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transient_content").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + PdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); + } + // validate the optional field `png_options` + if (jsonObj.get("png_options") != null && !jsonObj.get("png_options").isJsonNull()) { + PngOptionsInput.validateJsonElement(jsonObj.get("png_options")); + } + // validate the optional field `regional_settings` + if (jsonObj.get("regional_settings") != null && !jsonObj.get("regional_settings").isJsonNull()) { + RegionalSettingsInput.validateJsonElement(jsonObj.get("regional_settings")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportLiveboardReportRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportLiveboardReportRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExportLiveboardReportRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportLiveboardReportRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExportLiveboardReportRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExportLiveboardReportRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportLiveboardReportRequest + * @throws IOException if the JSON string is invalid with respect to ExportLiveboardReportRequest + */ + public static ExportLiveboardReportRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportLiveboardReportRequest.class); + } + + /** + * Convert an instance of ExportLiveboardReportRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java index 937bab4ae..f95208123 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java @@ -4,495 +4,467 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ExportMetadataTMLBatchedRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExportMetadataTMLBatchedRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of metadata object to export, can be one of USER | ROLE | USER_GROUP */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - USER("USER"), - - USER_GROUP("USER_GROUP"), - - ROLE("ROLE"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nonnull - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_BATCH_OFFSET = "batch_offset"; - - @SerializedName(SERIALIZED_NAME_BATCH_OFFSET) - @javax.annotation.Nullable - private Integer batchOffset = 0; - - public static final String SERIALIZED_NAME_BATCH_SIZE = "batch_size"; - - @SerializedName(SERIALIZED_NAME_BATCH_SIZE) - @javax.annotation.Nullable - private Integer batchSize = 20; - - /** TML EDOC content format. */ - @JsonAdapter(EdocFormatEnum.Adapter.class) - public enum EdocFormatEnum { - JSON("JSON"), - - YAML("YAML"); - - private String value; - - EdocFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EdocFormatEnum fromValue(String value) { - for (EdocFormatEnum b : EdocFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EdocFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EdocFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EdocFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - EdocFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_EDOC_FORMAT = "edoc_format"; - - @SerializedName(SERIALIZED_NAME_EDOC_FORMAT) - @javax.annotation.Nullable - private EdocFormatEnum edocFormat = EdocFormatEnum.JSON; - - public static final String SERIALIZED_NAME_EXPORT_DEPENDENT = "export_dependent"; - - @SerializedName(SERIALIZED_NAME_EXPORT_DEPENDENT) - @javax.annotation.Nullable - private Boolean exportDependent = false; - - public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; - - @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) - @javax.annotation.Nullable - private Boolean allOrgsOverride = false; - - public ExportMetadataTMLBatchedRequest() {} - - public ExportMetadataTMLBatchedRequest metadataType( - @javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP - * - * @return metadataType - */ - @javax.annotation.Nonnull - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public ExportMetadataTMLBatchedRequest batchOffset( - @javax.annotation.Nullable Integer batchOffset) { - this.batchOffset = batchOffset; - return this; - } - /** - * Indicates the position within the complete set from where the API should begin returning - * objects. - * - * @return batchOffset - */ - @javax.annotation.Nullable - public Integer getBatchOffset() { - return batchOffset; - } - - public void setBatchOffset(@javax.annotation.Nullable Integer batchOffset) { - this.batchOffset = batchOffset; - } - - public ExportMetadataTMLBatchedRequest batchSize(@javax.annotation.Nullable Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Determines the number of objects or items to be retrieved in a single request. - * - * @return batchSize - */ - @javax.annotation.Nullable - public Integer getBatchSize() { - return batchSize; - } - - public void setBatchSize(@javax.annotation.Nullable Integer batchSize) { - this.batchSize = batchSize; - } +import com.thoughtspot.client.JSON; - public ExportMetadataTMLBatchedRequest edocFormat( - @javax.annotation.Nullable EdocFormatEnum edocFormat) { - this.edocFormat = edocFormat; - return this; +/** + * ExportMetadataTMLBatchedRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExportMetadataTMLBatchedRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"), + + ROLE("ROLE"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; } - /** - * TML EDOC content format. - * - * @return edocFormat - */ - @javax.annotation.Nullable - public EdocFormatEnum getEdocFormat() { - return edocFormat; + public String getValue() { + return value; } - public void setEdocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { - this.edocFormat = edocFormat; + @Override + public String toString() { + return String.valueOf(value); } - public ExportMetadataTMLBatchedRequest exportDependent( - @javax.annotation.Nullable Boolean exportDependent) { - this.exportDependent = exportDependent; - return this; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Indicates whether to export dependent metadata objects of specified metadata objects. - * - * @return exportDependent - */ - @javax.annotation.Nullable - public Boolean getExportDependent() { - return exportDependent; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - public void setExportDependent(@javax.annotation.Nullable Boolean exportDependent) { - this.exportDependent = exportDependent; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); } - - public ExportMetadataTMLBatchedRequest allOrgsOverride( - @javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - return this; + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_BATCH_OFFSET = "batch_offset"; + @SerializedName(SERIALIZED_NAME_BATCH_OFFSET) + @javax.annotation.Nullable + private Integer batchOffset = 0; + + public static final String SERIALIZED_NAME_BATCH_SIZE = "batch_size"; + @SerializedName(SERIALIZED_NAME_BATCH_SIZE) + @javax.annotation.Nullable + private Integer batchSize = 20; + + /** + * TML EDOC content format. + */ + @JsonAdapter(EdocFormatEnum.Adapter.class) + public enum EdocFormatEnum { + JSON("JSON"), + + YAML("YAML"); + + private String value; + + EdocFormatEnum(String value) { + this.value = value; } - /** - * Indicates whether to export is happening from all orgs context. - * - * @return allOrgsOverride - */ - @javax.annotation.Nullable - public Boolean getAllOrgsOverride() { - return allOrgsOverride; + public String getValue() { + return value; } - public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static EdocFormatEnum fromValue(String value) { + for (EdocFormatEnum b : EdocFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest = - (ExportMetadataTMLBatchedRequest) o; - return Objects.equals(this.metadataType, exportMetadataTMLBatchedRequest.metadataType) - && Objects.equals(this.batchOffset, exportMetadataTMLBatchedRequest.batchOffset) - && Objects.equals(this.batchSize, exportMetadataTMLBatchedRequest.batchSize) - && Objects.equals(this.edocFormat, exportMetadataTMLBatchedRequest.edocFormat) - && Objects.equals( - this.exportDependent, exportMetadataTMLBatchedRequest.exportDependent) - && Objects.equals( - this.allOrgsOverride, exportMetadataTMLBatchedRequest.allOrgsOverride); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EdocFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EdocFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EdocFormatEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash( - metadataType, batchOffset, batchSize, edocFormat, exportDependent, allOrgsOverride); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EdocFormatEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_EDOC_FORMAT = "edoc_format"; + @SerializedName(SERIALIZED_NAME_EDOC_FORMAT) + @javax.annotation.Nullable + private EdocFormatEnum edocFormat = EdocFormatEnum.JSON; + + public static final String SERIALIZED_NAME_EXPORT_DEPENDENT = "export_dependent"; + @SerializedName(SERIALIZED_NAME_EXPORT_DEPENDENT) + @javax.annotation.Nullable + private Boolean exportDependent = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + public ExportMetadataTMLBatchedRequest() { + } + + public ExportMetadataTMLBatchedRequest metadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public ExportMetadataTMLBatchedRequest batchOffset(@javax.annotation.Nullable Integer batchOffset) { + this.batchOffset = batchOffset; + return this; + } + + /** + * Indicates the position within the complete set from where the API should begin returning objects. + * @return batchOffset + */ + @javax.annotation.Nullable + public Integer getBatchOffset() { + return batchOffset; + } + + public void setBatchOffset(@javax.annotation.Nullable Integer batchOffset) { + this.batchOffset = batchOffset; + } + + + public ExportMetadataTMLBatchedRequest batchSize(@javax.annotation.Nullable Integer batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * Determines the number of objects or items to be retrieved in a single request. + * @return batchSize + */ + @javax.annotation.Nullable + public Integer getBatchSize() { + return batchSize; + } + + public void setBatchSize(@javax.annotation.Nullable Integer batchSize) { + this.batchSize = batchSize; + } + + + public ExportMetadataTMLBatchedRequest edocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + return this; + } + + /** + * TML EDOC content format. + * @return edocFormat + */ + @javax.annotation.Nullable + public EdocFormatEnum getEdocFormat() { + return edocFormat; + } + + public void setEdocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + } + + + public ExportMetadataTMLBatchedRequest exportDependent(@javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + return this; + } + + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + * @return exportDependent + */ + @javax.annotation.Nullable + public Boolean getExportDependent() { + return exportDependent; + } + + public void setExportDependent(@javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + } + + + public ExportMetadataTMLBatchedRequest allOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * Indicates whether to export is happening from all orgs context. + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportMetadataTMLBatchedRequest {\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" batchOffset: ").append(toIndentedString(batchOffset)).append("\n"); - sb.append(" batchSize: ").append(toIndentedString(batchSize)).append("\n"); - sb.append(" edocFormat: ").append(toIndentedString(edocFormat)).append("\n"); - sb.append(" exportDependent: ").append(toIndentedString(exportDependent)).append("\n"); - sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest = (ExportMetadataTMLBatchedRequest) o; + return Objects.equals(this.metadataType, exportMetadataTMLBatchedRequest.metadataType) && + Objects.equals(this.batchOffset, exportMetadataTMLBatchedRequest.batchOffset) && + Objects.equals(this.batchSize, exportMetadataTMLBatchedRequest.batchSize) && + Objects.equals(this.edocFormat, exportMetadataTMLBatchedRequest.edocFormat) && + Objects.equals(this.exportDependent, exportMetadataTMLBatchedRequest.exportDependent) && + Objects.equals(this.allOrgsOverride, exportMetadataTMLBatchedRequest.allOrgsOverride); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataType, batchOffset, batchSize, edocFormat, exportDependent, allOrgsOverride); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_type"); - openapiFields.add("batch_offset"); - openapiFields.add("batch_size"); - openapiFields.add("edoc_format"); - openapiFields.add("export_dependent"); - openapiFields.add("all_orgs_override"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportMetadataTMLBatchedRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" batchOffset: ").append(toIndentedString(batchOffset)).append("\n"); + sb.append(" batchSize: ").append(toIndentedString(batchSize)).append("\n"); + sb.append(" edocFormat: ").append(toIndentedString(edocFormat)).append("\n"); + sb.append(" exportDependent: ").append(toIndentedString(exportDependent)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ExportMetadataTMLBatchedRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportMetadataTMLBatchedRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExportMetadataTMLBatchedRequest is" - + " not found in the empty JSON string", - ExportMetadataTMLBatchedRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("batch_offset"); + openapiFields.add("batch_size"); + openapiFields.add("edoc_format"); + openapiFields.add("export_dependent"); + openapiFields.add("all_orgs_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTMLBatchedRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportMetadataTMLBatchedRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExportMetadataTMLBatchedRequest is not found in the empty JSON string", ExportMetadataTMLBatchedRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportMetadataTMLBatchedRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExportMetadataTMLBatchedRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExportMetadataTMLBatchedRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportMetadataTMLBatchedRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportMetadataTMLBatchedRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportMetadataTMLBatchedRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the required field `metadata_type` - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - if ((jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) - && !jsonObj.get("edoc_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `edoc_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("edoc_format").toString())); - } - // validate the optional field `edoc_format` - if (jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) { - EdocFormatEnum.validateJsonElement(jsonObj.get("edoc_format")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportMetadataTMLBatchedRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportMetadataTMLBatchedRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ExportMetadataTMLBatchedRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportMetadataTMLBatchedRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportMetadataTMLBatchedRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExportMetadataTMLBatchedRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportMetadataTMLBatchedRequest - * @throws IOException if the JSON string is invalid with respect to - * ExportMetadataTMLBatchedRequest - */ - public static ExportMetadataTMLBatchedRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportMetadataTMLBatchedRequest.class); - } - - /** - * Convert an instance of ExportMetadataTMLBatchedRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + if ((jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) && !jsonObj.get("edoc_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `edoc_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("edoc_format").toString())); + } + // validate the optional field `edoc_format` + if (jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) { + EdocFormatEnum.validateJsonElement(jsonObj.get("edoc_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportMetadataTMLBatchedRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportMetadataTMLBatchedRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTMLBatchedRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportMetadataTMLBatchedRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExportMetadataTMLBatchedRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ExportMetadataTMLBatchedRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportMetadataTMLBatchedRequest + * @throws IOException if the JSON string is invalid with respect to ExportMetadataTMLBatchedRequest + */ + public static ExportMetadataTMLBatchedRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportMetadataTMLBatchedRequest.class); + } + + /** + * Convert an instance of ExportMetadataTMLBatchedRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java index 7fdc6106c..089a96b3b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java @@ -4,638 +4,576 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExportMetadataTypeInput; +import com.thoughtspot.client.model.ExportOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ExportMetadataTMLRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExportMetadataTMLRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - public static final String SERIALIZED_NAME_EXPORT_ASSOCIATED = "export_associated"; - - @SerializedName(SERIALIZED_NAME_EXPORT_ASSOCIATED) - @javax.annotation.Nullable - private Boolean exportAssociated = false; - - public static final String SERIALIZED_NAME_EXPORT_FQN = "export_fqn"; - - @SerializedName(SERIALIZED_NAME_EXPORT_FQN) - @javax.annotation.Nullable - private Boolean exportFqn = false; +import com.thoughtspot.client.JSON; - /** - * TML EDOC content format. **Note: exporting in YAML format currently requires manual - * formatting of the output. For more details on the workaround, please click - * [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - */ - @JsonAdapter(EdocFormatEnum.Adapter.class) - public enum EdocFormatEnum { - JSON("JSON"), +/** + * ExportMetadataTMLRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExportMetadataTMLRequest implements Serializable { + private static final long serialVersionUID = 1L; - YAML("YAML"); + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; - private String value; + public static final String SERIALIZED_NAME_EXPORT_ASSOCIATED = "export_associated"; + @SerializedName(SERIALIZED_NAME_EXPORT_ASSOCIATED) + @javax.annotation.Nullable + private Boolean exportAssociated = false; - EdocFormatEnum(String value) { - this.value = value; - } + public static final String SERIALIZED_NAME_EXPORT_FQN = "export_fqn"; + @SerializedName(SERIALIZED_NAME_EXPORT_FQN) + @javax.annotation.Nullable + private Boolean exportFqn = false; - public String getValue() { - return value; - } + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + @JsonAdapter(EdocFormatEnum.Adapter.class) + public enum EdocFormatEnum { + JSON("JSON"), + + YAML("YAML"); - @Override - public String toString() { - return String.valueOf(value); - } + private String value; - public static EdocFormatEnum fromValue(String value) { - for (EdocFormatEnum b : EdocFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EdocFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EdocFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EdocFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - EdocFormatEnum.fromValue(value); - } + EdocFormatEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_EDOC_FORMAT = "edoc_format"; - - @SerializedName(SERIALIZED_NAME_EDOC_FORMAT) - @javax.annotation.Nullable - private EdocFormatEnum edocFormat = EdocFormatEnum.JSON; - - /** Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. */ - @JsonAdapter(ExportSchemaVersionEnum.Adapter.class) - public enum ExportSchemaVersionEnum { - DEFAULT("DEFAULT"), - - V1("V1"), - - V2("V2"); - - private String value; - - ExportSchemaVersionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ExportSchemaVersionEnum fromValue(String value) { - for (ExportSchemaVersionEnum b : ExportSchemaVersionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final ExportSchemaVersionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ExportSchemaVersionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ExportSchemaVersionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ExportSchemaVersionEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_EXPORT_SCHEMA_VERSION = "export_schema_version"; - - @SerializedName(SERIALIZED_NAME_EXPORT_SCHEMA_VERSION) - @javax.annotation.Nullable - private ExportSchemaVersionEnum exportSchemaVersion = ExportSchemaVersionEnum.DEFAULT; - - public static final String SERIALIZED_NAME_EXPORT_DEPENDENT = "export_dependent"; - - @SerializedName(SERIALIZED_NAME_EXPORT_DEPENDENT) - @javax.annotation.Nullable - private Boolean exportDependent = false; - - public static final String SERIALIZED_NAME_EXPORT_CONNECTION_AS_DEPENDENT = - "export_connection_as_dependent"; - - @SerializedName(SERIALIZED_NAME_EXPORT_CONNECTION_AS_DEPENDENT) - @javax.annotation.Nullable - private Boolean exportConnectionAsDependent = false; - - public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; - - @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) - @javax.annotation.Nullable - private Boolean allOrgsOverride = false; - - public static final String SERIALIZED_NAME_EXPORT_OPTIONS = "export_options"; - - @SerializedName(SERIALIZED_NAME_EXPORT_OPTIONS) - @javax.annotation.Nullable - private ExportOptions exportOptions; - - public ExportMetadataTMLRequest() {} - - public ExportMetadataTMLRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public ExportMetadataTMLRequest addMetadataItem(ExportMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); + public static EdocFormatEnum fromValue(String value) { + for (EdocFormatEnum b : EdocFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.metadata.add(metadataItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Metadata objects. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EdocFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; + @Override + public EdocFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EdocFormatEnum.fromValue(value); + } } - public ExportMetadataTMLRequest exportAssociated( - @javax.annotation.Nullable Boolean exportAssociated) { - this.exportAssociated = exportAssociated; - return this; - } - - /** - * Indicates whether to export associated metadata objects of specified metadata objects. - * - * @return exportAssociated - */ - @javax.annotation.Nullable - public Boolean getExportAssociated() { - return exportAssociated; - } - - public void setExportAssociated(@javax.annotation.Nullable Boolean exportAssociated) { - this.exportAssociated = exportAssociated; - } - - public ExportMetadataTMLRequest exportFqn(@javax.annotation.Nullable Boolean exportFqn) { - this.exportFqn = exportFqn; - return this; - } - - /** - * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its - * associated objects, the API returns the Liveboard TML data with the FQNs of the referenced - * worksheet. If the exported TML data includes FQNs, you don't need to manually add FQNs of - * the referenced objects during TML import. - * - * @return exportFqn - */ - @javax.annotation.Nullable - public Boolean getExportFqn() { - return exportFqn; - } - - public void setExportFqn(@javax.annotation.Nullable Boolean exportFqn) { - this.exportFqn = exportFqn; - } - - public ExportMetadataTMLRequest edocFormat( - @javax.annotation.Nullable EdocFormatEnum edocFormat) { - this.edocFormat = edocFormat; - return this; - } - - /** - * TML EDOC content format. **Note: exporting in YAML format currently requires manual - * formatting of the output. For more details on the workaround, please click - * [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - * - * @return edocFormat - */ - @javax.annotation.Nullable - public EdocFormatEnum getEdocFormat() { - return edocFormat; - } - - public void setEdocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { - this.edocFormat = edocFormat; - } - - public ExportMetadataTMLRequest exportSchemaVersion( - @javax.annotation.Nullable ExportSchemaVersionEnum exportSchemaVersion) { - this.exportSchemaVersion = exportSchemaVersion; - return this; - } - - /** - * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. - * - * @return exportSchemaVersion - */ - @javax.annotation.Nullable - public ExportSchemaVersionEnum getExportSchemaVersion() { - return exportSchemaVersion; - } - - public void setExportSchemaVersion( - @javax.annotation.Nullable ExportSchemaVersionEnum exportSchemaVersion) { - this.exportSchemaVersion = exportSchemaVersion; - } - - public ExportMetadataTMLRequest exportDependent( - @javax.annotation.Nullable Boolean exportDependent) { - this.exportDependent = exportDependent; - return this; - } - - /** - * Indicates whether to export table while exporting connection. - * - * @return exportDependent - */ - @javax.annotation.Nullable - public Boolean getExportDependent() { - return exportDependent; - } - - public void setExportDependent(@javax.annotation.Nullable Boolean exportDependent) { - this.exportDependent = exportDependent; - } - - public ExportMetadataTMLRequest exportConnectionAsDependent( - @javax.annotation.Nullable Boolean exportConnectionAsDependent) { - this.exportConnectionAsDependent = exportConnectionAsDependent; - return this; - } - - /** - * Indicates whether to export connection as dependent while exporting - * table/worksheet/answer/liveboard. This will only be active when export_associated is true. - * - * @return exportConnectionAsDependent - */ - @javax.annotation.Nullable - public Boolean getExportConnectionAsDependent() { - return exportConnectionAsDependent; - } - - public void setExportConnectionAsDependent( - @javax.annotation.Nullable Boolean exportConnectionAsDependent) { - this.exportConnectionAsDependent = exportConnectionAsDependent; - } - - public ExportMetadataTMLRequest allOrgsOverride( - @javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - return this; - } - - /** - * Indicates whether to export is happening from all orgs context. - * - * @return allOrgsOverride - */ - @javax.annotation.Nullable - public Boolean getAllOrgsOverride() { - return allOrgsOverride; - } - - public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - } - - public ExportMetadataTMLRequest exportOptions( - @javax.annotation.Nullable ExportOptions exportOptions) { - this.exportOptions = exportOptions; - return this; - } - - /** - * Flags to specify additional options for export. Version: 10.6.0.cl or later - * - * @return exportOptions - */ - @javax.annotation.Nullable - public ExportOptions getExportOptions() { - return exportOptions; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EdocFormatEnum.fromValue(value); } + } - public void setExportOptions(@javax.annotation.Nullable ExportOptions exportOptions) { - this.exportOptions = exportOptions; - } + public static final String SERIALIZED_NAME_EDOC_FORMAT = "edoc_format"; + @SerializedName(SERIALIZED_NAME_EDOC_FORMAT) + @javax.annotation.Nullable + private EdocFormatEnum edocFormat = EdocFormatEnum.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExportMetadataTMLRequest exportMetadataTMLRequest = (ExportMetadataTMLRequest) o; - return Objects.equals(this.metadata, exportMetadataTMLRequest.metadata) - && Objects.equals(this.exportAssociated, exportMetadataTMLRequest.exportAssociated) - && Objects.equals(this.exportFqn, exportMetadataTMLRequest.exportFqn) - && Objects.equals(this.edocFormat, exportMetadataTMLRequest.edocFormat) - && Objects.equals( - this.exportSchemaVersion, exportMetadataTMLRequest.exportSchemaVersion) - && Objects.equals(this.exportDependent, exportMetadataTMLRequest.exportDependent) - && Objects.equals( - this.exportConnectionAsDependent, - exportMetadataTMLRequest.exportConnectionAsDependent) - && Objects.equals(this.allOrgsOverride, exportMetadataTMLRequest.allOrgsOverride) - && Objects.equals(this.exportOptions, exportMetadataTMLRequest.exportOptions); - } + /** + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. + */ + @JsonAdapter(ExportSchemaVersionEnum.Adapter.class) + public enum ExportSchemaVersionEnum { + DEFAULT("DEFAULT"), + + V1("V1"), + + V2("V2"); - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - metadata, - exportAssociated, - exportFqn, - edocFormat, - exportSchemaVersion, - exportDependent, - exportConnectionAsDependent, - allOrgsOverride, - exportOptions); + ExportSchemaVersionEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportMetadataTMLRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" exportAssociated: ").append(toIndentedString(exportAssociated)).append("\n"); - sb.append(" exportFqn: ").append(toIndentedString(exportFqn)).append("\n"); - sb.append(" edocFormat: ").append(toIndentedString(edocFormat)).append("\n"); - sb.append(" exportSchemaVersion: ") - .append(toIndentedString(exportSchemaVersion)) - .append("\n"); - sb.append(" exportDependent: ").append(toIndentedString(exportDependent)).append("\n"); - sb.append(" exportConnectionAsDependent: ") - .append(toIndentedString(exportConnectionAsDependent)) - .append("\n"); - sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); - sb.append(" exportOptions: ").append(toIndentedString(exportOptions)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static ExportSchemaVersionEnum fromValue(String value) { + for (ExportSchemaVersionEnum b : ExportSchemaVersionEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("export_associated"); - openapiFields.add("export_fqn"); - openapiFields.add("edoc_format"); - openapiFields.add("export_schema_version"); - openapiFields.add("export_dependent"); - openapiFields.add("export_connection_as_dependent"); - openapiFields.add("all_orgs_override"); - openapiFields.add("export_options"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExportSchemaVersionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExportSchemaVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExportSchemaVersionEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTMLRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportMetadataTMLRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExportMetadataTMLRequest is not found" - + " in the empty JSON string", - ExportMetadataTMLRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + ExportSchemaVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EXPORT_SCHEMA_VERSION = "export_schema_version"; + @SerializedName(SERIALIZED_NAME_EXPORT_SCHEMA_VERSION) + @javax.annotation.Nullable + private ExportSchemaVersionEnum exportSchemaVersion = ExportSchemaVersionEnum.DEFAULT; + + public static final String SERIALIZED_NAME_EXPORT_DEPENDENT = "export_dependent"; + @SerializedName(SERIALIZED_NAME_EXPORT_DEPENDENT) + @javax.annotation.Nullable + private Boolean exportDependent = false; + + public static final String SERIALIZED_NAME_EXPORT_CONNECTION_AS_DEPENDENT = "export_connection_as_dependent"; + @SerializedName(SERIALIZED_NAME_EXPORT_CONNECTION_AS_DEPENDENT) + @javax.annotation.Nullable + private Boolean exportConnectionAsDependent = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + public static final String SERIALIZED_NAME_EXPORT_OPTIONS = "export_options"; + @SerializedName(SERIALIZED_NAME_EXPORT_OPTIONS) + @javax.annotation.Nullable + private ExportOptions exportOptions; + + public ExportMetadataTMLRequest() { + } + + public ExportMetadataTMLRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public ExportMetadataTMLRequest addMetadataItem(ExportMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public ExportMetadataTMLRequest exportAssociated(@javax.annotation.Nullable Boolean exportAssociated) { + this.exportAssociated = exportAssociated; + return this; + } + + /** + * Indicates whether to export associated metadata objects of specified metadata objects. + * @return exportAssociated + */ + @javax.annotation.Nullable + public Boolean getExportAssociated() { + return exportAssociated; + } + + public void setExportAssociated(@javax.annotation.Nullable Boolean exportAssociated) { + this.exportAssociated = exportAssociated; + } + + + public ExportMetadataTMLRequest exportFqn(@javax.annotation.Nullable Boolean exportFqn) { + this.exportFqn = exportFqn; + return this; + } + + /** + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don't need to manually add FQNs of the referenced objects during TML import. + * @return exportFqn + */ + @javax.annotation.Nullable + public Boolean getExportFqn() { + return exportFqn; + } + + public void setExportFqn(@javax.annotation.Nullable Boolean exportFqn) { + this.exportFqn = exportFqn; + } + + + public ExportMetadataTMLRequest edocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + return this; + } + + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + * @return edocFormat + */ + @javax.annotation.Nullable + public EdocFormatEnum getEdocFormat() { + return edocFormat; + } + + public void setEdocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + } + + + public ExportMetadataTMLRequest exportSchemaVersion(@javax.annotation.Nullable ExportSchemaVersionEnum exportSchemaVersion) { + this.exportSchemaVersion = exportSchemaVersion; + return this; + } + + /** + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. + * @return exportSchemaVersion + */ + @javax.annotation.Nullable + public ExportSchemaVersionEnum getExportSchemaVersion() { + return exportSchemaVersion; + } + + public void setExportSchemaVersion(@javax.annotation.Nullable ExportSchemaVersionEnum exportSchemaVersion) { + this.exportSchemaVersion = exportSchemaVersion; + } + + + public ExportMetadataTMLRequest exportDependent(@javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + return this; + } + + /** + * Indicates whether to export table while exporting connection. + * @return exportDependent + */ + @javax.annotation.Nullable + public Boolean getExportDependent() { + return exportDependent; + } + + public void setExportDependent(@javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + } + + + public ExportMetadataTMLRequest exportConnectionAsDependent(@javax.annotation.Nullable Boolean exportConnectionAsDependent) { + this.exportConnectionAsDependent = exportConnectionAsDependent; + return this; + } + + /** + * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. + * @return exportConnectionAsDependent + */ + @javax.annotation.Nullable + public Boolean getExportConnectionAsDependent() { + return exportConnectionAsDependent; + } + + public void setExportConnectionAsDependent(@javax.annotation.Nullable Boolean exportConnectionAsDependent) { + this.exportConnectionAsDependent = exportConnectionAsDependent; + } + + + public ExportMetadataTMLRequest allOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * Indicates whether to export is happening from all orgs context. + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + + public ExportMetadataTMLRequest exportOptions(@javax.annotation.Nullable ExportOptions exportOptions) { + this.exportOptions = exportOptions; + return this; + } + + /** + * Flags to specify additional options for export. Version: 10.6.0.cl or later + * @return exportOptions + */ + @javax.annotation.Nullable + public ExportOptions getExportOptions() { + return exportOptions; + } + + public void setExportOptions(@javax.annotation.Nullable ExportOptions exportOptions) { + this.exportOptions = exportOptions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportMetadataTMLRequest exportMetadataTMLRequest = (ExportMetadataTMLRequest) o; + return Objects.equals(this.metadata, exportMetadataTMLRequest.metadata) && + Objects.equals(this.exportAssociated, exportMetadataTMLRequest.exportAssociated) && + Objects.equals(this.exportFqn, exportMetadataTMLRequest.exportFqn) && + Objects.equals(this.edocFormat, exportMetadataTMLRequest.edocFormat) && + Objects.equals(this.exportSchemaVersion, exportMetadataTMLRequest.exportSchemaVersion) && + Objects.equals(this.exportDependent, exportMetadataTMLRequest.exportDependent) && + Objects.equals(this.exportConnectionAsDependent, exportMetadataTMLRequest.exportConnectionAsDependent) && + Objects.equals(this.allOrgsOverride, exportMetadataTMLRequest.allOrgsOverride) && + Objects.equals(this.exportOptions, exportMetadataTMLRequest.exportOptions); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, exportAssociated, exportFqn, edocFormat, exportSchemaVersion, exportDependent, exportConnectionAsDependent, allOrgsOverride, exportOptions); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportMetadataTMLRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" exportAssociated: ").append(toIndentedString(exportAssociated)).append("\n"); + sb.append(" exportFqn: ").append(toIndentedString(exportFqn)).append("\n"); + sb.append(" edocFormat: ").append(toIndentedString(edocFormat)).append("\n"); + sb.append(" exportSchemaVersion: ").append(toIndentedString(exportSchemaVersion)).append("\n"); + sb.append(" exportDependent: ").append(toIndentedString(exportDependent)).append("\n"); + sb.append(" exportConnectionAsDependent: ").append(toIndentedString(exportConnectionAsDependent)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" exportOptions: ").append(toIndentedString(exportOptions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("export_associated"); + openapiFields.add("export_fqn"); + openapiFields.add("edoc_format"); + openapiFields.add("export_schema_version"); + openapiFields.add("export_dependent"); + openapiFields.add("export_connection_as_dependent"); + openapiFields.add("all_orgs_override"); + openapiFields.add("export_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTMLRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportMetadataTMLRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExportMetadataTMLRequest is not found in the empty JSON string", ExportMetadataTMLRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportMetadataTMLRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExportMetadataTMLRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExportMetadataTMLRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportMetadataTMLRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportMetadataTMLRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportMetadataTMLRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - ExportMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - if ((jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) - && !jsonObj.get("edoc_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `edoc_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("edoc_format").toString())); - } - // validate the optional field `edoc_format` - if (jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) { - EdocFormatEnum.validateJsonElement(jsonObj.get("edoc_format")); - } - if ((jsonObj.get("export_schema_version") != null - && !jsonObj.get("export_schema_version").isJsonNull()) - && !jsonObj.get("export_schema_version").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `export_schema_version` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("export_schema_version").toString())); - } - // validate the optional field `export_schema_version` - if (jsonObj.get("export_schema_version") != null - && !jsonObj.get("export_schema_version").isJsonNull()) { - ExportSchemaVersionEnum.validateJsonElement(jsonObj.get("export_schema_version")); - } - // validate the optional field `export_options` - if (jsonObj.get("export_options") != null && !jsonObj.get("export_options").isJsonNull()) { - ExportOptions.validateJsonElement(jsonObj.get("export_options")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportMetadataTMLRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportMetadataTMLRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTMLRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportMetadataTMLRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportMetadataTMLRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExportMetadataTMLRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportMetadataTMLRequest - * @throws IOException if the JSON string is invalid with respect to ExportMetadataTMLRequest - */ - public static ExportMetadataTMLRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportMetadataTMLRequest.class); - } - - /** - * Convert an instance of ExportMetadataTMLRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + ExportMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; + if ((jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) && !jsonObj.get("edoc_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `edoc_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("edoc_format").toString())); + } + // validate the optional field `edoc_format` + if (jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) { + EdocFormatEnum.validateJsonElement(jsonObj.get("edoc_format")); + } + if ((jsonObj.get("export_schema_version") != null && !jsonObj.get("export_schema_version").isJsonNull()) && !jsonObj.get("export_schema_version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `export_schema_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("export_schema_version").toString())); + } + // validate the optional field `export_schema_version` + if (jsonObj.get("export_schema_version") != null && !jsonObj.get("export_schema_version").isJsonNull()) { + ExportSchemaVersionEnum.validateJsonElement(jsonObj.get("export_schema_version")); + } + // validate the optional field `export_options` + if (jsonObj.get("export_options") != null && !jsonObj.get("export_options").isJsonNull()) { + ExportOptions.validateJsonElement(jsonObj.get("export_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportMetadataTMLRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportMetadataTMLRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTMLRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportMetadataTMLRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExportMetadataTMLRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExportMetadataTMLRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportMetadataTMLRequest + * @throws IOException if the JSON string is invalid with respect to ExportMetadataTMLRequest + */ + public static ExportMetadataTMLRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportMetadataTMLRequest.class); + } + + /** + * Convert an instance of ExportMetadataTMLRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java index 652a79471..a9105dff5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java @@ -4,394 +4,366 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataType InputType used in Export MetadataType API */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExportMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - CONNECTION("CONNECTION"), - - CUSTOM_ACTION("CUSTOM_ACTION"), - - USER("USER"), - - USER_GROUP("USER_GROUP"), - - ROLE("ROLE"), - - FEEDBACK("FEEDBACK"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; - - @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) - @javax.annotation.Nullable - private String sessionIdentifier; - - public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; - @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) - @javax.annotation.Nullable - private Integer generationNumber; - - public ExportMetadataTypeInput() {} - - public ExportMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - public ExportMetadataTypeInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when - * session_id and generation_number is set. - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } - - public ExportMetadataTypeInput sessionIdentifier( - @javax.annotation.Nullable String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - return this; - } - - /** - * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is - * not set. - * - * @return sessionIdentifier - */ - @javax.annotation.Nullable - public String getSessionIdentifier() { - return sessionIdentifier; - } - - public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - } +import com.thoughtspot.client.JSON; - public ExportMetadataTypeInput generationNumber( - @javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - return this; +/** + * MetadataType InputType used in Export MetadataType API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExportMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"), + + CUSTOM_ACTION("CUSTOM_ACTION"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + ROLE("ROLE"), + + FEEDBACK("FEEDBACK"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Generation Number of the Answer session. Required if the metadata type is ANSWER and - * identifier is not set. - * - * @return generationNumber - */ - @javax.annotation.Nullable - public Integer getGenerationNumber() { - return generationNumber; + public String getValue() { + return value; } - public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - ExportMetadataTypeInput exportMetadataTypeInput = (ExportMetadataTypeInput) o; - return Objects.equals(this.type, exportMetadataTypeInput.type) - && Objects.equals(this.identifier, exportMetadataTypeInput.identifier) - && Objects.equals(this.sessionIdentifier, exportMetadataTypeInput.sessionIdentifier) - && Objects.equals(this.generationNumber, exportMetadataTypeInput.generationNumber); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier, sessionIdentifier, generationNumber); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nullable + private String sessionIdentifier; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; + + public ExportMetadataTypeInput() { + } + + public ExportMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public ExportMetadataTypeInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public ExportMetadataTypeInput sessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + * @return sessionIdentifier + */ + @javax.annotation.Nullable + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + + public ExportMetadataTypeInput generationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" sessionIdentifier: ") - .append(toIndentedString(sessionIdentifier)) - .append("\n"); - sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ExportMetadataTypeInput exportMetadataTypeInput = (ExportMetadataTypeInput) o; + return Objects.equals(this.type, exportMetadataTypeInput.type) && + Objects.equals(this.identifier, exportMetadataTypeInput.identifier) && + Objects.equals(this.sessionIdentifier, exportMetadataTypeInput.sessionIdentifier) && + Objects.equals(this.generationNumber, exportMetadataTypeInput.generationNumber); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, sessionIdentifier, generationNumber); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - openapiFields.add("session_identifier"); - openapiFields.add("generation_number"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" sessionIdentifier: ").append(toIndentedString(sessionIdentifier)).append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExportMetadataTypeInput is not found" - + " in the empty JSON string", - ExportMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExportMetadataTypeInput is not found in the empty JSON string", ExportMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExportMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExportMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("session_identifier") != null - && !jsonObj.get("session_identifier").isJsonNull()) - && !jsonObj.get("session_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `session_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("session_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportMetadataTypeInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportMetadataTypeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExportMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to ExportMetadataTypeInput - */ - public static ExportMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportMetadataTypeInput.class); - } - - /** - * Convert an instance of ExportMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("session_identifier") != null && !jsonObj.get("session_identifier").isJsonNull()) && !jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `session_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("session_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExportMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ExportMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to ExportMetadataTypeInput + */ + public static ExportMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportMetadataTypeInput.class); + } + + /** + * Convert an instance of ExportMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java index 56d87383b..a3a08d738 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 @@ -4,341 +4,341 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * Flags to specify additional options for export. This will only be active when UserDefinedId in - * TML is enabled. + * Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ExportOptions implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_INCLUDE_OBJ_ID_REF = "include_obj_id_ref"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID_REF) - @javax.annotation.Nullable - private Boolean includeObjIdRef = false; - - public static final String SERIALIZED_NAME_INCLUDE_GUID = "include_guid"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_GUID) - @javax.annotation.Nullable - private Boolean includeGuid = true; - - public static final String SERIALIZED_NAME_INCLUDE_OBJ_ID = "include_obj_id"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID) - @javax.annotation.Nullable - private Boolean includeObjId = false; - - public static final String SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS = - "export_with_associated_feedbacks"; - - @SerializedName(SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS) - @javax.annotation.Nullable - private Boolean exportWithAssociatedFeedbacks = false; - - public static final String SERIALIZED_NAME_EXPORT_COLUMN_SECURITY_RULES = - "export_column_security_rules"; - - @SerializedName(SERIALIZED_NAME_EXPORT_COLUMN_SECURITY_RULES) - @javax.annotation.Nullable - private Boolean exportColumnSecurityRules = false; - - public ExportOptions() {} - - public ExportOptions includeObjIdRef(@javax.annotation.Nullable Boolean includeObjIdRef) { - this.includeObjIdRef = includeObjIdRef; - return this; - } - - /** - * Boolean Flag to export Object ID of referenced object. This flag will work only after the - * Object ID feature has been enabled. Please contact support to enable the feature. - * - * @return includeObjIdRef - */ - @javax.annotation.Nullable - public Boolean getIncludeObjIdRef() { - return includeObjIdRef; - } - - public void setIncludeObjIdRef(@javax.annotation.Nullable Boolean includeObjIdRef) { - this.includeObjIdRef = includeObjIdRef; - } - - public ExportOptions includeGuid(@javax.annotation.Nullable Boolean includeGuid) { - this.includeGuid = includeGuid; - return this; - } - - /** - * Boolean flag to export guid of the object. This flag will work only after the Object ID - * feature has been enabled. Please contact support to enable the feature. - * - * @return includeGuid - */ - @javax.annotation.Nullable - public Boolean getIncludeGuid() { - return includeGuid; - } - - public void setIncludeGuid(@javax.annotation.Nullable Boolean includeGuid) { - this.includeGuid = includeGuid; - } - - public ExportOptions includeObjId(@javax.annotation.Nullable Boolean includeObjId) { - this.includeObjId = includeObjId; - return this; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE_OBJ_ID_REF = "include_obj_id_ref"; + @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID_REF) + @javax.annotation.Nullable + private Boolean includeObjIdRef = false; + + public static final String SERIALIZED_NAME_INCLUDE_GUID = "include_guid"; + @SerializedName(SERIALIZED_NAME_INCLUDE_GUID) + @javax.annotation.Nullable + private Boolean includeGuid = true; + + public static final String SERIALIZED_NAME_INCLUDE_OBJ_ID = "include_obj_id"; + @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID) + @javax.annotation.Nullable + private Boolean includeObjId = false; + + public static final String SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS = "export_with_associated_feedbacks"; + @SerializedName(SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS) + @javax.annotation.Nullable + private Boolean exportWithAssociatedFeedbacks = false; + + public static final String SERIALIZED_NAME_EXPORT_COLUMN_SECURITY_RULES = "export_column_security_rules"; + @SerializedName(SERIALIZED_NAME_EXPORT_COLUMN_SECURITY_RULES) + @javax.annotation.Nullable + private Boolean exportColumnSecurityRules = false; + + public static final String SERIALIZED_NAME_EXPORT_WITH_COLUMN_ALIASES = "export_with_column_aliases"; + @SerializedName(SERIALIZED_NAME_EXPORT_WITH_COLUMN_ALIASES) + @javax.annotation.Nullable + private Boolean exportWithColumnAliases = false; + + public ExportOptions() { + } + + public ExportOptions includeObjIdRef(@javax.annotation.Nullable Boolean includeObjIdRef) { + this.includeObjIdRef = includeObjIdRef; + return this; + } + + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + * @return includeObjIdRef + */ + @javax.annotation.Nullable + public Boolean getIncludeObjIdRef() { + return includeObjIdRef; + } + + public void setIncludeObjIdRef(@javax.annotation.Nullable Boolean includeObjIdRef) { + this.includeObjIdRef = includeObjIdRef; + } + + + public ExportOptions includeGuid(@javax.annotation.Nullable Boolean includeGuid) { + this.includeGuid = includeGuid; + return this; + } + + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + * @return includeGuid + */ + @javax.annotation.Nullable + public Boolean getIncludeGuid() { + return includeGuid; + } + + public void setIncludeGuid(@javax.annotation.Nullable Boolean includeGuid) { + this.includeGuid = includeGuid; + } + + + public ExportOptions includeObjId(@javax.annotation.Nullable Boolean includeObjId) { + this.includeObjId = includeObjId; + return this; + } + + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + * @return includeObjId + */ + @javax.annotation.Nullable + public Boolean getIncludeObjId() { + return includeObjId; + } + + public void setIncludeObjId(@javax.annotation.Nullable Boolean includeObjId) { + this.includeObjId = includeObjId; + } + + + public ExportOptions exportWithAssociatedFeedbacks(@javax.annotation.Nullable Boolean exportWithAssociatedFeedbacks) { + this.exportWithAssociatedFeedbacks = exportWithAssociatedFeedbacks; + return this; + } + + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + * @return exportWithAssociatedFeedbacks + */ + @javax.annotation.Nullable + public Boolean getExportWithAssociatedFeedbacks() { + return exportWithAssociatedFeedbacks; + } + + public void setExportWithAssociatedFeedbacks(@javax.annotation.Nullable Boolean exportWithAssociatedFeedbacks) { + this.exportWithAssociatedFeedbacks = exportWithAssociatedFeedbacks; + } + + + public ExportOptions exportColumnSecurityRules(@javax.annotation.Nullable Boolean exportColumnSecurityRules) { + this.exportColumnSecurityRules = exportColumnSecurityRules; + return this; + } + + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + * @return exportColumnSecurityRules + */ + @javax.annotation.Nullable + public Boolean getExportColumnSecurityRules() { + return exportColumnSecurityRules; + } + + public void setExportColumnSecurityRules(@javax.annotation.Nullable Boolean exportColumnSecurityRules) { + this.exportColumnSecurityRules = exportColumnSecurityRules; + } + + + public ExportOptions exportWithColumnAliases(@javax.annotation.Nullable Boolean exportWithColumnAliases) { + this.exportWithColumnAliases = exportWithColumnAliases; + return this; + } + + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + * @return exportWithColumnAliases + */ + @javax.annotation.Nullable + public Boolean getExportWithColumnAliases() { + return exportWithColumnAliases; + } + + public void setExportWithColumnAliases(@javax.annotation.Nullable Boolean exportWithColumnAliases) { + this.exportWithColumnAliases = exportWithColumnAliases; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Boolean flag to export Object ID of the object. This flag will work only after the Object ID - * feature has been enabled. Please contact support to enable the feature. - * - * @return includeObjId - */ - @javax.annotation.Nullable - public Boolean getIncludeObjId() { - return includeObjId; - } - - public void setIncludeObjId(@javax.annotation.Nullable Boolean includeObjId) { - this.includeObjId = includeObjId; - } - - public ExportOptions exportWithAssociatedFeedbacks( - @javax.annotation.Nullable Boolean exportWithAssociatedFeedbacks) { - this.exportWithAssociatedFeedbacks = exportWithAssociatedFeedbacks; - return this; - } - - /** - * Boolean flag indicating whether to export associated feedbacks of the object. This will only - * be respected when the object can have feedbacks. Version: 10.7.0.cl or later - * - * @return exportWithAssociatedFeedbacks - */ - @javax.annotation.Nullable - public Boolean getExportWithAssociatedFeedbacks() { - return exportWithAssociatedFeedbacks; - } - - public void setExportWithAssociatedFeedbacks( - @javax.annotation.Nullable Boolean exportWithAssociatedFeedbacks) { - this.exportWithAssociatedFeedbacks = exportWithAssociatedFeedbacks; + if (o == null || getClass() != o.getClass()) { + return false; } - - public ExportOptions exportColumnSecurityRules( - @javax.annotation.Nullable Boolean exportColumnSecurityRules) { - this.exportColumnSecurityRules = exportColumnSecurityRules; - return this; + ExportOptions exportOptions = (ExportOptions) o; + return Objects.equals(this.includeObjIdRef, exportOptions.includeObjIdRef) && + Objects.equals(this.includeGuid, exportOptions.includeGuid) && + Objects.equals(this.includeObjId, exportOptions.includeObjId) && + Objects.equals(this.exportWithAssociatedFeedbacks, exportOptions.exportWithAssociatedFeedbacks) && + Objects.equals(this.exportColumnSecurityRules, exportOptions.exportColumnSecurityRules) && + Objects.equals(this.exportWithColumnAliases, exportOptions.exportWithColumnAliases); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(includeObjIdRef, includeGuid, includeObjId, exportWithAssociatedFeedbacks, exportColumnSecurityRules, exportWithColumnAliases); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - /** - * Boolean flag indicating whether to export column security rules of the object. This will only - * be respected when the object can have column security rules and export_associated is true. - * Version: 10.12.0.cl or later - * - * @return exportColumnSecurityRules - */ - @javax.annotation.Nullable - public Boolean getExportColumnSecurityRules() { - return exportColumnSecurityRules; + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportOptions {\n"); + sb.append(" includeObjIdRef: ").append(toIndentedString(includeObjIdRef)).append("\n"); + sb.append(" includeGuid: ").append(toIndentedString(includeGuid)).append("\n"); + sb.append(" includeObjId: ").append(toIndentedString(includeObjId)).append("\n"); + sb.append(" exportWithAssociatedFeedbacks: ").append(toIndentedString(exportWithAssociatedFeedbacks)).append("\n"); + sb.append(" exportColumnSecurityRules: ").append(toIndentedString(exportColumnSecurityRules)).append("\n"); + sb.append(" exportWithColumnAliases: ").append(toIndentedString(exportWithColumnAliases)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public void setExportColumnSecurityRules( - @javax.annotation.Nullable Boolean exportColumnSecurityRules) { - this.exportColumnSecurityRules = exportColumnSecurityRules; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_obj_id_ref"); + openapiFields.add("include_guid"); + openapiFields.add("include_obj_id"); + openapiFields.add("export_with_associated_feedbacks"); + openapiFields.add("export_column_security_rules"); + openapiFields.add("export_with_column_aliases"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExportOptions is not found in the empty JSON string", ExportOptions.openapiRequiredFields.toString())); } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExportOptions exportOptions = (ExportOptions) o; - return Objects.equals(this.includeObjIdRef, exportOptions.includeObjIdRef) - && Objects.equals(this.includeGuid, exportOptions.includeGuid) - && Objects.equals(this.includeObjId, exportOptions.includeObjId) - && Objects.equals( - this.exportWithAssociatedFeedbacks, - exportOptions.exportWithAssociatedFeedbacks) - && Objects.equals( - this.exportColumnSecurityRules, exportOptions.exportColumnSecurityRules); - } + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - includeObjIdRef, - includeGuid, - includeObjId, - exportWithAssociatedFeedbacks, - exportColumnSecurityRules); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExportOptions {\n"); - sb.append(" includeObjIdRef: ").append(toIndentedString(includeObjIdRef)).append("\n"); - sb.append(" includeGuid: ").append(toIndentedString(includeGuid)).append("\n"); - sb.append(" includeObjId: ").append(toIndentedString(includeObjId)).append("\n"); - sb.append(" exportWithAssociatedFeedbacks: ") - .append(toIndentedString(exportWithAssociatedFeedbacks)) - .append("\n"); - sb.append(" exportColumnSecurityRules: ") - .append(toIndentedString(exportColumnSecurityRules)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("include_obj_id_ref"); - openapiFields.add("include_guid"); - openapiFields.add("include_obj_id"); - openapiFields.add("export_with_associated_feedbacks"); - openapiFields.add("export_column_security_rules"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExportOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExportOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExportOptions is not found in the" - + " empty JSON string", - ExportOptions.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExportOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExportOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExportOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportOptions value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExportOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExportOptions - * @throws IOException if the JSON string is invalid with respect to ExportOptions - */ - public static ExportOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExportOptions.class); - } - - /** - * Convert an instance of ExportOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExportOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExportOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ExportOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportOptions + * @throws IOException if the JSON string is invalid with respect to ExportOptions + */ + public static ExportOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportOptions.class); + } + + /** + * Convert an instance of ExportOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java index a637f50cf..d94ad0009 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java @@ -4,332 +4,308 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ExternalTableInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ExternalTableInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; - - public static final String SERIALIZED_NAME_DATABASE_NAME = "database_name"; - - @SerializedName(SERIALIZED_NAME_DATABASE_NAME) - @javax.annotation.Nullable - private String databaseName = ""; - - public static final String SERIALIZED_NAME_SCHEMA_NAME = "schema_name"; - - @SerializedName(SERIALIZED_NAME_SCHEMA_NAME) - @javax.annotation.Nullable - private String schemaName = ""; - - public static final String SERIALIZED_NAME_TABLE_NAME = "table_name"; - - @SerializedName(SERIALIZED_NAME_TABLE_NAME) - @javax.annotation.Nonnull - private String tableName; - - public ExternalTableInput() {} - - public ExternalTableInput connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; - } - - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } - - public ExternalTableInput databaseName(@javax.annotation.Nullable String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Name of the database. - * - * @return databaseName - */ - @javax.annotation.Nullable - public String getDatabaseName() { - return databaseName; - } - - public void setDatabaseName(@javax.annotation.Nullable String databaseName) { - this.databaseName = databaseName; - } - - public ExternalTableInput schemaName(@javax.annotation.Nullable String schemaName) { - this.schemaName = schemaName; - return this; - } - - /** - * Name of the schema. - * - * @return schemaName - */ - @javax.annotation.Nullable - public String getSchemaName() { - return schemaName; - } - - public void setSchemaName(@javax.annotation.Nullable String schemaName) { - this.schemaName = schemaName; - } - - public ExternalTableInput tableName(@javax.annotation.Nonnull String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Name of the table. Table names may be case-sensitive depending on the database system. - * - * @return tableName - */ - @javax.annotation.Nonnull - public String getTableName() { - return tableName; - } - - public void setTableName(@javax.annotation.Nonnull String tableName) { - this.tableName = tableName; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExternalTableInput externalTableInput = (ExternalTableInput) o; - return Objects.equals(this.connectionIdentifier, externalTableInput.connectionIdentifier) - && Objects.equals(this.databaseName, externalTableInput.databaseName) - && Objects.equals(this.schemaName, externalTableInput.schemaName) - && Objects.equals(this.tableName, externalTableInput.tableName); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(connectionIdentifier, databaseName, schemaName, tableName); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * ExternalTableInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExternalTableInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_DATABASE_NAME = "database_name"; + @SerializedName(SERIALIZED_NAME_DATABASE_NAME) + @javax.annotation.Nullable + private String databaseName = ""; + + public static final String SERIALIZED_NAME_SCHEMA_NAME = "schema_name"; + @SerializedName(SERIALIZED_NAME_SCHEMA_NAME) + @javax.annotation.Nullable + private String schemaName = ""; + + public static final String SERIALIZED_NAME_TABLE_NAME = "table_name"; + @SerializedName(SERIALIZED_NAME_TABLE_NAME) + @javax.annotation.Nonnull + private String tableName; + + public ExternalTableInput() { + } + + public ExternalTableInput connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + public ExternalTableInput databaseName(@javax.annotation.Nullable String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Name of the database. + * @return databaseName + */ + @javax.annotation.Nullable + public String getDatabaseName() { + return databaseName; + } + + public void setDatabaseName(@javax.annotation.Nullable String databaseName) { + this.databaseName = databaseName; + } + + + public ExternalTableInput schemaName(@javax.annotation.Nullable String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Name of the schema. + * @return schemaName + */ + @javax.annotation.Nullable + public String getSchemaName() { + return schemaName; + } + + public void setSchemaName(@javax.annotation.Nullable String schemaName) { + this.schemaName = schemaName; + } + + + public ExternalTableInput tableName(@javax.annotation.Nonnull String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + * @return tableName + */ + @javax.annotation.Nonnull + public String getTableName() { + return tableName; + } + + public void setTableName(@javax.annotation.Nonnull String tableName) { + this.tableName = tableName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExternalTableInput {\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append(" databaseName: ").append(toIndentedString(databaseName)).append("\n"); - sb.append(" schemaName: ").append(toIndentedString(schemaName)).append("\n"); - sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ExternalTableInput externalTableInput = (ExternalTableInput) o; + return Objects.equals(this.connectionIdentifier, externalTableInput.connectionIdentifier) && + Objects.equals(this.databaseName, externalTableInput.databaseName) && + Objects.equals(this.schemaName, externalTableInput.schemaName) && + Objects.equals(this.tableName, externalTableInput.tableName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier, databaseName, schemaName, tableName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_identifier"); - openapiFields.add("database_name"); - openapiFields.add("schema_name"); - openapiFields.add("table_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("connection_identifier"); - openapiRequiredFields.add("table_name"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalTableInput {\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append(" databaseName: ").append(toIndentedString(databaseName)).append("\n"); + sb.append(" schemaName: ").append(toIndentedString(schemaName)).append("\n"); + sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExternalTableInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExternalTableInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ExternalTableInput is not found in" - + " the empty JSON string", - ExternalTableInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("database_name"); + openapiFields.add("schema_name"); + openapiFields.add("table_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + openapiRequiredFields.add("table_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExternalTableInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExternalTableInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalTableInput is not found in the empty JSON string", ExternalTableInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExternalTableInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ExternalTableInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExternalTableInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExternalTableInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExternalTableInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExternalTableInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - if ((jsonObj.get("database_name") != null && !jsonObj.get("database_name").isJsonNull()) - && !jsonObj.get("database_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `database_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("database_name").toString())); - } - if ((jsonObj.get("schema_name") != null && !jsonObj.get("schema_name").isJsonNull()) - && !jsonObj.get("schema_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `schema_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("schema_name").toString())); - } - if (!jsonObj.get("table_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `table_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("table_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExternalTableInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExternalTableInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ExternalTableInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ExternalTableInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExternalTableInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ExternalTableInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExternalTableInput - * @throws IOException if the JSON string is invalid with respect to ExternalTableInput - */ - public static ExternalTableInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExternalTableInput.class); - } - - /** - * Convert an instance of ExternalTableInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("database_name") != null && !jsonObj.get("database_name").isJsonNull()) && !jsonObj.get("database_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `database_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("database_name").toString())); + } + if ((jsonObj.get("schema_name") != null && !jsonObj.get("schema_name").isJsonNull()) && !jsonObj.get("schema_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `schema_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("schema_name").toString())); + } + if (!jsonObj.get("table_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `table_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("table_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalTableInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalTableInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalTableInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalTableInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExternalTableInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ExternalTableInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalTableInput + * @throws IOException if the JSON string is invalid with respect to ExternalTableInput + */ + public static ExternalTableInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalTableInput.class); + } + + /** + * Convert an instance of ExternalTableInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java index f71ee8523..50f93db17 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java @@ -4,307 +4,295 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** FavoriteMetadataInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FavoriteMetadataInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public FavoriteMetadataInput() {} - - public FavoriteMetadataInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata object. - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } +import com.thoughtspot.client.JSON; - public FavoriteMetadataInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; +/** + * FavoriteMetadataInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FavoriteMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - FavoriteMetadataInput favoriteMetadataInput = (FavoriteMetadataInput) o; - return Objects.equals(this.identifier, favoriteMetadataInput.identifier) - && Objects.equals(this.type, favoriteMetadataInput.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public FavoriteMetadataInput() { + } + + public FavoriteMetadataInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public FavoriteMetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FavoriteMetadataInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + FavoriteMetadataInput favoriteMetadataInput = (FavoriteMetadataInput) o; + return Objects.equals(this.identifier, favoriteMetadataInput.identifier) && + Objects.equals(this.type, favoriteMetadataInput.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteMetadataInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FavoriteMetadataInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FavoriteMetadataInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FavoriteMetadataInput is not found in" - + " the empty JSON string", - FavoriteMetadataInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteMetadataInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FavoriteMetadataInput is not found in the empty JSON string", FavoriteMetadataInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FavoriteMetadataInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FavoriteMetadataInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoriteMetadataInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoriteMetadataInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FavoriteMetadataInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FavoriteMetadataInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FavoriteMetadataInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FavoriteMetadataInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FavoriteMetadataInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FavoriteMetadataInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoriteMetadataInput - * @throws IOException if the JSON string is invalid with respect to FavoriteMetadataInput - */ - public static FavoriteMetadataInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FavoriteMetadataInput.class); - } - - /** - * Convert an instance of FavoriteMetadataInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteMetadataInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoriteMetadataInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteMetadataInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoriteMetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FavoriteMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteMetadataInput + * @throws IOException if the JSON string is invalid with respect to FavoriteMetadataInput + */ + public static FavoriteMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FavoriteMetadataInput.class); + } + + /** + * Convert an instance of FavoriteMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java index 75dff528e..06cdd4af3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java @@ -4,347 +4,335 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FavoriteMetadataItem */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FavoriteMetadataItem implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"), - - TAG("TAG"), - - USER("USER"), - - USER_GROUP("USER_GROUP"), - - LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private TypeEnum type; - - public FavoriteMetadataItem() {} - - public FavoriteMetadataItem id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Unique ID of the metadata object. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public FavoriteMetadataItem name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * name of the metadata object. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public FavoriteMetadataItem type(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FavoriteMetadataItem favoriteMetadataItem = (FavoriteMetadataItem) o; - return Objects.equals(this.id, favoriteMetadataItem.id) - && Objects.equals(this.name, favoriteMetadataItem.name) - && Objects.equals(this.type, favoriteMetadataItem.type); +/** + * FavoriteMetadataItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FavoriteMetadataItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(id, name, type); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FavoriteMetadataItem {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); + 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); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FavoriteMetadataItem - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FavoriteMetadataItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FavoriteMetadataItem is not found in" - + " the empty JSON string", - FavoriteMetadataItem.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public FavoriteMetadataItem() { + } + + public FavoriteMetadataItem id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the metadata object. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public FavoriteMetadataItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * name of the metadata object. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public FavoriteMetadataItem type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteMetadataItem favoriteMetadataItem = (FavoriteMetadataItem) o; + return Objects.equals(this.id, favoriteMetadataItem.id) && + Objects.equals(this.name, favoriteMetadataItem.name) && + Objects.equals(this.type, favoriteMetadataItem.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteMetadataItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteMetadataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteMetadataItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FavoriteMetadataItem is not found in the empty JSON string", FavoriteMetadataItem.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FavoriteMetadataItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FavoriteMetadataItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoriteMetadataItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoriteMetadataItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FavoriteMetadataItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FavoriteMetadataItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FavoriteMetadataItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FavoriteMetadataItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FavoriteMetadataItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FavoriteMetadataItem value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FavoriteMetadataItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FavoriteMetadataItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoriteMetadataItem - * @throws IOException if the JSON string is invalid with respect to FavoriteMetadataItem - */ - public static FavoriteMetadataItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FavoriteMetadataItem.class); - } - - /** - * Convert an instance of FavoriteMetadataItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteMetadataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteMetadataItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoriteMetadataItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteMetadataItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoriteMetadataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FavoriteMetadataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteMetadataItem + * @throws IOException if the JSON string is invalid with respect to FavoriteMetadataItem + */ + public static FavoriteMetadataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FavoriteMetadataItem.class); + } + + /** + * Convert an instance of FavoriteMetadataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java index f78b84aa2..7000b8bfa 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java @@ -4,254 +4,247 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Favorite object options. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FavoriteObjectOptionsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_INCLUDE = "include"; - - @SerializedName(SERIALIZED_NAME_INCLUDE) - @javax.annotation.Nullable - private Boolean include = false; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - public FavoriteObjectOptionsInput() {} - - public FavoriteObjectOptionsInput include(@javax.annotation.Nullable Boolean include) { - this.include = include; - return this; - } - - /** - * Includes objects marked as favorite for the specified users. - * - * @return include - */ - @javax.annotation.Nullable - public Boolean getInclude() { - return include; - } - - public void setInclude(@javax.annotation.Nullable Boolean include) { - this.include = include; - } - - public FavoriteObjectOptionsInput userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; - } - - public FavoriteObjectOptionsInput addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); - } - this.userIdentifiers.add(userIdentifiersItem); - return this; - } - /** - * Unique ID or name of the users. If not specified, the favorite objects of current logged in - * user are returned. - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } - - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FavoriteObjectOptionsInput favoriteObjectOptionsInput = (FavoriteObjectOptionsInput) o; - return Objects.equals(this.include, favoriteObjectOptionsInput.include) - && Objects.equals(this.userIdentifiers, favoriteObjectOptionsInput.userIdentifiers); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(include, userIdentifiers); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FavoriteObjectOptionsInput {\n"); - sb.append(" include: ").append(toIndentedString(include)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("include"); - openapiFields.add("user_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FavoriteObjectOptionsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FavoriteObjectOptionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FavoriteObjectOptionsInput is not" - + " found in the empty JSON string", - FavoriteObjectOptionsInput.openapiRequiredFields.toString())); - } +/** + * Favorite object options. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FavoriteObjectOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE = "include"; + @SerializedName(SERIALIZED_NAME_INCLUDE) + @javax.annotation.Nullable + private Boolean include = false; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public FavoriteObjectOptionsInput() { + } + + public FavoriteObjectOptionsInput include(@javax.annotation.Nullable Boolean include) { + this.include = include; + return this; + } + + /** + * Includes objects marked as favorite for the specified users. + * @return include + */ + @javax.annotation.Nullable + public Boolean getInclude() { + return include; + } + + public void setInclude(@javax.annotation.Nullable Boolean include) { + this.include = include; + } + + + public FavoriteObjectOptionsInput userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public FavoriteObjectOptionsInput addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteObjectOptionsInput favoriteObjectOptionsInput = (FavoriteObjectOptionsInput) o; + return Objects.equals(this.include, favoriteObjectOptionsInput.include) && + Objects.equals(this.userIdentifiers, favoriteObjectOptionsInput.userIdentifiers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(include, userIdentifiers); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteObjectOptionsInput {\n"); + sb.append(" include: ").append(toIndentedString(include)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include"); + openapiFields.add("user_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteObjectOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteObjectOptionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FavoriteObjectOptionsInput is not found in the empty JSON string", FavoriteObjectOptionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FavoriteObjectOptionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FavoriteObjectOptionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoriteObjectOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoriteObjectOptionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FavoriteObjectOptionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FavoriteObjectOptionsInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FavoriteObjectOptionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FavoriteObjectOptionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FavoriteObjectOptionsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FavoriteObjectOptionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoriteObjectOptionsInput - * @throws IOException if the JSON string is invalid with respect to FavoriteObjectOptionsInput - */ - public static FavoriteObjectOptionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FavoriteObjectOptionsInput.class); - } - - /** - * Convert an instance of FavoriteObjectOptionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteObjectOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteObjectOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoriteObjectOptionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteObjectOptionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoriteObjectOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FavoriteObjectOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteObjectOptionsInput + * @throws IOException if the JSON string is invalid with respect to FavoriteObjectOptionsInput + */ + public static FavoriteObjectOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FavoriteObjectOptionsInput.class); + } + + /** + * Convert an instance of FavoriteObjectOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java index a329e6a4c..c2bc3d996 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java @@ -4,464 +4,426 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FetchAnswerDataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchAnswerDataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - @JsonAdapter(DataFormatEnum.Adapter.class) - public enum DataFormatEnum { - FULL("FULL"), - - COMPACT("COMPACT"); - - private String value; - - DataFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataFormatEnum fromValue(String value) { - for (DataFormatEnum b : DataFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; - - @SerializedName(SERIALIZED_NAME_DATA_FORMAT) - @javax.annotation.Nullable - private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; - - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; - - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; - - public FetchAnswerDataRequest() {} - - public FetchAnswerDataRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * GUID or name of the Answer. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public FetchAnswerDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { - this.dataFormat = dataFormat; - return this; - } - - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - * - * @return dataFormat - */ - @javax.annotation.Nullable - public DataFormatEnum getDataFormat() { - return dataFormat; - } - - public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { - this.dataFormat = dataFormat; - } - - public FetchAnswerDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public FetchAnswerDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records to include in a batch. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public FetchAnswerDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * JSON object with representing filter condition to apply filters at runtime. For example, - * <code> {\"col1\": \"item type\", \"op1\": - * \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple - * keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, - * val3. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } - - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } - - public FetchAnswerDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } - - /** - * JSON object representing columns to sort data at runtime. For example, <code> - * {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You - * can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For - * more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } - - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } - - public FetchAnswerDataRequest runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } - - /** - * JSON object for setting values of parameters at runtime. For example, <code> - * {\"param1\": \"Double List Param\", \"paramVal1\": - * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for - * example, param2, paramVal2. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } - - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchAnswerDataRequest fetchAnswerDataRequest = (FetchAnswerDataRequest) o; - return Objects.equals(this.metadataIdentifier, fetchAnswerDataRequest.metadataIdentifier) - && Objects.equals(this.dataFormat, fetchAnswerDataRequest.dataFormat) - && Objects.equals(this.recordOffset, fetchAnswerDataRequest.recordOffset) - && Objects.equals(this.recordSize, fetchAnswerDataRequest.recordSize) - && Objects.equals(this.runtimeFilter, fetchAnswerDataRequest.runtimeFilter) - && Objects.equals(this.runtimeSort, fetchAnswerDataRequest.runtimeSort) - && Objects.equals( - this.runtimeParamOverride, fetchAnswerDataRequest.runtimeParamOverride); +/** + * FetchAnswerDataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchAnswerDataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + @JsonAdapter(DataFormatEnum.Adapter.class) + public enum DataFormatEnum { + FULL("FULL"), + + COMPACT("COMPACT"); + + private String value; + + DataFormatEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - metadataIdentifier, - dataFormat, - recordOffset, - recordSize, - runtimeFilter, - runtimeSort, - runtimeParamOverride); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchAnswerDataRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static DataFormatEnum fromValue(String value) { + for (DataFormatEnum b : DataFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("data_format"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("runtime_filter"); - openapiFields.add("runtime_sort"); - openapiFields.add("runtime_param_override"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataFormatEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FetchAnswerDataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchAnswerDataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchAnswerDataRequest is not found" - + " in the empty JSON string", - FetchAnswerDataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + DataFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; + @SerializedName(SERIALIZED_NAME_DATA_FORMAT) + @javax.annotation.Nullable + private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public FetchAnswerDataRequest() { + } + + public FetchAnswerDataRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the Answer. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public FetchAnswerDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * @return dataFormat + */ + @javax.annotation.Nullable + public DataFormatEnum getDataFormat() { + return dataFormat; + } + + public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + } + + + public FetchAnswerDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public FetchAnswerDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records to include in a batch. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public FetchAnswerDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, <code> {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + + public FetchAnswerDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON object representing columns to sort data at runtime. For example, <code> {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + + public FetchAnswerDataRequest runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchAnswerDataRequest fetchAnswerDataRequest = (FetchAnswerDataRequest) o; + return Objects.equals(this.metadataIdentifier, fetchAnswerDataRequest.metadataIdentifier) && + Objects.equals(this.dataFormat, fetchAnswerDataRequest.dataFormat) && + Objects.equals(this.recordOffset, fetchAnswerDataRequest.recordOffset) && + Objects.equals(this.recordSize, fetchAnswerDataRequest.recordSize) && + Objects.equals(this.runtimeFilter, fetchAnswerDataRequest.runtimeFilter) && + Objects.equals(this.runtimeSort, fetchAnswerDataRequest.runtimeSort) && + Objects.equals(this.runtimeParamOverride, fetchAnswerDataRequest.runtimeParamOverride); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, dataFormat, recordOffset, recordSize, runtimeFilter, runtimeSort, runtimeParamOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAnswerDataRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("data_format"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchAnswerDataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchAnswerDataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchAnswerDataRequest is not found in the empty JSON string", FetchAnswerDataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchAnswerDataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchAnswerDataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchAnswerDataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchAnswerDataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchAnswerDataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchAnswerDataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) - && !jsonObj.get("data_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("data_format").toString())); - } - // validate the optional field `data_format` - if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { - DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchAnswerDataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchAnswerDataRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FetchAnswerDataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchAnswerDataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchAnswerDataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchAnswerDataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchAnswerDataRequest - * @throws IOException if the JSON string is invalid with respect to FetchAnswerDataRequest - */ - public static FetchAnswerDataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchAnswerDataRequest.class); - } - - /** - * Convert an instance of FetchAnswerDataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) && !jsonObj.get("data_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_format").toString())); + } + // validate the optional field `data_format` + if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { + DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchAnswerDataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchAnswerDataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchAnswerDataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchAnswerDataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchAnswerDataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FetchAnswerDataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchAnswerDataRequest + * @throws IOException if the JSON string is invalid with respect to FetchAnswerDataRequest + */ + public static FetchAnswerDataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchAnswerDataRequest.class); + } + + /** + * Convert an instance of FetchAnswerDataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java index f12b7f030..4bdd785df 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java @@ -4,208 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FetchAnswerSqlQueryRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchAnswerSqlQueryRequest implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; +/** + * FetchAnswerSqlQueryRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchAnswerSqlQueryRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; - public FetchAnswerSqlQueryRequest() {} + public FetchAnswerSqlQueryRequest() { + } - public FetchAnswerSqlQueryRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } + public FetchAnswerSqlQueryRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } - /** - * ID or name of an Answer. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } + /** + * ID or name of an Answer. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest = (FetchAnswerSqlQueryRequest) o; - return Objects.equals( - this.metadataIdentifier, fetchAnswerSqlQueryRequest.metadataIdentifier); - } - @Override - public int hashCode() { - return Objects.hash(metadataIdentifier); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchAnswerSqlQueryRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest = (FetchAnswerSqlQueryRequest) o; + return Objects.equals(this.metadataIdentifier, fetchAnswerSqlQueryRequest.metadataIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAnswerSqlQueryRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FetchAnswerSqlQueryRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchAnswerSqlQueryRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchAnswerSqlQueryRequest is not" - + " found in the empty JSON string", - FetchAnswerSqlQueryRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchAnswerSqlQueryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchAnswerSqlQueryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchAnswerSqlQueryRequest is not found in the empty JSON string", FetchAnswerSqlQueryRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchAnswerSqlQueryRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchAnswerSqlQueryRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchAnswerSqlQueryRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchAnswerSqlQueryRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchAnswerSqlQueryRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchAnswerSqlQueryRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchAnswerSqlQueryRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchAnswerSqlQueryRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FetchAnswerSqlQueryRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchAnswerSqlQueryRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchAnswerSqlQueryRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchAnswerSqlQueryRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchAnswerSqlQueryRequest - * @throws IOException if the JSON string is invalid with respect to FetchAnswerSqlQueryRequest - */ - public static FetchAnswerSqlQueryRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchAnswerSqlQueryRequest.class); - } - - /** - * Convert an instance of FetchAnswerSqlQueryRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchAnswerSqlQueryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchAnswerSqlQueryRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchAnswerSqlQueryRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchAnswerSqlQueryRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchAnswerSqlQueryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FetchAnswerSqlQueryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchAnswerSqlQueryRequest + * @throws IOException if the JSON string is invalid with respect to FetchAnswerSqlQueryRequest + */ + public static FetchAnswerSqlQueryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchAnswerSqlQueryRequest.class); + } + + /** + * Convert an instance of FetchAnswerSqlQueryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java index 405510b15..79475a1c5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java @@ -4,471 +4,426 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** FetchAsyncImportTaskStatusRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchAsyncImportTaskStatusRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TASK_IDS = "task_ids"; - - @SerializedName(SERIALIZED_NAME_TASK_IDS) - @javax.annotation.Nullable - private List taskIds; - - /** Gets or Sets taskStatus */ - @JsonAdapter(TaskStatusEnum.Adapter.class) - public enum TaskStatusEnum { - COMPLETED("COMPLETED"), - - IN_QUEUE("IN_QUEUE"), - - IN_PROGRESS("IN_PROGRESS"), - - FAILED("FAILED"); - - private String value; - - TaskStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TaskStatusEnum fromValue(String value) { - for (TaskStatusEnum b : TaskStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TaskStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TaskStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TaskStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TaskStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TASK_STATUS = "task_status"; - - @SerializedName(SERIALIZED_NAME_TASK_STATUS) - @javax.annotation.Nullable - private List taskStatus; - - public static final String SERIALIZED_NAME_AUTHOR_IDENTIFIER = "author_identifier"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_IDENTIFIER) - @javax.annotation.Nullable - private String authorIdentifier; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 5; - - public static final String SERIALIZED_NAME_INCLUDE_IMPORT_RESPONSE = "include_import_response"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_IMPORT_RESPONSE) - @javax.annotation.Nullable - private Boolean includeImportResponse = false; - - public FetchAsyncImportTaskStatusRequest() {} - - public FetchAsyncImportTaskStatusRequest taskIds( - @javax.annotation.Nullable List taskIds) { - this.taskIds = taskIds; - return this; - } - - public FetchAsyncImportTaskStatusRequest addTaskIdsItem(String taskIdsItem) { - if (this.taskIds == null) { - this.taskIds = new ArrayList<>(); - } - this.taskIds.add(taskIdsItem); - return this; - } - - /** - * List of task IDs to fetch status for. - * - * @return taskIds - */ - @javax.annotation.Nullable - public List getTaskIds() { - return taskIds; - } - - public void setTaskIds(@javax.annotation.Nullable List taskIds) { - this.taskIds = taskIds; - } - - public FetchAsyncImportTaskStatusRequest taskStatus( - @javax.annotation.Nullable List taskStatus) { - this.taskStatus = taskStatus; - return this; - } - - public FetchAsyncImportTaskStatusRequest addTaskStatusItem(TaskStatusEnum taskStatusItem) { - if (this.taskStatus == null) { - this.taskStatus = new ArrayList<>(); - } - this.taskStatus.add(taskStatusItem); - return this; - } - - /** - * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] - * - * @return taskStatus - */ - @javax.annotation.Nullable - public List getTaskStatus() { - return taskStatus; - } - - public void setTaskStatus(@javax.annotation.Nullable List taskStatus) { - this.taskStatus = taskStatus; - } - - public FetchAsyncImportTaskStatusRequest authorIdentifier( - @javax.annotation.Nullable String authorIdentifier) { - this.authorIdentifier = authorIdentifier; - return this; - } - - /** - * Author GUID or name of async import tasks to filter on. - * - * @return authorIdentifier - */ - @javax.annotation.Nullable - public String getAuthorIdentifier() { - return authorIdentifier; - } - - public void setAuthorIdentifier(@javax.annotation.Nullable String authorIdentifier) { - this.authorIdentifier = authorIdentifier; - } - - public FetchAsyncImportTaskStatusRequest recordOffset( - @javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The offset point, starting from where the task status should be included in the response. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public FetchAsyncImportTaskStatusRequest recordSize( - @javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of task statuses that should be included in the response starting from offset - * position. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public FetchAsyncImportTaskStatusRequest includeImportResponse( - @javax.annotation.Nullable Boolean includeImportResponse) { - this.includeImportResponse = includeImportResponse; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Boolean flag to specify whether to include import response in the task status objects. - * - * @return includeImportResponse - */ - @javax.annotation.Nullable - public Boolean getIncludeImportResponse() { - return includeImportResponse; - } +/** + * FetchAsyncImportTaskStatusRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchAsyncImportTaskStatusRequest implements Serializable { + private static final long serialVersionUID = 1L; - public void setIncludeImportResponse(@javax.annotation.Nullable Boolean includeImportResponse) { - this.includeImportResponse = includeImportResponse; - } + public static final String SERIALIZED_NAME_TASK_IDS = "task_ids"; + @SerializedName(SERIALIZED_NAME_TASK_IDS) + @javax.annotation.Nullable + private List taskIds; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = - (FetchAsyncImportTaskStatusRequest) o; - return Objects.equals(this.taskIds, fetchAsyncImportTaskStatusRequest.taskIds) - && Objects.equals(this.taskStatus, fetchAsyncImportTaskStatusRequest.taskStatus) - && Objects.equals( - this.authorIdentifier, fetchAsyncImportTaskStatusRequest.authorIdentifier) - && Objects.equals(this.recordOffset, fetchAsyncImportTaskStatusRequest.recordOffset) - && Objects.equals(this.recordSize, fetchAsyncImportTaskStatusRequest.recordSize) - && Objects.equals( - this.includeImportResponse, - fetchAsyncImportTaskStatusRequest.includeImportResponse); - } + /** + * Gets or Sets taskStatus + */ + @JsonAdapter(TaskStatusEnum.Adapter.class) + public enum TaskStatusEnum { + COMPLETED("COMPLETED"), + + IN_QUEUE("IN_QUEUE"), + + IN_PROGRESS("IN_PROGRESS"), + + FAILED("FAILED"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - taskIds, - taskStatus, - authorIdentifier, - recordOffset, - recordSize, - includeImportResponse); + TaskStatusEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchAsyncImportTaskStatusRequest {\n"); - sb.append(" taskIds: ").append(toIndentedString(taskIds)).append("\n"); - sb.append(" taskStatus: ").append(toIndentedString(taskStatus)).append("\n"); - sb.append(" authorIdentifier: ").append(toIndentedString(authorIdentifier)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" includeImportResponse: ") - .append(toIndentedString(includeImportResponse)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static TaskStatusEnum fromValue(String value) { + for (TaskStatusEnum b : TaskStatusEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("task_ids"); - openapiFields.add("task_status"); - openapiFields.add("author_identifier"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("include_import_response"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TaskStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TaskStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TaskStatusEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FetchAsyncImportTaskStatusRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchAsyncImportTaskStatusRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchAsyncImportTaskStatusRequest is" - + " not found in the empty JSON string", - FetchAsyncImportTaskStatusRequest.openapiRequiredFields - .toString())); - } + String value = jsonElement.getAsString(); + TaskStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TASK_STATUS = "task_status"; + @SerializedName(SERIALIZED_NAME_TASK_STATUS) + @javax.annotation.Nullable + private List taskStatus; + + public static final String SERIALIZED_NAME_AUTHOR_IDENTIFIER = "author_identifier"; + @SerializedName(SERIALIZED_NAME_AUTHOR_IDENTIFIER) + @javax.annotation.Nullable + private String authorIdentifier; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 5; + + public static final String SERIALIZED_NAME_INCLUDE_IMPORT_RESPONSE = "include_import_response"; + @SerializedName(SERIALIZED_NAME_INCLUDE_IMPORT_RESPONSE) + @javax.annotation.Nullable + private Boolean includeImportResponse = false; + + public FetchAsyncImportTaskStatusRequest() { + } + + public FetchAsyncImportTaskStatusRequest taskIds(@javax.annotation.Nullable List taskIds) { + this.taskIds = taskIds; + return this; + } + + public FetchAsyncImportTaskStatusRequest addTaskIdsItem(String taskIdsItem) { + if (this.taskIds == null) { + this.taskIds = new ArrayList<>(); + } + this.taskIds.add(taskIdsItem); + return this; + } + + /** + * List of task IDs to fetch status for. + * @return taskIds + */ + @javax.annotation.Nullable + public List getTaskIds() { + return taskIds; + } + + public void setTaskIds(@javax.annotation.Nullable List taskIds) { + this.taskIds = taskIds; + } + + + public FetchAsyncImportTaskStatusRequest taskStatus(@javax.annotation.Nullable List taskStatus) { + this.taskStatus = taskStatus; + return this; + } + + public FetchAsyncImportTaskStatusRequest addTaskStatusItem(TaskStatusEnum taskStatusItem) { + if (this.taskStatus == null) { + this.taskStatus = new ArrayList<>(); + } + this.taskStatus.add(taskStatusItem); + return this; + } + + /** + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] + * @return taskStatus + */ + @javax.annotation.Nullable + public List getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(@javax.annotation.Nullable List taskStatus) { + this.taskStatus = taskStatus; + } + + + public FetchAsyncImportTaskStatusRequest authorIdentifier(@javax.annotation.Nullable String authorIdentifier) { + this.authorIdentifier = authorIdentifier; + return this; + } + + /** + * Author GUID or name of async import tasks to filter on. + * @return authorIdentifier + */ + @javax.annotation.Nullable + public String getAuthorIdentifier() { + return authorIdentifier; + } + + public void setAuthorIdentifier(@javax.annotation.Nullable String authorIdentifier) { + this.authorIdentifier = authorIdentifier; + } + + + public FetchAsyncImportTaskStatusRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The offset point, starting from where the task status should be included in the response. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public FetchAsyncImportTaskStatusRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of task statuses that should be included in the response starting from offset position. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public FetchAsyncImportTaskStatusRequest includeImportResponse(@javax.annotation.Nullable Boolean includeImportResponse) { + this.includeImportResponse = includeImportResponse; + return this; + } + + /** + * Boolean flag to specify whether to include import response in the task status objects. + * @return includeImportResponse + */ + @javax.annotation.Nullable + public Boolean getIncludeImportResponse() { + return includeImportResponse; + } + + public void setIncludeImportResponse(@javax.annotation.Nullable Boolean includeImportResponse) { + this.includeImportResponse = includeImportResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = (FetchAsyncImportTaskStatusRequest) o; + return Objects.equals(this.taskIds, fetchAsyncImportTaskStatusRequest.taskIds) && + Objects.equals(this.taskStatus, fetchAsyncImportTaskStatusRequest.taskStatus) && + Objects.equals(this.authorIdentifier, fetchAsyncImportTaskStatusRequest.authorIdentifier) && + Objects.equals(this.recordOffset, fetchAsyncImportTaskStatusRequest.recordOffset) && + Objects.equals(this.recordSize, fetchAsyncImportTaskStatusRequest.recordSize) && + Objects.equals(this.includeImportResponse, fetchAsyncImportTaskStatusRequest.includeImportResponse); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(taskIds, taskStatus, authorIdentifier, recordOffset, recordSize, includeImportResponse); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAsyncImportTaskStatusRequest {\n"); + sb.append(" taskIds: ").append(toIndentedString(taskIds)).append("\n"); + sb.append(" taskStatus: ").append(toIndentedString(taskStatus)).append("\n"); + sb.append(" authorIdentifier: ").append(toIndentedString(authorIdentifier)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" includeImportResponse: ").append(toIndentedString(includeImportResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("task_ids"); + openapiFields.add("task_status"); + openapiFields.add("author_identifier"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("include_import_response"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchAsyncImportTaskStatusRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchAsyncImportTaskStatusRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchAsyncImportTaskStatusRequest is not found in the empty JSON string", FetchAsyncImportTaskStatusRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchAsyncImportTaskStatusRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchAsyncImportTaskStatusRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchAsyncImportTaskStatusRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchAsyncImportTaskStatusRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("task_ids") != null - && !jsonObj.get("task_ids").isJsonNull() - && !jsonObj.get("task_ids").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `task_ids` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("task_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("task_status") != null - && !jsonObj.get("task_status").isJsonNull() - && !jsonObj.get("task_status").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `task_status` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("task_status").toString())); - } - if ((jsonObj.get("author_identifier") != null - && !jsonObj.get("author_identifier").isJsonNull()) - && !jsonObj.get("author_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("author_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchAsyncImportTaskStatusRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchAsyncImportTaskStatusRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FetchAsyncImportTaskStatusRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchAsyncImportTaskStatusRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchAsyncImportTaskStatusRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchAsyncImportTaskStatusRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchAsyncImportTaskStatusRequest - * @throws IOException if the JSON string is invalid with respect to - * FetchAsyncImportTaskStatusRequest - */ - public static FetchAsyncImportTaskStatusRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchAsyncImportTaskStatusRequest.class); - } - - /** - * Convert an instance of FetchAsyncImportTaskStatusRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the optional json data is an array if present + if (jsonObj.get("task_ids") != null && !jsonObj.get("task_ids").isJsonNull() && !jsonObj.get("task_ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `task_ids` to be an array in the JSON string but got `%s`", jsonObj.get("task_ids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull() && !jsonObj.get("task_status").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `task_status` to be an array in the JSON string but got `%s`", jsonObj.get("task_status").toString())); + } + if ((jsonObj.get("author_identifier") != null && !jsonObj.get("author_identifier").isJsonNull()) && !jsonObj.get("author_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchAsyncImportTaskStatusRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchAsyncImportTaskStatusRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchAsyncImportTaskStatusRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchAsyncImportTaskStatusRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchAsyncImportTaskStatusRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FetchAsyncImportTaskStatusRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchAsyncImportTaskStatusRequest + * @throws IOException if the JSON string is invalid with respect to FetchAsyncImportTaskStatusRequest + */ + public static FetchAsyncImportTaskStatusRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchAsyncImportTaskStatusRequest.class); + } + + /** + * Convert an instance of FetchAsyncImportTaskStatusRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java index 423ff4411..76ac2c8a9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java @@ -4,229 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleTableInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FetchColumnSecurityRulesRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * FetchColumnSecurityRulesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class FetchColumnSecurityRulesRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_TABLES = "tables"; + public static final String SERIALIZED_NAME_TABLES = "tables"; + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nonnull + private List tables; - @SerializedName(SERIALIZED_NAME_TABLES) - @javax.annotation.Nonnull - private List tables; + public FetchColumnSecurityRulesRequest() { + } - public FetchColumnSecurityRulesRequest() {} + public FetchColumnSecurityRulesRequest tables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + return this; + } - public FetchColumnSecurityRulesRequest tables( - @javax.annotation.Nonnull List tables) { - this.tables = tables; - return this; + public FetchColumnSecurityRulesRequest addTablesItem(ColumnSecurityRuleTableInput tablesItem) { + if (this.tables == null) { + this.tables = new ArrayList<>(); } + this.tables.add(tablesItem); + return this; + } - public FetchColumnSecurityRulesRequest addTablesItem(ColumnSecurityRuleTableInput tablesItem) { - if (this.tables == null) { - this.tables = new ArrayList<>(); - } - this.tables.add(tablesItem); - return this; - } + /** + * Array of table identifier objects for which to fetch column security rules + * @return tables + */ + @javax.annotation.Nonnull + public List getTables() { + return tables; + } - /** - * Array of table identifier objects for which to fetch column security rules - * - * @return tables - */ - @javax.annotation.Nonnull - public List getTables() { - return tables; - } + public void setTables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + } - public void setTables(@javax.annotation.Nonnull List tables) { - this.tables = tables; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = - (FetchColumnSecurityRulesRequest) o; - return Objects.equals(this.tables, fetchColumnSecurityRulesRequest.tables); - } - @Override - public int hashCode() { - return Objects.hash(tables); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchColumnSecurityRulesRequest {\n"); - sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tables"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tables"); + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = (FetchColumnSecurityRulesRequest) o; + return Objects.equals(this.tables, fetchColumnSecurityRulesRequest.tables); + } + + @Override + public int hashCode() { + return Objects.hash(tables); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchColumnSecurityRulesRequest {\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FetchColumnSecurityRulesRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchColumnSecurityRulesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchColumnSecurityRulesRequest is" - + " not found in the empty JSON string", - FetchColumnSecurityRulesRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tables"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tables"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchColumnSecurityRulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchColumnSecurityRulesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchColumnSecurityRulesRequest is not found in the empty JSON string", FetchColumnSecurityRulesRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchColumnSecurityRulesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchColumnSecurityRulesRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchColumnSecurityRulesRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchColumnSecurityRulesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchColumnSecurityRulesRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchColumnSecurityRulesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("tables").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tables` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("tables").toString())); - } - - JsonArray jsonArraytables = jsonObj.getAsJsonArray("tables"); - // validate the required field `tables` (array) - for (int i = 0; i < jsonArraytables.size(); i++) { - ColumnSecurityRuleTableInput.validateJsonElement(jsonArraytables.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchColumnSecurityRulesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchColumnSecurityRulesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FetchColumnSecurityRulesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchColumnSecurityRulesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchColumnSecurityRulesRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchColumnSecurityRulesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchColumnSecurityRulesRequest - * @throws IOException if the JSON string is invalid with respect to - * FetchColumnSecurityRulesRequest - */ - public static FetchColumnSecurityRulesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchColumnSecurityRulesRequest.class); - } - - /** - * Convert an instance of FetchColumnSecurityRulesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("tables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tables` to be an array in the JSON string but got `%s`", jsonObj.get("tables").toString())); + } + + JsonArray jsonArraytables = jsonObj.getAsJsonArray("tables"); + // validate the required field `tables` (array) + for (int i = 0; i < jsonArraytables.size(); i++) { + ColumnSecurityRuleTableInput.validateJsonElement(jsonArraytables.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchColumnSecurityRulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchColumnSecurityRulesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchColumnSecurityRulesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchColumnSecurityRulesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchColumnSecurityRulesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FetchColumnSecurityRulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchColumnSecurityRulesRequest + * @throws IOException if the JSON string is invalid with respect to FetchColumnSecurityRulesRequest + */ + public static FetchColumnSecurityRulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchColumnSecurityRulesRequest.class); + } + + /** + * Convert an instance of FetchColumnSecurityRulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java index d92d80c74..2742d013d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java @@ -4,210 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** FetchConnectionDiffStatusResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * FetchConnectionDiffStatusResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class FetchConnectionDiffStatusResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_STATUS = "status"; + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private Boolean status; - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private Boolean status; + public FetchConnectionDiffStatusResponse() { + } - public FetchConnectionDiffStatusResponse() {} + public FetchConnectionDiffStatusResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } - public FetchConnectionDiffStatusResponse status(@javax.annotation.Nullable Boolean status) { - this.status = status; - return this; - } + /** + * Status of the connection diff. + * @return status + */ + @javax.annotation.Nullable + public Boolean getStatus() { + return status; + } - /** - * Status of the connection diff. - * - * @return status - */ - @javax.annotation.Nullable - public Boolean getStatus() { - return status; - } + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } - public void setStatus(@javax.annotation.Nullable Boolean status) { - this.status = status; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchConnectionDiffStatusResponse fetchConnectionDiffStatusResponse = - (FetchConnectionDiffStatusResponse) o; - return Objects.equals(this.status, fetchConnectionDiffStatusResponse.status); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(status); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + FetchConnectionDiffStatusResponse fetchConnectionDiffStatusResponse = (FetchConnectionDiffStatusResponse) o; + return Objects.equals(this.status, fetchConnectionDiffStatusResponse.status); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchConnectionDiffStatusResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchConnectionDiffStatusResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchConnectionDiffStatusResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchConnectionDiffStatusResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchConnectionDiffStatusResponse is not found in the empty JSON string", FetchConnectionDiffStatusResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FetchConnectionDiffStatusResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchConnectionDiffStatusResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchConnectionDiffStatusResponse is" - + " not found in the empty JSON string", - FetchConnectionDiffStatusResponse.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchConnectionDiffStatusResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchConnectionDiffStatusResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchConnectionDiffStatusResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchConnectionDiffStatusResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchConnectionDiffStatusResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchConnectionDiffStatusResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FetchConnectionDiffStatusResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchConnectionDiffStatusResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchConnectionDiffStatusResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchConnectionDiffStatusResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchConnectionDiffStatusResponse - * @throws IOException if the JSON string is invalid with respect to - * FetchConnectionDiffStatusResponse - */ - public static FetchConnectionDiffStatusResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchConnectionDiffStatusResponse.class); - } + } - /** - * Convert an instance of FetchConnectionDiffStatusResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchConnectionDiffStatusResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchConnectionDiffStatusResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchConnectionDiffStatusResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchConnectionDiffStatusResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchConnectionDiffStatusResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FetchConnectionDiffStatusResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchConnectionDiffStatusResponse + * @throws IOException if the JSON string is invalid with respect to FetchConnectionDiffStatusResponse + */ + public static FetchConnectionDiffStatusResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchConnectionDiffStatusResponse.class); + } + + /** + * Convert an instance of FetchConnectionDiffStatusResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java index e6e8c3e52..d6a4ce052 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java @@ -4,563 +4,497 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FetchLiveboardDataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchLiveboardDataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = - "visualization_identifiers"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) - @javax.annotation.Nullable - private List visualizationIdentifiers; - - public static final String SERIALIZED_NAME_TRANSIENT_CONTENT = "transient_content"; - - @SerializedName(SERIALIZED_NAME_TRANSIENT_CONTENT) - @javax.annotation.Nullable - private String transientContent; - - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - @JsonAdapter(DataFormatEnum.Adapter.class) - public enum DataFormatEnum { - FULL("FULL"), - - COMPACT("COMPACT"); - - private String value; - - DataFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataFormatEnum fromValue(String value) { - for (DataFormatEnum b : DataFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; - - @SerializedName(SERIALIZED_NAME_DATA_FORMAT) - @javax.annotation.Nullable - private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; - - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; - - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; - - public FetchLiveboardDataRequest() {} - - public FetchLiveboardDataRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * GUID or name of the Liveboard. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public FetchLiveboardDataRequest visualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - return this; - } - - public FetchLiveboardDataRequest addVisualizationIdentifiersItem( - String visualizationIdentifiersItem) { - if (this.visualizationIdentifiers == null) { - this.visualizationIdentifiers = new ArrayList<>(); - } - this.visualizationIdentifiers.add(visualizationIdentifiersItem); - return this; - } - - /** - * GUIDs or names of the visualizations on the Liveboard. - * - * @return visualizationIdentifiers - */ - @javax.annotation.Nullable - public List getVisualizationIdentifiers() { - return visualizationIdentifiers; - } - - public void setVisualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - } - - public FetchLiveboardDataRequest transientContent( - @javax.annotation.Nullable String transientContent) { - this.transientContent = transientContent; - return this; - } - - /** - * Transient content of the Liveboard. - * - * @return transientContent - */ - @javax.annotation.Nullable - public String getTransientContent() { - return transientContent; - } - - public void setTransientContent(@javax.annotation.Nullable String transientContent) { - this.transientContent = transientContent; - } - - public FetchLiveboardDataRequest dataFormat( - @javax.annotation.Nullable DataFormatEnum dataFormat) { - this.dataFormat = dataFormat; - return this; - } - - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - * - * @return dataFormat - */ - @javax.annotation.Nullable - public DataFormatEnum getDataFormat() { - return dataFormat; - } - - public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { - this.dataFormat = dataFormat; - } - - public FetchLiveboardDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public FetchLiveboardDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records to include in a batch. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public FetchLiveboardDataRequest runtimeFilter( - @javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * JSON object with representing filter condition to apply filters at runtime. For example, - * <code> {\"col1\": \"item type\", \"op1\": - * \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple - * keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, - * val3. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } - - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } +import com.thoughtspot.client.JSON; - public FetchLiveboardDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } +/** + * FetchLiveboardDataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchLiveboardDataRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * JSON object representing columns to sort data at runtime. For example, <code> - * {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You - * can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For - * more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = "visualization_identifiers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; - public FetchLiveboardDataRequest runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } + public static final String SERIALIZED_NAME_TRANSIENT_CONTENT = "transient_content"; + @SerializedName(SERIALIZED_NAME_TRANSIENT_CONTENT) + @javax.annotation.Nullable + private String transientContent; - /** - * JSON object for setting values of parameters at runtime. For example, <code> - * {\"param1\": \"Double List Param\", \"paramVal1\": - * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for - * example, param2, paramVal2. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + @JsonAdapter(DataFormatEnum.Adapter.class) + public enum DataFormatEnum { + FULL("FULL"), + + COMPACT("COMPACT"); - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - } + private String value; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchLiveboardDataRequest fetchLiveboardDataRequest = (FetchLiveboardDataRequest) o; - return Objects.equals(this.metadataIdentifier, fetchLiveboardDataRequest.metadataIdentifier) - && Objects.equals( - this.visualizationIdentifiers, - fetchLiveboardDataRequest.visualizationIdentifiers) - && Objects.equals(this.transientContent, fetchLiveboardDataRequest.transientContent) - && Objects.equals(this.dataFormat, fetchLiveboardDataRequest.dataFormat) - && Objects.equals(this.recordOffset, fetchLiveboardDataRequest.recordOffset) - && Objects.equals(this.recordSize, fetchLiveboardDataRequest.recordSize) - && Objects.equals(this.runtimeFilter, fetchLiveboardDataRequest.runtimeFilter) - && Objects.equals(this.runtimeSort, fetchLiveboardDataRequest.runtimeSort) - && Objects.equals( - this.runtimeParamOverride, fetchLiveboardDataRequest.runtimeParamOverride); + DataFormatEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - metadataIdentifier, - visualizationIdentifiers, - transientContent, - dataFormat, - recordOffset, - recordSize, - runtimeFilter, - runtimeSort, - runtimeParamOverride); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchLiveboardDataRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" visualizationIdentifiers: ") - .append(toIndentedString(visualizationIdentifiers)) - .append("\n"); - sb.append(" transientContent: ").append(toIndentedString(transientContent)).append("\n"); - sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static DataFormatEnum fromValue(String value) { + for (DataFormatEnum b : DataFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("visualization_identifiers"); - openapiFields.add("transient_content"); - openapiFields.add("data_format"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("runtime_filter"); - openapiFields.add("runtime_sort"); - openapiFields.add("runtime_param_override"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataFormatEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FetchLiveboardDataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchLiveboardDataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchLiveboardDataRequest is not" - + " found in the empty JSON string", - FetchLiveboardDataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + DataFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; + @SerializedName(SERIALIZED_NAME_DATA_FORMAT) + @javax.annotation.Nullable + private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public FetchLiveboardDataRequest() { + } + + public FetchLiveboardDataRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the Liveboard. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public FetchLiveboardDataRequest visualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public FetchLiveboardDataRequest addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the visualizations on the Liveboard. + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + + public FetchLiveboardDataRequest transientContent(@javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + return this; + } + + /** + * Transient content of the Liveboard. + * @return transientContent + */ + @javax.annotation.Nullable + public String getTransientContent() { + return transientContent; + } + + public void setTransientContent(@javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + } + + + public FetchLiveboardDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * @return dataFormat + */ + @javax.annotation.Nullable + public DataFormatEnum getDataFormat() { + return dataFormat; + } + + public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + } + + + public FetchLiveboardDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public FetchLiveboardDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records to include in a batch. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public FetchLiveboardDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, <code> {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + + public FetchLiveboardDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON object representing columns to sort data at runtime. For example, <code> {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + + public FetchLiveboardDataRequest runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchLiveboardDataRequest fetchLiveboardDataRequest = (FetchLiveboardDataRequest) o; + return Objects.equals(this.metadataIdentifier, fetchLiveboardDataRequest.metadataIdentifier) && + Objects.equals(this.visualizationIdentifiers, fetchLiveboardDataRequest.visualizationIdentifiers) && + Objects.equals(this.transientContent, fetchLiveboardDataRequest.transientContent) && + Objects.equals(this.dataFormat, fetchLiveboardDataRequest.dataFormat) && + Objects.equals(this.recordOffset, fetchLiveboardDataRequest.recordOffset) && + Objects.equals(this.recordSize, fetchLiveboardDataRequest.recordSize) && + Objects.equals(this.runtimeFilter, fetchLiveboardDataRequest.runtimeFilter) && + Objects.equals(this.runtimeSort, fetchLiveboardDataRequest.runtimeSort) && + Objects.equals(this.runtimeParamOverride, fetchLiveboardDataRequest.runtimeParamOverride); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, visualizationIdentifiers, transientContent, dataFormat, recordOffset, recordSize, runtimeFilter, runtimeSort, runtimeParamOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchLiveboardDataRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" visualizationIdentifiers: ").append(toIndentedString(visualizationIdentifiers)).append("\n"); + sb.append(" transientContent: ").append(toIndentedString(transientContent)).append("\n"); + sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("visualization_identifiers"); + openapiFields.add("transient_content"); + openapiFields.add("data_format"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchLiveboardDataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchLiveboardDataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchLiveboardDataRequest is not found in the empty JSON string", FetchLiveboardDataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchLiveboardDataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchLiveboardDataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchLiveboardDataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchLiveboardDataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchLiveboardDataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchLiveboardDataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("visualization_identifiers") != null - && !jsonObj.get("visualization_identifiers").isJsonNull() - && !jsonObj.get("visualization_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_identifiers").toString())); - } - if ((jsonObj.get("transient_content") != null - && !jsonObj.get("transient_content").isJsonNull()) - && !jsonObj.get("transient_content").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `transient_content` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("transient_content").toString())); - } - if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) - && !jsonObj.get("data_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("data_format").toString())); - } - // validate the optional field `data_format` - if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { - DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchLiveboardDataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchLiveboardDataRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FetchLiveboardDataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchLiveboardDataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchLiveboardDataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchLiveboardDataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchLiveboardDataRequest - * @throws IOException if the JSON string is invalid with respect to FetchLiveboardDataRequest - */ - public static FetchLiveboardDataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchLiveboardDataRequest.class); - } - - /** - * Convert an instance of FetchLiveboardDataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null && !jsonObj.get("visualization_identifiers").isJsonNull() && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_identifiers").toString())); + } + if ((jsonObj.get("transient_content") != null && !jsonObj.get("transient_content").isJsonNull()) && !jsonObj.get("transient_content").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `transient_content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transient_content").toString())); + } + if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) && !jsonObj.get("data_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_format").toString())); + } + // validate the optional field `data_format` + if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { + DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchLiveboardDataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchLiveboardDataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchLiveboardDataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchLiveboardDataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchLiveboardDataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FetchLiveboardDataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchLiveboardDataRequest + * @throws IOException if the JSON string is invalid with respect to FetchLiveboardDataRequest + */ + public static FetchLiveboardDataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchLiveboardDataRequest.class); + } + + /** + * Convert an instance of FetchLiveboardDataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java index 2c22ab939..9082c90ea 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java @@ -4,269 +4,246 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FetchLiveboardSqlQueryRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchLiveboardSqlQueryRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = - "visualization_identifiers"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) - @javax.annotation.Nullable - private List visualizationIdentifiers; - - public FetchLiveboardSqlQueryRequest() {} - - public FetchLiveboardSqlQueryRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * ID or name of the Liveboard. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public FetchLiveboardSqlQueryRequest visualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - return this; - } - - public FetchLiveboardSqlQueryRequest addVisualizationIdentifiersItem( - String visualizationIdentifiersItem) { - if (this.visualizationIdentifiers == null) { - this.visualizationIdentifiers = new ArrayList<>(); - } - this.visualizationIdentifiers.add(visualizationIdentifiersItem); - return this; - } - - /** - * Unique ID or name of visualizations. - * - * @return visualizationIdentifiers - */ - @javax.annotation.Nullable - public List getVisualizationIdentifiers() { - return visualizationIdentifiers; - } - - public void setVisualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest = - (FetchLiveboardSqlQueryRequest) o; - return Objects.equals( - this.metadataIdentifier, fetchLiveboardSqlQueryRequest.metadataIdentifier) - && Objects.equals( - this.visualizationIdentifiers, - fetchLiveboardSqlQueryRequest.visualizationIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(metadataIdentifier, visualizationIdentifiers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchLiveboardSqlQueryRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" visualizationIdentifiers: ") - .append(toIndentedString(visualizationIdentifiers)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("visualization_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FetchLiveboardSqlQueryRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchLiveboardSqlQueryRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchLiveboardSqlQueryRequest is not" - + " found in the empty JSON string", - FetchLiveboardSqlQueryRequest.openapiRequiredFields.toString())); - } +/** + * FetchLiveboardSqlQueryRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchLiveboardSqlQueryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = "visualization_identifiers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; + + public FetchLiveboardSqlQueryRequest() { + } + + public FetchLiveboardSqlQueryRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID or name of the Liveboard. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public FetchLiveboardSqlQueryRequest visualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public FetchLiveboardSqlQueryRequest addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * Unique ID or name of visualizations. + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest = (FetchLiveboardSqlQueryRequest) o; + return Objects.equals(this.metadataIdentifier, fetchLiveboardSqlQueryRequest.metadataIdentifier) && + Objects.equals(this.visualizationIdentifiers, fetchLiveboardSqlQueryRequest.visualizationIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, visualizationIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchLiveboardSqlQueryRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" visualizationIdentifiers: ").append(toIndentedString(visualizationIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("visualization_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchLiveboardSqlQueryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchLiveboardSqlQueryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchLiveboardSqlQueryRequest is not found in the empty JSON string", FetchLiveboardSqlQueryRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchLiveboardSqlQueryRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchLiveboardSqlQueryRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchLiveboardSqlQueryRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchLiveboardSqlQueryRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchLiveboardSqlQueryRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchLiveboardSqlQueryRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("visualization_identifiers") != null - && !jsonObj.get("visualization_identifiers").isJsonNull() - && !jsonObj.get("visualization_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchLiveboardSqlQueryRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchLiveboardSqlQueryRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FetchLiveboardSqlQueryRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchLiveboardSqlQueryRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchLiveboardSqlQueryRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchLiveboardSqlQueryRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchLiveboardSqlQueryRequest - * @throws IOException if the JSON string is invalid with respect to - * FetchLiveboardSqlQueryRequest - */ - public static FetchLiveboardSqlQueryRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchLiveboardSqlQueryRequest.class); - } - - /** - * Convert an instance of FetchLiveboardSqlQueryRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null && !jsonObj.get("visualization_identifiers").isJsonNull() && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchLiveboardSqlQueryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchLiveboardSqlQueryRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchLiveboardSqlQueryRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchLiveboardSqlQueryRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchLiveboardSqlQueryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FetchLiveboardSqlQueryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchLiveboardSqlQueryRequest + * @throws IOException if the JSON string is invalid with respect to FetchLiveboardSqlQueryRequest + */ + public static FetchLiveboardSqlQueryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchLiveboardSqlQueryRequest.class); + } + + /** + * Convert an instance of FetchLiveboardSqlQueryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java index c8044ccac..d83fc2462 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java @@ -4,366 +4,350 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** FetchLogsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchLogsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** Name of the log type */ - @JsonAdapter(LogTypeEnum.Adapter.class) - public enum LogTypeEnum { - SECURITY_AUDIT("SECURITY_AUDIT"); - - private String value; - - LogTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static LogTypeEnum fromValue(String value) { - for (LogTypeEnum b : LogTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final LogTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public LogTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return LogTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - LogTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_LOG_TYPE = "log_type"; - - @SerializedName(SERIALIZED_NAME_LOG_TYPE) - @javax.annotation.Nonnull - private LogTypeEnum logType; - - public static final String SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS = - "start_epoch_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float startEpochTimeInMillis; - - public static final String SERIALIZED_NAME_END_EPOCH_TIME_IN_MILLIS = - "end_epoch_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_END_EPOCH_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float endEpochTimeInMillis; - - public static final String SERIALIZED_NAME_GET_ALL_LOGS = "get_all_logs"; - - @SerializedName(SERIALIZED_NAME_GET_ALL_LOGS) - @javax.annotation.Nullable - private Boolean getAllLogs = true; - public FetchLogsRequest() {} - - public FetchLogsRequest logType(@javax.annotation.Nonnull LogTypeEnum logType) { - this.logType = logType; - return this; - } - - /** - * Name of the log type - * - * @return logType - */ - @javax.annotation.Nonnull - public LogTypeEnum getLogType() { - return logType; - } - - public void setLogType(@javax.annotation.Nonnull LogTypeEnum logType) { - this.logType = logType; - } - - public FetchLogsRequest startEpochTimeInMillis( - @javax.annotation.Nullable Float startEpochTimeInMillis) { - this.startEpochTimeInMillis = startEpochTimeInMillis; - return this; - } - - /** - * Start time in EPOCH format - * - * @return startEpochTimeInMillis - */ - @javax.annotation.Nullable - public Float getStartEpochTimeInMillis() { - return startEpochTimeInMillis; - } - - public void setStartEpochTimeInMillis(@javax.annotation.Nullable Float startEpochTimeInMillis) { - this.startEpochTimeInMillis = startEpochTimeInMillis; - } +import com.thoughtspot.client.JSON; - public FetchLogsRequest endEpochTimeInMillis( - @javax.annotation.Nullable Float endEpochTimeInMillis) { - this.endEpochTimeInMillis = endEpochTimeInMillis; - return this; - } +/** + * FetchLogsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchLogsRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * End time in EPOCH format - * - * @return endEpochTimeInMillis - */ - @javax.annotation.Nullable - public Float getEndEpochTimeInMillis() { - return endEpochTimeInMillis; - } + /** + * Name of the log type + */ + @JsonAdapter(LogTypeEnum.Adapter.class) + public enum LogTypeEnum { + SECURITY_AUDIT("SECURITY_AUDIT"); - public void setEndEpochTimeInMillis(@javax.annotation.Nullable Float endEpochTimeInMillis) { - this.endEpochTimeInMillis = endEpochTimeInMillis; - } + private String value; - public FetchLogsRequest getAllLogs(@javax.annotation.Nullable Boolean getAllLogs) { - this.getAllLogs = getAllLogs; - return this; + LogTypeEnum(String value) { + this.value = value; } - /** - * Fetch all the logs. This is available from 9.10.5.cl - * - * @return getAllLogs - */ - @javax.annotation.Nullable - public Boolean getGetAllLogs() { - return getAllLogs; + public String getValue() { + return value; } - public void setGetAllLogs(@javax.annotation.Nullable Boolean getAllLogs) { - this.getAllLogs = getAllLogs; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static LogTypeEnum fromValue(String value) { + for (LogTypeEnum b : LogTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchLogsRequest fetchLogsRequest = (FetchLogsRequest) o; - return Objects.equals(this.logType, fetchLogsRequest.logType) - && Objects.equals( - this.startEpochTimeInMillis, fetchLogsRequest.startEpochTimeInMillis) - && Objects.equals(this.endEpochTimeInMillis, fetchLogsRequest.endEpochTimeInMillis) - && Objects.equals(this.getAllLogs, fetchLogsRequest.getAllLogs); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LogTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LogTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LogTypeEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(logType, startEpochTimeInMillis, endEpochTimeInMillis, getAllLogs); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LogTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_LOG_TYPE = "log_type"; + @SerializedName(SERIALIZED_NAME_LOG_TYPE) + @javax.annotation.Nonnull + private LogTypeEnum logType; + + public static final String SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS = "start_epoch_time_in_millis"; + @SerializedName(SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float startEpochTimeInMillis; + + public static final String SERIALIZED_NAME_END_EPOCH_TIME_IN_MILLIS = "end_epoch_time_in_millis"; + @SerializedName(SERIALIZED_NAME_END_EPOCH_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float endEpochTimeInMillis; + + public static final String SERIALIZED_NAME_GET_ALL_LOGS = "get_all_logs"; + @SerializedName(SERIALIZED_NAME_GET_ALL_LOGS) + @javax.annotation.Nullable + private Boolean getAllLogs = true; + + public FetchLogsRequest() { + } + + public FetchLogsRequest logType(@javax.annotation.Nonnull LogTypeEnum logType) { + this.logType = logType; + return this; + } + + /** + * Name of the log type + * @return logType + */ + @javax.annotation.Nonnull + public LogTypeEnum getLogType() { + return logType; + } + + public void setLogType(@javax.annotation.Nonnull LogTypeEnum logType) { + this.logType = logType; + } + + + public FetchLogsRequest startEpochTimeInMillis(@javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + return this; + } + + /** + * Start time in EPOCH format + * @return startEpochTimeInMillis + */ + @javax.annotation.Nullable + public Float getStartEpochTimeInMillis() { + return startEpochTimeInMillis; + } + + public void setStartEpochTimeInMillis(@javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + } + + + public FetchLogsRequest endEpochTimeInMillis(@javax.annotation.Nullable Float endEpochTimeInMillis) { + this.endEpochTimeInMillis = endEpochTimeInMillis; + return this; + } + + /** + * End time in EPOCH format + * @return endEpochTimeInMillis + */ + @javax.annotation.Nullable + public Float getEndEpochTimeInMillis() { + return endEpochTimeInMillis; + } + + public void setEndEpochTimeInMillis(@javax.annotation.Nullable Float endEpochTimeInMillis) { + this.endEpochTimeInMillis = endEpochTimeInMillis; + } + + + public FetchLogsRequest getAllLogs(@javax.annotation.Nullable Boolean getAllLogs) { + this.getAllLogs = getAllLogs; + return this; + } + + /** + * Fetch all the logs. This is available from 9.10.5.cl + * @return getAllLogs + */ + @javax.annotation.Nullable + public Boolean getGetAllLogs() { + return getAllLogs; + } + + public void setGetAllLogs(@javax.annotation.Nullable Boolean getAllLogs) { + this.getAllLogs = getAllLogs; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchLogsRequest {\n"); - sb.append(" logType: ").append(toIndentedString(logType)).append("\n"); - sb.append(" startEpochTimeInMillis: ") - .append(toIndentedString(startEpochTimeInMillis)) - .append("\n"); - sb.append(" endEpochTimeInMillis: ") - .append(toIndentedString(endEpochTimeInMillis)) - .append("\n"); - sb.append(" getAllLogs: ").append(toIndentedString(getAllLogs)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + FetchLogsRequest fetchLogsRequest = (FetchLogsRequest) o; + return Objects.equals(this.logType, fetchLogsRequest.logType) && + Objects.equals(this.startEpochTimeInMillis, fetchLogsRequest.startEpochTimeInMillis) && + Objects.equals(this.endEpochTimeInMillis, fetchLogsRequest.endEpochTimeInMillis) && + Objects.equals(this.getAllLogs, fetchLogsRequest.getAllLogs); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(logType, startEpochTimeInMillis, endEpochTimeInMillis, getAllLogs); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("log_type"); - openapiFields.add("start_epoch_time_in_millis"); - openapiFields.add("end_epoch_time_in_millis"); - openapiFields.add("get_all_logs"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("log_type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchLogsRequest {\n"); + sb.append(" logType: ").append(toIndentedString(logType)).append("\n"); + sb.append(" startEpochTimeInMillis: ").append(toIndentedString(startEpochTimeInMillis)).append("\n"); + sb.append(" endEpochTimeInMillis: ").append(toIndentedString(endEpochTimeInMillis)).append("\n"); + sb.append(" getAllLogs: ").append(toIndentedString(getAllLogs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FetchLogsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchLogsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchLogsRequest is not found in the" - + " empty JSON string", - FetchLogsRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("log_type"); + openapiFields.add("start_epoch_time_in_millis"); + openapiFields.add("end_epoch_time_in_millis"); + openapiFields.add("get_all_logs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("log_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchLogsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchLogsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchLogsRequest is not found in the empty JSON string", FetchLogsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchLogsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchLogsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchLogsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchLogsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchLogsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchLogsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("log_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `log_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("log_type").toString())); - } - // validate the required field `log_type` - LogTypeEnum.validateJsonElement(jsonObj.get("log_type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchLogsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchLogsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FetchLogsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchLogsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchLogsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchLogsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchLogsRequest - * @throws IOException if the JSON string is invalid with respect to FetchLogsRequest - */ - public static FetchLogsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchLogsRequest.class); - } - - /** - * Convert an instance of FetchLogsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("log_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `log_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("log_type").toString())); + } + // validate the required field `log_type` + LogTypeEnum.validateJsonElement(jsonObj.get("log_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchLogsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchLogsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchLogsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchLogsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchLogsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FetchLogsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchLogsRequest + * @throws IOException if the JSON string is invalid with respect to FetchLogsRequest + */ + public static FetchLogsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchLogsRequest.class); + } + + /** + * Convert an instance of FetchLogsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java index e7f823c46..35d042014 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java @@ -4,460 +4,421 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PermissionsMetadataTypeInput; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** FetchPermissionsOfPrincipalsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchPermissionsOfPrincipalsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; - - @SerializedName(SERIALIZED_NAME_PRINCIPALS) - @javax.annotation.Nonnull - private List principals; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = -1; - - /** When no metadata objects input is passed, metadata objects of this type are fetched. */ - @JsonAdapter(DefaultMetadataTypeEnum.Adapter.class) - public enum DefaultMetadataTypeEnum { - ALL("ALL"), - - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"); - - private String value; - - DefaultMetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DefaultMetadataTypeEnum fromValue(String value) { - for (DefaultMetadataTypeEnum b : DefaultMetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final DefaultMetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DefaultMetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DefaultMetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DefaultMetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEFAULT_METADATA_TYPE = "default_metadata_type"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_METADATA_TYPE) - @javax.annotation.Nullable - private DefaultMetadataTypeEnum defaultMetadataType; - - public FetchPermissionsOfPrincipalsRequest() {} - - public FetchPermissionsOfPrincipalsRequest principals( - @javax.annotation.Nonnull List principals) { - this.principals = principals; - return this; - } - - public FetchPermissionsOfPrincipalsRequest addPrincipalsItem(PrincipalsInput principalsItem) { - if (this.principals == null) { - this.principals = new ArrayList<>(); - } - this.principals.add(principalsItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * GUID or name of the user or group. - * - * @return principals - */ - @javax.annotation.Nonnull - public List getPrincipals() { - return principals; +/** + * FetchPermissionsOfPrincipalsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchPermissionsOfPrincipalsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nonnull + private List principals; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = -1; + + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + */ + @JsonAdapter(DefaultMetadataTypeEnum.Adapter.class) + public enum DefaultMetadataTypeEnum { + ALL("ALL"), + + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"); + + private String value; + + DefaultMetadataTypeEnum(String value) { + this.value = value; } - public void setPrincipals(@javax.annotation.Nonnull List principals) { - this.principals = principals; + public String getValue() { + return value; } - public FetchPermissionsOfPrincipalsRequest metadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public FetchPermissionsOfPrincipalsRequest addMetadataItem( - PermissionsMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); + public static DefaultMetadataTypeEnum fromValue(String value) { + for (DefaultMetadataTypeEnum b : DefaultMetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata objects for which you want to fetch permission details. If not specified, the API - * returns permission details for all metadata objects that the specified users and groups can - * access. - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; - } - - public void setMetadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public FetchPermissionsOfPrincipalsRequest recordOffset( - @javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DefaultMetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DefaultMetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DefaultMetadataTypeEnum.fromValue(value); + } } - /** - * The starting record number from where the records should be included for each metadata type. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public FetchPermissionsOfPrincipalsRequest recordSize( - @javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included for each metadata type. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DefaultMetadataTypeEnum.fromValue(value); } + } - public FetchPermissionsOfPrincipalsRequest defaultMetadataType( - @javax.annotation.Nullable DefaultMetadataTypeEnum defaultMetadataType) { - this.defaultMetadataType = defaultMetadataType; - return this; - } + public static final String SERIALIZED_NAME_DEFAULT_METADATA_TYPE = "default_metadata_type"; + @SerializedName(SERIALIZED_NAME_DEFAULT_METADATA_TYPE) + @javax.annotation.Nullable + private DefaultMetadataTypeEnum defaultMetadataType; - /** - * When no metadata objects input is passed, metadata objects of this type are fetched. - * - * @return defaultMetadataType - */ - @javax.annotation.Nullable - public DefaultMetadataTypeEnum getDefaultMetadataType() { - return defaultMetadataType; - } + public FetchPermissionsOfPrincipalsRequest() { + } - public void setDefaultMetadataType( - @javax.annotation.Nullable DefaultMetadataTypeEnum defaultMetadataType) { - this.defaultMetadataType = defaultMetadataType; - } + public FetchPermissionsOfPrincipalsRequest principals(@javax.annotation.Nonnull List principals) { + this.principals = principals; + return this; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = - (FetchPermissionsOfPrincipalsRequest) o; - return Objects.equals(this.principals, fetchPermissionsOfPrincipalsRequest.principals) - && Objects.equals(this.metadata, fetchPermissionsOfPrincipalsRequest.metadata) - && Objects.equals( - this.recordOffset, fetchPermissionsOfPrincipalsRequest.recordOffset) - && Objects.equals(this.recordSize, fetchPermissionsOfPrincipalsRequest.recordSize) - && Objects.equals( - this.defaultMetadataType, - fetchPermissionsOfPrincipalsRequest.defaultMetadataType); + public FetchPermissionsOfPrincipalsRequest addPrincipalsItem(PrincipalsInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); } - - @Override - public int hashCode() { - return Objects.hash(principals, metadata, recordOffset, recordSize, defaultMetadataType); + this.principals.add(principalsItem); + return this; + } + + /** + * GUID or name of the user or group. + * @return principals + */ + @javax.annotation.Nonnull + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nonnull List principals) { + this.principals = principals; + } + + + public FetchPermissionsOfPrincipalsRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public FetchPermissionsOfPrincipalsRequest addMetadataItem(PermissionsMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchPermissionsOfPrincipalsRequest {\n"); - sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" defaultMetadataType: ") - .append(toIndentedString(defaultMetadataType)) - .append("\n"); - sb.append("}"); - return sb.toString(); + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + + public FetchPermissionsOfPrincipalsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included for each metadata type. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public FetchPermissionsOfPrincipalsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included for each metadata type. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public FetchPermissionsOfPrincipalsRequest defaultMetadataType(@javax.annotation.Nullable DefaultMetadataTypeEnum defaultMetadataType) { + this.defaultMetadataType = defaultMetadataType; + return this; + } + + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + * @return defaultMetadataType + */ + @javax.annotation.Nullable + public DefaultMetadataTypeEnum getDefaultMetadataType() { + return defaultMetadataType; + } + + public void setDefaultMetadataType(@javax.annotation.Nullable DefaultMetadataTypeEnum defaultMetadataType) { + this.defaultMetadataType = defaultMetadataType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("principals"); - openapiFields.add("metadata"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("default_metadata_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("principals"); + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = (FetchPermissionsOfPrincipalsRequest) o; + return Objects.equals(this.principals, fetchPermissionsOfPrincipalsRequest.principals) && + Objects.equals(this.metadata, fetchPermissionsOfPrincipalsRequest.metadata) && + Objects.equals(this.recordOffset, fetchPermissionsOfPrincipalsRequest.recordOffset) && + Objects.equals(this.recordSize, fetchPermissionsOfPrincipalsRequest.recordSize) && + Objects.equals(this.defaultMetadataType, fetchPermissionsOfPrincipalsRequest.defaultMetadataType); + } + + @Override + public int hashCode() { + return Objects.hash(principals, metadata, recordOffset, recordSize, defaultMetadataType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchPermissionsOfPrincipalsRequest {\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" defaultMetadataType: ").append(toIndentedString(defaultMetadataType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FetchPermissionsOfPrincipalsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchPermissionsOfPrincipalsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchPermissionsOfPrincipalsRequest" - + " is not found in the empty JSON string", - FetchPermissionsOfPrincipalsRequest.openapiRequiredFields - .toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principals"); + openapiFields.add("metadata"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("default_metadata_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("principals"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchPermissionsOfPrincipalsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchPermissionsOfPrincipalsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchPermissionsOfPrincipalsRequest is not found in the empty JSON string", FetchPermissionsOfPrincipalsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchPermissionsOfPrincipalsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchPermissionsOfPrincipalsRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchPermissionsOfPrincipalsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchPermissionsOfPrincipalsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchPermissionsOfPrincipalsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchPermissionsOfPrincipalsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `principals` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("principals").toString())); - } - - JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); - // validate the required field `principals` (array) - for (int i = 0; i < jsonArrayprincipals.size(); i++) { - PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); - } - ; - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - PermissionsMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - } - if ((jsonObj.get("default_metadata_type") != null - && !jsonObj.get("default_metadata_type").isJsonNull()) - && !jsonObj.get("default_metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_metadata_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("default_metadata_type").toString())); - } - // validate the optional field `default_metadata_type` - if (jsonObj.get("default_metadata_type") != null - && !jsonObj.get("default_metadata_type").isJsonNull()) { - DefaultMetadataTypeEnum.validateJsonElement(jsonObj.get("default_metadata_type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchPermissionsOfPrincipalsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchPermissionsOfPrincipalsRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FetchPermissionsOfPrincipalsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchPermissionsOfPrincipalsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchPermissionsOfPrincipalsRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `principals` to be an array in the JSON string but got `%s`", jsonObj.get("principals").toString())); + } + + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + // validate the required field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); + }; + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PermissionsMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; } + } + if ((jsonObj.get("default_metadata_type") != null && !jsonObj.get("default_metadata_type").isJsonNull()) && !jsonObj.get("default_metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_metadata_type").toString())); + } + // validate the optional field `default_metadata_type` + if (jsonObj.get("default_metadata_type") != null && !jsonObj.get("default_metadata_type").isJsonNull()) { + DefaultMetadataTypeEnum.validateJsonElement(jsonObj.get("default_metadata_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchPermissionsOfPrincipalsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchPermissionsOfPrincipalsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchPermissionsOfPrincipalsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchPermissionsOfPrincipalsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchPermissionsOfPrincipalsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - - /** - * Create an instance of FetchPermissionsOfPrincipalsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchPermissionsOfPrincipalsRequest - * @throws IOException if the JSON string is invalid with respect to - * FetchPermissionsOfPrincipalsRequest - */ - public static FetchPermissionsOfPrincipalsRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, FetchPermissionsOfPrincipalsRequest.class); - } - - /** - * Convert an instance of FetchPermissionsOfPrincipalsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + + /** + * Create an instance of FetchPermissionsOfPrincipalsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchPermissionsOfPrincipalsRequest + * @throws IOException if the JSON string is invalid with respect to FetchPermissionsOfPrincipalsRequest + */ + public static FetchPermissionsOfPrincipalsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchPermissionsOfPrincipalsRequest.class); + } + + /** + * Convert an instance of FetchPermissionsOfPrincipalsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java index 268251294..d8d578ec1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java @@ -4,446 +4,396 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PermissionsMetadataTypeInput; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** FetchPermissionsOnMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FetchPermissionsOnMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - - public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; - - @SerializedName(SERIALIZED_NAME_PRINCIPALS) - @javax.annotation.Nullable - private List principals; - - public static final String SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS = - "include_dependent_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS) - @javax.annotation.Nullable - private Boolean includeDependentObjects = false; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = -1; - - public static final String SERIALIZED_NAME_PERMISSION_TYPE = "permission_type"; - - @SerializedName(SERIALIZED_NAME_PERMISSION_TYPE) - @javax.annotation.Nullable - private String permissionType; - - public FetchPermissionsOnMetadataRequest() {} - - public FetchPermissionsOnMetadataRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; - } - - public FetchPermissionsOnMetadataRequest addMetadataItem( - PermissionsMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * GUID or name of the metadata object. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } - - public FetchPermissionsOnMetadataRequest principals( - @javax.annotation.Nullable List principals) { - this.principals = principals; - return this; - } - - public FetchPermissionsOnMetadataRequest addPrincipalsItem(PrincipalsInput principalsItem) { - if (this.principals == null) { - this.principals = new ArrayList<>(); - } - this.principals.add(principalsItem); - return this; - } - - /** - * User or group objects for which you want to fetch permissions. If not specified, the API - * returns all users and groups that can access the specified metadata objects. - * - * @return principals - */ - @javax.annotation.Nullable - public List getPrincipals() { - return principals; - } - - public void setPrincipals(@javax.annotation.Nullable List principals) { - this.principals = principals; - } - public FetchPermissionsOnMetadataRequest includeDependentObjects( - @javax.annotation.Nullable Boolean includeDependentObjects) { - this.includeDependentObjects = includeDependentObjects; - return this; - } - - /** - * Indicates whether to fetch permissions of dependent metadata objects. - * - * @return includeDependentObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeDependentObjects() { - return includeDependentObjects; - } - - public void setIncludeDependentObjects( - @javax.annotation.Nullable Boolean includeDependentObjects) { - this.includeDependentObjects = includeDependentObjects; - } - - public FetchPermissionsOnMetadataRequest recordOffset( - @javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included for each metadata type. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public FetchPermissionsOnMetadataRequest recordSize( - @javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included for each metadata type. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public FetchPermissionsOnMetadataRequest permissionType( - @javax.annotation.Nullable String permissionType) { - this.permissionType = permissionType; - return this; - } - - /** - * <div>Version: 10.3.0.cl or later </div> Specifies the type of permission. Valid - * values are: EFFECTIVE - If the user permission to the metadata objects is granted by the - * privileges assigned to the groups to which they belong. DEFINED - If a user or user group - * received access to metadata objects via object sharing by another user. - * - * @return permissionType - */ - @javax.annotation.Nullable - public String getPermissionType() { - return permissionType; - } - - public void setPermissionType(@javax.annotation.Nullable String permissionType) { - this.permissionType = permissionType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = - (FetchPermissionsOnMetadataRequest) o; - return Objects.equals(this.metadata, fetchPermissionsOnMetadataRequest.metadata) - && Objects.equals(this.principals, fetchPermissionsOnMetadataRequest.principals) - && Objects.equals( - this.includeDependentObjects, - fetchPermissionsOnMetadataRequest.includeDependentObjects) - && Objects.equals(this.recordOffset, fetchPermissionsOnMetadataRequest.recordOffset) - && Objects.equals(this.recordSize, fetchPermissionsOnMetadataRequest.recordSize) - && Objects.equals( - this.permissionType, fetchPermissionsOnMetadataRequest.permissionType); - } +import com.thoughtspot.client.JSON; - 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())); +/** + * FetchPermissionsOnMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FetchPermissionsOnMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; + + public static final String SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS = "include_dependent_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS) + @javax.annotation.Nullable + private Boolean includeDependentObjects = false; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = -1; + + public static final String SERIALIZED_NAME_PERMISSION_TYPE = "permission_type"; + @SerializedName(SERIALIZED_NAME_PERMISSION_TYPE) + @javax.annotation.Nullable + private String permissionType; + + public FetchPermissionsOnMetadataRequest() { + } + + public FetchPermissionsOnMetadataRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public FetchPermissionsOnMetadataRequest addMetadataItem(PermissionsMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - @Override - public int hashCode() { - return Objects.hash( - metadata, - principals, - includeDependentObjects, - recordOffset, - recordSize, - permissionType); + this.metadata.add(metadataItem); + return this; + } + + /** + * GUID or name of the metadata object. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public FetchPermissionsOnMetadataRequest principals(@javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public FetchPermissionsOnMetadataRequest addPrincipalsItem(PrincipalsInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.principals.add(principalsItem); + return this; + } + + /** + * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } + + + public FetchPermissionsOnMetadataRequest includeDependentObjects(@javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + return this; + } + + /** + * Indicates whether to fetch permissions of dependent metadata objects. + * @return includeDependentObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeDependentObjects() { + return includeDependentObjects; + } + + public void setIncludeDependentObjects(@javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + } + + + public FetchPermissionsOnMetadataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included for each metadata type. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public FetchPermissionsOnMetadataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included for each metadata type. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public FetchPermissionsOnMetadataRequest permissionType(@javax.annotation.Nullable String permissionType) { + this.permissionType = permissionType; + return this; + } + + /** + * <div>Version: 10.3.0.cl or later </div> Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + * @return permissionType + */ + @javax.annotation.Nullable + public String getPermissionType() { + return permissionType; + } + + public void setPermissionType(@javax.annotation.Nullable String permissionType) { + this.permissionType = permissionType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchPermissionsOnMetadataRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); - sb.append(" includeDependentObjects: ") - .append(toIndentedString(includeDependentObjects)) - .append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" permissionType: ").append(toIndentedString(permissionType)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = (FetchPermissionsOnMetadataRequest) o; + return Objects.equals(this.metadata, fetchPermissionsOnMetadataRequest.metadata) && + Objects.equals(this.principals, fetchPermissionsOnMetadataRequest.principals) && + Objects.equals(this.includeDependentObjects, fetchPermissionsOnMetadataRequest.includeDependentObjects) && + Objects.equals(this.recordOffset, fetchPermissionsOnMetadataRequest.recordOffset) && + Objects.equals(this.recordSize, fetchPermissionsOnMetadataRequest.recordSize) && + Objects.equals(this.permissionType, fetchPermissionsOnMetadataRequest.permissionType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, principals, includeDependentObjects, recordOffset, recordSize, permissionType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("principals"); - openapiFields.add("include_dependent_objects"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("permission_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchPermissionsOnMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" includeDependentObjects: ").append(toIndentedString(includeDependentObjects)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" permissionType: ").append(toIndentedString(permissionType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * FetchPermissionsOnMetadataRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FetchPermissionsOnMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FetchPermissionsOnMetadataRequest is" - + " not found in the empty JSON string", - FetchPermissionsOnMetadataRequest.openapiRequiredFields - .toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("principals"); + openapiFields.add("include_dependent_objects"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("permission_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchPermissionsOnMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchPermissionsOnMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FetchPermissionsOnMetadataRequest is not found in the empty JSON string", FetchPermissionsOnMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FetchPermissionsOnMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FetchPermissionsOnMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FetchPermissionsOnMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FetchPermissionsOnMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FetchPermissionsOnMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchPermissionsOnMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PermissionsMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `principals` to be an array in the JSON string but got `%s`", jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); + }; } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - PermissionsMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { - JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); - if (jsonArrayprincipals != null) { - // ensure the json data is an array - if (!jsonObj.get("principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `principals` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("principals").toString())); - } - - // validate the optional field `principals` (array) - for (int i = 0; i < jsonArrayprincipals.size(); i++) { - PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); - } - ; - } - } - if ((jsonObj.get("permission_type") != null && !jsonObj.get("permission_type").isJsonNull()) - && !jsonObj.get("permission_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permission_type` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("permission_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FetchPermissionsOnMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FetchPermissionsOnMetadataRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(FetchPermissionsOnMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FetchPermissionsOnMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FetchPermissionsOnMetadataRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FetchPermissionsOnMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FetchPermissionsOnMetadataRequest - * @throws IOException if the JSON string is invalid with respect to - * FetchPermissionsOnMetadataRequest - */ - public static FetchPermissionsOnMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FetchPermissionsOnMetadataRequest.class); - } - - /** - * Convert an instance of FetchPermissionsOnMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + if ((jsonObj.get("permission_type") != null && !jsonObj.get("permission_type").isJsonNull()) && !jsonObj.get("permission_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `permission_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permission_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchPermissionsOnMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchPermissionsOnMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FetchPermissionsOnMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchPermissionsOnMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FetchPermissionsOnMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FetchPermissionsOnMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchPermissionsOnMetadataRequest + * @throws IOException if the JSON string is invalid with respect to FetchPermissionsOnMetadataRequest + */ + public static FetchPermissionsOnMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchPermissionsOnMetadataRequest.class); + } + + /** + * Convert an instance of FetchPermissionsOnMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java index 322188230..9b1b51f33 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java @@ -4,371 +4,362 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Filter Rules to be applied on Objects. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class FilterRules implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; - - @SerializedName(SERIALIZED_NAME_COLUMN_NAME) - @javax.annotation.Nonnull - private String columnName; - - /** The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. */ - @JsonAdapter(OperatorEnum.Adapter.class) - public enum OperatorEnum { - EQ("EQ"), - - NE("NE"), - - LT("LT"), - - LE("LE"), - - GT("GT"), - - GE("GE"), - - IN("IN"), - - BW("BW"), - - CONTAINS("CONTAINS"), - - BEGINS_WITH("BEGINS_WITH"), - - ENDS_WITH("ENDS_WITH"), - - BW_INC("BW_INC"), - - BW_INC_MIN("BW_INC_MIN"), - - BW_INC_MAX("BW_INC_MAX"), - - LIKE("LIKE"), - - NOT_IN("NOT_IN"); - - private String value; - - OperatorEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperatorEnum fromValue(String value) { - for (OperatorEnum b : OperatorEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperatorEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperatorEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperatorEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_OPERATOR = "operator"; - - @SerializedName(SERIALIZED_NAME_OPERATOR) - @javax.annotation.Nonnull - private OperatorEnum operator; - - public static final String SERIALIZED_NAME_VALUES = "values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nonnull - private List values; - - public FilterRules() {} - - public FilterRules columnName(@javax.annotation.Nonnull String columnName) { - this.columnName = columnName; - return this; - } +import com.thoughtspot.client.JSON; - /** - * The name of the column to apply the filter on. - * - * @return columnName - */ - @javax.annotation.Nonnull - public String getColumnName() { - return columnName; +/** + * Filter Rules to be applied on Objects. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FilterRules implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; + @SerializedName(SERIALIZED_NAME_COLUMN_NAME) + @javax.annotation.Nonnull + private String columnName; + + /** + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQ("EQ"), + + NE("NE"), + + LT("LT"), + + LE("LE"), + + GT("GT"), + + GE("GE"), + + IN("IN"), + + BW("BW"), + + CONTAINS("CONTAINS"), + + BEGINS_WITH("BEGINS_WITH"), + + ENDS_WITH("ENDS_WITH"), + + BW_INC("BW_INC"), + + BW_INC_MIN("BW_INC_MIN"), + + BW_INC_MAX("BW_INC_MAX"), + + LIKE("LIKE"), + + NOT_IN("NOT_IN"); + + private String value; + + OperatorEnum(String value) { + this.value = value; } - public void setColumnName(@javax.annotation.Nonnull String columnName) { - this.columnName = columnName; + public String getValue() { + return value; } - public FilterRules operator(@javax.annotation.Nonnull OperatorEnum operator) { - this.operator = operator; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. - * - * @return operator - */ - @javax.annotation.Nonnull - public OperatorEnum getOperator() { - return operator; + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { - this.operator = operator; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } } - public FilterRules values(@javax.annotation.Nonnull List values) { - this.values = values; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); } - - public FilterRules addValuesItem(Object valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public FilterRules() { + } + + public FilterRules columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * The name of the column to apply the filter on. + * @return columnName + */ + @javax.annotation.Nonnull + public String getColumnName() { + return columnName; + } + + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + + public FilterRules operator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + * @return operator + */ + @javax.annotation.Nonnull + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + } + + + public FilterRules values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public FilterRules addValuesItem(Object valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); } + this.values.add(valuesItem); + return this; + } - /** - * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; - } + /** + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } - public void setValues(@javax.annotation.Nonnull List values) { - this.values = values; - } + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FilterRules filterRules = (FilterRules) o; - return Objects.equals(this.columnName, filterRules.columnName) - && Objects.equals(this.operator, filterRules.operator) - && Objects.equals(this.values, filterRules.values); - } - @Override - public int hashCode() { - return Objects.hash(columnName, operator, values); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FilterRules {\n"); - sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("column_name"); - openapiFields.add("operator"); - openapiFields.add("values"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("column_name"); - openapiRequiredFields.add("operator"); - openapiRequiredFields.add("values"); + FilterRules filterRules = (FilterRules) o; + return Objects.equals(this.columnName, filterRules.columnName) && + Objects.equals(this.operator, filterRules.operator) && + Objects.equals(this.values, filterRules.values); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, operator, values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FilterRules {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FilterRules - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FilterRules.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FilterRules is not found in the empty" - + " JSON string", - FilterRules.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_name"); + openapiFields.add("operator"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_name"); + openapiRequiredFields.add("operator"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FilterRules + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FilterRules.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FilterRules is not found in the empty JSON string", FilterRules.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FilterRules.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FilterRules` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FilterRules.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FilterRules` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FilterRules.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FilterRules.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("column_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("column_name").toString())); - } - if (!jsonObj.get("operator").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operator` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operator").toString())); - } - // validate the required field `operator` - OperatorEnum.validateJsonElement(jsonObj.get("operator")); - // ensure the required json array is present - if (jsonObj.get("values") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `values` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("values").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FilterRules.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FilterRules' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FilterRules.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FilterRules value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FilterRules read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FilterRules given an JSON string - * - * @param jsonString JSON string - * @return An instance of FilterRules - * @throws IOException if the JSON string is invalid with respect to FilterRules - */ - public static FilterRules fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FilterRules.class); - } - - /** - * Convert an instance of FilterRules to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("column_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `column_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("column_name").toString())); + } + if (!jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // validate the required field `operator` + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FilterRules.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FilterRules' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FilterRules.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FilterRules value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FilterRules read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FilterRules given an JSON string + * + * @param jsonString JSON string + * @return An instance of FilterRules + * @throws IOException if the JSON string is invalid with respect to FilterRules + */ + public static FilterRules fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FilterRules.class); + } + + /** + * Convert an instance of FilterRules to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java index c22c8fd72..a96c676d9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java @@ -4,207 +4,208 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ForceLogoutUsersRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * ForceLogoutUsersRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ForceLogoutUsersRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; + public ForceLogoutUsersRequest() { + } - public ForceLogoutUsersRequest() {} + public ForceLogoutUsersRequest userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } - public ForceLogoutUsersRequest userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; + public ForceLogoutUsersRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } - public ForceLogoutUsersRequest addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); - } - this.userIdentifiers.add(userIdentifiersItem); - return this; - } + /** + * GUID or name of the users for force logging out their sessions. + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } - /** - * GUID or name of the users for force logging out their sessions. - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ForceLogoutUsersRequest forceLogoutUsersRequest = (ForceLogoutUsersRequest) o; - return Objects.equals(this.userIdentifiers, forceLogoutUsersRequest.userIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(userIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ForceLogoutUsersRequest {\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + ForceLogoutUsersRequest forceLogoutUsersRequest = (ForceLogoutUsersRequest) o; + return Objects.equals(this.userIdentifiers, forceLogoutUsersRequest.userIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ForceLogoutUsersRequest {\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ForceLogoutUsersRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ForceLogoutUsersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ForceLogoutUsersRequest is not found" - + " in the empty JSON string", - ForceLogoutUsersRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ForceLogoutUsersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ForceLogoutUsersRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ForceLogoutUsersRequest is not found in the empty JSON string", ForceLogoutUsersRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ForceLogoutUsersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ForceLogoutUsersRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ForceLogoutUsersRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ForceLogoutUsersRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ForceLogoutUsersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ForceLogoutUsersRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ForceLogoutUsersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ForceLogoutUsersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ForceLogoutUsersRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ForceLogoutUsersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ForceLogoutUsersRequest - * @throws IOException if the JSON string is invalid with respect to ForceLogoutUsersRequest - */ - public static ForceLogoutUsersRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ForceLogoutUsersRequest.class); - } - - /** - * Convert an instance of ForceLogoutUsersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ForceLogoutUsersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ForceLogoutUsersRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ForceLogoutUsersRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ForceLogoutUsersRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ForceLogoutUsersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ForceLogoutUsersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ForceLogoutUsersRequest + * @throws IOException if the JSON string is invalid with respect to ForceLogoutUsersRequest + */ + public static ForceLogoutUsersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ForceLogoutUsersRequest.class); + } + + /** + * Convert an instance of ForceLogoutUsersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java index 9915b90c5..81468c416 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java @@ -4,197 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CronExpression; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Configuration of schedule with cron expression */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * Configuration of schedule with cron expression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Frequency implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_CRON_EXPRESSION = "cron_expression"; + public static final String SERIALIZED_NAME_CRON_EXPRESSION = "cron_expression"; + @SerializedName(SERIALIZED_NAME_CRON_EXPRESSION) + @javax.annotation.Nonnull + private CronExpression cronExpression; - @SerializedName(SERIALIZED_NAME_CRON_EXPRESSION) - @javax.annotation.Nonnull - private CronExpression cronExpression; + public Frequency() { + } - public Frequency() {} + public Frequency cronExpression(@javax.annotation.Nonnull CronExpression cronExpression) { + this.cronExpression = cronExpression; + return this; + } - public Frequency cronExpression(@javax.annotation.Nonnull CronExpression cronExpression) { - this.cronExpression = cronExpression; - return this; - } + /** + * Get cronExpression + * @return cronExpression + */ + @javax.annotation.Nonnull + public CronExpression getCronExpression() { + return cronExpression; + } - /** - * Get cronExpression - * - * @return cronExpression - */ - @javax.annotation.Nonnull - public CronExpression getCronExpression() { - return cronExpression; - } + public void setCronExpression(@javax.annotation.Nonnull CronExpression cronExpression) { + this.cronExpression = cronExpression; + } - public void setCronExpression(@javax.annotation.Nonnull CronExpression cronExpression) { - this.cronExpression = cronExpression; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Frequency frequency = (Frequency) o; - return Objects.equals(this.cronExpression, frequency.cronExpression); - } - @Override - public int hashCode() { - return Objects.hash(cronExpression); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Frequency {\n"); - sb.append(" cronExpression: ").append(toIndentedString(cronExpression)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + Frequency frequency = (Frequency) o; + return Objects.equals(this.cronExpression, frequency.cronExpression); + } + + @Override + public int hashCode() { + return Objects.hash(cronExpression); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Frequency {\n"); + sb.append(" cronExpression: ").append(toIndentedString(cronExpression)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cron_expression"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("cron_expression"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Frequency - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Frequency.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Frequency is not found in the empty" - + " JSON string", - Frequency.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cron_expression"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("cron_expression"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Frequency + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Frequency.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Frequency is not found in the empty JSON string", Frequency.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Frequency.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Frequency` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Frequency.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Frequency` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Frequency.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Frequency.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `cron_expression` - CronExpression.validateJsonElement(jsonObj.get("cron_expression")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Frequency.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Frequency' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Frequency.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Frequency value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Frequency read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Frequency given an JSON string - * - * @param jsonString JSON string - * @return An instance of Frequency - * @throws IOException if the JSON string is invalid with respect to Frequency - */ - public static Frequency fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Frequency.class); - } + // validate the required field `cron_expression` + CronExpression.validateJsonElement(jsonObj.get("cron_expression")); + } - /** - * Convert an instance of Frequency to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Frequency.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Frequency' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Frequency.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Frequency value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Frequency read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Frequency given an JSON string + * + * @param jsonString JSON string + * @return An instance of Frequency + * @throws IOException if the JSON string is invalid with respect to Frequency + */ + public static Frequency fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Frequency.class); + } + + /** + * Convert an instance of Frequency to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java index 7134ee5a5..29c2224c4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java @@ -4,198 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CronExpressionInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Configuration of schedule with cron expression */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * Configuration of schedule with cron expression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class FrequencyInput implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_CRON_EXPRESSION = "cron_expression"; + public static final String SERIALIZED_NAME_CRON_EXPRESSION = "cron_expression"; + @SerializedName(SERIALIZED_NAME_CRON_EXPRESSION) + @javax.annotation.Nonnull + private CronExpressionInput cronExpression; - @SerializedName(SERIALIZED_NAME_CRON_EXPRESSION) - @javax.annotation.Nonnull - private CronExpressionInput cronExpression; + public FrequencyInput() { + } - public FrequencyInput() {} + public FrequencyInput cronExpression(@javax.annotation.Nonnull CronExpressionInput cronExpression) { + this.cronExpression = cronExpression; + return this; + } - public FrequencyInput cronExpression( - @javax.annotation.Nonnull CronExpressionInput cronExpression) { - this.cronExpression = cronExpression; - return this; - } + /** + * Get cronExpression + * @return cronExpression + */ + @javax.annotation.Nonnull + public CronExpressionInput getCronExpression() { + return cronExpression; + } - /** - * Get cronExpression - * - * @return cronExpression - */ - @javax.annotation.Nonnull - public CronExpressionInput getCronExpression() { - return cronExpression; - } + public void setCronExpression(@javax.annotation.Nonnull CronExpressionInput cronExpression) { + this.cronExpression = cronExpression; + } - public void setCronExpression(@javax.annotation.Nonnull CronExpressionInput cronExpression) { - this.cronExpression = cronExpression; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FrequencyInput frequencyInput = (FrequencyInput) o; - return Objects.equals(this.cronExpression, frequencyInput.cronExpression); - } - @Override - public int hashCode() { - return Objects.hash(cronExpression); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FrequencyInput {\n"); - sb.append(" cronExpression: ").append(toIndentedString(cronExpression)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + FrequencyInput frequencyInput = (FrequencyInput) o; + return Objects.equals(this.cronExpression, frequencyInput.cronExpression); + } + + @Override + public int hashCode() { + return Objects.hash(cronExpression); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FrequencyInput {\n"); + sb.append(" cronExpression: ").append(toIndentedString(cronExpression)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cron_expression"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("cron_expression"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FrequencyInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FrequencyInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in FrequencyInput is not found in the" - + " empty JSON string", - FrequencyInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cron_expression"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("cron_expression"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FrequencyInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FrequencyInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FrequencyInput is not found in the empty JSON string", FrequencyInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FrequencyInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `FrequencyInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FrequencyInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FrequencyInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FrequencyInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FrequencyInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `cron_expression` - CronExpressionInput.validateJsonElement(jsonObj.get("cron_expression")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FrequencyInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FrequencyInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(FrequencyInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, FrequencyInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FrequencyInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of FrequencyInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of FrequencyInput - * @throws IOException if the JSON string is invalid with respect to FrequencyInput - */ - public static FrequencyInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FrequencyInput.class); - } + // validate the required field `cron_expression` + CronExpressionInput.validateJsonElement(jsonObj.get("cron_expression")); + } - /** - * Convert an instance of FrequencyInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FrequencyInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FrequencyInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FrequencyInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FrequencyInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FrequencyInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of FrequencyInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of FrequencyInput + * @throws IOException if the JSON string is invalid with respect to FrequencyInput + */ + public static FrequencyInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FrequencyInput.class); + } + + /** + * Convert an instance of FrequencyInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java index 2b29626c3..e7a97e4c9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java @@ -4,635 +4,588 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** GenerateCSVRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GenerateCSVRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_START_DATE = "start_date"; - - @SerializedName(SERIALIZED_NAME_START_DATE) - @javax.annotation.Nonnull - private String startDate; - - public static final String SERIALIZED_NAME_END_DATE = "end_date"; - - @SerializedName(SERIALIZED_NAME_END_DATE) - @javax.annotation.Nonnull - private String endDate; - - /** Type of the calendar. */ - @JsonAdapter(CalendarTypeEnum.Adapter.class) - public enum CalendarTypeEnum { - MONTH_OFFSET("MONTH_OFFSET"), - - FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), - - FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), - - FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); - - private String value; - - CalendarTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CalendarTypeEnum fromValue(String value) { - for (CalendarTypeEnum b : CalendarTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CalendarTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - CalendarTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; - - @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) - @javax.annotation.Nullable - private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; - - /** Month offset to start calendar from `January`. */ - @JsonAdapter(MonthOffsetEnum.Adapter.class) - public enum MonthOffsetEnum { - JANUARY("January"), - - FEBRUARY("February"), - - MARCH("March"), - - APRIL("April"), - - MAY("May"), - - JUNE("June"), - - JULY("July"), - - AUGUST("August"), - - SEPTEMBER("September"), - - OCTOBER("October"), - - NOVEMBER("November"), - - DECEMBER("December"); - - private String value; - - MonthOffsetEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MonthOffsetEnum fromValue(String value) { - for (MonthOffsetEnum b : MonthOffsetEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MonthOffsetEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MonthOffsetEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; - - @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) - @javax.annotation.Nullable - private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; - - /** Specify the starting day of the week. */ - @JsonAdapter(StartDayOfWeekEnum.Adapter.class) - public enum StartDayOfWeekEnum { - SUNDAY("Sunday"), - - MONDAY("Monday"), - - TUESDAY("Tuesday"), - - WEDNESDAY("Wednesday"), - - THURSDAY("Thursday"), - - FRIDAY("Friday"), - - SATURDAY("Saturday"); - - private String value; - - StartDayOfWeekEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StartDayOfWeekEnum fromValue(String value) { - for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StartDayOfWeekEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StartDayOfWeekEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; - - @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) - @javax.annotation.Nullable - private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; - - public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; - - @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) - @javax.annotation.Nullable - private String quarterNamePrefix; - - public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; - - @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) - @javax.annotation.Nullable - private String yearNamePrefix; +import com.thoughtspot.client.JSON; - public GenerateCSVRequest() {} +/** + * GenerateCSVRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GenerateCSVRequest implements Serializable { + private static final long serialVersionUID = 1L; - public GenerateCSVRequest startDate(@javax.annotation.Nonnull String startDate) { - this.startDate = startDate; - return this; - } + public static final String SERIALIZED_NAME_START_DATE = "start_date"; + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nonnull + private String startDate; - /** - * Start date for the calendar in `MM/dd/yyyy` format. - * - * @return startDate - */ - @javax.annotation.Nonnull - public String getStartDate() { - return startDate; - } + public static final String SERIALIZED_NAME_END_DATE = "end_date"; + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nonnull + private String endDate; - public void setStartDate(@javax.annotation.Nonnull String startDate) { - this.startDate = startDate; - } + /** + * Type of the calendar. + */ + @JsonAdapter(CalendarTypeEnum.Adapter.class) + public enum CalendarTypeEnum { + MONTH_OFFSET("MONTH_OFFSET"), + + FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), + + FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), + + FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); - public GenerateCSVRequest endDate(@javax.annotation.Nonnull String endDate) { - this.endDate = endDate; - return this; - } + private String value; - /** - * End date for the calendar in `MM/dd/yyyy` format. - * - * @return endDate - */ - @javax.annotation.Nonnull - public String getEndDate() { - return endDate; + CalendarTypeEnum(String value) { + this.value = value; } - public void setEndDate(@javax.annotation.Nonnull String endDate) { - this.endDate = endDate; + public String getValue() { + return value; } - public GenerateCSVRequest calendarType( - @javax.annotation.Nullable CalendarTypeEnum calendarType) { - this.calendarType = calendarType; - return this; - } - - /** - * Type of the calendar. - * - * @return calendarType - */ - @javax.annotation.Nullable - public CalendarTypeEnum getCalendarType() { - return calendarType; - } - - public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { - this.calendarType = calendarType; + @Override + public String toString() { + return String.valueOf(value); } - public GenerateCSVRequest monthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { - this.monthOffset = monthOffset; - return this; + public static CalendarTypeEnum fromValue(String value) { + for (CalendarTypeEnum b : CalendarTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Month offset to start calendar from `January`. - * - * @return monthOffset - */ - @javax.annotation.Nullable - public MonthOffsetEnum getMonthOffset() { - return monthOffset; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { - this.monthOffset = monthOffset; + @Override + public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CalendarTypeEnum.fromValue(value); + } } - public GenerateCSVRequest startDayOfWeek( - @javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { - this.startDayOfWeek = startDayOfWeek; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; + @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) + @javax.annotation.Nullable + private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; + + /** + * Month offset to start calendar from `January`. + */ + @JsonAdapter(MonthOffsetEnum.Adapter.class) + public enum MonthOffsetEnum { + JANUARY("January"), + + FEBRUARY("February"), + + MARCH("March"), + + APRIL("April"), + + MAY("May"), + + JUNE("June"), + + JULY("July"), + + AUGUST("August"), + + SEPTEMBER("September"), + + OCTOBER("October"), + + NOVEMBER("November"), + + DECEMBER("December"); + + private String value; + + MonthOffsetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - /** - * Specify the starting day of the week. - * - * @return startDayOfWeek - */ - @javax.annotation.Nullable - public StartDayOfWeekEnum getStartDayOfWeek() { - return startDayOfWeek; + @Override + public String toString() { + return String.valueOf(value); } - public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { - this.startDayOfWeek = startDayOfWeek; + public static MonthOffsetEnum fromValue(String value) { + for (MonthOffsetEnum b : MonthOffsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public GenerateCSVRequest quarterNamePrefix( - @javax.annotation.Nullable String quarterNamePrefix) { - this.quarterNamePrefix = quarterNamePrefix; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Prefix to add before the quarter. - * - * @return quarterNamePrefix - */ - @javax.annotation.Nullable - public String getQuarterNamePrefix() { - return quarterNamePrefix; + @Override + public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthOffsetEnum.fromValue(value); + } } - public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { - this.quarterNamePrefix = quarterNamePrefix; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthOffsetEnum.fromValue(value); } + } - public GenerateCSVRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { - this.yearNamePrefix = yearNamePrefix; - return this; - } + public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; + @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) + @javax.annotation.Nullable + private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; - /** - * Prefix to add before the year. - * - * @return yearNamePrefix - */ - @javax.annotation.Nullable - public String getYearNamePrefix() { - return yearNamePrefix; - } + /** + * Specify the starting day of the week. + */ + @JsonAdapter(StartDayOfWeekEnum.Adapter.class) + public enum StartDayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); - public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { - this.yearNamePrefix = yearNamePrefix; - } + private String value; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GenerateCSVRequest generateCSVRequest = (GenerateCSVRequest) o; - return Objects.equals(this.startDate, generateCSVRequest.startDate) - && Objects.equals(this.endDate, generateCSVRequest.endDate) - && Objects.equals(this.calendarType, generateCSVRequest.calendarType) - && Objects.equals(this.monthOffset, generateCSVRequest.monthOffset) - && Objects.equals(this.startDayOfWeek, generateCSVRequest.startDayOfWeek) - && Objects.equals(this.quarterNamePrefix, generateCSVRequest.quarterNamePrefix) - && Objects.equals(this.yearNamePrefix, generateCSVRequest.yearNamePrefix); + StartDayOfWeekEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - startDate, - endDate, - calendarType, - monthOffset, - startDayOfWeek, - quarterNamePrefix, - yearNamePrefix); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GenerateCSVRequest {\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); - sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); - sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); - sb.append(" quarterNamePrefix: ") - .append(toIndentedString(quarterNamePrefix)) - .append("\n"); - sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static StartDayOfWeekEnum fromValue(String value) { + for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("start_date"); - openapiFields.add("end_date"); - openapiFields.add("calendar_type"); - openapiFields.add("month_offset"); - openapiFields.add("start_day_of_week"); - openapiFields.add("quarter_name_prefix"); - openapiFields.add("year_name_prefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("start_date"); - openapiRequiredFields.add("end_date"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartDayOfWeekEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GenerateCSVRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GenerateCSVRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GenerateCSVRequest is not found in" - + " the empty JSON string", - GenerateCSVRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GenerateCSVRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GenerateCSVRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GenerateCSVRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + StartDayOfWeekEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; + @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) + @javax.annotation.Nullable + private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; + + public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; + @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) + @javax.annotation.Nullable + private String quarterNamePrefix; + + public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; + @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) + @javax.annotation.Nullable + private String yearNamePrefix; + + public GenerateCSVRequest() { + } + + public GenerateCSVRequest startDate(@javax.annotation.Nonnull String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date for the calendar in `MM/dd/yyyy` format. + * @return startDate + */ + @javax.annotation.Nonnull + public String getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nonnull String startDate) { + this.startDate = startDate; + } + + + public GenerateCSVRequest endDate(@javax.annotation.Nonnull String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End date for the calendar in `MM/dd/yyyy` format. + * @return endDate + */ + @javax.annotation.Nonnull + public String getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nonnull String endDate) { + this.endDate = endDate; + } + + + public GenerateCSVRequest calendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + return this; + } + + /** + * Type of the calendar. + * @return calendarType + */ + @javax.annotation.Nullable + public CalendarTypeEnum getCalendarType() { + return calendarType; + } + + public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + } + + + public GenerateCSVRequest monthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + return this; + } + + /** + * Month offset to start calendar from `January`. + * @return monthOffset + */ + @javax.annotation.Nullable + public MonthOffsetEnum getMonthOffset() { + return monthOffset; + } + + public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + } + + + public GenerateCSVRequest startDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + return this; + } + + /** + * Specify the starting day of the week. + * @return startDayOfWeek + */ + @javax.annotation.Nullable + public StartDayOfWeekEnum getStartDayOfWeek() { + return startDayOfWeek; + } + + public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + } + + + public GenerateCSVRequest quarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + return this; + } + + /** + * Prefix to add before the quarter. + * @return quarterNamePrefix + */ + @javax.annotation.Nullable + public String getQuarterNamePrefix() { + return quarterNamePrefix; + } + + public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + } + + + public GenerateCSVRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + return this; + } + + /** + * Prefix to add before the year. + * @return yearNamePrefix + */ + @javax.annotation.Nullable + public String getYearNamePrefix() { + return yearNamePrefix; + } + + public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateCSVRequest generateCSVRequest = (GenerateCSVRequest) o; + return Objects.equals(this.startDate, generateCSVRequest.startDate) && + Objects.equals(this.endDate, generateCSVRequest.endDate) && + Objects.equals(this.calendarType, generateCSVRequest.calendarType) && + Objects.equals(this.monthOffset, generateCSVRequest.monthOffset) && + Objects.equals(this.startDayOfWeek, generateCSVRequest.startDayOfWeek) && + Objects.equals(this.quarterNamePrefix, generateCSVRequest.quarterNamePrefix) && + Objects.equals(this.yearNamePrefix, generateCSVRequest.yearNamePrefix); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, calendarType, monthOffset, startDayOfWeek, quarterNamePrefix, yearNamePrefix); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenerateCSVRequest {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); + sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); + sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); + sb.append(" quarterNamePrefix: ").append(toIndentedString(quarterNamePrefix)).append("\n"); + sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("start_date"); + openapiFields.add("end_date"); + openapiFields.add("calendar_type"); + openapiFields.add("month_offset"); + openapiFields.add("start_day_of_week"); + openapiFields.add("quarter_name_prefix"); + openapiFields.add("year_name_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("start_date"); + openapiRequiredFields.add("end_date"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GenerateCSVRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GenerateCSVRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GenerateCSVRequest is not found in the empty JSON string", GenerateCSVRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GenerateCSVRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GenerateCSVRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GenerateCSVRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("start_date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `start_date` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("start_date").toString())); - } - if (!jsonObj.get("end_date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `end_date` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("end_date").toString())); - } - if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) - && !jsonObj.get("calendar_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `calendar_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("calendar_type").toString())); - } - // validate the optional field `calendar_type` - if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { - CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); - } - if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) - && !jsonObj.get("month_offset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `month_offset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("month_offset").toString())); - } - // validate the optional field `month_offset` - if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { - MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); - } - if ((jsonObj.get("start_day_of_week") != null - && !jsonObj.get("start_day_of_week").isJsonNull()) - && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `start_day_of_week` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("start_day_of_week").toString())); - } - // validate the optional field `start_day_of_week` - if (jsonObj.get("start_day_of_week") != null - && !jsonObj.get("start_day_of_week").isJsonNull()) { - StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); - } - if ((jsonObj.get("quarter_name_prefix") != null - && !jsonObj.get("quarter_name_prefix").isJsonNull()) - && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quarter_name_prefix` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("quarter_name_prefix").toString())); - } - if ((jsonObj.get("year_name_prefix") != null - && !jsonObj.get("year_name_prefix").isJsonNull()) - && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `year_name_prefix` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("year_name_prefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GenerateCSVRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GenerateCSVRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GenerateCSVRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GenerateCSVRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GenerateCSVRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GenerateCSVRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GenerateCSVRequest - * @throws IOException if the JSON string is invalid with respect to GenerateCSVRequest - */ - public static GenerateCSVRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GenerateCSVRequest.class); - } - - /** - * Convert an instance of GenerateCSVRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("start_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_date").toString())); + } + if (!jsonObj.get("end_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `end_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("end_date").toString())); + } + if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) && !jsonObj.get("calendar_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `calendar_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendar_type").toString())); + } + // validate the optional field `calendar_type` + if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { + CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); + } + if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) && !jsonObj.get("month_offset").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `month_offset` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month_offset").toString())); + } + // validate the optional field `month_offset` + if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { + MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); + } + if ((jsonObj.get("start_day_of_week") != null && !jsonObj.get("start_day_of_week").isJsonNull()) && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_day_of_week` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_day_of_week").toString())); + } + // validate the optional field `start_day_of_week` + if (jsonObj.get("start_day_of_week") != null && !jsonObj.get("start_day_of_week").isJsonNull()) { + StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); + } + if ((jsonObj.get("quarter_name_prefix") != null && !jsonObj.get("quarter_name_prefix").isJsonNull()) && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quarter_name_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quarter_name_prefix").toString())); + } + if ((jsonObj.get("year_name_prefix") != null && !jsonObj.get("year_name_prefix").isJsonNull()) && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `year_name_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("year_name_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GenerateCSVRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GenerateCSVRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GenerateCSVRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GenerateCSVRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GenerateCSVRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GenerateCSVRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenerateCSVRequest + * @throws IOException if the JSON string is invalid with respect to GenerateCSVRequest + */ + public static GenerateCSVRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GenerateCSVRequest.class); + } + + /** + * Convert an instance of GenerateCSVRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java index f6e424d1b..75cd6049a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java @@ -4,246 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** GenericInfo */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GenericInfo implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public GenericInfo() {} - - public GenericInfo id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public GenericInfo name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GenericInfo genericInfo = (GenericInfo) o; - return Objects.equals(this.id, genericInfo.id) - && Objects.equals(this.name, genericInfo.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GenericInfo {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GenericInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GenericInfo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GenericInfo is not found in the empty" - + " JSON string", - GenericInfo.openapiRequiredFields.toString())); - } +/** + * GenericInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GenericInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public GenericInfo() { + } + + public GenericInfo id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public GenericInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenericInfo genericInfo = (GenericInfo) o; + return Objects.equals(this.id, genericInfo.id) && + Objects.equals(this.name, genericInfo.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenericInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GenericInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GenericInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GenericInfo is not found in the empty JSON string", GenericInfo.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GenericInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GenericInfo` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GenericInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GenericInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GenericInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GenericInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GenericInfo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GenericInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GenericInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GenericInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of GenericInfo - * @throws IOException if the JSON string is invalid with respect to GenericInfo - */ - public static GenericInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GenericInfo.class); - } - - /** - * Convert an instance of GenericInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GenericInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GenericInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GenericInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GenericInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GenericInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GenericInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenericInfo + * @throws IOException if the JSON string is invalid with respect to GenericInfo + */ + public static GenericInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GenericInfo.class); + } + + /** + * Convert an instance of GenericInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java index f9a75fc2f..4239fe821 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java @@ -4,269 +4,258 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ImportEPackAsyncTaskStatus; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** GetAsyncImportStatusResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetAsyncImportStatusResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_STATUS_LIST = "status_list"; - - @SerializedName(SERIALIZED_NAME_STATUS_LIST) - @javax.annotation.Nullable - private List statusList; - - public static final String SERIALIZED_NAME_LAST_BATCH = "last_batch"; - - @SerializedName(SERIALIZED_NAME_LAST_BATCH) - @javax.annotation.Nullable - private Boolean lastBatch; - - public GetAsyncImportStatusResponse() {} - - public GetAsyncImportStatusResponse statusList( - @javax.annotation.Nullable List statusList) { - this.statusList = statusList; - return this; - } - - public GetAsyncImportStatusResponse addStatusListItem( - ImportEPackAsyncTaskStatus statusListItem) { - if (this.statusList == null) { - this.statusList = new ArrayList<>(); - } - this.statusList.add(statusListItem); - return this; - } - /** - * List of task statuses. - * - * @return statusList - */ - @javax.annotation.Nullable - public List getStatusList() { - return statusList; - } +import com.thoughtspot.client.JSON; - public void setStatusList( - @javax.annotation.Nullable List statusList) { - this.statusList = statusList; - } +/** + * GetAsyncImportStatusResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetAsyncImportStatusResponse implements Serializable { + private static final long serialVersionUID = 1L; - public GetAsyncImportStatusResponse lastBatch(@javax.annotation.Nullable Boolean lastBatch) { - this.lastBatch = lastBatch; - return this; - } + public static final String SERIALIZED_NAME_STATUS_LIST = "status_list"; + @SerializedName(SERIALIZED_NAME_STATUS_LIST) + @javax.annotation.Nullable + private List statusList; - /** - * Indicates whether there are more task statuses to fetch. - * - * @return lastBatch - */ - @javax.annotation.Nullable - public Boolean getLastBatch() { - return lastBatch; - } + public static final String SERIALIZED_NAME_LAST_BATCH = "last_batch"; + @SerializedName(SERIALIZED_NAME_LAST_BATCH) + @javax.annotation.Nullable + private Boolean lastBatch; - public void setLastBatch(@javax.annotation.Nullable Boolean lastBatch) { - this.lastBatch = lastBatch; - } + public GetAsyncImportStatusResponse() { + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAsyncImportStatusResponse getAsyncImportStatusResponse = - (GetAsyncImportStatusResponse) o; - return Objects.equals(this.statusList, getAsyncImportStatusResponse.statusList) - && Objects.equals(this.lastBatch, getAsyncImportStatusResponse.lastBatch); - } + public GetAsyncImportStatusResponse statusList(@javax.annotation.Nullable List statusList) { + this.statusList = statusList; + return this; + } - 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())); + public GetAsyncImportStatusResponse addStatusListItem(ImportEPackAsyncTaskStatus statusListItem) { + if (this.statusList == null) { + this.statusList = new ArrayList<>(); } - - @Override - public int hashCode() { - return Objects.hash(statusList, lastBatch); + this.statusList.add(statusListItem); + return this; + } + + /** + * List of task statuses. + * @return statusList + */ + @javax.annotation.Nullable + public List getStatusList() { + return statusList; + } + + public void setStatusList(@javax.annotation.Nullable List statusList) { + this.statusList = statusList; + } + + + public GetAsyncImportStatusResponse lastBatch(@javax.annotation.Nullable Boolean lastBatch) { + this.lastBatch = lastBatch; + return this; + } + + /** + * Indicates whether there are more task statuses to fetch. + * @return lastBatch + */ + @javax.annotation.Nullable + public Boolean getLastBatch() { + return lastBatch; + } + + public void setLastBatch(@javax.annotation.Nullable Boolean lastBatch) { + this.lastBatch = lastBatch; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAsyncImportStatusResponse {\n"); - sb.append(" statusList: ").append(toIndentedString(statusList)).append("\n"); - sb.append(" lastBatch: ").append(toIndentedString(lastBatch)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + GetAsyncImportStatusResponse getAsyncImportStatusResponse = (GetAsyncImportStatusResponse) o; + return Objects.equals(this.statusList, getAsyncImportStatusResponse.statusList) && + Objects.equals(this.lastBatch, getAsyncImportStatusResponse.lastBatch); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(statusList, lastBatch); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status_list"); - openapiFields.add("last_batch"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAsyncImportStatusResponse {\n"); + sb.append(" statusList: ").append(toIndentedString(statusList)).append("\n"); + sb.append(" lastBatch: ").append(toIndentedString(lastBatch)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetAsyncImportStatusResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetAsyncImportStatusResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetAsyncImportStatusResponse is not" - + " found in the empty JSON string", - GetAsyncImportStatusResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status_list"); + openapiFields.add("last_batch"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetAsyncImportStatusResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetAsyncImportStatusResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetAsyncImportStatusResponse is not found in the empty JSON string", GetAsyncImportStatusResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetAsyncImportStatusResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetAsyncImportStatusResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetAsyncImportStatusResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetAsyncImportStatusResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("status_list") != null && !jsonObj.get("status_list").isJsonNull()) { - JsonArray jsonArraystatusList = jsonObj.getAsJsonArray("status_list"); - if (jsonArraystatusList != null) { - // ensure the json data is an array - if (!jsonObj.get("status_list").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_list` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("status_list").toString())); - } - - // validate the optional field `status_list` (array) - for (int i = 0; i < jsonArraystatusList.size(); i++) { - ImportEPackAsyncTaskStatus.validateJsonElement(jsonArraystatusList.get(i)); - } - ; - } + if (jsonObj.get("status_list") != null && !jsonObj.get("status_list").isJsonNull()) { + JsonArray jsonArraystatusList = jsonObj.getAsJsonArray("status_list"); + if (jsonArraystatusList != null) { + // ensure the json data is an array + if (!jsonObj.get("status_list").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `status_list` to be an array in the JSON string but got `%s`", jsonObj.get("status_list").toString())); + } + + // validate the optional field `status_list` (array) + for (int i = 0; i < jsonArraystatusList.size(); i++) { + ImportEPackAsyncTaskStatus.validateJsonElement(jsonArraystatusList.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetAsyncImportStatusResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetAsyncImportStatusResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetAsyncImportStatusResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetAsyncImportStatusResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetAsyncImportStatusResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of GetAsyncImportStatusResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetAsyncImportStatusResponse - * @throws IOException if the JSON string is invalid with respect to - * GetAsyncImportStatusResponse - */ - public static GetAsyncImportStatusResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetAsyncImportStatusResponse.class); - } - - /** - * Convert an instance of GetAsyncImportStatusResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAsyncImportStatusResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAsyncImportStatusResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAsyncImportStatusResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAsyncImportStatusResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetAsyncImportStatusResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of GetAsyncImportStatusResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAsyncImportStatusResponse + * @throws IOException if the JSON string is invalid with respect to GetAsyncImportStatusResponse + */ + public static GetAsyncImportStatusResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAsyncImportStatusResponse.class); + } + + /** + * Convert an instance of GetAsyncImportStatusResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java index 8c9a76129..8497d3d24 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java @@ -4,810 +4,712 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FilterRules; +import com.thoughtspot.client.model.GroupObject; +import com.thoughtspot.client.model.ParameterValues; +import com.thoughtspot.client.model.TokenAccessScopeObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** GetCustomAccessTokenRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetCustomAccessTokenRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nonnull - private String username; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password = ""; - - public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; - - @SerializedName(SERIALIZED_NAME_SECRET_KEY) - @javax.annotation.Nullable - private String secretKey = ""; - - public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; - - @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) - @javax.annotation.Nullable - private Integer validityTimeInSec = 300; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - /** Indicates whether the specified attributes should be persisted or not. */ - @JsonAdapter(PersistOptionEnum.Adapter.class) - public enum PersistOptionEnum { - REPLACE("REPLACE"), - - APPEND("APPEND"), - - NONE("NONE"), - - RESET("RESET"); - - private String value; - - PersistOptionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PersistOptionEnum fromValue(String value) { - for (PersistOptionEnum b : PersistOptionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PersistOptionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PersistOptionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PersistOptionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PersistOptionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PERSIST_OPTION = "persist_option"; - - @SerializedName(SERIALIZED_NAME_PERSIST_OPTION) - @javax.annotation.Nonnull - private PersistOptionEnum persistOption; - - public static final String SERIALIZED_NAME_FILTER_RULES = "filter_rules"; - - @SerializedName(SERIALIZED_NAME_FILTER_RULES) - @javax.annotation.Nullable - private List filterRules; - - public static final String SERIALIZED_NAME_PARAMETER_VALUES = "parameter_values"; - - @SerializedName(SERIALIZED_NAME_PARAMETER_VALUES) - @javax.annotation.Nullable - private List parameterValues; - - public static final String SERIALIZED_NAME_OBJECTS = "objects"; - - @SerializedName(SERIALIZED_NAME_OBJECTS) - @javax.annotation.Nullable - private List objects; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - public static final String SERIALIZED_NAME_GROUPS = "groups"; - - @SerializedName(SERIALIZED_NAME_GROUPS) - @javax.annotation.Nullable - private List groups; - - public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; - - @SerializedName(SERIALIZED_NAME_AUTO_CREATE) - @javax.annotation.Nullable - private Boolean autoCreate = true; - - public GetCustomAccessTokenRequest() {} - - public GetCustomAccessTokenRequest username(@javax.annotation.Nonnull String username) { - this.username = username; - return this; - } - - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of - * the user object. - * - * @return username - */ - @javax.annotation.Nonnull - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nonnull String username) { - this.username = username; - } - - public GetCustomAccessTokenRequest password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password of the user account - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public GetCustomAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { - this.secretKey = secretKey; - return this; - } - - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a - * secret key when Trusted authentication is enabled. - * - * @return secretKey - */ - @javax.annotation.Nullable - public String getSecretKey() { - return secretKey; - } - - public void setSecretKey(@javax.annotation.Nullable String secretKey) { - this.secretKey = secretKey; - } - - public GetCustomAccessTokenRequest validityTimeInSec( - @javax.annotation.Nullable Integer validityTimeInSec) { - this.validityTimeInSec = validityTimeInSec; - return this; - } - /** - * Token validity duration in seconds - * - * @return validityTimeInSec - */ - @javax.annotation.Nullable - public Integer getValidityTimeInSec() { - return validityTimeInSec; - } - - public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { - this.validityTimeInSec = validityTimeInSec; - } - - public GetCustomAccessTokenRequest orgIdentifier( - @javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - - /** - * ID or name of the Org context to log in to. If the Org ID or name is not specified but a - * secret key is provided, the user will be logged into the Org associated with the secret key. - * If neither the Org ID/name nor the secret key is provided, the user will be logged into the - * Org context from their previous login session. - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - public GetCustomAccessTokenRequest persistOption( - @javax.annotation.Nonnull PersistOptionEnum persistOption) { - this.persistOption = persistOption; - return this; - } - - /** - * Indicates whether the specified attributes should be persisted or not. - * - * @return persistOption - */ - @javax.annotation.Nonnull - public PersistOptionEnum getPersistOption() { - return persistOption; - } - - public void setPersistOption(@javax.annotation.Nonnull PersistOptionEnum persistOption) { - this.persistOption = persistOption; - } - - public GetCustomAccessTokenRequest filterRules( - @javax.annotation.Nullable List filterRules) { - this.filterRules = filterRules; - return this; - } - - public GetCustomAccessTokenRequest addFilterRulesItem(FilterRules filterRulesItem) { - if (this.filterRules == null) { - this.filterRules = new ArrayList<>(); - } - this.filterRules.add(filterRulesItem); - return this; - } - - /** - * Filter rules. - * - * @return filterRules - */ - @javax.annotation.Nullable - public List getFilterRules() { - return filterRules; - } - - public void setFilterRules(@javax.annotation.Nullable List filterRules) { - this.filterRules = filterRules; - } - - public GetCustomAccessTokenRequest parameterValues( - @javax.annotation.Nullable List parameterValues) { - this.parameterValues = parameterValues; - return this; - } - - public GetCustomAccessTokenRequest addParameterValuesItem(ParameterValues parameterValuesItem) { - if (this.parameterValues == null) { - this.parameterValues = new ArrayList<>(); - } - this.parameterValues.add(parameterValuesItem); - return this; - } - - /** - * Parameter values. - * - * @return parameterValues - */ - @javax.annotation.Nullable - public List getParameterValues() { - return parameterValues; - } - - public void setParameterValues( - @javax.annotation.Nullable List parameterValues) { - this.parameterValues = parameterValues; - } - - public GetCustomAccessTokenRequest objects( - @javax.annotation.Nullable List objects) { - this.objects = objects; - return this; - } - - public GetCustomAccessTokenRequest addObjectsItem(TokenAccessScopeObject objectsItem) { - if (this.objects == null) { - this.objects = new ArrayList<>(); - } - this.objects.add(objectsItem); - return this; - } - - /** - * Objects on which the filter rules and parameters values should be applied to - * - * @return objects - */ - @javax.annotation.Nullable - public List getObjects() { - return objects; - } - - public void setObjects(@javax.annotation.Nullable List objects) { - this.objects = objects; - } - - public GetCustomAccessTokenRequest email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when - * creating a new user. - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } +import com.thoughtspot.client.JSON; - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } +/** + * GetCustomAccessTokenRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetCustomAccessTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; - public GetCustomAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; - /** - * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute - * when creating a new user. - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password = ""; - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - } + public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @javax.annotation.Nullable + private String secretKey = ""; - public GetCustomAccessTokenRequest groups(@javax.annotation.Nullable List groups) { - this.groups = groups; - return this; - } + public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; + @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) + @javax.annotation.Nullable + private Integer validityTimeInSec = 300; - public GetCustomAccessTokenRequest addGroupsItem(GroupObject groupsItem) { - if (this.groups == null) { - this.groups = new ArrayList<>(); - } - this.groups.add(groupsItem); - return this; - } + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; - /** - * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user - * belongs. Specify this attribute when creating a new user. - * - * @return groups - */ - @javax.annotation.Nullable - public List getGroups() { - return groups; - } + /** + * Indicates whether the specified attributes should be persisted or not. + */ + @JsonAdapter(PersistOptionEnum.Adapter.class) + public enum PersistOptionEnum { + REPLACE("REPLACE"), + + APPEND("APPEND"), + + NONE("NONE"), + + RESET("RESET"); - public void setGroups(@javax.annotation.Nullable List groups) { - this.groups = groups; - } - - public GetCustomAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { - this.autoCreate = autoCreate; - return this; - } + private String value; - /** - * 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. Version: 10.5.0.cl or later - * - * @return autoCreate - */ - @javax.annotation.Nullable - public Boolean getAutoCreate() { - return autoCreate; + PersistOptionEnum(String value) { + this.value = value; } - public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { - this.autoCreate = autoCreate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCustomAccessTokenRequest getCustomAccessTokenRequest = (GetCustomAccessTokenRequest) o; - return Objects.equals(this.username, getCustomAccessTokenRequest.username) - && Objects.equals(this.password, getCustomAccessTokenRequest.password) - && Objects.equals(this.secretKey, getCustomAccessTokenRequest.secretKey) - && Objects.equals( - this.validityTimeInSec, getCustomAccessTokenRequest.validityTimeInSec) - && Objects.equals(this.orgIdentifier, getCustomAccessTokenRequest.orgIdentifier) - && Objects.equals(this.persistOption, getCustomAccessTokenRequest.persistOption) - && Objects.equals(this.filterRules, getCustomAccessTokenRequest.filterRules) - && Objects.equals(this.parameterValues, getCustomAccessTokenRequest.parameterValues) - && Objects.equals(this.objects, getCustomAccessTokenRequest.objects) - && Objects.equals(this.email, getCustomAccessTokenRequest.email) - && Objects.equals(this.displayName, getCustomAccessTokenRequest.displayName) - && Objects.equals(this.groups, getCustomAccessTokenRequest.groups) - && Objects.equals(this.autoCreate, getCustomAccessTokenRequest.autoCreate); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - username, - password, - secretKey, - validityTimeInSec, - orgIdentifier, - persistOption, - filterRules, - parameterValues, - objects, - email, - displayName, - groups, - autoCreate); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetCustomAccessTokenRequest {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); - sb.append(" validityTimeInSec: ") - .append(toIndentedString(validityTimeInSec)) - .append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" persistOption: ").append(toIndentedString(persistOption)).append("\n"); - sb.append(" filterRules: ").append(toIndentedString(filterRules)).append("\n"); - sb.append(" parameterValues: ").append(toIndentedString(parameterValues)).append("\n"); - sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PersistOptionEnum fromValue(String value) { + for (PersistOptionEnum b : PersistOptionEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("secret_key"); - openapiFields.add("validity_time_in_sec"); - openapiFields.add("org_identifier"); - openapiFields.add("persist_option"); - openapiFields.add("filter_rules"); - openapiFields.add("parameter_values"); - openapiFields.add("objects"); - openapiFields.add("email"); - openapiFields.add("display_name"); - openapiFields.add("groups"); - openapiFields.add("auto_create"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("persist_option"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PersistOptionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PersistOptionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PersistOptionEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetCustomAccessTokenRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetCustomAccessTokenRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetCustomAccessTokenRequest is not" - + " found in the empty JSON string", - GetCustomAccessTokenRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PersistOptionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERSIST_OPTION = "persist_option"; + @SerializedName(SERIALIZED_NAME_PERSIST_OPTION) + @javax.annotation.Nonnull + private PersistOptionEnum persistOption; + + public static final String SERIALIZED_NAME_FILTER_RULES = "filter_rules"; + @SerializedName(SERIALIZED_NAME_FILTER_RULES) + @javax.annotation.Nullable + private List filterRules; + + public static final String SERIALIZED_NAME_PARAMETER_VALUES = "parameter_values"; + @SerializedName(SERIALIZED_NAME_PARAMETER_VALUES) + @javax.annotation.Nullable + private List parameterValues; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; + @SerializedName(SERIALIZED_NAME_AUTO_CREATE) + @javax.annotation.Nullable + private Boolean autoCreate = true; + + public GetCustomAccessTokenRequest() { + } + + public GetCustomAccessTokenRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public GetCustomAccessTokenRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public GetCustomAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + * @return secretKey + */ + @javax.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + + public GetCustomAccessTokenRequest validityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + return this; + } + + /** + * Token validity duration in seconds + * @return validityTimeInSec + */ + @javax.annotation.Nullable + public Integer getValidityTimeInSec() { + return validityTimeInSec; + } + + public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + } + + + public GetCustomAccessTokenRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + public GetCustomAccessTokenRequest persistOption(@javax.annotation.Nonnull PersistOptionEnum persistOption) { + this.persistOption = persistOption; + return this; + } + + /** + * Indicates whether the specified attributes should be persisted or not. + * @return persistOption + */ + @javax.annotation.Nonnull + public PersistOptionEnum getPersistOption() { + return persistOption; + } + + public void setPersistOption(@javax.annotation.Nonnull PersistOptionEnum persistOption) { + this.persistOption = persistOption; + } + + + public GetCustomAccessTokenRequest filterRules(@javax.annotation.Nullable List filterRules) { + this.filterRules = filterRules; + return this; + } + + public GetCustomAccessTokenRequest addFilterRulesItem(FilterRules filterRulesItem) { + if (this.filterRules == null) { + this.filterRules = new ArrayList<>(); + } + this.filterRules.add(filterRulesItem); + return this; + } + + /** + * Filter rules. + * @return filterRules + */ + @javax.annotation.Nullable + public List getFilterRules() { + return filterRules; + } + + public void setFilterRules(@javax.annotation.Nullable List filterRules) { + this.filterRules = filterRules; + } + + + public GetCustomAccessTokenRequest parameterValues(@javax.annotation.Nullable List parameterValues) { + this.parameterValues = parameterValues; + return this; + } + + public GetCustomAccessTokenRequest addParameterValuesItem(ParameterValues parameterValuesItem) { + if (this.parameterValues == null) { + this.parameterValues = new ArrayList<>(); + } + this.parameterValues.add(parameterValuesItem); + return this; + } + + /** + * Parameter values. + * @return parameterValues + */ + @javax.annotation.Nullable + public List getParameterValues() { + return parameterValues; + } + + public void setParameterValues(@javax.annotation.Nullable List parameterValues) { + this.parameterValues = parameterValues; + } + + + public GetCustomAccessTokenRequest objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public GetCustomAccessTokenRequest addObjectsItem(TokenAccessScopeObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); + } + this.objects.add(objectsItem); + return this; + } + + /** + * Objects on which the filter rules and parameters values should be applied to + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + + public GetCustomAccessTokenRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public GetCustomAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public GetCustomAccessTokenRequest groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public GetCustomAccessTokenRequest addGroupsItem(GroupObject groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + + public GetCustomAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + return this; + } + + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. Version: 10.5.0.cl or later + * @return autoCreate + */ + @javax.annotation.Nullable + public Boolean getAutoCreate() { + return autoCreate; + } + + public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCustomAccessTokenRequest getCustomAccessTokenRequest = (GetCustomAccessTokenRequest) o; + return Objects.equals(this.username, getCustomAccessTokenRequest.username) && + Objects.equals(this.password, getCustomAccessTokenRequest.password) && + Objects.equals(this.secretKey, getCustomAccessTokenRequest.secretKey) && + Objects.equals(this.validityTimeInSec, getCustomAccessTokenRequest.validityTimeInSec) && + Objects.equals(this.orgIdentifier, getCustomAccessTokenRequest.orgIdentifier) && + Objects.equals(this.persistOption, getCustomAccessTokenRequest.persistOption) && + Objects.equals(this.filterRules, getCustomAccessTokenRequest.filterRules) && + Objects.equals(this.parameterValues, getCustomAccessTokenRequest.parameterValues) && + Objects.equals(this.objects, getCustomAccessTokenRequest.objects) && + Objects.equals(this.email, getCustomAccessTokenRequest.email) && + Objects.equals(this.displayName, getCustomAccessTokenRequest.displayName) && + Objects.equals(this.groups, getCustomAccessTokenRequest.groups) && + Objects.equals(this.autoCreate, getCustomAccessTokenRequest.autoCreate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, secretKey, validityTimeInSec, orgIdentifier, persistOption, filterRules, parameterValues, objects, email, displayName, groups, autoCreate); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCustomAccessTokenRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" validityTimeInSec: ").append(toIndentedString(validityTimeInSec)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" persistOption: ").append(toIndentedString(persistOption)).append("\n"); + sb.append(" filterRules: ").append(toIndentedString(filterRules)).append("\n"); + sb.append(" parameterValues: ").append(toIndentedString(parameterValues)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("secret_key"); + openapiFields.add("validity_time_in_sec"); + openapiFields.add("org_identifier"); + openapiFields.add("persist_option"); + openapiFields.add("filter_rules"); + openapiFields.add("parameter_values"); + openapiFields.add("objects"); + openapiFields.add("email"); + openapiFields.add("display_name"); + openapiFields.add("groups"); + openapiFields.add("auto_create"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("persist_option"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetCustomAccessTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetCustomAccessTokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetCustomAccessTokenRequest is not found in the empty JSON string", GetCustomAccessTokenRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetCustomAccessTokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetCustomAccessTokenRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetCustomAccessTokenRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetCustomAccessTokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetCustomAccessTokenRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetCustomAccessTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) - && !jsonObj.get("secret_key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `secret_key` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("secret_key").toString())); - } - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - if (!jsonObj.get("persist_option").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `persist_option` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("persist_option").toString())); - } - // validate the required field `persist_option` - PersistOptionEnum.validateJsonElement(jsonObj.get("persist_option")); - if (jsonObj.get("filter_rules") != null && !jsonObj.get("filter_rules").isJsonNull()) { - JsonArray jsonArrayfilterRules = jsonObj.getAsJsonArray("filter_rules"); - if (jsonArrayfilterRules != null) { - // ensure the json data is an array - if (!jsonObj.get("filter_rules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `filter_rules` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("filter_rules").toString())); - } - - // validate the optional field `filter_rules` (array) - for (int i = 0; i < jsonArrayfilterRules.size(); i++) { - FilterRules.validateJsonElement(jsonArrayfilterRules.get(i)); - } - ; - } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) && !jsonObj.get("secret_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secret_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret_key").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + if (!jsonObj.get("persist_option").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `persist_option` to be a primitive type in the JSON string but got `%s`", jsonObj.get("persist_option").toString())); + } + // validate the required field `persist_option` + PersistOptionEnum.validateJsonElement(jsonObj.get("persist_option")); + if (jsonObj.get("filter_rules") != null && !jsonObj.get("filter_rules").isJsonNull()) { + JsonArray jsonArrayfilterRules = jsonObj.getAsJsonArray("filter_rules"); + if (jsonArrayfilterRules != null) { + // ensure the json data is an array + if (!jsonObj.get("filter_rules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `filter_rules` to be an array in the JSON string but got `%s`", jsonObj.get("filter_rules").toString())); + } + + // validate the optional field `filter_rules` (array) + for (int i = 0; i < jsonArrayfilterRules.size(); i++) { + FilterRules.validateJsonElement(jsonArrayfilterRules.get(i)); + }; } - if (jsonObj.get("parameter_values") != null - && !jsonObj.get("parameter_values").isJsonNull()) { - JsonArray jsonArrayparameterValues = jsonObj.getAsJsonArray("parameter_values"); - if (jsonArrayparameterValues != null) { - // ensure the json data is an array - if (!jsonObj.get("parameter_values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameter_values` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("parameter_values").toString())); - } - - // validate the optional field `parameter_values` (array) - for (int i = 0; i < jsonArrayparameterValues.size(); i++) { - ParameterValues.validateJsonElement(jsonArrayparameterValues.get(i)); - } - ; - } + } + if (jsonObj.get("parameter_values") != null && !jsonObj.get("parameter_values").isJsonNull()) { + JsonArray jsonArrayparameterValues = jsonObj.getAsJsonArray("parameter_values"); + if (jsonArrayparameterValues != null) { + // ensure the json data is an array + if (!jsonObj.get("parameter_values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameter_values` to be an array in the JSON string but got `%s`", jsonObj.get("parameter_values").toString())); + } + + // validate the optional field `parameter_values` (array) + for (int i = 0; i < jsonArrayparameterValues.size(); i++) { + ParameterValues.validateJsonElement(jsonArrayparameterValues.get(i)); + }; } - if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { - JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); - if (jsonArrayobjects != null) { - // ensure the json data is an array - if (!jsonObj.get("objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `objects` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("objects").toString())); - } - - // validate the optional field `objects` (array) - for (int i = 0; i < jsonArrayobjects.size(); i++) { - TokenAccessScopeObject.validateJsonElement(jsonArrayobjects.get(i)); - } - ; - } + } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `objects` to be an array in the JSON string but got `%s`", jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + TokenAccessScopeObject.validateJsonElement(jsonArrayobjects.get(i)); + }; } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GroupObject.validateJsonElement(jsonArraygroups.get(i)); + }; } - if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { - JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); - if (jsonArraygroups != null) { - // ensure the json data is an array - if (!jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups").toString())); - } - - // validate the optional field `groups` (array) - for (int i = 0; i < jsonArraygroups.size(); i++) { - GroupObject.validateJsonElement(jsonArraygroups.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetCustomAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetCustomAccessTokenRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GetCustomAccessTokenRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetCustomAccessTokenRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetCustomAccessTokenRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of GetCustomAccessTokenRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetCustomAccessTokenRequest - * @throws IOException if the JSON string is invalid with respect to GetCustomAccessTokenRequest - */ - public static GetCustomAccessTokenRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetCustomAccessTokenRequest.class); - } - - /** - * Convert an instance of GetCustomAccessTokenRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetCustomAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetCustomAccessTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetCustomAccessTokenRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetCustomAccessTokenRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetCustomAccessTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetCustomAccessTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetCustomAccessTokenRequest + * @throws IOException if the JSON string is invalid with respect to GetCustomAccessTokenRequest + */ + public static GetCustomAccessTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetCustomAccessTokenRequest.class); + } + + /** + * Convert an instance of GetCustomAccessTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java index 67cd10218..5436005c3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java @@ -4,209 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** GetDataSourceSuggestionsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetDataSourceSuggestionsRequest implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_QUERY = "query"; +/** + * GetDataSourceSuggestionsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetDataSourceSuggestionsRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_QUERY) - @javax.annotation.Nonnull - private String query; + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nonnull + private String query; - public GetDataSourceSuggestionsRequest() {} + public GetDataSourceSuggestionsRequest() { + } - public GetDataSourceSuggestionsRequest query(@javax.annotation.Nonnull String query) { - this.query = query; - return this; - } + public GetDataSourceSuggestionsRequest query(@javax.annotation.Nonnull String query) { + this.query = query; + return this; + } - /** - * User query used to suggest data sources. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } + /** + * User query used to suggest data sources. + * @return query + */ + @javax.annotation.Nonnull + public String getQuery() { + return query; + } - public void setQuery(@javax.annotation.Nonnull String query) { - this.query = query; - } + public void setQuery(@javax.annotation.Nonnull String query) { + this.query = query; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = - (GetDataSourceSuggestionsRequest) o; - return Objects.equals(this.query, getDataSourceSuggestionsRequest.query); - } - @Override - public int hashCode() { - return Objects.hash(query); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetDataSourceSuggestionsRequest {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("query"); + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = (GetDataSourceSuggestionsRequest) o; + return Objects.equals(this.query, getDataSourceSuggestionsRequest.query); + } + + @Override + public int hashCode() { + return Objects.hash(query); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDataSourceSuggestionsRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetDataSourceSuggestionsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetDataSourceSuggestionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetDataSourceSuggestionsRequest is" - + " not found in the empty JSON string", - GetDataSourceSuggestionsRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetDataSourceSuggestionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetDataSourceSuggestionsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetDataSourceSuggestionsRequest is not found in the empty JSON string", GetDataSourceSuggestionsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetDataSourceSuggestionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetDataSourceSuggestionsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetDataSourceSuggestionsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetDataSourceSuggestionsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetDataSourceSuggestionsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetDataSourceSuggestionsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("query").toString())); - } - } + if (!jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetDataSourceSuggestionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetDataSourceSuggestionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetDataSourceSuggestionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetDataSourceSuggestionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetDataSourceSuggestionsRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetDataSourceSuggestionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetDataSourceSuggestionsRequest - * @throws IOException if the JSON string is invalid with respect to - * GetDataSourceSuggestionsRequest - */ - public static GetDataSourceSuggestionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetDataSourceSuggestionsRequest.class); - } - - /** - * Convert an instance of GetDataSourceSuggestionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetDataSourceSuggestionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetDataSourceSuggestionsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetDataSourceSuggestionsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetDataSourceSuggestionsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetDataSourceSuggestionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of GetDataSourceSuggestionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetDataSourceSuggestionsRequest + * @throws IOException if the JSON string is invalid with respect to GetDataSourceSuggestionsRequest + */ + public static GetDataSourceSuggestionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetDataSourceSuggestionsRequest.class); + } + + /** + * Convert an instance of GetDataSourceSuggestionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java index 94092879b..5f0d16c5f 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 @@ -4,522 +4,491 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserParameterOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** GetFullAccessTokenRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetFullAccessTokenRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nonnull - private String username; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password = ""; - - public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; - - @SerializedName(SERIALIZED_NAME_SECRET_KEY) - @javax.annotation.Nullable - private String secretKey = ""; - - public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; - - @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) - @javax.annotation.Nullable - private Integer validityTimeInSec = 300; - - public static final String SERIALIZED_NAME_ORG_ID = "org_id"; - - @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable - private Integer orgId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; - - @SerializedName(SERIALIZED_NAME_AUTO_CREATE) - @javax.annotation.Nullable - private Boolean autoCreate = false; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - public GetFullAccessTokenRequest() {} - - public GetFullAccessTokenRequest username(@javax.annotation.Nonnull String username) { - this.username = username; - return this; - } - - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of - * the user object. - * - * @return username - */ - @javax.annotation.Nonnull - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nonnull String username) { - this.username = username; - } - - public GetFullAccessTokenRequest password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password of the user account - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public GetFullAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { - this.secretKey = secretKey; - return this; - } - - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a - * secret key when Trusted authentication is enabled. - * - * @return secretKey - */ - @javax.annotation.Nullable - public String getSecretKey() { - return secretKey; - } - - public void setSecretKey(@javax.annotation.Nullable String secretKey) { - this.secretKey = secretKey; - } - - public GetFullAccessTokenRequest validityTimeInSec( - @javax.annotation.Nullable Integer validityTimeInSec) { - this.validityTimeInSec = validityTimeInSec; - return this; - } - - /** - * Token validity duration in seconds - * - * @return validityTimeInSec - */ - @javax.annotation.Nullable - public Integer getValidityTimeInSec() { - return validityTimeInSec; - } - - public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { - this.validityTimeInSec = validityTimeInSec; - } - - public GetFullAccessTokenRequest orgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided - * then user will be logged into the org corresponding to the secret key, and if secret key is - * not provided then user will be logged in to the Org context of their previous login session. - * - * @return orgId - */ - @javax.annotation.Nullable - public Integer getOrgId() { - return orgId; - } - - public void setOrgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - } - - public GetFullAccessTokenRequest email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email address of the user. Specify this attribute when creating a new user (just-in-time - * (JIT) provisioning). - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public GetFullAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Indicates display name of the user. Use this parameter to provision a user just-in-time - * (JIT). - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - } - - public GetFullAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { - this.autoCreate = autoCreate; - return this; - } - - /** - * Creates a new user if the specified username does not already exist in ThoughtSpot. To - * provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning - * of a user, the secret_key is required. - * - * @return autoCreate - */ - @javax.annotation.Nullable - public Boolean getAutoCreate() { - return autoCreate; - } - - public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { - this.autoCreate = autoCreate; - } - - public GetFullAccessTokenRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; - } - - public GetFullAccessTokenRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); - } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } - - /** - * ID or name of the groups to which the newly created user belongs. Use this parameter to - * provision a user just-in-time (JIT). - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; - } - - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFullAccessTokenRequest getFullAccessTokenRequest = (GetFullAccessTokenRequest) o; - return Objects.equals(this.username, getFullAccessTokenRequest.username) - && Objects.equals(this.password, getFullAccessTokenRequest.password) - && Objects.equals(this.secretKey, getFullAccessTokenRequest.secretKey) - && Objects.equals( - this.validityTimeInSec, getFullAccessTokenRequest.validityTimeInSec) - && Objects.equals(this.orgId, getFullAccessTokenRequest.orgId) - && Objects.equals(this.email, getFullAccessTokenRequest.email) - && Objects.equals(this.displayName, getFullAccessTokenRequest.displayName) - && Objects.equals(this.autoCreate, getFullAccessTokenRequest.autoCreate) - && Objects.equals( - this.groupIdentifiers, getFullAccessTokenRequest.groupIdentifiers); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - username, - password, - secretKey, - validityTimeInSec, - orgId, - email, - displayName, - autoCreate, - groupIdentifiers); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetFullAccessTokenRequest {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); - sb.append(" validityTimeInSec: ") - .append(toIndentedString(validityTimeInSec)) - .append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("secret_key"); - openapiFields.add("validity_time_in_sec"); - openapiFields.add("org_id"); - openapiFields.add("email"); - openapiFields.add("display_name"); - openapiFields.add("auto_create"); - openapiFields.add("group_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetFullAccessTokenRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetFullAccessTokenRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetFullAccessTokenRequest is not" - + " found in the empty JSON string", - GetFullAccessTokenRequest.openapiRequiredFields.toString())); - } +/** + * GetFullAccessTokenRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetFullAccessTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password = ""; + + public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @javax.annotation.Nullable + private String secretKey = ""; + + public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; + @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) + @javax.annotation.Nullable + private Integer validityTimeInSec = 300; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; + @SerializedName(SERIALIZED_NAME_AUTO_CREATE) + @javax.annotation.Nullable + private Boolean autoCreate = false; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; + @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) + @javax.annotation.Nullable + private UserParameterOptions userParameters; + + public GetFullAccessTokenRequest() { + } + + public GetFullAccessTokenRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public GetFullAccessTokenRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public GetFullAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + * @return secretKey + */ + @javax.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + + public GetFullAccessTokenRequest validityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + return this; + } + + /** + * Token validity duration in seconds + * @return validityTimeInSec + */ + @javax.annotation.Nullable + public Integer getValidityTimeInSec() { + return validityTimeInSec; + } + + public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + } + + + public GetFullAccessTokenRequest orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public GetFullAccessTokenRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public GetFullAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public GetFullAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + return this; + } + + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + * @return autoCreate + */ + @javax.annotation.Nullable + public Boolean getAutoCreate() { + return autoCreate; + } + + public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + } + + + public GetFullAccessTokenRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public GetFullAccessTokenRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public GetFullAccessTokenRequest userParameters(@javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + return this; + } + + /** + * <div>Deprecated: 10.4.0.cl and later </div> Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + * @return userParameters + */ + @javax.annotation.Nullable + public UserParameterOptions getUserParameters() { + return userParameters; + } + + public void setUserParameters(@javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFullAccessTokenRequest getFullAccessTokenRequest = (GetFullAccessTokenRequest) o; + return Objects.equals(this.username, getFullAccessTokenRequest.username) && + Objects.equals(this.password, getFullAccessTokenRequest.password) && + Objects.equals(this.secretKey, getFullAccessTokenRequest.secretKey) && + Objects.equals(this.validityTimeInSec, getFullAccessTokenRequest.validityTimeInSec) && + Objects.equals(this.orgId, getFullAccessTokenRequest.orgId) && + Objects.equals(this.email, getFullAccessTokenRequest.email) && + Objects.equals(this.displayName, getFullAccessTokenRequest.displayName) && + Objects.equals(this.autoCreate, getFullAccessTokenRequest.autoCreate) && + Objects.equals(this.groupIdentifiers, getFullAccessTokenRequest.groupIdentifiers) && + Objects.equals(this.userParameters, getFullAccessTokenRequest.userParameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, secretKey, validityTimeInSec, orgId, email, displayName, autoCreate, groupIdentifiers, userParameters); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFullAccessTokenRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" validityTimeInSec: ").append(toIndentedString(validityTimeInSec)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("secret_key"); + openapiFields.add("validity_time_in_sec"); + openapiFields.add("org_id"); + openapiFields.add("email"); + openapiFields.add("display_name"); + openapiFields.add("auto_create"); + openapiFields.add("group_identifiers"); + openapiFields.add("user_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetFullAccessTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetFullAccessTokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetFullAccessTokenRequest is not found in the empty JSON string", GetFullAccessTokenRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetFullAccessTokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetFullAccessTokenRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetFullAccessTokenRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetFullAccessTokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetFullAccessTokenRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetFullAccessTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) - && !jsonObj.get("secret_key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `secret_key` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("secret_key").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetFullAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetFullAccessTokenRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GetFullAccessTokenRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetFullAccessTokenRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetFullAccessTokenRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetFullAccessTokenRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetFullAccessTokenRequest - * @throws IOException if the JSON string is invalid with respect to GetFullAccessTokenRequest - */ - public static GetFullAccessTokenRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetFullAccessTokenRequest.class); - } - - /** - * Convert an instance of GetFullAccessTokenRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) && !jsonObj.get("secret_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secret_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret_key").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + // validate the optional field `user_parameters` + if (jsonObj.get("user_parameters") != null && !jsonObj.get("user_parameters").isJsonNull()) { + UserParameterOptions.validateJsonElement(jsonObj.get("user_parameters")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetFullAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetFullAccessTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetFullAccessTokenRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetFullAccessTokenRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetFullAccessTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetFullAccessTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetFullAccessTokenRequest + * @throws IOException if the JSON string is invalid with respect to GetFullAccessTokenRequest + */ + public static GetFullAccessTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetFullAccessTokenRequest.class); + } + + /** + * Convert an instance of GetFullAccessTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java index d0965b8d6..fefbf65e5 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 @@ -4,561 +4,521 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserParameterOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** GetObjectAccessTokenRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetObjectAccessTokenRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nonnull - private String username; - - public static final String SERIALIZED_NAME_OBJECT_ID = "object_id"; - - @SerializedName(SERIALIZED_NAME_OBJECT_ID) - @javax.annotation.Nullable - private String objectId; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password = ""; - - public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; - - @SerializedName(SERIALIZED_NAME_SECRET_KEY) - @javax.annotation.Nullable - private String secretKey = ""; - - public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; - - @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) - @javax.annotation.Nullable - private Integer validityTimeInSec = 300; - - public static final String SERIALIZED_NAME_ORG_ID = "org_id"; - - @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable - private Integer orgId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; - - @SerializedName(SERIALIZED_NAME_AUTO_CREATE) - @javax.annotation.Nullable - private Boolean autoCreate = false; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - public GetObjectAccessTokenRequest() {} - - public GetObjectAccessTokenRequest username(@javax.annotation.Nonnull String username) { - this.username = username; - return this; - } - - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of - * the user object. - * - * @return username - */ - @javax.annotation.Nonnull - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nonnull String username) { - this.username = username; - } - - public GetObjectAccessTokenRequest objectId(@javax.annotation.Nullable String objectId) { - this.objectId = objectId; - return this; - } - - /** - * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have - * access to the object specified in the API request. - * - * @return objectId - */ - @javax.annotation.Nullable - public String getObjectId() { - return objectId; - } - - public void setObjectId(@javax.annotation.Nullable String objectId) { - this.objectId = objectId; - } - - public GetObjectAccessTokenRequest password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password of the user account - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public GetObjectAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { - this.secretKey = secretKey; - return this; - } - - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a - * secret key when Trusted authentication is enabled. - * - * @return secretKey - */ - @javax.annotation.Nullable - public String getSecretKey() { - return secretKey; - } - - public void setSecretKey(@javax.annotation.Nullable String secretKey) { - this.secretKey = secretKey; - } - - public GetObjectAccessTokenRequest validityTimeInSec( - @javax.annotation.Nullable Integer validityTimeInSec) { - this.validityTimeInSec = validityTimeInSec; - return this; - } - - /** - * Token validity duration in seconds - * - * @return validityTimeInSec - */ - @javax.annotation.Nullable - public Integer getValidityTimeInSec() { - return validityTimeInSec; - } - - public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { - this.validityTimeInSec = validityTimeInSec; - } - - public GetObjectAccessTokenRequest orgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided - * then user will be logged into the org corresponding to the secret key, and if secret key is - * not provided then user will be logged in to the Org context of their previous login session. - * - * @return orgId - */ - @javax.annotation.Nullable - public Integer getOrgId() { - return orgId; - } - - public void setOrgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - } - - public GetObjectAccessTokenRequest email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email address of the user. Specify this attribute when creating a new user (just-in-time - * (JIT) provisioning). - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public GetObjectAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) - * provisioning). - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - } - - public GetObjectAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { - this.autoCreate = autoCreate; - return this; - } - - /** - * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a - * user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, - * the secret_key is required. - * - * @return autoCreate - */ - @javax.annotation.Nullable - public Boolean getAutoCreate() { - return autoCreate; - } - - public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { - this.autoCreate = autoCreate; - } - - public GetObjectAccessTokenRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; - } - - public GetObjectAccessTokenRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); - } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } - - /** - * Unique ID or name of the groups to which you want to assign the new user. You can specify - * this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; - } - - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetObjectAccessTokenRequest getObjectAccessTokenRequest = (GetObjectAccessTokenRequest) o; - return Objects.equals(this.username, getObjectAccessTokenRequest.username) - && Objects.equals(this.objectId, getObjectAccessTokenRequest.objectId) - && Objects.equals(this.password, getObjectAccessTokenRequest.password) - && Objects.equals(this.secretKey, getObjectAccessTokenRequest.secretKey) - && Objects.equals( - this.validityTimeInSec, getObjectAccessTokenRequest.validityTimeInSec) - && Objects.equals(this.orgId, getObjectAccessTokenRequest.orgId) - && Objects.equals(this.email, getObjectAccessTokenRequest.email) - && Objects.equals(this.displayName, getObjectAccessTokenRequest.displayName) - && Objects.equals(this.autoCreate, getObjectAccessTokenRequest.autoCreate) - && Objects.equals( - this.groupIdentifiers, getObjectAccessTokenRequest.groupIdentifiers); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - username, - objectId, - password, - secretKey, - validityTimeInSec, - orgId, - email, - displayName, - autoCreate, - groupIdentifiers); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetObjectAccessTokenRequest {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" objectId: ").append(toIndentedString(objectId)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); - sb.append(" validityTimeInSec: ") - .append(toIndentedString(validityTimeInSec)) - .append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("object_id"); - openapiFields.add("password"); - openapiFields.add("secret_key"); - openapiFields.add("validity_time_in_sec"); - openapiFields.add("org_id"); - openapiFields.add("email"); - openapiFields.add("display_name"); - openapiFields.add("auto_create"); - openapiFields.add("group_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetObjectAccessTokenRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetObjectAccessTokenRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetObjectAccessTokenRequest is not" - + " found in the empty JSON string", - GetObjectAccessTokenRequest.openapiRequiredFields.toString())); - } +/** + * GetObjectAccessTokenRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetObjectAccessTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_OBJECT_ID = "object_id"; + @SerializedName(SERIALIZED_NAME_OBJECT_ID) + @javax.annotation.Nullable + private String objectId; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password = ""; + + public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @javax.annotation.Nullable + private String secretKey = ""; + + public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; + @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) + @javax.annotation.Nullable + private Integer validityTimeInSec = 300; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; + @SerializedName(SERIALIZED_NAME_AUTO_CREATE) + @javax.annotation.Nullable + private Boolean autoCreate = false; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; + @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) + @javax.annotation.Nullable + private UserParameterOptions userParameters; + + public GetObjectAccessTokenRequest() { + } + + public GetObjectAccessTokenRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public GetObjectAccessTokenRequest objectId(@javax.annotation.Nullable String objectId) { + this.objectId = objectId; + return this; + } + + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. + * @return objectId + */ + @javax.annotation.Nullable + public String getObjectId() { + return objectId; + } + + public void setObjectId(@javax.annotation.Nullable String objectId) { + this.objectId = objectId; + } + + + public GetObjectAccessTokenRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public GetObjectAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + * @return secretKey + */ + @javax.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + + public GetObjectAccessTokenRequest validityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + return this; + } + + /** + * Token validity duration in seconds + * @return validityTimeInSec + */ + @javax.annotation.Nullable + public Integer getValidityTimeInSec() { + return validityTimeInSec; + } + + public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + } + + + public GetObjectAccessTokenRequest orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public GetObjectAccessTokenRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public GetObjectAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public GetObjectAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + return this; + } + + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + * @return autoCreate + */ + @javax.annotation.Nullable + public Boolean getAutoCreate() { + return autoCreate; + } + + public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + } + + + public GetObjectAccessTokenRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public GetObjectAccessTokenRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public GetObjectAccessTokenRequest userParameters(@javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + return this; + } + + /** + * <div>Deprecated: 10.4.0.cl and later </div> Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + * @return userParameters + */ + @javax.annotation.Nullable + public UserParameterOptions getUserParameters() { + return userParameters; + } + + public void setUserParameters(@javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetObjectAccessTokenRequest getObjectAccessTokenRequest = (GetObjectAccessTokenRequest) o; + return Objects.equals(this.username, getObjectAccessTokenRequest.username) && + Objects.equals(this.objectId, getObjectAccessTokenRequest.objectId) && + Objects.equals(this.password, getObjectAccessTokenRequest.password) && + Objects.equals(this.secretKey, getObjectAccessTokenRequest.secretKey) && + Objects.equals(this.validityTimeInSec, getObjectAccessTokenRequest.validityTimeInSec) && + Objects.equals(this.orgId, getObjectAccessTokenRequest.orgId) && + Objects.equals(this.email, getObjectAccessTokenRequest.email) && + Objects.equals(this.displayName, getObjectAccessTokenRequest.displayName) && + Objects.equals(this.autoCreate, getObjectAccessTokenRequest.autoCreate) && + Objects.equals(this.groupIdentifiers, getObjectAccessTokenRequest.groupIdentifiers) && + Objects.equals(this.userParameters, getObjectAccessTokenRequest.userParameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, objectId, password, secretKey, validityTimeInSec, orgId, email, displayName, autoCreate, groupIdentifiers, userParameters); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetObjectAccessTokenRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" objectId: ").append(toIndentedString(objectId)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" validityTimeInSec: ").append(toIndentedString(validityTimeInSec)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("object_id"); + openapiFields.add("password"); + openapiFields.add("secret_key"); + openapiFields.add("validity_time_in_sec"); + openapiFields.add("org_id"); + openapiFields.add("email"); + openapiFields.add("display_name"); + openapiFields.add("auto_create"); + openapiFields.add("group_identifiers"); + openapiFields.add("user_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetObjectAccessTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetObjectAccessTokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetObjectAccessTokenRequest is not found in the empty JSON string", GetObjectAccessTokenRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetObjectAccessTokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetObjectAccessTokenRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetObjectAccessTokenRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetObjectAccessTokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetObjectAccessTokenRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetObjectAccessTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if ((jsonObj.get("object_id") != null && !jsonObj.get("object_id").isJsonNull()) - && !jsonObj.get("object_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `object_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("object_id").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) - && !jsonObj.get("secret_key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `secret_key` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("secret_key").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetObjectAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetObjectAccessTokenRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GetObjectAccessTokenRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetObjectAccessTokenRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetObjectAccessTokenRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetObjectAccessTokenRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetObjectAccessTokenRequest - * @throws IOException if the JSON string is invalid with respect to GetObjectAccessTokenRequest - */ - public static GetObjectAccessTokenRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetObjectAccessTokenRequest.class); - } - - /** - * Convert an instance of GetObjectAccessTokenRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("object_id") != null && !jsonObj.get("object_id").isJsonNull()) && !jsonObj.get("object_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_id").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) && !jsonObj.get("secret_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secret_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret_key").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + // validate the optional field `user_parameters` + if (jsonObj.get("user_parameters") != null && !jsonObj.get("user_parameters").isJsonNull()) { + UserParameterOptions.validateJsonElement(jsonObj.get("user_parameters")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetObjectAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetObjectAccessTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetObjectAccessTokenRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetObjectAccessTokenRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetObjectAccessTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetObjectAccessTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetObjectAccessTokenRequest + * @throws IOException if the JSON string is invalid with respect to GetObjectAccessTokenRequest + */ + public static GetObjectAccessTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetObjectAccessTokenRequest.class); + } + + /** + * Convert an instance of GetObjectAccessTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java index 1209f3aee..ce09d0b9d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java @@ -4,352 +4,334 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AIContext; +import com.thoughtspot.client.model.MetadataContext; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** GetRelevantQuestionsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetRelevantQuestionsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_CONTEXT = "metadata_context"; - - @SerializedName(SERIALIZED_NAME_METADATA_CONTEXT) - @javax.annotation.Nonnull - private MetadataContext metadataContext; - - public static final String SERIALIZED_NAME_LIMIT_RELEVANT_QUESTIONS = - "limit_relevant_questions"; - - @SerializedName(SERIALIZED_NAME_LIMIT_RELEVANT_QUESTIONS) - @javax.annotation.Nullable - private Integer limitRelevantQuestions; - - public static final String SERIALIZED_NAME_BYPASS_CACHE = "bypass_cache"; - - @SerializedName(SERIALIZED_NAME_BYPASS_CACHE) - @javax.annotation.Nullable - private Boolean bypassCache; - - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) - @javax.annotation.Nonnull - private String query; - - public static final String SERIALIZED_NAME_AI_CONTEXT = "ai_context"; - - @SerializedName(SERIALIZED_NAME_AI_CONTEXT) - @javax.annotation.Nullable - private AIContext aiContext; - - public GetRelevantQuestionsRequest() {} - - public GetRelevantQuestionsRequest metadataContext( - @javax.annotation.Nonnull MetadataContext metadataContext) { - this.metadataContext = metadataContext; - return this; - } - - /** - * metadata for the query to enable generation of relevant sub-questions; at least one context - * identifier is required. - * - * @return metadataContext - */ - @javax.annotation.Nonnull - public MetadataContext getMetadataContext() { - return metadataContext; - } - - public void setMetadataContext(@javax.annotation.Nonnull MetadataContext metadataContext) { - this.metadataContext = metadataContext; - } - - public GetRelevantQuestionsRequest limitRelevantQuestions( - @javax.annotation.Nullable Integer limitRelevantQuestions) { - this.limitRelevantQuestions = limitRelevantQuestions; - return this; - } - - /** - * Maximum number of relevant questions that is allowed in the response, default = 5. - * - * @return limitRelevantQuestions - */ - @javax.annotation.Nullable - public Integer getLimitRelevantQuestions() { - return limitRelevantQuestions; - } - - public void setLimitRelevantQuestions( - @javax.annotation.Nullable Integer limitRelevantQuestions) { - this.limitRelevantQuestions = limitRelevantQuestions; - } - - public GetRelevantQuestionsRequest bypassCache(@javax.annotation.Nullable Boolean bypassCache) { - this.bypassCache = bypassCache; - return this; - } - /** - * If true, results are not returned from cache & calculated every time. - * - * @return bypassCache - */ - @javax.annotation.Nullable - public Boolean getBypassCache() { - return bypassCache; - } - - public void setBypassCache(@javax.annotation.Nullable Boolean bypassCache) { - this.bypassCache = bypassCache; - } - - public GetRelevantQuestionsRequest query(@javax.annotation.Nonnull String query) { - this.query = query; - return this; - } - - /** - * A user query that requires breaking down into smaller, more manageable analytical questions - * to facilitate better understanding and analysis. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public void setQuery(@javax.annotation.Nonnull String query) { - this.query = query; - } - - public GetRelevantQuestionsRequest aiContext(@javax.annotation.Nullable AIContext aiContext) { - this.aiContext = aiContext; - return this; - } - - /** - * Additional context to guide the response. - * - * @return aiContext - */ - @javax.annotation.Nullable - public AIContext getAiContext() { - return aiContext; - } - - public void setAiContext(@javax.annotation.Nullable AIContext aiContext) { - this.aiContext = aiContext; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRelevantQuestionsRequest getRelevantQuestionsRequest = (GetRelevantQuestionsRequest) o; - return Objects.equals(this.metadataContext, getRelevantQuestionsRequest.metadataContext) - && Objects.equals( - this.limitRelevantQuestions, - getRelevantQuestionsRequest.limitRelevantQuestions) - && Objects.equals(this.bypassCache, getRelevantQuestionsRequest.bypassCache) - && Objects.equals(this.query, getRelevantQuestionsRequest.query) - && Objects.equals(this.aiContext, getRelevantQuestionsRequest.aiContext); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(metadataContext, limitRelevantQuestions, bypassCache, query, aiContext); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * GetRelevantQuestionsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetRelevantQuestionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_CONTEXT = "metadata_context"; + @SerializedName(SERIALIZED_NAME_METADATA_CONTEXT) + @javax.annotation.Nonnull + private MetadataContext metadataContext; + + public static final String SERIALIZED_NAME_LIMIT_RELEVANT_QUESTIONS = "limit_relevant_questions"; + @SerializedName(SERIALIZED_NAME_LIMIT_RELEVANT_QUESTIONS) + @javax.annotation.Nullable + private Integer limitRelevantQuestions; + + public static final String SERIALIZED_NAME_BYPASS_CACHE = "bypass_cache"; + @SerializedName(SERIALIZED_NAME_BYPASS_CACHE) + @javax.annotation.Nullable + private Boolean bypassCache; + + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nonnull + private String query; + + public static final String SERIALIZED_NAME_AI_CONTEXT = "ai_context"; + @SerializedName(SERIALIZED_NAME_AI_CONTEXT) + @javax.annotation.Nullable + private AIContext aiContext; + + public GetRelevantQuestionsRequest() { + } + + public GetRelevantQuestionsRequest metadataContext(@javax.annotation.Nonnull MetadataContext metadataContext) { + this.metadataContext = metadataContext; + return this; + } + + /** + * metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. + * @return metadataContext + */ + @javax.annotation.Nonnull + public MetadataContext getMetadataContext() { + return metadataContext; + } + + public void setMetadataContext(@javax.annotation.Nonnull MetadataContext metadataContext) { + this.metadataContext = metadataContext; + } + + + public GetRelevantQuestionsRequest limitRelevantQuestions(@javax.annotation.Nullable Integer limitRelevantQuestions) { + this.limitRelevantQuestions = limitRelevantQuestions; + return this; + } + + /** + * Maximum number of relevant questions that is allowed in the response, default = 5. + * @return limitRelevantQuestions + */ + @javax.annotation.Nullable + public Integer getLimitRelevantQuestions() { + return limitRelevantQuestions; + } + + public void setLimitRelevantQuestions(@javax.annotation.Nullable Integer limitRelevantQuestions) { + this.limitRelevantQuestions = limitRelevantQuestions; + } + + + public GetRelevantQuestionsRequest bypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + return this; + } + + /** + * If true, results are not returned from cache & calculated every time. + * @return bypassCache + */ + @javax.annotation.Nullable + public Boolean getBypassCache() { + return bypassCache; + } + + public void setBypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + } + + + public GetRelevantQuestionsRequest query(@javax.annotation.Nonnull String query) { + this.query = query; + return this; + } + + /** + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. + * @return query + */ + @javax.annotation.Nonnull + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nonnull String query) { + this.query = query; + } + + + public GetRelevantQuestionsRequest aiContext(@javax.annotation.Nullable AIContext aiContext) { + this.aiContext = aiContext; + return this; + } + + /** + * Additional context to guide the response. + * @return aiContext + */ + @javax.annotation.Nullable + public AIContext getAiContext() { + return aiContext; + } + + public void setAiContext(@javax.annotation.Nullable AIContext aiContext) { + this.aiContext = aiContext; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetRelevantQuestionsRequest {\n"); - sb.append(" metadataContext: ").append(toIndentedString(metadataContext)).append("\n"); - sb.append(" limitRelevantQuestions: ") - .append(toIndentedString(limitRelevantQuestions)) - .append("\n"); - sb.append(" bypassCache: ").append(toIndentedString(bypassCache)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" aiContext: ").append(toIndentedString(aiContext)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + GetRelevantQuestionsRequest getRelevantQuestionsRequest = (GetRelevantQuestionsRequest) o; + return Objects.equals(this.metadataContext, getRelevantQuestionsRequest.metadataContext) && + Objects.equals(this.limitRelevantQuestions, getRelevantQuestionsRequest.limitRelevantQuestions) && + Objects.equals(this.bypassCache, getRelevantQuestionsRequest.bypassCache) && + Objects.equals(this.query, getRelevantQuestionsRequest.query) && + Objects.equals(this.aiContext, getRelevantQuestionsRequest.aiContext); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataContext, limitRelevantQuestions, bypassCache, query, aiContext); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_context"); - openapiFields.add("limit_relevant_questions"); - openapiFields.add("bypass_cache"); - openapiFields.add("query"); - openapiFields.add("ai_context"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_context"); - openapiRequiredFields.add("query"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetRelevantQuestionsRequest {\n"); + sb.append(" metadataContext: ").append(toIndentedString(metadataContext)).append("\n"); + sb.append(" limitRelevantQuestions: ").append(toIndentedString(limitRelevantQuestions)).append("\n"); + sb.append(" bypassCache: ").append(toIndentedString(bypassCache)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" aiContext: ").append(toIndentedString(aiContext)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetRelevantQuestionsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetRelevantQuestionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetRelevantQuestionsRequest is not" - + " found in the empty JSON string", - GetRelevantQuestionsRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_context"); + openapiFields.add("limit_relevant_questions"); + openapiFields.add("bypass_cache"); + openapiFields.add("query"); + openapiFields.add("ai_context"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_context"); + openapiRequiredFields.add("query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetRelevantQuestionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetRelevantQuestionsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetRelevantQuestionsRequest is not found in the empty JSON string", GetRelevantQuestionsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetRelevantQuestionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetRelevantQuestionsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetRelevantQuestionsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetRelevantQuestionsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetRelevantQuestionsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetRelevantQuestionsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `metadata_context` - MetadataContext.validateJsonElement(jsonObj.get("metadata_context")); - if (!jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("query").toString())); - } - // validate the optional field `ai_context` - if (jsonObj.get("ai_context") != null && !jsonObj.get("ai_context").isJsonNull()) { - AIContext.validateJsonElement(jsonObj.get("ai_context")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetRelevantQuestionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetRelevantQuestionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GetRelevantQuestionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetRelevantQuestionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetRelevantQuestionsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetRelevantQuestionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetRelevantQuestionsRequest - * @throws IOException if the JSON string is invalid with respect to GetRelevantQuestionsRequest - */ - public static GetRelevantQuestionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetRelevantQuestionsRequest.class); - } - - /** - * Convert an instance of GetRelevantQuestionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `metadata_context` + MetadataContext.validateJsonElement(jsonObj.get("metadata_context")); + if (!jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + // validate the optional field `ai_context` + if (jsonObj.get("ai_context") != null && !jsonObj.get("ai_context").isJsonNull()) { + AIContext.validateJsonElement(jsonObj.get("ai_context")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetRelevantQuestionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetRelevantQuestionsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetRelevantQuestionsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetRelevantQuestionsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetRelevantQuestionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of GetRelevantQuestionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetRelevantQuestionsRequest + * @throws IOException if the JSON string is invalid with respect to GetRelevantQuestionsRequest + */ + public static GetRelevantQuestionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetRelevantQuestionsRequest.class); + } + + /** + * Convert an instance of GetRelevantQuestionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java index fce59a47e..b86b4cf6b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java @@ -4,346 +4,323 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** GetTokenResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetTokenResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - - @SerializedName(SERIALIZED_NAME_TOKEN) - @javax.annotation.Nonnull - private String token; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = - "expiration_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float expirationTimeInMillis; - - public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; - - @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) - @javax.annotation.Nonnull - private String validForUserId; - - public static final String SERIALIZED_NAME_VALID_FOR_USERNAME = "valid_for_username"; - - @SerializedName(SERIALIZED_NAME_VALID_FOR_USERNAME) - @javax.annotation.Nonnull - private String validForUsername; - - public GetTokenResponse() {} - - public GetTokenResponse token(@javax.annotation.Nonnull String token) { - this.token = token; - return this; - } - - /** - * Bearer auth token. - * - * @return token - */ - @javax.annotation.Nonnull - public String getToken() { - return token; - } - - public void setToken(@javax.annotation.Nonnull String token) { - this.token = token; - } - - public GetTokenResponse creationTimeInMillis( - @javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Token creation time in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public GetTokenResponse expirationTimeInMillis( - @javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - return this; - } - - /** - * Token expiration time in milliseconds. - * - * @return expirationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getExpirationTimeInMillis() { - return expirationTimeInMillis; - } - - public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - } - - public GetTokenResponse validForUserId(@javax.annotation.Nonnull String validForUserId) { - this.validForUserId = validForUserId; - return this; - } - - /** - * Username to whom the token is issued. - * - * @return validForUserId - */ - @javax.annotation.Nonnull - public String getValidForUserId() { - return validForUserId; - } - - public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { - this.validForUserId = validForUserId; - } - - public GetTokenResponse validForUsername(@javax.annotation.Nonnull String validForUsername) { - this.validForUsername = validForUsername; - return this; - } - - /** - * Unique identifier of the user to whom the token is issued. - * - * @return validForUsername - */ - @javax.annotation.Nonnull - public String getValidForUsername() { - return validForUsername; - } - - public void setValidForUsername(@javax.annotation.Nonnull String validForUsername) { - this.validForUsername = validForUsername; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenResponse getTokenResponse = (GetTokenResponse) o; - return Objects.equals(this.token, getTokenResponse.token) - && Objects.equals(this.creationTimeInMillis, getTokenResponse.creationTimeInMillis) - && Objects.equals( - this.expirationTimeInMillis, getTokenResponse.expirationTimeInMillis) - && Objects.equals(this.validForUserId, getTokenResponse.validForUserId) - && Objects.equals(this.validForUsername, getTokenResponse.validForUsername); - } - - @Override - public int hashCode() { - return Objects.hash( - token, - creationTimeInMillis, - expirationTimeInMillis, - validForUserId, - validForUsername); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTokenResponse {\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" expirationTimeInMillis: ") - .append(toIndentedString(expirationTimeInMillis)) - .append("\n"); - sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); - sb.append(" validForUsername: ").append(toIndentedString(validForUsername)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * GetTokenResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetTokenResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = "expiration_time_in_millis"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; + @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) + @javax.annotation.Nonnull + private String validForUserId; + + public static final String SERIALIZED_NAME_VALID_FOR_USERNAME = "valid_for_username"; + @SerializedName(SERIALIZED_NAME_VALID_FOR_USERNAME) + @javax.annotation.Nonnull + private String validForUsername; + + public GetTokenResponse() { + } + + public GetTokenResponse token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Bearer auth token. + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + + public GetTokenResponse creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public GetTokenResponse expirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + + public GetTokenResponse validForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + return this; + } + + /** + * Username to whom the token is issued. + * @return validForUserId + */ + @javax.annotation.Nonnull + public String getValidForUserId() { + return validForUserId; + } + + public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + } + + + public GetTokenResponse validForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + return this; + } + + /** + * Unique identifier of the user to whom the token is issued. + * @return validForUsername + */ + @javax.annotation.Nonnull + public String getValidForUsername() { + return validForUsername; + } + + public void setValidForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("token"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("expiration_time_in_millis"); - openapiFields.add("valid_for_user_id"); - openapiFields.add("valid_for_username"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - openapiRequiredFields.add("creation_time_in_millis"); - openapiRequiredFields.add("expiration_time_in_millis"); - openapiRequiredFields.add("valid_for_user_id"); - openapiRequiredFields.add("valid_for_username"); + GetTokenResponse getTokenResponse = (GetTokenResponse) o; + return Objects.equals(this.token, getTokenResponse.token) && + Objects.equals(this.creationTimeInMillis, getTokenResponse.creationTimeInMillis) && + Objects.equals(this.expirationTimeInMillis, getTokenResponse.expirationTimeInMillis) && + Objects.equals(this.validForUserId, getTokenResponse.validForUserId) && + Objects.equals(this.validForUsername, getTokenResponse.validForUsername); + } + + @Override + public int hashCode() { + return Objects.hash(token, creationTimeInMillis, expirationTimeInMillis, validForUserId, validForUsername); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTokenResponse {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" expirationTimeInMillis: ").append(toIndentedString(expirationTimeInMillis)).append("\n"); + sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); + sb.append(" validForUsername: ").append(toIndentedString(validForUsername)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetTokenResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetTokenResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetTokenResponse is not found in the" - + " empty JSON string", - GetTokenResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("valid_for_user_id"); + openapiFields.add("valid_for_username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + openapiRequiredFields.add("valid_for_user_id"); + openapiRequiredFields.add("valid_for_username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTokenResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTokenResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetTokenResponse is not found in the empty JSON string", GetTokenResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GetTokenResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GetTokenResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetTokenResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetTokenResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetTokenResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetTokenResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `token` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("token").toString())); - } - if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `valid_for_user_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("valid_for_user_id").toString())); - } - if (!jsonObj.get("valid_for_username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `valid_for_username` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("valid_for_username").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetTokenResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetTokenResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GetTokenResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetTokenResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetTokenResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetTokenResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetTokenResponse - * @throws IOException if the JSON string is invalid with respect to GetTokenResponse - */ - public static GetTokenResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetTokenResponse.class); - } - - /** - * Convert an instance of GetTokenResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `valid_for_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("valid_for_user_id").toString())); + } + if (!jsonObj.get("valid_for_username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `valid_for_username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("valid_for_username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTokenResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTokenResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetTokenResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTokenResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetTokenResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of GetTokenResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTokenResponse + * @throws IOException if the JSON string is invalid with respect to GetTokenResponse + */ + public static GetTokenResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTokenResponse.class); + } + + /** + * Convert an instance of GetTokenResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java index 39d4fa0d7..92580fa62 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java @@ -4,210 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** Groups objects. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GroupObject implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; +/** + * Groups objects. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroupObject implements Serializable { + private static final long serialVersionUID = 1L; - public GroupObject() {} + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; - public GroupObject identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } + public GroupObject() { + } - /** - * Get identifier - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } + public GroupObject identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } + /** + * Get identifier + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GroupObject groupObject = (GroupObject) o; - return Objects.equals(this.identifier, groupObject.identifier); - } + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(identifier); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GroupObject {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + GroupObject groupObject = (GroupObject) o; + return Objects.equals(this.identifier, groupObject.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupObject {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GroupObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GroupObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GroupObject is not found in the empty" - + " JSON string", - GroupObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GroupObject is not found in the empty JSON string", GroupObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GroupObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GroupObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GroupObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GroupObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GroupObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GroupObject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GroupObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GroupObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupObject - * @throws IOException if the JSON string is invalid with respect to GroupObject - */ - public static GroupObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GroupObject.class); - } - - /** - * Convert an instance of GroupObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of GroupObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupObject + * @throws IOException if the JSON string is invalid with respect to GroupObject + */ + public static GroupObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupObject.class); + } + + /** + * Convert an instance of GroupObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java index 2c5c5e2cf..6d1a58d92 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 @@ -4,800 +4,722 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** GroupsImportListInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GroupsImportListInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nonnull - private String displayName; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIER = "group_identifier"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIER) - @javax.annotation.Nonnull - private String groupIdentifier; - - public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = - "default_liveboard_identifiers"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) - @javax.annotation.Nullable - private List defaultLiveboardIdentifiers; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DEVELOPER("DEVELOPER"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; - - @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List subGroupIdentifiers; - - /** Type of the group. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOCAL_GROUP("LOCAL_GROUP"), - - LDAP_GROUP("LDAP_GROUP"), - - TEAM_GROUP("TEAM_GROUP"), - - TENANT_GROUP("TENANT_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and - * thus allows them to share objects. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public GroupsImportListInput() {} - - public GroupsImportListInput displayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Unique display name of the group. - * - * @return displayName - */ - @javax.annotation.Nonnull - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - } - - public GroupsImportListInput groupIdentifier(@javax.annotation.Nonnull String groupIdentifier) { - this.groupIdentifier = groupIdentifier; - return this; - } - - /** - * Unique ID or name of the group. - * - * @return groupIdentifier - */ - @javax.annotation.Nonnull - public String getGroupIdentifier() { - return groupIdentifier; - } - - public void setGroupIdentifier(@javax.annotation.Nonnull String groupIdentifier) { - this.groupIdentifier = groupIdentifier; - } - - public GroupsImportListInput defaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - return this; - } - - public GroupsImportListInput addDefaultLiveboardIdentifiersItem( - String defaultLiveboardIdentifiersItem) { - if (this.defaultLiveboardIdentifiers == null) { - this.defaultLiveboardIdentifiers = new ArrayList<>(); - } - this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); - return this; - } - - /** - * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the - * group. - * - * @return defaultLiveboardIdentifiers - */ - @javax.annotation.Nullable - public List getDefaultLiveboardIdentifiers() { - return defaultLiveboardIdentifiers; - } - - public void setDefaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public GroupsImportListInput description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - /** - * Description of the group. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } +import com.thoughtspot.client.JSON; - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; +/** + * GroupsImportListInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroupsImportListInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIER = "group_identifier"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIER) + @javax.annotation.Nonnull + private String groupIdentifier; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = "default_liveboard_identifiers"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_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"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public GroupsImportListInput privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public GroupsImportListInput addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Privileges that will be assigned to the group. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public GroupsImportListInput subGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public GroupsImportListInput addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { - if (this.subGroupIdentifiers == null) { - this.subGroupIdentifiers = new ArrayList<>(); - } - this.subGroupIdentifiers.add(subGroupIdentifiersItem); - return this; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - /** - * Unique ID or name of the sub-groups to add to the group. - * - * @return subGroupIdentifiers - */ - @javax.annotation.Nullable - public List getSubGroupIdentifiers() { - return subGroupIdentifiers; - } + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; - public void setSubGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - } + /** + * Type of the group. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); - public GroupsImportListInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } + private String value; - /** - * Type of the group. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + TypeEnum(String value) { + this.value = value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public String getValue() { + return value; } - public GroupsImportListInput userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public GroupsImportListInput addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.userIdentifiers.add(userIdentifiersItem); - return this; + } + return null; } - /** - * Unique ID or name of the users to assign to the group. - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } } - public GroupsImportListInput visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } + } - /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and - * thus allows them to share objects. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; - } + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GroupsImportListInput groupsImportListInput = (GroupsImportListInput) o; - return Objects.equals(this.displayName, groupsImportListInput.displayName) - && Objects.equals(this.groupIdentifier, groupsImportListInput.groupIdentifier) - && Objects.equals( - this.defaultLiveboardIdentifiers, - groupsImportListInput.defaultLiveboardIdentifiers) - && Objects.equals(this.description, groupsImportListInput.description) - && Objects.equals(this.privileges, groupsImportListInput.privileges) - && Objects.equals( - this.subGroupIdentifiers, groupsImportListInput.subGroupIdentifiers) - && Objects.equals(this.type, groupsImportListInput.type) - && Objects.equals(this.userIdentifiers, groupsImportListInput.userIdentifiers) - && Objects.equals(this.visibility, groupsImportListInput.visibility); - } + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - displayName, - groupIdentifier, - defaultLiveboardIdentifiers, - description, - privileges, - subGroupIdentifiers, - type, - userIdentifiers, - visibility); + VisibilityEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GroupsImportListInput {\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" groupIdentifier: ").append(toIndentedString(groupIdentifier)).append("\n"); - sb.append(" defaultLiveboardIdentifiers: ") - .append(toIndentedString(defaultLiveboardIdentifiers)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" subGroupIdentifiers: ") - .append(toIndentedString(subGroupIdentifiers)) - .append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("display_name"); - openapiFields.add("group_identifier"); - openapiFields.add("default_liveboard_identifiers"); - openapiFields.add("description"); - openapiFields.add("privileges"); - openapiFields.add("sub_group_identifiers"); - openapiFields.add("type"); - openapiFields.add("user_identifiers"); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("display_name"); - openapiRequiredFields.add("group_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GroupsImportListInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GroupsImportListInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GroupsImportListInput is not found in" - + " the empty JSON string", - GroupsImportListInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!GroupsImportListInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `GroupsImportListInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GroupsImportListInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public GroupsImportListInput() { + } + + public GroupsImportListInput displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique display name of the group. + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public GroupsImportListInput groupIdentifier(@javax.annotation.Nonnull String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + return this; + } + + /** + * Unique ID or name of the group. + * @return groupIdentifier + */ + @javax.annotation.Nonnull + public String getGroupIdentifier() { + return groupIdentifier; + } + + public void setGroupIdentifier(@javax.annotation.Nonnull String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + } + + + public GroupsImportListInput defaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public GroupsImportListInput addDefaultLiveboardIdentifiersItem(String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + + public GroupsImportListInput description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GroupsImportListInput privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public GroupsImportListInput addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges that will be assigned to the group. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public GroupsImportListInput subGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public GroupsImportListInput addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the sub-groups to add to the group. + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + + public GroupsImportListInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the group. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public GroupsImportListInput userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public GroupsImportListInput addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the users to assign to the group. + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + + public GroupsImportListInput visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupsImportListInput groupsImportListInput = (GroupsImportListInput) o; + return Objects.equals(this.displayName, groupsImportListInput.displayName) && + Objects.equals(this.groupIdentifier, groupsImportListInput.groupIdentifier) && + Objects.equals(this.defaultLiveboardIdentifiers, groupsImportListInput.defaultLiveboardIdentifiers) && + Objects.equals(this.description, groupsImportListInput.description) && + Objects.equals(this.privileges, groupsImportListInput.privileges) && + Objects.equals(this.subGroupIdentifiers, groupsImportListInput.subGroupIdentifiers) && + Objects.equals(this.type, groupsImportListInput.type) && + Objects.equals(this.userIdentifiers, groupsImportListInput.userIdentifiers) && + Objects.equals(this.visibility, groupsImportListInput.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, groupIdentifier, defaultLiveboardIdentifiers, description, privileges, subGroupIdentifiers, type, userIdentifiers, visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupsImportListInput {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groupIdentifier: ").append(toIndentedString(groupIdentifier)).append("\n"); + sb.append(" defaultLiveboardIdentifiers: ").append(toIndentedString(defaultLiveboardIdentifiers)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ").append(toIndentedString(subGroupIdentifiers)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("display_name"); + openapiFields.add("group_identifier"); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("group_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupsImportListInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupsImportListInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GroupsImportListInput is not found in the empty JSON string", GroupsImportListInput.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupsImportListInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupsImportListInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GroupsImportListInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if (!jsonObj.get("group_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("group_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("default_liveboard_identifiers") != null - && !jsonObj.get("default_liveboard_identifiers").isJsonNull() - && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_liveboard_identifiers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("default_liveboard_identifiers").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("sub_group_identifiers") != null - && !jsonObj.get("sub_group_identifiers").isJsonNull() - && !jsonObj.get("sub_group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sub_group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("sub_group_identifiers").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GroupsImportListInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GroupsImportListInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GroupsImportListInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GroupsImportListInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GroupsImportListInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GroupsImportListInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupsImportListInput - * @throws IOException if the JSON string is invalid with respect to GroupsImportListInput - */ - public static GroupsImportListInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GroupsImportListInput.class); - } - - /** - * Convert an instance of GroupsImportListInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("group_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null && !jsonObj.get("default_liveboard_identifiers").isJsonNull() && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `default_liveboard_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null && !jsonObj.get("sub_group_identifiers").isJsonNull() && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupsImportListInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupsImportListInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupsImportListInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupsImportListInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupsImportListInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GroupsImportListInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupsImportListInput + * @throws IOException if the JSON string is invalid with respect to GroupsImportListInput + */ + public static GroupsImportListInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupsImportListInput.class); + } + + /** + * Convert an instance of GroupsImportListInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java index fe418fa8e..30283bb05 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java @@ -4,239 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Attribute to update in a header. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class HeaderAttributeInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nonnull - private String value; - - public HeaderAttributeInput() {} - - public HeaderAttributeInput name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Attribute name to be updated. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public HeaderAttributeInput value(@javax.annotation.Nonnull String value) { - this.value = value; - return this; - } - - /** - * Attribute's new value. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HeaderAttributeInput headerAttributeInput = (HeaderAttributeInput) o; - return Objects.equals(this.name, headerAttributeInput.name) - && Objects.equals(this.value, headerAttributeInput.value); +/** + * Attribute to update in a header. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HeaderAttributeInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public HeaderAttributeInput() { + } + + public HeaderAttributeInput name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Attribute name to be updated. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public HeaderAttributeInput value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Attribute's new value. + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(name, value); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HeaderAttributeInput {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); + HeaderAttributeInput headerAttributeInput = (HeaderAttributeInput) o; + return Objects.equals(this.name, headerAttributeInput.name) && + Objects.equals(this.value, headerAttributeInput.value); + } + + @Override + public int hashCode() { + return Objects.hash(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HeaderAttributeInput {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to HeaderAttributeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HeaderAttributeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in HeaderAttributeInput is not found in the empty JSON string", HeaderAttributeInput.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("value"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("value"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HeaderAttributeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HeaderAttributeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in HeaderAttributeInput is not found in" - + " the empty JSON string", - HeaderAttributeInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!HeaderAttributeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `HeaderAttributeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!HeaderAttributeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HeaderAttributeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HeaderAttributeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : HeaderAttributeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HeaderAttributeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HeaderAttributeInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(HeaderAttributeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, HeaderAttributeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HeaderAttributeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of HeaderAttributeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of HeaderAttributeInput - * @throws IOException if the JSON string is invalid with respect to HeaderAttributeInput - */ - public static HeaderAttributeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HeaderAttributeInput.class); - } - - /** - * Convert an instance of HeaderAttributeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HeaderAttributeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HeaderAttributeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(HeaderAttributeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, HeaderAttributeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public HeaderAttributeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of HeaderAttributeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of HeaderAttributeInput + * @throws IOException if the JSON string is invalid with respect to HeaderAttributeInput + */ + public static HeaderAttributeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HeaderAttributeInput.class); + } + + /** + * Convert an instance of HeaderAttributeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java index eaf2eae06..3934d32f1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java @@ -4,417 +4,393 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.HeaderAttributeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Favorite object options. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class HeaderUpdateInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; - - @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) - @javax.annotation.Nullable - private String objIdentifier; - - /** Optional type of the header object. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - LIVEBOARD("LIVEBOARD"), - - ACTION_OBJECT("ACTION_OBJECT"), - - DATA_SOURCE("DATA_SOURCE"), - - USER("USER"), - - USER_GROUP("USER_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - @javax.annotation.Nonnull - private List attributes; - - public HeaderUpdateInput() {} - - public HeaderUpdateInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Unique ID of a specified type to identify the header. - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; +/** + * Favorite object options. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HeaderUpdateInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + /** + * Optional type of the header object. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + LIVEBOARD("LIVEBOARD"), + + ACTION_OBJECT("ACTION_OBJECT"), + + DATA_SOURCE("DATA_SOURCE"), + + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; + public String getValue() { + return value; } - public HeaderUpdateInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Custom object identifier to uniquely identify header. - * - * @return objIdentifier - */ - @javax.annotation.Nullable - public String getObjIdentifier() { - return objIdentifier; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; + 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 HeaderUpdateInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - /** - * Optional type of the header object. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + @javax.annotation.Nonnull + private List attributes; + + public HeaderUpdateInput() { + } + + public HeaderUpdateInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID of a specified type to identify the header. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public HeaderUpdateInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * Custom object identifier to uniquely identify header. + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + + public HeaderUpdateInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Optional type of the header object. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public HeaderUpdateInput attributes(@javax.annotation.Nonnull List attributes) { + this.attributes = attributes; + return this; + } + + public HeaderUpdateInput addAttributesItem(HeaderAttributeInput attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); } + this.attributes.add(attributesItem); + return this; + } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } + /** + * List of attributes to update + * @return attributes + */ + @javax.annotation.Nonnull + public List getAttributes() { + return attributes; + } - public HeaderUpdateInput attributes( - @javax.annotation.Nonnull List attributes) { - this.attributes = attributes; - return this; - } + public void setAttributes(@javax.annotation.Nonnull List attributes) { + this.attributes = attributes; + } - public HeaderUpdateInput addAttributesItem(HeaderAttributeInput attributesItem) { - if (this.attributes == null) { - this.attributes = new ArrayList<>(); - } - this.attributes.add(attributesItem); - return this; - } - /** - * List of attributes to update - * - * @return attributes - */ - @javax.annotation.Nonnull - public List getAttributes() { - return attributes; - } - public void setAttributes(@javax.annotation.Nonnull List attributes) { - this.attributes = attributes; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HeaderUpdateInput headerUpdateInput = (HeaderUpdateInput) o; - return Objects.equals(this.identifier, headerUpdateInput.identifier) - && Objects.equals(this.objIdentifier, headerUpdateInput.objIdentifier) - && Objects.equals(this.type, headerUpdateInput.type) - && Objects.equals(this.attributes, headerUpdateInput.attributes); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + HeaderUpdateInput headerUpdateInput = (HeaderUpdateInput) o; + return Objects.equals(this.identifier, headerUpdateInput.identifier) && + Objects.equals(this.objIdentifier, headerUpdateInput.objIdentifier) && + Objects.equals(this.type, headerUpdateInput.type) && + Objects.equals(this.attributes, headerUpdateInput.attributes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, objIdentifier, type, attributes); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(identifier, objIdentifier, type, attributes); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HeaderUpdateInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to HeaderUpdateInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HeaderUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in HeaderUpdateInput is not found in the empty JSON string", HeaderUpdateInput.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HeaderUpdateInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("obj_identifier"); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HeaderUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HeaderUpdateInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in HeaderUpdateInput is not found in the" - + " empty JSON string", - HeaderUpdateInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!HeaderUpdateInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `HeaderUpdateInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!HeaderUpdateInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HeaderUpdateInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HeaderUpdateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : HeaderUpdateInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) - && !jsonObj.get("obj_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `obj_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("obj_identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the json data is an array - if (!jsonObj.get("attributes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `attributes` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("attributes").toString())); - } - - JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); - // validate the required field `attributes` (array) - for (int i = 0; i < jsonArrayattributes.size(); i++) { - HeaderAttributeInput.validateJsonElement(jsonArrayattributes.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HeaderUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HeaderUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(HeaderUpdateInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, HeaderUpdateInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HeaderUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of HeaderUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of HeaderUpdateInput - * @throws IOException if the JSON string is invalid with respect to HeaderUpdateInput - */ - public static HeaderUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HeaderUpdateInput.class); - } - - /** - * Convert an instance of HeaderUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `obj_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obj_identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the json data is an array + if (!jsonObj.get("attributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); + } + + JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); + // validate the required field `attributes` (array) + for (int i = 0; i < jsonArrayattributes.size(); i++) { + HeaderAttributeInput.validateJsonElement(jsonArrayattributes.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HeaderUpdateInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HeaderUpdateInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(HeaderUpdateInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, HeaderUpdateInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public HeaderUpdateInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of HeaderUpdateInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of HeaderUpdateInput + * @throws IOException if the JSON string is invalid with respect to HeaderUpdateInput + */ + public static HeaderUpdateInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HeaderUpdateInput.class); + } + + /** + * Convert an instance of HeaderUpdateInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java index 6a609d770..1c5c99c48 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java @@ -4,800 +4,725 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ImportEPackAsyncTaskStatus */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportEPackAsyncTaskStatus implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; - - @SerializedName(SERIALIZED_NAME_TENANT_ID) - @javax.annotation.Nullable - private String tenantId; - - public static final String SERIALIZED_NAME_ORG_ID = "org_id"; - - @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable - private Integer orgId; - - public static final String SERIALIZED_NAME_TASK_ID = "task_id"; - - @SerializedName(SERIALIZED_NAME_TASK_ID) - @javax.annotation.Nullable - private String taskId; - - public static final String SERIALIZED_NAME_TASK_NAME = "task_name"; - - @SerializedName(SERIALIZED_NAME_TASK_NAME) - @javax.annotation.Nullable - private String taskName; - - public static final String SERIALIZED_NAME_IMPORT_RESPONSE = "import_response"; - - @SerializedName(SERIALIZED_NAME_IMPORT_RESPONSE) - @javax.annotation.Nullable - private Object importResponse; - - /** Current status of the task. */ - @JsonAdapter(TaskStatusEnum.Adapter.class) - public enum TaskStatusEnum { - COMPLETED("COMPLETED"), - - IN_QUEUE("IN_QUEUE"), - - IN_PROGRESS("IN_PROGRESS"), - - FAILED("FAILED"); - - private String value; - - TaskStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TaskStatusEnum fromValue(String value) { - for (TaskStatusEnum b : TaskStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TaskStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TaskStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TaskStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TaskStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TASK_STATUS = "task_status"; - - @SerializedName(SERIALIZED_NAME_TASK_STATUS) - @javax.annotation.Nullable - private TaskStatusEnum taskStatus; - - public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_ID) - @javax.annotation.Nullable - private String authorId; - - /** Policy used for the import task. */ - @JsonAdapter(ImportPolicyEnum.Adapter.class) - public enum ImportPolicyEnum { - PARTIAL("PARTIAL"), - - ALL_OR_NONE("ALL_OR_NONE"), - - VALIDATE_ONLY("VALIDATE_ONLY"), - - PARTIAL_OBJECT("PARTIAL_OBJECT"); - - private String value; - - ImportPolicyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ImportPolicyEnum fromValue(String value) { - for (ImportPolicyEnum b : ImportPolicyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ImportPolicyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ImportPolicyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; - - @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) - @javax.annotation.Nullable - private ImportPolicyEnum importPolicy; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - - @SerializedName(SERIALIZED_NAME_CREATED_AT) - @javax.annotation.Nullable - private Float createdAt; - - public static final String SERIALIZED_NAME_IN_PROGRESS_AT = "in_progress_at"; - - @SerializedName(SERIALIZED_NAME_IN_PROGRESS_AT) - @javax.annotation.Nullable - private Float inProgressAt; - - public static final String SERIALIZED_NAME_COMPLETED_AT = "completed_at"; - - @SerializedName(SERIALIZED_NAME_COMPLETED_AT) - @javax.annotation.Nullable - private Float completedAt; - - public static final String SERIALIZED_NAME_TOTAL_OBJECT_COUNT = "total_object_count"; - - @SerializedName(SERIALIZED_NAME_TOTAL_OBJECT_COUNT) - @javax.annotation.Nullable - private Integer totalObjectCount; - - public static final String SERIALIZED_NAME_OBJECT_PROCESSED_COUNT = "object_processed_count"; - - @SerializedName(SERIALIZED_NAME_OBJECT_PROCESSED_COUNT) - @javax.annotation.Nullable - private Integer objectProcessedCount; - - public static final String SERIALIZED_NAME_MODIFIED_AT = "modified_at"; - - @SerializedName(SERIALIZED_NAME_MODIFIED_AT) - @javax.annotation.Nullable - private Float modifiedAt; - - public static final String SERIALIZED_NAME_AUTHOR_DISPLAY_NAME = "author_display_name"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_DISPLAY_NAME) - @javax.annotation.Nullable - private String authorDisplayName; - - public ImportEPackAsyncTaskStatus() {} - - public ImportEPackAsyncTaskStatus tenantId(@javax.annotation.Nullable String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * GUID of tenant from which the task is initiated. - * - * @return tenantId - */ - @javax.annotation.Nullable - public String getTenantId() { - return tenantId; - } - - public void setTenantId(@javax.annotation.Nullable String tenantId) { - this.tenantId = tenantId; - } - - public ImportEPackAsyncTaskStatus orgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * Organisation ID of the user who initiated the task. - * - * @return orgId - */ - @javax.annotation.Nullable - public Integer getOrgId() { - return orgId; - } - - public void setOrgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - } - - public ImportEPackAsyncTaskStatus taskId(@javax.annotation.Nullable String taskId) { - this.taskId = taskId; - return this; - } - - /** - * Unique identifier for the task. - * - * @return taskId - */ - @javax.annotation.Nullable - public String getTaskId() { - return taskId; - } - - public void setTaskId(@javax.annotation.Nullable String taskId) { - this.taskId = taskId; - } - - public ImportEPackAsyncTaskStatus taskName(@javax.annotation.Nullable String taskName) { - this.taskName = taskName; - return this; - } - - /** - * Name of the task. - * - * @return taskName - */ - @javax.annotation.Nullable - public String getTaskName() { - return taskName; - } - - public void setTaskName(@javax.annotation.Nullable String taskName) { - this.taskName = taskName; - } - - public ImportEPackAsyncTaskStatus importResponse( - @javax.annotation.Nullable Object importResponse) { - this.importResponse = importResponse; - return this; - } - - /** - * Response of imported objects so far. - * - * @return importResponse - */ - @javax.annotation.Nullable - public Object getImportResponse() { - return importResponse; - } - - public void setImportResponse(@javax.annotation.Nullable Object importResponse) { - this.importResponse = importResponse; - } - - public ImportEPackAsyncTaskStatus taskStatus( - @javax.annotation.Nullable TaskStatusEnum taskStatus) { - this.taskStatus = taskStatus; - return this; - } - - /** - * Current status of the task. - * - * @return taskStatus - */ - @javax.annotation.Nullable - public TaskStatusEnum getTaskStatus() { - return taskStatus; - } - - public void setTaskStatus(@javax.annotation.Nullable TaskStatusEnum taskStatus) { - this.taskStatus = taskStatus; - } - - public ImportEPackAsyncTaskStatus authorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - return this; - } - - /** - * ID of the user who initiated the task. - * - * @return authorId - */ - @javax.annotation.Nullable - public String getAuthorId() { - return authorId; - } - - public void setAuthorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - } - - public ImportEPackAsyncTaskStatus importPolicy( - @javax.annotation.Nullable ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - return this; - } - - /** - * Policy used for the import task. - * - * @return importPolicy - */ - @javax.annotation.Nullable - public ImportPolicyEnum getImportPolicy() { - return importPolicy; - } - - public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - } - - public ImportEPackAsyncTaskStatus createdAt(@javax.annotation.Nullable Float createdAt) { - this.createdAt = createdAt; - return this; - } - /** - * Time when the task was created (in ms since epoch). - * - * @return createdAt - */ - @javax.annotation.Nullable - public Float getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(@javax.annotation.Nullable Float createdAt) { - this.createdAt = createdAt; - } +import com.thoughtspot.client.JSON; - public ImportEPackAsyncTaskStatus inProgressAt(@javax.annotation.Nullable Float inProgressAt) { - this.inProgressAt = inProgressAt; - return this; - } +/** + * ImportEPackAsyncTaskStatus + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportEPackAsyncTaskStatus implements Serializable { + private static final long serialVersionUID = 1L; - /** - * Time when the task started (in ms since epoch). - * - * @return inProgressAt - */ - @javax.annotation.Nullable - public Float getInProgressAt() { - return inProgressAt; - } + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nullable + private String tenantId; - public void setInProgressAt(@javax.annotation.Nullable Float inProgressAt) { - this.inProgressAt = inProgressAt; - } + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; - public ImportEPackAsyncTaskStatus completedAt(@javax.annotation.Nullable Float completedAt) { - this.completedAt = completedAt; - return this; - } + public static final String SERIALIZED_NAME_TASK_ID = "task_id"; + @SerializedName(SERIALIZED_NAME_TASK_ID) + @javax.annotation.Nullable + private String taskId; - /** - * Time when the task was completed (in ms since epoch). - * - * @return completedAt - */ - @javax.annotation.Nullable - public Float getCompletedAt() { - return completedAt; - } + public static final String SERIALIZED_NAME_TASK_NAME = "task_name"; + @SerializedName(SERIALIZED_NAME_TASK_NAME) + @javax.annotation.Nullable + private String taskName; - public void setCompletedAt(@javax.annotation.Nullable Float completedAt) { - this.completedAt = completedAt; - } + public static final String SERIALIZED_NAME_IMPORT_RESPONSE = "import_response"; + @SerializedName(SERIALIZED_NAME_IMPORT_RESPONSE) + @javax.annotation.Nullable + private Object importResponse; - public ImportEPackAsyncTaskStatus totalObjectCount( - @javax.annotation.Nullable Integer totalObjectCount) { - this.totalObjectCount = totalObjectCount; - return this; - } + /** + * Current status of the task. + */ + @JsonAdapter(TaskStatusEnum.Adapter.class) + public enum TaskStatusEnum { + COMPLETED("COMPLETED"), + + IN_QUEUE("IN_QUEUE"), + + IN_PROGRESS("IN_PROGRESS"), + + FAILED("FAILED"); - /** - * Total number of objects to process. - * - * @return totalObjectCount - */ - @javax.annotation.Nullable - public Integer getTotalObjectCount() { - return totalObjectCount; - } + private String value; - public void setTotalObjectCount(@javax.annotation.Nullable Integer totalObjectCount) { - this.totalObjectCount = totalObjectCount; + TaskStatusEnum(String value) { + this.value = value; } - public ImportEPackAsyncTaskStatus objectProcessedCount( - @javax.annotation.Nullable Integer objectProcessedCount) { - this.objectProcessedCount = objectProcessedCount; - return this; + public String getValue() { + return value; } - /** - * Number of objects processed so far. - * - * @return objectProcessedCount - */ - @javax.annotation.Nullable - public Integer getObjectProcessedCount() { - return objectProcessedCount; + @Override + public String toString() { + return String.valueOf(value); } - public void setObjectProcessedCount(@javax.annotation.Nullable Integer objectProcessedCount) { - this.objectProcessedCount = objectProcessedCount; + public static TaskStatusEnum fromValue(String value) { + for (TaskStatusEnum b : TaskStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public ImportEPackAsyncTaskStatus modifiedAt(@javax.annotation.Nullable Float modifiedAt) { - this.modifiedAt = modifiedAt; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TaskStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Last time the task status was updated (in ms since epoch). - * - * @return modifiedAt - */ - @javax.annotation.Nullable - public Float getModifiedAt() { - return modifiedAt; + @Override + public TaskStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TaskStatusEnum.fromValue(value); + } } - public void setModifiedAt(@javax.annotation.Nullable Float modifiedAt) { - this.modifiedAt = modifiedAt; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskStatusEnum.fromValue(value); } + } - public ImportEPackAsyncTaskStatus authorDisplayName( - @javax.annotation.Nullable String authorDisplayName) { - this.authorDisplayName = authorDisplayName; - return this; - } + public static final String SERIALIZED_NAME_TASK_STATUS = "task_status"; + @SerializedName(SERIALIZED_NAME_TASK_STATUS) + @javax.annotation.Nullable + private TaskStatusEnum taskStatus; - /** - * Display name of the user who initiated the task. - * - * @return authorDisplayName - */ - @javax.annotation.Nullable - public String getAuthorDisplayName() { - return authorDisplayName; - } + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; - public void setAuthorDisplayName(@javax.annotation.Nullable String authorDisplayName) { - this.authorDisplayName = authorDisplayName; - } + /** + * Policy used for the import task. + */ + @JsonAdapter(ImportPolicyEnum.Adapter.class) + public enum ImportPolicyEnum { + PARTIAL("PARTIAL"), + + ALL_OR_NONE("ALL_OR_NONE"), + + VALIDATE_ONLY("VALIDATE_ONLY"), + + PARTIAL_OBJECT("PARTIAL_OBJECT"); - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportEPackAsyncTaskStatus importEPackAsyncTaskStatus = (ImportEPackAsyncTaskStatus) o; - return Objects.equals(this.tenantId, importEPackAsyncTaskStatus.tenantId) - && Objects.equals(this.orgId, importEPackAsyncTaskStatus.orgId) - && Objects.equals(this.taskId, importEPackAsyncTaskStatus.taskId) - && Objects.equals(this.taskName, importEPackAsyncTaskStatus.taskName) - && Objects.equals(this.importResponse, importEPackAsyncTaskStatus.importResponse) - && Objects.equals(this.taskStatus, importEPackAsyncTaskStatus.taskStatus) - && Objects.equals(this.authorId, importEPackAsyncTaskStatus.authorId) - && Objects.equals(this.importPolicy, importEPackAsyncTaskStatus.importPolicy) - && Objects.equals(this.createdAt, importEPackAsyncTaskStatus.createdAt) - && Objects.equals(this.inProgressAt, importEPackAsyncTaskStatus.inProgressAt) - && Objects.equals(this.completedAt, importEPackAsyncTaskStatus.completedAt) - && Objects.equals( - this.totalObjectCount, importEPackAsyncTaskStatus.totalObjectCount) - && Objects.equals( - this.objectProcessedCount, importEPackAsyncTaskStatus.objectProcessedCount) - && Objects.equals(this.modifiedAt, importEPackAsyncTaskStatus.modifiedAt) - && Objects.equals( - this.authorDisplayName, importEPackAsyncTaskStatus.authorDisplayName); - } + private String value; - 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())); + ImportPolicyEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - tenantId, - orgId, - taskId, - taskName, - importResponse, - taskStatus, - authorId, - importPolicy, - createdAt, - inProgressAt, - completedAt, - totalObjectCount, - objectProcessedCount, - modifiedAt, - authorDisplayName); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportEPackAsyncTaskStatus {\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); - sb.append(" taskName: ").append(toIndentedString(taskName)).append("\n"); - sb.append(" importResponse: ").append(toIndentedString(importResponse)).append("\n"); - sb.append(" taskStatus: ").append(toIndentedString(taskStatus)).append("\n"); - sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); - sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" inProgressAt: ").append(toIndentedString(inProgressAt)).append("\n"); - sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); - sb.append(" totalObjectCount: ").append(toIndentedString(totalObjectCount)).append("\n"); - sb.append(" objectProcessedCount: ") - .append(toIndentedString(objectProcessedCount)) - .append("\n"); - sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); - sb.append(" authorDisplayName: ") - .append(toIndentedString(authorDisplayName)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static ImportPolicyEnum fromValue(String value) { + for (ImportPolicyEnum b : ImportPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tenant_id"); - openapiFields.add("org_id"); - openapiFields.add("task_id"); - openapiFields.add("task_name"); - openapiFields.add("import_response"); - openapiFields.add("task_status"); - openapiFields.add("author_id"); - openapiFields.add("import_policy"); - openapiFields.add("created_at"); - openapiFields.add("in_progress_at"); - openapiFields.add("completed_at"); - openapiFields.add("total_object_count"); - openapiFields.add("object_processed_count"); - openapiFields.add("modified_at"); - openapiFields.add("author_display_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImportPolicyEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportEPackAsyncTaskStatus - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportEPackAsyncTaskStatus.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportEPackAsyncTaskStatus is not" - + " found in the empty JSON string", - ImportEPackAsyncTaskStatus.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + ImportPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; + @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) + @javax.annotation.Nullable + private ImportPolicyEnum importPolicy; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private Float createdAt; + + public static final String SERIALIZED_NAME_IN_PROGRESS_AT = "in_progress_at"; + @SerializedName(SERIALIZED_NAME_IN_PROGRESS_AT) + @javax.annotation.Nullable + private Float inProgressAt; + + public static final String SERIALIZED_NAME_COMPLETED_AT = "completed_at"; + @SerializedName(SERIALIZED_NAME_COMPLETED_AT) + @javax.annotation.Nullable + private Float completedAt; + + public static final String SERIALIZED_NAME_TOTAL_OBJECT_COUNT = "total_object_count"; + @SerializedName(SERIALIZED_NAME_TOTAL_OBJECT_COUNT) + @javax.annotation.Nullable + private Integer totalObjectCount; + + public static final String SERIALIZED_NAME_OBJECT_PROCESSED_COUNT = "object_processed_count"; + @SerializedName(SERIALIZED_NAME_OBJECT_PROCESSED_COUNT) + @javax.annotation.Nullable + private Integer objectProcessedCount; + + public static final String SERIALIZED_NAME_MODIFIED_AT = "modified_at"; + @SerializedName(SERIALIZED_NAME_MODIFIED_AT) + @javax.annotation.Nullable + private Float modifiedAt; + + public static final String SERIALIZED_NAME_AUTHOR_DISPLAY_NAME = "author_display_name"; + @SerializedName(SERIALIZED_NAME_AUTHOR_DISPLAY_NAME) + @javax.annotation.Nullable + private String authorDisplayName; + + public ImportEPackAsyncTaskStatus() { + } + + public ImportEPackAsyncTaskStatus tenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * GUID of tenant from which the task is initiated. + * @return tenantId + */ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + } + + + public ImportEPackAsyncTaskStatus orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Organisation ID of the user who initiated the task. + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public ImportEPackAsyncTaskStatus taskId(@javax.annotation.Nullable String taskId) { + this.taskId = taskId; + return this; + } + + /** + * Unique identifier for the task. + * @return taskId + */ + @javax.annotation.Nullable + public String getTaskId() { + return taskId; + } + + public void setTaskId(@javax.annotation.Nullable String taskId) { + this.taskId = taskId; + } + + + public ImportEPackAsyncTaskStatus taskName(@javax.annotation.Nullable String taskName) { + this.taskName = taskName; + return this; + } + + /** + * Name of the task. + * @return taskName + */ + @javax.annotation.Nullable + public String getTaskName() { + return taskName; + } + + public void setTaskName(@javax.annotation.Nullable String taskName) { + this.taskName = taskName; + } + + + public ImportEPackAsyncTaskStatus importResponse(@javax.annotation.Nullable Object importResponse) { + this.importResponse = importResponse; + return this; + } + + /** + * Response of imported objects so far. + * @return importResponse + */ + @javax.annotation.Nullable + public Object getImportResponse() { + return importResponse; + } + + public void setImportResponse(@javax.annotation.Nullable Object importResponse) { + this.importResponse = importResponse; + } + + + public ImportEPackAsyncTaskStatus taskStatus(@javax.annotation.Nullable TaskStatusEnum taskStatus) { + this.taskStatus = taskStatus; + return this; + } + + /** + * Current status of the task. + * @return taskStatus + */ + @javax.annotation.Nullable + public TaskStatusEnum getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(@javax.annotation.Nullable TaskStatusEnum taskStatus) { + this.taskStatus = taskStatus; + } + + + public ImportEPackAsyncTaskStatus authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * ID of the user who initiated the task. + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public ImportEPackAsyncTaskStatus importPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + return this; + } + + /** + * Policy used for the import task. + * @return importPolicy + */ + @javax.annotation.Nullable + public ImportPolicyEnum getImportPolicy() { + return importPolicy; + } + + public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + } + + + public ImportEPackAsyncTaskStatus createdAt(@javax.annotation.Nullable Float createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the task was created (in ms since epoch). + * @return createdAt + */ + @javax.annotation.Nullable + public Float getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable Float createdAt) { + this.createdAt = createdAt; + } + + + public ImportEPackAsyncTaskStatus inProgressAt(@javax.annotation.Nullable Float inProgressAt) { + this.inProgressAt = inProgressAt; + return this; + } + + /** + * Time when the task started (in ms since epoch). + * @return inProgressAt + */ + @javax.annotation.Nullable + public Float getInProgressAt() { + return inProgressAt; + } + + public void setInProgressAt(@javax.annotation.Nullable Float inProgressAt) { + this.inProgressAt = inProgressAt; + } + + + public ImportEPackAsyncTaskStatus completedAt(@javax.annotation.Nullable Float completedAt) { + this.completedAt = completedAt; + return this; + } + + /** + * Time when the task was completed (in ms since epoch). + * @return completedAt + */ + @javax.annotation.Nullable + public Float getCompletedAt() { + return completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable Float completedAt) { + this.completedAt = completedAt; + } + + + public ImportEPackAsyncTaskStatus totalObjectCount(@javax.annotation.Nullable Integer totalObjectCount) { + this.totalObjectCount = totalObjectCount; + return this; + } + + /** + * Total number of objects to process. + * @return totalObjectCount + */ + @javax.annotation.Nullable + public Integer getTotalObjectCount() { + return totalObjectCount; + } + + public void setTotalObjectCount(@javax.annotation.Nullable Integer totalObjectCount) { + this.totalObjectCount = totalObjectCount; + } + + + public ImportEPackAsyncTaskStatus objectProcessedCount(@javax.annotation.Nullable Integer objectProcessedCount) { + this.objectProcessedCount = objectProcessedCount; + return this; + } + + /** + * Number of objects processed so far. + * @return objectProcessedCount + */ + @javax.annotation.Nullable + public Integer getObjectProcessedCount() { + return objectProcessedCount; + } + + public void setObjectProcessedCount(@javax.annotation.Nullable Integer objectProcessedCount) { + this.objectProcessedCount = objectProcessedCount; + } + + + public ImportEPackAsyncTaskStatus modifiedAt(@javax.annotation.Nullable Float modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Last time the task status was updated (in ms since epoch). + * @return modifiedAt + */ + @javax.annotation.Nullable + public Float getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(@javax.annotation.Nullable Float modifiedAt) { + this.modifiedAt = modifiedAt; + } + + + public ImportEPackAsyncTaskStatus authorDisplayName(@javax.annotation.Nullable String authorDisplayName) { + this.authorDisplayName = authorDisplayName; + return this; + } + + /** + * Display name of the user who initiated the task. + * @return authorDisplayName + */ + @javax.annotation.Nullable + public String getAuthorDisplayName() { + return authorDisplayName; + } + + public void setAuthorDisplayName(@javax.annotation.Nullable String authorDisplayName) { + this.authorDisplayName = authorDisplayName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportEPackAsyncTaskStatus importEPackAsyncTaskStatus = (ImportEPackAsyncTaskStatus) o; + return Objects.equals(this.tenantId, importEPackAsyncTaskStatus.tenantId) && + Objects.equals(this.orgId, importEPackAsyncTaskStatus.orgId) && + Objects.equals(this.taskId, importEPackAsyncTaskStatus.taskId) && + Objects.equals(this.taskName, importEPackAsyncTaskStatus.taskName) && + Objects.equals(this.importResponse, importEPackAsyncTaskStatus.importResponse) && + Objects.equals(this.taskStatus, importEPackAsyncTaskStatus.taskStatus) && + Objects.equals(this.authorId, importEPackAsyncTaskStatus.authorId) && + Objects.equals(this.importPolicy, importEPackAsyncTaskStatus.importPolicy) && + Objects.equals(this.createdAt, importEPackAsyncTaskStatus.createdAt) && + Objects.equals(this.inProgressAt, importEPackAsyncTaskStatus.inProgressAt) && + Objects.equals(this.completedAt, importEPackAsyncTaskStatus.completedAt) && + Objects.equals(this.totalObjectCount, importEPackAsyncTaskStatus.totalObjectCount) && + Objects.equals(this.objectProcessedCount, importEPackAsyncTaskStatus.objectProcessedCount) && + Objects.equals(this.modifiedAt, importEPackAsyncTaskStatus.modifiedAt) && + Objects.equals(this.authorDisplayName, importEPackAsyncTaskStatus.authorDisplayName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(tenantId, orgId, taskId, taskName, importResponse, taskStatus, authorId, importPolicy, createdAt, inProgressAt, completedAt, totalObjectCount, objectProcessedCount, modifiedAt, authorDisplayName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportEPackAsyncTaskStatus {\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" taskName: ").append(toIndentedString(taskName)).append("\n"); + sb.append(" importResponse: ").append(toIndentedString(importResponse)).append("\n"); + sb.append(" taskStatus: ").append(toIndentedString(taskStatus)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" inProgressAt: ").append(toIndentedString(inProgressAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" totalObjectCount: ").append(toIndentedString(totalObjectCount)).append("\n"); + sb.append(" objectProcessedCount: ").append(toIndentedString(objectProcessedCount)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" authorDisplayName: ").append(toIndentedString(authorDisplayName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tenant_id"); + openapiFields.add("org_id"); + openapiFields.add("task_id"); + openapiFields.add("task_name"); + openapiFields.add("import_response"); + openapiFields.add("task_status"); + openapiFields.add("author_id"); + openapiFields.add("import_policy"); + openapiFields.add("created_at"); + openapiFields.add("in_progress_at"); + openapiFields.add("completed_at"); + openapiFields.add("total_object_count"); + openapiFields.add("object_processed_count"); + openapiFields.add("modified_at"); + openapiFields.add("author_display_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportEPackAsyncTaskStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportEPackAsyncTaskStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportEPackAsyncTaskStatus is not found in the empty JSON string", ImportEPackAsyncTaskStatus.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportEPackAsyncTaskStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportEPackAsyncTaskStatus` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportEPackAsyncTaskStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportEPackAsyncTaskStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) - && !jsonObj.get("tenant_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tenant_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tenant_id").toString())); - } - if ((jsonObj.get("task_id") != null && !jsonObj.get("task_id").isJsonNull()) - && !jsonObj.get("task_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `task_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("task_id").toString())); - } - if ((jsonObj.get("task_name") != null && !jsonObj.get("task_name").isJsonNull()) - && !jsonObj.get("task_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `task_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("task_name").toString())); - } - if ((jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull()) - && !jsonObj.get("task_status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `task_status` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("task_status").toString())); - } - // validate the optional field `task_status` - if (jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull()) { - TaskStatusEnum.validateJsonElement(jsonObj.get("task_status")); - } - if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) - && !jsonObj.get("author_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_id").toString())); - } - if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) - && !jsonObj.get("import_policy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_policy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("import_policy").toString())); - } - // validate the optional field `import_policy` - if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { - ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); - } - if ((jsonObj.get("author_display_name") != null - && !jsonObj.get("author_display_name").isJsonNull()) - && !jsonObj.get("author_display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_display_name` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("author_display_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportEPackAsyncTaskStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportEPackAsyncTaskStatus' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportEPackAsyncTaskStatus.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportEPackAsyncTaskStatus value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportEPackAsyncTaskStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportEPackAsyncTaskStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportEPackAsyncTaskStatus - * @throws IOException if the JSON string is invalid with respect to ImportEPackAsyncTaskStatus - */ - public static ImportEPackAsyncTaskStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportEPackAsyncTaskStatus.class); - } - - /** - * Convert an instance of ImportEPackAsyncTaskStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("task_id") != null && !jsonObj.get("task_id").isJsonNull()) && !jsonObj.get("task_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `task_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_id").toString())); + } + if ((jsonObj.get("task_name") != null && !jsonObj.get("task_name").isJsonNull()) && !jsonObj.get("task_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `task_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_name").toString())); + } + if ((jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull()) && !jsonObj.get("task_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `task_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_status").toString())); + } + // validate the optional field `task_status` + if (jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull()) { + TaskStatusEnum.validateJsonElement(jsonObj.get("task_status")); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) && !jsonObj.get("import_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `import_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("import_policy").toString())); + } + // validate the optional field `import_policy` + if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { + ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); + } + if ((jsonObj.get("author_display_name") != null && !jsonObj.get("author_display_name").isJsonNull()) && !jsonObj.get("author_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_display_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportEPackAsyncTaskStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportEPackAsyncTaskStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportEPackAsyncTaskStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportEPackAsyncTaskStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportEPackAsyncTaskStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImportEPackAsyncTaskStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportEPackAsyncTaskStatus + * @throws IOException if the JSON string is invalid with respect to ImportEPackAsyncTaskStatus + */ + public static ImportEPackAsyncTaskStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportEPackAsyncTaskStatus.class); + } + + /** + * Convert an instance of ImportEPackAsyncTaskStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java index 69fbd3167..7a9803907 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java @@ -4,474 +4,428 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** ImportMetadataTMLAsyncRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportMetadataTMLAsyncRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_TMLS = "metadata_tmls"; - - @SerializedName(SERIALIZED_NAME_METADATA_TMLS) - @javax.annotation.Nonnull - private List metadataTmls; - - public static final String SERIALIZED_NAME_CREATE_NEW = "create_new"; - - @SerializedName(SERIALIZED_NAME_CREATE_NEW) - @javax.annotation.Nullable - private Boolean createNew = false; - - public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; - - @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) - @javax.annotation.Nullable - private Boolean allOrgsOverride = false; - - /** - * <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the - * TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] - */ - @JsonAdapter(ImportPolicyEnum.Adapter.class) - public enum ImportPolicyEnum { - PARTIAL("PARTIAL"), - - ALL_OR_NONE("ALL_OR_NONE"), - - VALIDATE_ONLY("VALIDATE_ONLY"), - - PARTIAL_OBJECT("PARTIAL_OBJECT"); - - private String value; - - ImportPolicyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ImportPolicyEnum fromValue(String value) { - for (ImportPolicyEnum b : ImportPolicyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ImportPolicyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ImportPolicyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; - - @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) - @javax.annotation.Nullable - private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL_OBJECT; - - public static final String SERIALIZED_NAME_SKIP_DIFF_CHECK = "skip_diff_check"; - - @SerializedName(SERIALIZED_NAME_SKIP_DIFF_CHECK) - @javax.annotation.Nullable - private Boolean skipDiffCheck = false; - - public static final String SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION = - "enable_large_metadata_validation"; - - @SerializedName(SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION) - @javax.annotation.Nullable - private Boolean enableLargeMetadataValidation = false; - - public ImportMetadataTMLAsyncRequest() {} - - public ImportMetadataTMLAsyncRequest metadataTmls( - @javax.annotation.Nonnull List metadataTmls) { - this.metadataTmls = metadataTmls; - return this; - } - - public ImportMetadataTMLAsyncRequest addMetadataTmlsItem(String metadataTmlsItem) { - if (this.metadataTmls == null) { - this.metadataTmls = new ArrayList<>(); - } - this.metadataTmls.add(metadataTmlsItem); - return this; - } - - /** - * Details of TML objects. - * - * @return metadataTmls - */ - @javax.annotation.Nonnull - public List getMetadataTmls() { - return metadataTmls; - } - - public void setMetadataTmls(@javax.annotation.Nonnull List metadataTmls) { - this.metadataTmls = metadataTmls; - } - - public ImportMetadataTMLAsyncRequest createNew(@javax.annotation.Nullable Boolean createNew) { - this.createNew = createNew; - return this; - } - - /** - * If selected, creates TML objects with new GUIDs. - * - * @return createNew - */ - @javax.annotation.Nullable - public Boolean getCreateNew() { - return createNew; - } - - public void setCreateNew(@javax.annotation.Nullable Boolean createNew) { - this.createNew = createNew; - } - - public ImportMetadataTMLAsyncRequest allOrgsOverride( - @javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - return this; - } - - /** - * If import is happening from all orgs context. - * - * @return allOrgsOverride - */ - @javax.annotation.Nullable - public Boolean getAllOrgsOverride() { - return allOrgsOverride; - } - - public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - } - - public ImportMetadataTMLAsyncRequest importPolicy( - @javax.annotation.Nullable ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - return this; - } - - /** - * <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the - * TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] - * - * @return importPolicy - */ - @javax.annotation.Nullable - public ImportPolicyEnum getImportPolicy() { - return importPolicy; - } - - public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - } - - public ImportMetadataTMLAsyncRequest skipDiffCheck( - @javax.annotation.Nullable Boolean skipDiffCheck) { - this.skipDiffCheck = skipDiffCheck; - return this; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - /** - * <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check - * before processing object TMLs. - * - * @return skipDiffCheck - */ - @javax.annotation.Nullable - public Boolean getSkipDiffCheck() { - return skipDiffCheck; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public void setSkipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { - this.skipDiffCheck = skipDiffCheck; - } +import com.thoughtspot.client.JSON; - public ImportMetadataTMLAsyncRequest enableLargeMetadataValidation( - @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { - this.enableLargeMetadataValidation = enableLargeMetadataValidation; - return this; +/** + * ImportMetadataTMLAsyncRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportMetadataTMLAsyncRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_TMLS = "metadata_tmls"; + @SerializedName(SERIALIZED_NAME_METADATA_TMLS) + @javax.annotation.Nonnull + private List metadataTmls; + + public static final String SERIALIZED_NAME_CREATE_NEW = "create_new"; + @SerializedName(SERIALIZED_NAME_CREATE_NEW) + @javax.annotation.Nullable + private Boolean createNew = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + /** + * <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + */ + @JsonAdapter(ImportPolicyEnum.Adapter.class) + public enum ImportPolicyEnum { + PARTIAL("PARTIAL"), + + ALL_OR_NONE("ALL_OR_NONE"), + + VALIDATE_ONLY("VALIDATE_ONLY"), + + PARTIAL_OBJECT("PARTIAL_OBJECT"); + + private String value; + + ImportPolicyEnum(String value) { + this.value = value; } - /** - * <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata - * validation should be enabled. - * - * @return enableLargeMetadataValidation - */ - @javax.annotation.Nullable - public Boolean getEnableLargeMetadataValidation() { - return enableLargeMetadataValidation; + public String getValue() { + return value; } - public void setEnableLargeMetadataValidation( - @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { - this.enableLargeMetadataValidation = enableLargeMetadataValidation; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static ImportPolicyEnum fromValue(String value) { + for (ImportPolicyEnum b : ImportPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = - (ImportMetadataTMLAsyncRequest) o; - return Objects.equals(this.metadataTmls, importMetadataTMLAsyncRequest.metadataTmls) - && Objects.equals(this.createNew, importMetadataTMLAsyncRequest.createNew) - && Objects.equals( - this.allOrgsOverride, importMetadataTMLAsyncRequest.allOrgsOverride) - && Objects.equals(this.importPolicy, importMetadataTMLAsyncRequest.importPolicy) - && Objects.equals(this.skipDiffCheck, importMetadataTMLAsyncRequest.skipDiffCheck) - && Objects.equals( - this.enableLargeMetadataValidation, - importMetadataTMLAsyncRequest.enableLargeMetadataValidation); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImportPolicyEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash( - metadataTmls, - createNew, - allOrgsOverride, - importPolicy, - skipDiffCheck, - enableLargeMetadataValidation); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImportPolicyEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; + @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) + @javax.annotation.Nullable + private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL_OBJECT; + + public static final String SERIALIZED_NAME_SKIP_DIFF_CHECK = "skip_diff_check"; + @SerializedName(SERIALIZED_NAME_SKIP_DIFF_CHECK) + @javax.annotation.Nullable + private Boolean skipDiffCheck = false; + + public static final String SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION = "enable_large_metadata_validation"; + @SerializedName(SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION) + @javax.annotation.Nullable + private Boolean enableLargeMetadataValidation = false; + + public ImportMetadataTMLAsyncRequest() { + } + + public ImportMetadataTMLAsyncRequest metadataTmls(@javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + return this; + } + + public ImportMetadataTMLAsyncRequest addMetadataTmlsItem(String metadataTmlsItem) { + if (this.metadataTmls == null) { + this.metadataTmls = new ArrayList<>(); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportMetadataTMLAsyncRequest {\n"); - sb.append(" metadataTmls: ").append(toIndentedString(metadataTmls)).append("\n"); - sb.append(" createNew: ").append(toIndentedString(createNew)).append("\n"); - sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); - sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); - sb.append(" skipDiffCheck: ").append(toIndentedString(skipDiffCheck)).append("\n"); - sb.append(" enableLargeMetadataValidation: ") - .append(toIndentedString(enableLargeMetadataValidation)) - .append("\n"); - sb.append("}"); - return sb.toString(); + this.metadataTmls.add(metadataTmlsItem); + return this; + } + + /** + * Details of TML objects. + * @return metadataTmls + */ + @javax.annotation.Nonnull + public List getMetadataTmls() { + return metadataTmls; + } + + public void setMetadataTmls(@javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + } + + + public ImportMetadataTMLAsyncRequest createNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + return this; + } + + /** + * If selected, creates TML objects with new GUIDs. + * @return createNew + */ + @javax.annotation.Nullable + public Boolean getCreateNew() { + return createNew; + } + + public void setCreateNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + } + + + public ImportMetadataTMLAsyncRequest allOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * If import is happening from all orgs context. + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + + public ImportMetadataTMLAsyncRequest importPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + * @return importPolicy + */ + @javax.annotation.Nullable + public ImportPolicyEnum getImportPolicy() { + return importPolicy; + } + + public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + } + + + public ImportMetadataTMLAsyncRequest skipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + return this; + } + + /** + * <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check before processing object TMLs. + * @return skipDiffCheck + */ + @javax.annotation.Nullable + public Boolean getSkipDiffCheck() { + return skipDiffCheck; + } + + public void setSkipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + } + + + public ImportMetadataTMLAsyncRequest enableLargeMetadataValidation(@javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata validation should be enabled. + * @return enableLargeMetadataValidation + */ + @javax.annotation.Nullable + public Boolean getEnableLargeMetadataValidation() { + return enableLargeMetadataValidation; + } + + public void setEnableLargeMetadataValidation(@javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_tmls"); - openapiFields.add("create_new"); - openapiFields.add("all_orgs_override"); - openapiFields.add("import_policy"); - openapiFields.add("skip_diff_check"); - openapiFields.add("enable_large_metadata_validation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_tmls"); + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = (ImportMetadataTMLAsyncRequest) o; + return Objects.equals(this.metadataTmls, importMetadataTMLAsyncRequest.metadataTmls) && + Objects.equals(this.createNew, importMetadataTMLAsyncRequest.createNew) && + Objects.equals(this.allOrgsOverride, importMetadataTMLAsyncRequest.allOrgsOverride) && + Objects.equals(this.importPolicy, importMetadataTMLAsyncRequest.importPolicy) && + Objects.equals(this.skipDiffCheck, importMetadataTMLAsyncRequest.skipDiffCheck) && + Objects.equals(this.enableLargeMetadataValidation, importMetadataTMLAsyncRequest.enableLargeMetadataValidation); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataTmls, createNew, allOrgsOverride, importPolicy, skipDiffCheck, enableLargeMetadataValidation); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ImportMetadataTMLAsyncRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportMetadataTMLAsyncRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportMetadataTMLAsyncRequest is not" - + " found in the empty JSON string", - ImportMetadataTMLAsyncRequest.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportMetadataTMLAsyncRequest {\n"); + sb.append(" metadataTmls: ").append(toIndentedString(metadataTmls)).append("\n"); + sb.append(" createNew: ").append(toIndentedString(createNew)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); + sb.append(" skipDiffCheck: ").append(toIndentedString(skipDiffCheck)).append("\n"); + sb.append(" enableLargeMetadataValidation: ").append(toIndentedString(enableLargeMetadataValidation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_tmls"); + openapiFields.add("create_new"); + openapiFields.add("all_orgs_override"); + openapiFields.add("import_policy"); + openapiFields.add("skip_diff_check"); + openapiFields.add("enable_large_metadata_validation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_tmls"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportMetadataTMLAsyncRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportMetadataTMLAsyncRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportMetadataTMLAsyncRequest is not found in the empty JSON string", ImportMetadataTMLAsyncRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportMetadataTMLAsyncRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportMetadataTMLAsyncRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportMetadataTMLAsyncRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportMetadataTMLAsyncRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportMetadataTMLAsyncRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportMetadataTMLAsyncRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("metadata_tmls") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("metadata_tmls").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_tmls` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("metadata_tmls").toString())); - } - if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) - && !jsonObj.get("import_policy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_policy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("import_policy").toString())); - } - // validate the optional field `import_policy` - if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { - ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportMetadataTMLAsyncRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportMetadataTMLAsyncRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ImportMetadataTMLAsyncRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportMetadataTMLAsyncRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportMetadataTMLAsyncRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportMetadataTMLAsyncRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportMetadataTMLAsyncRequest - * @throws IOException if the JSON string is invalid with respect to - * ImportMetadataTMLAsyncRequest - */ - public static ImportMetadataTMLAsyncRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportMetadataTMLAsyncRequest.class); - } - - /** - * Convert an instance of ImportMetadataTMLAsyncRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the required json array is present + if (jsonObj.get("metadata_tmls") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("metadata_tmls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_tmls` to be an array in the JSON string but got `%s`", jsonObj.get("metadata_tmls").toString())); + } + if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) && !jsonObj.get("import_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `import_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("import_policy").toString())); + } + // validate the optional field `import_policy` + if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { + ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportMetadataTMLAsyncRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportMetadataTMLAsyncRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportMetadataTMLAsyncRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportMetadataTMLAsyncRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportMetadataTMLAsyncRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ImportMetadataTMLAsyncRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportMetadataTMLAsyncRequest + * @throws IOException if the JSON string is invalid with respect to ImportMetadataTMLAsyncRequest + */ + public static ImportMetadataTMLAsyncRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportMetadataTMLAsyncRequest.class); + } + + /** + * Convert an instance of ImportMetadataTMLAsyncRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java index a8e9e6db6..bace7d7d0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java @@ -4,467 +4,428 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** ImportMetadataTMLRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportMetadataTMLRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_TMLS = "metadata_tmls"; - - @SerializedName(SERIALIZED_NAME_METADATA_TMLS) - @javax.annotation.Nonnull - private List metadataTmls; - - /** Specifies the import policy for the TML import. */ - @JsonAdapter(ImportPolicyEnum.Adapter.class) - public enum ImportPolicyEnum { - PARTIAL("PARTIAL"), - - ALL_OR_NONE("ALL_OR_NONE"), - - VALIDATE_ONLY("VALIDATE_ONLY"), - - PARTIAL_OBJECT("PARTIAL_OBJECT"); - - private String value; - - ImportPolicyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ImportPolicyEnum fromValue(String value) { - for (ImportPolicyEnum b : ImportPolicyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ImportPolicyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ImportPolicyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; - - @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) - @javax.annotation.Nullable - private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL; - - public static final String SERIALIZED_NAME_CREATE_NEW = "create_new"; - - @SerializedName(SERIALIZED_NAME_CREATE_NEW) - @javax.annotation.Nullable - private Boolean createNew = false; - - public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; - - @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) - @javax.annotation.Nullable - private Boolean allOrgsOverride = false; - - public static final String SERIALIZED_NAME_SKIP_DIFF_CHECK = "skip_diff_check"; - - @SerializedName(SERIALIZED_NAME_SKIP_DIFF_CHECK) - @javax.annotation.Nullable - private Boolean skipDiffCheck = false; - - public static final String SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION = - "enable_large_metadata_validation"; - - @SerializedName(SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION) - @javax.annotation.Nullable - private Boolean enableLargeMetadataValidation = false; - - public ImportMetadataTMLRequest() {} - - public ImportMetadataTMLRequest metadataTmls( - @javax.annotation.Nonnull List metadataTmls) { - this.metadataTmls = metadataTmls; - return this; - } - - public ImportMetadataTMLRequest addMetadataTmlsItem(String metadataTmlsItem) { - if (this.metadataTmls == null) { - this.metadataTmls = new ArrayList<>(); - } - this.metadataTmls.add(metadataTmlsItem); - return this; - } - - /** - * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our - * Playground, is currently requires manual formatting. For more details on the workaround, - * please click - * [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - * - * @return metadataTmls - */ - @javax.annotation.Nonnull - public List getMetadataTmls() { - return metadataTmls; - } - - public void setMetadataTmls(@javax.annotation.Nonnull List metadataTmls) { - this.metadataTmls = metadataTmls; - } - - public ImportMetadataTMLRequest importPolicy( - @javax.annotation.Nullable ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - return this; - } - - /** - * Specifies the import policy for the TML import. - * - * @return importPolicy - */ - @javax.annotation.Nullable - public ImportPolicyEnum getImportPolicy() { - return importPolicy; - } - - public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - } - - public ImportMetadataTMLRequest createNew(@javax.annotation.Nullable Boolean createNew) { - this.createNew = createNew; - return this; - } - - /** - * If selected, creates TML objects with new GUIDs. - * - * @return createNew - */ - @javax.annotation.Nullable - public Boolean getCreateNew() { - return createNew; - } - - public void setCreateNew(@javax.annotation.Nullable Boolean createNew) { - this.createNew = createNew; - } - - public ImportMetadataTMLRequest allOrgsOverride( - @javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - return this; - } - - /** - * If import is happening from all orgs context. - * - * @return allOrgsOverride - */ - @javax.annotation.Nullable - public Boolean getAllOrgsOverride() { - return allOrgsOverride; - } - - public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { - this.allOrgsOverride = allOrgsOverride; - } - - public ImportMetadataTMLRequest skipDiffCheck( - @javax.annotation.Nullable Boolean skipDiffCheck) { - this.skipDiffCheck = skipDiffCheck; - return this; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - /** - * <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check - * before processing object TMLs. - * - * @return skipDiffCheck - */ - @javax.annotation.Nullable - public Boolean getSkipDiffCheck() { - return skipDiffCheck; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public void setSkipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { - this.skipDiffCheck = skipDiffCheck; - } +import com.thoughtspot.client.JSON; - public ImportMetadataTMLRequest enableLargeMetadataValidation( - @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { - this.enableLargeMetadataValidation = enableLargeMetadataValidation; - return this; +/** + * ImportMetadataTMLRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportMetadataTMLRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_TMLS = "metadata_tmls"; + @SerializedName(SERIALIZED_NAME_METADATA_TMLS) + @javax.annotation.Nonnull + private List metadataTmls; + + /** + * Specifies the import policy for the TML import. + */ + @JsonAdapter(ImportPolicyEnum.Adapter.class) + public enum ImportPolicyEnum { + PARTIAL("PARTIAL"), + + ALL_OR_NONE("ALL_OR_NONE"), + + VALIDATE_ONLY("VALIDATE_ONLY"), + + PARTIAL_OBJECT("PARTIAL_OBJECT"); + + private String value; + + ImportPolicyEnum(String value) { + this.value = value; } - /** - * <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata - * validation should be enabled. - * - * @return enableLargeMetadataValidation - */ - @javax.annotation.Nullable - public Boolean getEnableLargeMetadataValidation() { - return enableLargeMetadataValidation; + public String getValue() { + return value; } - public void setEnableLargeMetadataValidation( - @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { - this.enableLargeMetadataValidation = enableLargeMetadataValidation; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static ImportPolicyEnum fromValue(String value) { + for (ImportPolicyEnum b : ImportPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportMetadataTMLRequest importMetadataTMLRequest = (ImportMetadataTMLRequest) o; - return Objects.equals(this.metadataTmls, importMetadataTMLRequest.metadataTmls) - && Objects.equals(this.importPolicy, importMetadataTMLRequest.importPolicy) - && Objects.equals(this.createNew, importMetadataTMLRequest.createNew) - && Objects.equals(this.allOrgsOverride, importMetadataTMLRequest.allOrgsOverride) - && Objects.equals(this.skipDiffCheck, importMetadataTMLRequest.skipDiffCheck) - && Objects.equals( - this.enableLargeMetadataValidation, - importMetadataTMLRequest.enableLargeMetadataValidation); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImportPolicyEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash( - metadataTmls, - importPolicy, - createNew, - allOrgsOverride, - skipDiffCheck, - enableLargeMetadataValidation); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImportPolicyEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; + @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) + @javax.annotation.Nullable + private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL; + + public static final String SERIALIZED_NAME_CREATE_NEW = "create_new"; + @SerializedName(SERIALIZED_NAME_CREATE_NEW) + @javax.annotation.Nullable + private Boolean createNew = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + public static final String SERIALIZED_NAME_SKIP_DIFF_CHECK = "skip_diff_check"; + @SerializedName(SERIALIZED_NAME_SKIP_DIFF_CHECK) + @javax.annotation.Nullable + private Boolean skipDiffCheck = false; + + public static final String SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION = "enable_large_metadata_validation"; + @SerializedName(SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION) + @javax.annotation.Nullable + private Boolean enableLargeMetadataValidation = false; + + public ImportMetadataTMLRequest() { + } + + public ImportMetadataTMLRequest metadataTmls(@javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + return this; + } + + public ImportMetadataTMLRequest addMetadataTmlsItem(String metadataTmlsItem) { + if (this.metadataTmls == null) { + this.metadataTmls = new ArrayList<>(); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportMetadataTMLRequest {\n"); - sb.append(" metadataTmls: ").append(toIndentedString(metadataTmls)).append("\n"); - sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); - sb.append(" createNew: ").append(toIndentedString(createNew)).append("\n"); - sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); - sb.append(" skipDiffCheck: ").append(toIndentedString(skipDiffCheck)).append("\n"); - sb.append(" enableLargeMetadataValidation: ") - .append(toIndentedString(enableLargeMetadataValidation)) - .append("\n"); - sb.append("}"); - return sb.toString(); + this.metadataTmls.add(metadataTmlsItem); + return this; + } + + /** + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + * @return metadataTmls + */ + @javax.annotation.Nonnull + public List getMetadataTmls() { + return metadataTmls; + } + + public void setMetadataTmls(@javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + } + + + public ImportMetadataTMLRequest importPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + return this; + } + + /** + * Specifies the import policy for the TML import. + * @return importPolicy + */ + @javax.annotation.Nullable + public ImportPolicyEnum getImportPolicy() { + return importPolicy; + } + + public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + } + + + public ImportMetadataTMLRequest createNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + return this; + } + + /** + * If selected, creates TML objects with new GUIDs. + * @return createNew + */ + @javax.annotation.Nullable + public Boolean getCreateNew() { + return createNew; + } + + public void setCreateNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + } + + + public ImportMetadataTMLRequest allOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * If import is happening from all orgs context. + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + + public ImportMetadataTMLRequest skipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + return this; + } + + /** + * <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check before processing object TMLs. + * @return skipDiffCheck + */ + @javax.annotation.Nullable + public Boolean getSkipDiffCheck() { + return skipDiffCheck; + } + + public void setSkipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + } + + + public ImportMetadataTMLRequest enableLargeMetadataValidation(@javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata validation should be enabled. + * @return enableLargeMetadataValidation + */ + @javax.annotation.Nullable + public Boolean getEnableLargeMetadataValidation() { + return enableLargeMetadataValidation; + } + + public void setEnableLargeMetadataValidation(@javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_tmls"); - openapiFields.add("import_policy"); - openapiFields.add("create_new"); - openapiFields.add("all_orgs_override"); - openapiFields.add("skip_diff_check"); - openapiFields.add("enable_large_metadata_validation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_tmls"); + ImportMetadataTMLRequest importMetadataTMLRequest = (ImportMetadataTMLRequest) o; + return Objects.equals(this.metadataTmls, importMetadataTMLRequest.metadataTmls) && + Objects.equals(this.importPolicy, importMetadataTMLRequest.importPolicy) && + Objects.equals(this.createNew, importMetadataTMLRequest.createNew) && + Objects.equals(this.allOrgsOverride, importMetadataTMLRequest.allOrgsOverride) && + Objects.equals(this.skipDiffCheck, importMetadataTMLRequest.skipDiffCheck) && + Objects.equals(this.enableLargeMetadataValidation, importMetadataTMLRequest.enableLargeMetadataValidation); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataTmls, importPolicy, createNew, allOrgsOverride, skipDiffCheck, enableLargeMetadataValidation); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportMetadataTMLRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportMetadataTMLRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportMetadataTMLRequest is not found" - + " in the empty JSON string", - ImportMetadataTMLRequest.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportMetadataTMLRequest {\n"); + sb.append(" metadataTmls: ").append(toIndentedString(metadataTmls)).append("\n"); + sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); + sb.append(" createNew: ").append(toIndentedString(createNew)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" skipDiffCheck: ").append(toIndentedString(skipDiffCheck)).append("\n"); + sb.append(" enableLargeMetadataValidation: ").append(toIndentedString(enableLargeMetadataValidation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_tmls"); + openapiFields.add("import_policy"); + openapiFields.add("create_new"); + openapiFields.add("all_orgs_override"); + openapiFields.add("skip_diff_check"); + openapiFields.add("enable_large_metadata_validation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_tmls"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportMetadataTMLRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportMetadataTMLRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportMetadataTMLRequest is not found in the empty JSON string", ImportMetadataTMLRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportMetadataTMLRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportMetadataTMLRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportMetadataTMLRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportMetadataTMLRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportMetadataTMLRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportMetadataTMLRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("metadata_tmls") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("metadata_tmls").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_tmls` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("metadata_tmls").toString())); - } - if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) - && !jsonObj.get("import_policy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_policy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("import_policy").toString())); - } - // validate the optional field `import_policy` - if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { - ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportMetadataTMLRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportMetadataTMLRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportMetadataTMLRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportMetadataTMLRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportMetadataTMLRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportMetadataTMLRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportMetadataTMLRequest - * @throws IOException if the JSON string is invalid with respect to ImportMetadataTMLRequest - */ - public static ImportMetadataTMLRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportMetadataTMLRequest.class); - } - - /** - * Convert an instance of ImportMetadataTMLRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the required json array is present + if (jsonObj.get("metadata_tmls") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("metadata_tmls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_tmls` to be an array in the JSON string but got `%s`", jsonObj.get("metadata_tmls").toString())); + } + if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) && !jsonObj.get("import_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `import_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("import_policy").toString())); + } + // validate the optional field `import_policy` + if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { + ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportMetadataTMLRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportMetadataTMLRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportMetadataTMLRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportMetadataTMLRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportMetadataTMLRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ImportMetadataTMLRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportMetadataTMLRequest + * @throws IOException if the JSON string is invalid with respect to ImportMetadataTMLRequest + */ + public static ImportMetadataTMLRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportMetadataTMLRequest.class); + } + + /** + * Convert an instance of ImportMetadataTMLRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java index b28fbb2a9..8943e3548 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java @@ -4,926 +4,821 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ImportUser */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportUser implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nonnull - private String userIdentifier; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nonnull - private String displayName; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password; - - /** Type of the user account. */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - LOCAL_USER("LOCAL_USER"), - - LDAP_USER("LDAP_USER"), - - SAML_USER("SAML_USER"), - - OIDC_USER("OIDC_USER"), - - REMOTE_USER("REMOTE_USER"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - @javax.annotation.Nullable - private AccountTypeEnum accountType = AccountTypeEnum.LOCAL_USER; - - /** Status of the user account. */ - @JsonAdapter(AccountStatusEnum.Adapter.class) - public enum AccountStatusEnum { - ACTIVE("ACTIVE"), - - INACTIVE("INACTIVE"), - - EXPIRED("EXPIRED"), - - LOCKED("LOCKED"), - - PENDING("PENDING"), - - SUSPENDED("SUSPENDED"); - - private String value; - - AccountStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountStatusEnum fromValue(String value) { - for (AccountStatusEnum b : AccountStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) - @javax.annotation.Nullable - private AccountStatusEnum accountStatus = AccountStatusEnum.ACTIVE; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - /** - * Visibility of the users. The SHARABLE property makes a user visible to other users and group, - * who can share objects with the user. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; - - @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) - @javax.annotation.Nullable - private Boolean notifyOnShare = true; - - public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = - "show_onboarding_experience"; - - @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) - @javax.annotation.Nullable - private Boolean showOnboardingExperience; - - public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = - "onboarding_experience_completed"; - - @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) - @javax.annotation.Nullable - private Boolean onboardingExperienceCompleted; - public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = - "home_liveboard_identifier"; - - @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) - @javax.annotation.Nullable - private String homeLiveboardIdentifier; - - public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; - - @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) - @javax.annotation.Nullable - private List favoriteMetadata; - - public ImportUser() {} - - public ImportUser userIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * Unique ID or name of the user. - * - * @return userIdentifier - */ - @javax.annotation.Nonnull - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - public ImportUser displayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Display name of the user. - * - * @return displayName - */ - @javax.annotation.Nonnull - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - } - - public ImportUser password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password of the user. - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public ImportUser accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - return this; - } - - /** - * Type of the user account. - * - * @return accountType - */ - @javax.annotation.Nullable - public AccountTypeEnum getAccountType() { - return accountType; - } - - public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - } - - public ImportUser accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - return this; - } - - /** - * Status of the user account. - * - * @return accountStatus - */ - @javax.annotation.Nullable - public AccountStatusEnum getAccountStatus() { - return accountStatus; - } +import com.thoughtspot.client.JSON; - public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - } +/** + * ImportUser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportUser implements Serializable { + private static final long serialVersionUID = 1L; - public ImportUser email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; - /** - * Email address of the user. - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; - public ImportUser orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; - } + /** + * Type of the user account. + */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); - public ImportUser addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } + private String value; - /** - * ID or name of the Orgs to which the user belongs. - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; + AccountTypeEnum(String value) { + this.value = value; } - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; + public String getValue() { + return value; } - public ImportUser groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public ImportUser addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } - - /** - * ID or name of the groups to which the user belongs. - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; - } - - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - } - - public ImportUser visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the users. The SHARABLE property makes a user visible to other users and group, - * who can share objects with the user. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; + } + return null; } - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public ImportUser notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } } - /** - * Notify user when other users or groups share metadata objects - * - * @return notifyOnShare - */ - @javax.annotation.Nullable - public Boolean getNotifyOnShare() { - return notifyOnShare; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); } + } - public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType = AccountTypeEnum.LOCAL_USER; - public ImportUser showOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - return this; - } + /** + * Status of the user account. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); - /** - * Show or hide the new user onboarding walkthroughs - * - * @return showOnboardingExperience - */ - @javax.annotation.Nullable - public Boolean getShowOnboardingExperience() { - return showOnboardingExperience; - } + private String value; - public void setShowOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; + AccountStatusEnum(String value) { + this.value = value; } - public ImportUser onboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - return this; + public String getValue() { + return value; } - /** - * Revisit the new user onboarding walkthroughs - * - * @return onboardingExperienceCompleted - */ - @javax.annotation.Nullable - public Boolean getOnboardingExperienceCompleted() { - return onboardingExperienceCompleted; + @Override + public String toString() { + return String.valueOf(value); } - public void setOnboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public ImportUser homeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Unique ID or name of the default Liveboard assigned to the user. - * - * @return homeLiveboardIdentifier - */ - @javax.annotation.Nullable - public String getHomeLiveboardIdentifier() { - return homeLiveboardIdentifier; + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } } - public void setHomeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); } + } - public ImportUser favoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - return this; - } + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus = AccountStatusEnum.ACTIVE; - public ImportUser addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { - if (this.favoriteMetadata == null) { - this.favoriteMetadata = new ArrayList<>(); - } - this.favoriteMetadata.add(favoriteMetadataItem); - return this; - } + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; - /** - * Metadata objects to add to the user's favorites list. - * - * @return favoriteMetadata - */ - @javax.annotation.Nullable - public List getFavoriteMetadata() { - return favoriteMetadata; - } + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; - public void setFavoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - } + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportUser importUser = (ImportUser) o; - return Objects.equals(this.userIdentifier, importUser.userIdentifier) - && Objects.equals(this.displayName, importUser.displayName) - && Objects.equals(this.password, importUser.password) - && Objects.equals(this.accountType, importUser.accountType) - && Objects.equals(this.accountStatus, importUser.accountStatus) - && Objects.equals(this.email, importUser.email) - && Objects.equals(this.orgIdentifiers, importUser.orgIdentifiers) - && Objects.equals(this.groupIdentifiers, importUser.groupIdentifiers) - && Objects.equals(this.visibility, importUser.visibility) - && Objects.equals(this.notifyOnShare, importUser.notifyOnShare) - && Objects.equals( - this.showOnboardingExperience, importUser.showOnboardingExperience) - && Objects.equals( - this.onboardingExperienceCompleted, - importUser.onboardingExperienceCompleted) - && Objects.equals(this.homeLiveboardIdentifier, importUser.homeLiveboardIdentifier) - && Objects.equals(this.favoriteMetadata, importUser.favoriteMetadata); - } + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - userIdentifier, - displayName, - password, - accountType, - accountStatus, - email, - orgIdentifiers, - groupIdentifiers, - visibility, - notifyOnShare, - showOnboardingExperience, - onboardingExperienceCompleted, - homeLiveboardIdentifier, - favoriteMetadata); + VisibilityEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportUser {\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); - sb.append(" showOnboardingExperience: ") - .append(toIndentedString(showOnboardingExperience)) - .append("\n"); - sb.append(" onboardingExperienceCompleted: ") - .append(toIndentedString(onboardingExperienceCompleted)) - .append("\n"); - sb.append(" homeLiveboardIdentifier: ") - .append(toIndentedString(homeLiveboardIdentifier)) - .append("\n"); - sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_identifier"); - openapiFields.add("display_name"); - openapiFields.add("password"); - openapiFields.add("account_type"); - openapiFields.add("account_status"); - openapiFields.add("email"); - openapiFields.add("org_identifiers"); - openapiFields.add("group_identifiers"); - openapiFields.add("visibility"); - openapiFields.add("notify_on_share"); - openapiFields.add("show_onboarding_experience"); - openapiFields.add("onboarding_experience_completed"); - openapiFields.add("home_liveboard_identifier"); - openapiFields.add("favorite_metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("user_identifier"); - openapiRequiredFields.add("display_name"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportUser - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportUser.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportUser is not found in the empty" - + " JSON string", - ImportUser.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportUser.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportUser` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportUser.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare = true; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = "show_onboarding_experience"; + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = "onboarding_experience_completed"; + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = "home_liveboard_identifier"; + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + public ImportUser() { + } + + public ImportUser userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Unique ID or name of the user. + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + public ImportUser displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the user. + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public ImportUser password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user. + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public ImportUser accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the user account. + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public ImportUser accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Status of the user account. + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + + public ImportUser email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public ImportUser orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public ImportUser addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * ID or name of the Orgs to which the user belongs. + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public ImportUser groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public ImportUser addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * ID or name of the groups to which the user belongs. + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public ImportUser visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public ImportUser notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * Notify user when other users or groups share metadata objects + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + + public ImportUser showOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * Show or hide the new user onboarding walkthroughs + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + + public ImportUser onboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * Revisit the new user onboarding walkthroughs + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + + public ImportUser homeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * Unique ID or name of the default Liveboard assigned to the user. + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + + public ImportUser favoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public ImportUser addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the user's favorites list. + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUser importUser = (ImportUser) o; + return Objects.equals(this.userIdentifier, importUser.userIdentifier) && + Objects.equals(this.displayName, importUser.displayName) && + Objects.equals(this.password, importUser.password) && + Objects.equals(this.accountType, importUser.accountType) && + Objects.equals(this.accountStatus, importUser.accountStatus) && + Objects.equals(this.email, importUser.email) && + Objects.equals(this.orgIdentifiers, importUser.orgIdentifiers) && + Objects.equals(this.groupIdentifiers, importUser.groupIdentifiers) && + Objects.equals(this.visibility, importUser.visibility) && + Objects.equals(this.notifyOnShare, importUser.notifyOnShare) && + Objects.equals(this.showOnboardingExperience, importUser.showOnboardingExperience) && + Objects.equals(this.onboardingExperienceCompleted, importUser.onboardingExperienceCompleted) && + Objects.equals(this.homeLiveboardIdentifier, importUser.homeLiveboardIdentifier) && + Objects.equals(this.favoriteMetadata, importUser.favoriteMetadata); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, displayName, password, accountType, accountStatus, email, orgIdentifiers, groupIdentifiers, visibility, notifyOnShare, showOnboardingExperience, onboardingExperienceCompleted, homeLiveboardIdentifier, favoriteMetadata); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUser {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ").append(toIndentedString(showOnboardingExperience)).append("\n"); + sb.append(" onboardingExperienceCompleted: ").append(toIndentedString(onboardingExperienceCompleted)).append("\n"); + sb.append(" homeLiveboardIdentifier: ").append(toIndentedString(homeLiveboardIdentifier)).append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("display_name"); + openapiFields.add("password"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("email"); + openapiFields.add("org_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_identifier"); + openapiRequiredFields.add("display_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportUser is not found in the empty JSON string", ImportUser.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportUser.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUser.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - if (!jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) - && !jsonObj.get("account_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_type").toString())); - } - // validate the optional field `account_type` - if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { - AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); - } - if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) - && !jsonObj.get("account_status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_status` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("account_status").toString())); - } - // validate the optional field `account_status` - if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { - AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - if ((jsonObj.get("home_liveboard_identifier") != null - && !jsonObj.get("home_liveboard_identifier").isJsonNull()) - && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `home_liveboard_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("home_liveboard_identifier").toString())); - } - if (jsonObj.get("favorite_metadata") != null - && !jsonObj.get("favorite_metadata").isJsonNull()) { - JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); - if (jsonArrayfavoriteMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("favorite_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `favorite_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("favorite_metadata").toString())); - } - - // validate the optional field `favorite_metadata` (array) - for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { - FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportUser.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportUser' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportUser.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportUser value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportUser read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportUser - * @throws IOException if the JSON string is invalid with respect to ImportUser - */ - public static ImportUser fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportUser.class); - } - - /** - * Convert an instance of ImportUser to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("home_liveboard_identifier") != null && !jsonObj.get("home_liveboard_identifier").isJsonNull()) && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `home_liveboard_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `favorite_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUser + * @throws IOException if the JSON string is invalid with respect to ImportUser + */ + public static ImportUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUser.class); + } + + /** + * Convert an instance of ImportUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java index becb5dc30..3ba229175 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java @@ -4,299 +4,285 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.GroupsImportListInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ImportUserGroupsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportUserGroupsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_GROUPS = "groups"; - - @SerializedName(SERIALIZED_NAME_GROUPS) - @javax.annotation.Nullable - private List groups; - - public static final String SERIALIZED_NAME_DELETE_UNSPECIFIED_GROUPS = - "delete_unspecified_groups"; - - @SerializedName(SERIALIZED_NAME_DELETE_UNSPECIFIED_GROUPS) - @javax.annotation.Nullable - private Boolean deleteUnspecifiedGroups = false; - - public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - @javax.annotation.Nullable - private Boolean dryRun = true; - - public ImportUserGroupsRequest() {} - - public ImportUserGroupsRequest groups( - @javax.annotation.Nullable List groups) { - this.groups = groups; - return this; - } - - public ImportUserGroupsRequest addGroupsItem(GroupsImportListInput groupsItem) { - if (this.groups == null) { - this.groups = new ArrayList<>(); - } - this.groups.add(groupsItem); - return this; - } - - /** - * Details of groups which are to be imported - * - * @return groups - */ - @javax.annotation.Nullable - public List getGroups() { - return groups; - } - - public void setGroups(@javax.annotation.Nullable List groups) { - this.groups = groups; - } - public ImportUserGroupsRequest deleteUnspecifiedGroups( - @javax.annotation.Nullable Boolean deleteUnspecifiedGroups) { - this.deleteUnspecifiedGroups = deleteUnspecifiedGroups; - return this; - } - - /** - * If set to true, removes groups that are not specified in the API request. - * - * @return deleteUnspecifiedGroups - */ - @javax.annotation.Nullable - public Boolean getDeleteUnspecifiedGroups() { - return deleteUnspecifiedGroups; - } - - public void setDeleteUnspecifiedGroups( - @javax.annotation.Nullable Boolean deleteUnspecifiedGroups) { - this.deleteUnspecifiedGroups = deleteUnspecifiedGroups; - } - - public ImportUserGroupsRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { - this.dryRun = dryRun; - return this; - } - - /** - * If true, the API performs a test operation and returns user IDs whose data will be edited - * after the import. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { - this.dryRun = dryRun; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportUserGroupsRequest importUserGroupsRequest = (ImportUserGroupsRequest) o; - return Objects.equals(this.groups, importUserGroupsRequest.groups) - && Objects.equals( - this.deleteUnspecifiedGroups, - importUserGroupsRequest.deleteUnspecifiedGroups) - && Objects.equals(this.dryRun, importUserGroupsRequest.dryRun); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(groups, deleteUnspecifiedGroups, dryRun); +/** + * ImportUserGroupsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportUserGroupsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + public static final String SERIALIZED_NAME_DELETE_UNSPECIFIED_GROUPS = "delete_unspecified_groups"; + @SerializedName(SERIALIZED_NAME_DELETE_UNSPECIFIED_GROUPS) + @javax.annotation.Nullable + private Boolean deleteUnspecifiedGroups = false; + + public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; + @SerializedName(SERIALIZED_NAME_DRY_RUN) + @javax.annotation.Nullable + private Boolean dryRun = true; + + public ImportUserGroupsRequest() { + } + + public ImportUserGroupsRequest groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public ImportUserGroupsRequest addGroupsItem(GroupsImportListInput groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.groups.add(groupsItem); + return this; + } + + /** + * Details of groups which are to be imported + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + + public ImportUserGroupsRequest deleteUnspecifiedGroups(@javax.annotation.Nullable Boolean deleteUnspecifiedGroups) { + this.deleteUnspecifiedGroups = deleteUnspecifiedGroups; + return this; + } + + /** + * If set to true, removes groups that are not specified in the API request. + * @return deleteUnspecifiedGroups + */ + @javax.annotation.Nullable + public Boolean getDeleteUnspecifiedGroups() { + return deleteUnspecifiedGroups; + } + + public void setDeleteUnspecifiedGroups(@javax.annotation.Nullable Boolean deleteUnspecifiedGroups) { + this.deleteUnspecifiedGroups = deleteUnspecifiedGroups; + } + + + public ImportUserGroupsRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportUserGroupsRequest {\n"); - sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" deleteUnspecifiedGroups: ") - .append(toIndentedString(deleteUnspecifiedGroups)) - .append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ImportUserGroupsRequest importUserGroupsRequest = (ImportUserGroupsRequest) o; + return Objects.equals(this.groups, importUserGroupsRequest.groups) && + Objects.equals(this.deleteUnspecifiedGroups, importUserGroupsRequest.deleteUnspecifiedGroups) && + Objects.equals(this.dryRun, importUserGroupsRequest.dryRun); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(groups, deleteUnspecifiedGroups, dryRun); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("groups"); - openapiFields.add("delete_unspecified_groups"); - openapiFields.add("dry_run"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUserGroupsRequest {\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" deleteUnspecifiedGroups: ").append(toIndentedString(deleteUnspecifiedGroups)).append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportUserGroupsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportUserGroupsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportUserGroupsRequest is not found" - + " in the empty JSON string", - ImportUserGroupsRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("groups"); + openapiFields.add("delete_unspecified_groups"); + openapiFields.add("dry_run"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUserGroupsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUserGroupsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportUserGroupsRequest is not found in the empty JSON string", ImportUserGroupsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportUserGroupsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportUserGroupsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportUserGroupsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportUserGroupsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { - JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); - if (jsonArraygroups != null) { - // ensure the json data is an array - if (!jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups").toString())); - } - - // validate the optional field `groups` (array) - for (int i = 0; i < jsonArraygroups.size(); i++) { - GroupsImportListInput.validateJsonElement(jsonArraygroups.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportUserGroupsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportUserGroupsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportUserGroupsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportUserGroupsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GroupsImportListInput.validateJsonElement(jsonArraygroups.get(i)); + }; } - } - - /** - * Create an instance of ImportUserGroupsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportUserGroupsRequest - * @throws IOException if the JSON string is invalid with respect to ImportUserGroupsRequest - */ - public static ImportUserGroupsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportUserGroupsRequest.class); - } + } + } - /** - * Convert an instance of ImportUserGroupsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUserGroupsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportUserGroupsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUserGroupsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportUserGroupsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ImportUserGroupsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUserGroupsRequest + * @throws IOException if the JSON string is invalid with respect to ImportUserGroupsRequest + */ + public static ImportUserGroupsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUserGroupsRequest.class); + } + + /** + * Convert an instance of ImportUserGroupsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java index 1a2e1dc7d..111b441f6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java @@ -4,330 +4,315 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserGroup; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ImportUserGroupsResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportUserGroupsResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_GROUPS_ADDED = "groups_added"; - - @SerializedName(SERIALIZED_NAME_GROUPS_ADDED) - @javax.annotation.Nonnull - private List groupsAdded; - - public static final String SERIALIZED_NAME_GROUPS_DELETED = "groups_deleted"; - - @SerializedName(SERIALIZED_NAME_GROUPS_DELETED) - @javax.annotation.Nonnull - private List groupsDeleted; - - public static final String SERIALIZED_NAME_GROUPS_UPDATED = "groups_updated"; - - @SerializedName(SERIALIZED_NAME_GROUPS_UPDATED) - @javax.annotation.Nonnull - private List groupsUpdated; - - public ImportUserGroupsResponse() {} - - public ImportUserGroupsResponse groupsAdded( - @javax.annotation.Nonnull List groupsAdded) { - this.groupsAdded = groupsAdded; - return this; - } - - public ImportUserGroupsResponse addGroupsAddedItem(UserGroup groupsAddedItem) { - if (this.groupsAdded == null) { - this.groupsAdded = new ArrayList<>(); - } - this.groupsAdded.add(groupsAddedItem); - return this; - } - - /** - * The groups which are added into the system. - * - * @return groupsAdded - */ - @javax.annotation.Nonnull - public List getGroupsAdded() { - return groupsAdded; - } - - public void setGroupsAdded(@javax.annotation.Nonnull List groupsAdded) { - this.groupsAdded = groupsAdded; - } - - public ImportUserGroupsResponse groupsDeleted( - @javax.annotation.Nonnull List groupsDeleted) { - this.groupsDeleted = groupsDeleted; - return this; - } - - public ImportUserGroupsResponse addGroupsDeletedItem(UserGroup groupsDeletedItem) { - if (this.groupsDeleted == null) { - this.groupsDeleted = new ArrayList<>(); - } - this.groupsDeleted.add(groupsDeletedItem); - return this; - } - - /** - * The groups which are deleted from the system. - * - * @return groupsDeleted - */ - @javax.annotation.Nonnull - public List getGroupsDeleted() { - return groupsDeleted; - } +import com.thoughtspot.client.JSON; - public void setGroupsDeleted(@javax.annotation.Nonnull List groupsDeleted) { - this.groupsDeleted = groupsDeleted; +/** + * ImportUserGroupsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportUserGroupsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_GROUPS_ADDED = "groups_added"; + @SerializedName(SERIALIZED_NAME_GROUPS_ADDED) + @javax.annotation.Nonnull + private List groupsAdded; + + public static final String SERIALIZED_NAME_GROUPS_DELETED = "groups_deleted"; + @SerializedName(SERIALIZED_NAME_GROUPS_DELETED) + @javax.annotation.Nonnull + private List groupsDeleted; + + public static final String SERIALIZED_NAME_GROUPS_UPDATED = "groups_updated"; + @SerializedName(SERIALIZED_NAME_GROUPS_UPDATED) + @javax.annotation.Nonnull + private List groupsUpdated; + + public ImportUserGroupsResponse() { + } + + public ImportUserGroupsResponse groupsAdded(@javax.annotation.Nonnull List groupsAdded) { + this.groupsAdded = groupsAdded; + return this; + } + + public ImportUserGroupsResponse addGroupsAddedItem(UserGroup groupsAddedItem) { + if (this.groupsAdded == null) { + this.groupsAdded = new ArrayList<>(); } - - public ImportUserGroupsResponse groupsUpdated( - @javax.annotation.Nonnull List groupsUpdated) { - this.groupsUpdated = groupsUpdated; - return this; + this.groupsAdded.add(groupsAddedItem); + return this; + } + + /** + * The groups which are added into the system. + * @return groupsAdded + */ + @javax.annotation.Nonnull + public List getGroupsAdded() { + return groupsAdded; + } + + public void setGroupsAdded(@javax.annotation.Nonnull List groupsAdded) { + this.groupsAdded = groupsAdded; + } + + + public ImportUserGroupsResponse groupsDeleted(@javax.annotation.Nonnull List groupsDeleted) { + this.groupsDeleted = groupsDeleted; + return this; + } + + public ImportUserGroupsResponse addGroupsDeletedItem(UserGroup groupsDeletedItem) { + if (this.groupsDeleted == null) { + this.groupsDeleted = new ArrayList<>(); } - - public ImportUserGroupsResponse addGroupsUpdatedItem(UserGroup groupsUpdatedItem) { - if (this.groupsUpdated == null) { - this.groupsUpdated = new ArrayList<>(); - } - this.groupsUpdated.add(groupsUpdatedItem); - return this; + this.groupsDeleted.add(groupsDeletedItem); + return this; + } + + /** + * The groups which are deleted from the system. + * @return groupsDeleted + */ + @javax.annotation.Nonnull + public List getGroupsDeleted() { + return groupsDeleted; + } + + public void setGroupsDeleted(@javax.annotation.Nonnull List groupsDeleted) { + this.groupsDeleted = groupsDeleted; + } + + + public ImportUserGroupsResponse groupsUpdated(@javax.annotation.Nonnull List groupsUpdated) { + this.groupsUpdated = groupsUpdated; + return this; + } + + public ImportUserGroupsResponse addGroupsUpdatedItem(UserGroup groupsUpdatedItem) { + if (this.groupsUpdated == null) { + this.groupsUpdated = new ArrayList<>(); } + this.groupsUpdated.add(groupsUpdatedItem); + return this; + } - /** - * The groups which are updated in the system. - * - * @return groupsUpdated - */ - @javax.annotation.Nonnull - public List getGroupsUpdated() { - return groupsUpdated; - } + /** + * The groups which are updated in the system. + * @return groupsUpdated + */ + @javax.annotation.Nonnull + public List getGroupsUpdated() { + return groupsUpdated; + } - public void setGroupsUpdated(@javax.annotation.Nonnull List groupsUpdated) { - this.groupsUpdated = groupsUpdated; - } + public void setGroupsUpdated(@javax.annotation.Nonnull List groupsUpdated) { + this.groupsUpdated = groupsUpdated; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportUserGroupsResponse importUserGroupsResponse = (ImportUserGroupsResponse) o; - return Objects.equals(this.groupsAdded, importUserGroupsResponse.groupsAdded) - && Objects.equals(this.groupsDeleted, importUserGroupsResponse.groupsDeleted) - && Objects.equals(this.groupsUpdated, importUserGroupsResponse.groupsUpdated); - } - @Override - public int hashCode() { - return Objects.hash(groupsAdded, groupsDeleted, groupsUpdated); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportUserGroupsResponse {\n"); - sb.append(" groupsAdded: ").append(toIndentedString(groupsAdded)).append("\n"); - sb.append(" groupsDeleted: ").append(toIndentedString(groupsDeleted)).append("\n"); - sb.append(" groupsUpdated: ").append(toIndentedString(groupsUpdated)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("groups_added"); - openapiFields.add("groups_deleted"); - openapiFields.add("groups_updated"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("groups_added"); - openapiRequiredFields.add("groups_deleted"); - openapiRequiredFields.add("groups_updated"); + ImportUserGroupsResponse importUserGroupsResponse = (ImportUserGroupsResponse) o; + return Objects.equals(this.groupsAdded, importUserGroupsResponse.groupsAdded) && + Objects.equals(this.groupsDeleted, importUserGroupsResponse.groupsDeleted) && + Objects.equals(this.groupsUpdated, importUserGroupsResponse.groupsUpdated); + } + + @Override + public int hashCode() { + return Objects.hash(groupsAdded, groupsDeleted, groupsUpdated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUserGroupsResponse {\n"); + sb.append(" groupsAdded: ").append(toIndentedString(groupsAdded)).append("\n"); + sb.append(" groupsDeleted: ").append(toIndentedString(groupsDeleted)).append("\n"); + sb.append(" groupsUpdated: ").append(toIndentedString(groupsUpdated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportUserGroupsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportUserGroupsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportUserGroupsResponse is not found" - + " in the empty JSON string", - ImportUserGroupsResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("groups_added"); + openapiFields.add("groups_deleted"); + openapiFields.add("groups_updated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("groups_added"); + openapiRequiredFields.add("groups_deleted"); + openapiRequiredFields.add("groups_updated"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUserGroupsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUserGroupsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportUserGroupsResponse is not found in the empty JSON string", ImportUserGroupsResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportUserGroupsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportUserGroupsResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportUserGroupsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportUserGroupsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportUserGroupsResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUserGroupsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("groups_added").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups_added` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups_added").toString())); - } - - JsonArray jsonArraygroupsAdded = jsonObj.getAsJsonArray("groups_added"); - // validate the required field `groups_added` (array) - for (int i = 0; i < jsonArraygroupsAdded.size(); i++) { - UserGroup.validateJsonElement(jsonArraygroupsAdded.get(i)); - } - ; - // ensure the json data is an array - if (!jsonObj.get("groups_deleted").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups_deleted` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups_deleted").toString())); - } - - JsonArray jsonArraygroupsDeleted = jsonObj.getAsJsonArray("groups_deleted"); - // validate the required field `groups_deleted` (array) - for (int i = 0; i < jsonArraygroupsDeleted.size(); i++) { - UserGroup.validateJsonElement(jsonArraygroupsDeleted.get(i)); - } - ; - // ensure the json data is an array - if (!jsonObj.get("groups_updated").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups_updated` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups_updated").toString())); - } - - JsonArray jsonArraygroupsUpdated = jsonObj.getAsJsonArray("groups_updated"); - // validate the required field `groups_updated` (array) - for (int i = 0; i < jsonArraygroupsUpdated.size(); i++) { - UserGroup.validateJsonElement(jsonArraygroupsUpdated.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportUserGroupsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportUserGroupsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportUserGroupsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportUserGroupsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportUserGroupsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportUserGroupsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportUserGroupsResponse - * @throws IOException if the JSON string is invalid with respect to ImportUserGroupsResponse - */ - public static ImportUserGroupsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportUserGroupsResponse.class); - } - - /** - * Convert an instance of ImportUserGroupsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("groups_added").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups_added` to be an array in the JSON string but got `%s`", jsonObj.get("groups_added").toString())); + } + + JsonArray jsonArraygroupsAdded = jsonObj.getAsJsonArray("groups_added"); + // validate the required field `groups_added` (array) + for (int i = 0; i < jsonArraygroupsAdded.size(); i++) { + UserGroup.validateJsonElement(jsonArraygroupsAdded.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("groups_deleted").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups_deleted` to be an array in the JSON string but got `%s`", jsonObj.get("groups_deleted").toString())); + } + + JsonArray jsonArraygroupsDeleted = jsonObj.getAsJsonArray("groups_deleted"); + // validate the required field `groups_deleted` (array) + for (int i = 0; i < jsonArraygroupsDeleted.size(); i++) { + UserGroup.validateJsonElement(jsonArraygroupsDeleted.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("groups_updated").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups_updated` to be an array in the JSON string but got `%s`", jsonObj.get("groups_updated").toString())); + } + + JsonArray jsonArraygroupsUpdated = jsonObj.getAsJsonArray("groups_updated"); + // validate the required field `groups_updated` (array) + for (int i = 0; i < jsonArraygroupsUpdated.size(); i++) { + UserGroup.validateJsonElement(jsonArraygroupsUpdated.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUserGroupsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUserGroupsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportUserGroupsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUserGroupsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportUserGroupsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ImportUserGroupsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUserGroupsResponse + * @throws IOException if the JSON string is invalid with respect to ImportUserGroupsResponse + */ + public static ImportUserGroupsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUserGroupsResponse.class); + } + + /** + * Convert an instance of ImportUserGroupsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java index b905357fc..dbc7bf271 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java @@ -4,256 +4,247 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ImportUserType */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportUserType implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public ImportUserType() {} - - public ImportUserType id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the user. - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public ImportUserType name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the user. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportUserType importUserType = (ImportUserType) o; - return Objects.equals(this.id, importUserType.id) - && Objects.equals(this.name, importUserType.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportUserType {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportUserType - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportUserType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportUserType is not found in the" - + " empty JSON string", - ImportUserType.openapiRequiredFields.toString())); - } +/** + * ImportUserType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportUserType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ImportUserType() { + } + + public ImportUserType id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the user. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public ImportUserType name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUserType importUserType = (ImportUserType) o; + return Objects.equals(this.id, importUserType.id) && + Objects.equals(this.name, importUserType.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUserType {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUserType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUserType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportUserType is not found in the empty JSON string", ImportUserType.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportUserType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportUserType` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportUserType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportUserType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportUserType.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUserType.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportUserType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportUserType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportUserType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportUserType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportUserType read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportUserType given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportUserType - * @throws IOException if the JSON string is invalid with respect to ImportUserType - */ - public static ImportUserType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportUserType.class); - } - - /** - * Convert an instance of ImportUserType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUserType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUserType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportUserType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUserType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportUserType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUserType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUserType + * @throws IOException if the JSON string is invalid with respect to ImportUserType + */ + public static ImportUserType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUserType.class); + } + + /** + * Convert an instance of ImportUserType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java index ba812875b..a7f482773 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java @@ -4,341 +4,319 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ImportUser; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ImportUsersRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportUsersRequest implements Serializable { - private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_USERS = "users"; - - @SerializedName(SERIALIZED_NAME_USERS) - @javax.annotation.Nonnull - private List users; - - public static final String SERIALIZED_NAME_DEFAULT_PASSWORD = "default_password"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_PASSWORD) - @javax.annotation.Nullable - private String defaultPassword; - - public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; - - @SerializedName(SERIALIZED_NAME_DRY_RUN) - @javax.annotation.Nullable - private Boolean dryRun = true; - - public static final String SERIALIZED_NAME_DELETE_UNSPECIFIED_USERS = - "delete_unspecified_users"; - - @SerializedName(SERIALIZED_NAME_DELETE_UNSPECIFIED_USERS) - @javax.annotation.Nullable - private Boolean deleteUnspecifiedUsers = false; - - public ImportUsersRequest() {} - - public ImportUsersRequest users(@javax.annotation.Nonnull List users) { - this.users = users; - return this; - } - - public ImportUsersRequest addUsersItem(ImportUser usersItem) { - if (this.users == null) { - this.users = new ArrayList<>(); - } - this.users.add(usersItem); - return this; - } - - /** - * List of users needs to be imported. - * - * @return users - */ - @javax.annotation.Nonnull - public List getUsers() { - return users; - } - - public void setUsers(@javax.annotation.Nonnull List users) { - this.users = users; - } - - public ImportUsersRequest defaultPassword(@javax.annotation.Nullable String defaultPassword) { - this.defaultPassword = defaultPassword; - return this; - } - - /** - * The default password to assign to users if they do not have a password assigned in - * ThoughtSpot. - * - * @return defaultPassword - */ - @javax.annotation.Nullable - public String getDefaultPassword() { - return defaultPassword; - } - - public void setDefaultPassword(@javax.annotation.Nullable String defaultPassword) { - this.defaultPassword = defaultPassword; - } - - public ImportUsersRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { - this.dryRun = dryRun; - return this; - } - - /** - * If true, the API performs a test operation and returns user IDs whose data will be edited - * after the import. - * - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { - this.dryRun = dryRun; - } - - public ImportUsersRequest deleteUnspecifiedUsers( - @javax.annotation.Nullable Boolean deleteUnspecifiedUsers) { - this.deleteUnspecifiedUsers = deleteUnspecifiedUsers; - return this; - } - - /** - * If set to true, removes the users that are not specified in the API request. - * - * @return deleteUnspecifiedUsers - */ - @javax.annotation.Nullable - public Boolean getDeleteUnspecifiedUsers() { - return deleteUnspecifiedUsers; - } - - public void setDeleteUnspecifiedUsers( - @javax.annotation.Nullable Boolean deleteUnspecifiedUsers) { - this.deleteUnspecifiedUsers = deleteUnspecifiedUsers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportUsersRequest importUsersRequest = (ImportUsersRequest) o; - return Objects.equals(this.users, importUsersRequest.users) - && Objects.equals(this.defaultPassword, importUsersRequest.defaultPassword) - && Objects.equals(this.dryRun, importUsersRequest.dryRun) - && Objects.equals( - this.deleteUnspecifiedUsers, importUsersRequest.deleteUnspecifiedUsers); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(users, defaultPassword, dryRun, deleteUnspecifiedUsers); +/** + * ImportUsersRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportUsersRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nonnull + private List users; + + public static final String SERIALIZED_NAME_DEFAULT_PASSWORD = "default_password"; + @SerializedName(SERIALIZED_NAME_DEFAULT_PASSWORD) + @javax.annotation.Nullable + private String defaultPassword; + + public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; + @SerializedName(SERIALIZED_NAME_DRY_RUN) + @javax.annotation.Nullable + private Boolean dryRun = true; + + public static final String SERIALIZED_NAME_DELETE_UNSPECIFIED_USERS = "delete_unspecified_users"; + @SerializedName(SERIALIZED_NAME_DELETE_UNSPECIFIED_USERS) + @javax.annotation.Nullable + private Boolean deleteUnspecifiedUsers = false; + + public ImportUsersRequest() { + } + + public ImportUsersRequest users(@javax.annotation.Nonnull List users) { + this.users = users; + return this; + } + + public ImportUsersRequest addUsersItem(ImportUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.users.add(usersItem); + return this; + } + + /** + * List of users needs to be imported. + * @return users + */ + @javax.annotation.Nonnull + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nonnull List users) { + this.users = users; + } + + + public ImportUsersRequest defaultPassword(@javax.annotation.Nullable String defaultPassword) { + this.defaultPassword = defaultPassword; + return this; + } + + /** + * The default password to assign to users if they do not have a password assigned in ThoughtSpot. + * @return defaultPassword + */ + @javax.annotation.Nullable + public String getDefaultPassword() { + return defaultPassword; + } + + public void setDefaultPassword(@javax.annotation.Nullable String defaultPassword) { + this.defaultPassword = defaultPassword; + } + + + public ImportUsersRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + } + + + public ImportUsersRequest deleteUnspecifiedUsers(@javax.annotation.Nullable Boolean deleteUnspecifiedUsers) { + this.deleteUnspecifiedUsers = deleteUnspecifiedUsers; + return this; + } + + /** + * If set to true, removes the users that are not specified in the API request. + * @return deleteUnspecifiedUsers + */ + @javax.annotation.Nullable + public Boolean getDeleteUnspecifiedUsers() { + return deleteUnspecifiedUsers; + } + + public void setDeleteUnspecifiedUsers(@javax.annotation.Nullable Boolean deleteUnspecifiedUsers) { + this.deleteUnspecifiedUsers = deleteUnspecifiedUsers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportUsersRequest {\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append(" defaultPassword: ").append(toIndentedString(defaultPassword)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" deleteUnspecifiedUsers: ") - .append(toIndentedString(deleteUnspecifiedUsers)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ImportUsersRequest importUsersRequest = (ImportUsersRequest) o; + return Objects.equals(this.users, importUsersRequest.users) && + Objects.equals(this.defaultPassword, importUsersRequest.defaultPassword) && + Objects.equals(this.dryRun, importUsersRequest.dryRun) && + Objects.equals(this.deleteUnspecifiedUsers, importUsersRequest.deleteUnspecifiedUsers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(users, defaultPassword, dryRun, deleteUnspecifiedUsers); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("users"); - openapiFields.add("default_password"); - openapiFields.add("dry_run"); - openapiFields.add("delete_unspecified_users"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("users"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUsersRequest {\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" defaultPassword: ").append(toIndentedString(defaultPassword)).append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append(" deleteUnspecifiedUsers: ").append(toIndentedString(deleteUnspecifiedUsers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportUsersRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportUsersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportUsersRequest is not found in" - + " the empty JSON string", - ImportUsersRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("users"); + openapiFields.add("default_password"); + openapiFields.add("dry_run"); + openapiFields.add("delete_unspecified_users"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("users"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUsersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUsersRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportUsersRequest is not found in the empty JSON string", ImportUsersRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportUsersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportUsersRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportUsersRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportUsersRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportUsersRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUsersRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("users").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `users` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("users").toString())); - } - - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); - // validate the required field `users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - ImportUser.validateJsonElement(jsonArrayusers.get(i)); - } - ; - if ((jsonObj.get("default_password") != null - && !jsonObj.get("default_password").isJsonNull()) - && !jsonObj.get("default_password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_password` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("default_password").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportUsersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportUsersRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportUsersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportUsersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportUsersRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ImportUsersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportUsersRequest - * @throws IOException if the JSON string is invalid with respect to ImportUsersRequest - */ - public static ImportUsersRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportUsersRequest.class); - } - - /** - * Convert an instance of ImportUsersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + // validate the required field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + ImportUser.validateJsonElement(jsonArrayusers.get(i)); + }; + if ((jsonObj.get("default_password") != null && !jsonObj.get("default_password").isJsonNull()) && !jsonObj.get("default_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_password").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUsersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUsersRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportUsersRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUsersRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportUsersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ImportUsersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUsersRequest + * @throws IOException if the JSON string is invalid with respect to ImportUsersRequest + */ + public static ImportUsersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUsersRequest.class); + } + + /** + * Convert an instance of ImportUsersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java index 2662cce0b..3d754a9ea 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java @@ -4,346 +4,329 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ImportUserType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ImportUsersResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ImportUsersResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USERS_ADDED = "users_added"; - - @SerializedName(SERIALIZED_NAME_USERS_ADDED) - @javax.annotation.Nullable - private List usersAdded; - - public static final String SERIALIZED_NAME_USERS_UPDATED = "users_updated"; - - @SerializedName(SERIALIZED_NAME_USERS_UPDATED) - @javax.annotation.Nullable - private List usersUpdated; - - public static final String SERIALIZED_NAME_USERS_DELETED = "users_deleted"; - - @SerializedName(SERIALIZED_NAME_USERS_DELETED) - @javax.annotation.Nullable - private List usersDeleted; - - public ImportUsersResponse() {} - - public ImportUsersResponse usersAdded( - @javax.annotation.Nullable List usersAdded) { - this.usersAdded = usersAdded; - return this; - } - - public ImportUsersResponse addUsersAddedItem(ImportUserType usersAddedItem) { - if (this.usersAdded == null) { - this.usersAdded = new ArrayList<>(); - } - this.usersAdded.add(usersAddedItem); - return this; - } - - /** - * Get usersAdded - * - * @return usersAdded - */ - @javax.annotation.Nullable - public List getUsersAdded() { - return usersAdded; - } - - public void setUsersAdded(@javax.annotation.Nullable List usersAdded) { - this.usersAdded = usersAdded; - } - public ImportUsersResponse usersUpdated( - @javax.annotation.Nullable List usersUpdated) { - this.usersUpdated = usersUpdated; - return this; - } +import com.thoughtspot.client.JSON; - public ImportUsersResponse addUsersUpdatedItem(ImportUserType usersUpdatedItem) { - if (this.usersUpdated == null) { - this.usersUpdated = new ArrayList<>(); - } - this.usersUpdated.add(usersUpdatedItem); - return this; +/** + * ImportUsersResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportUsersResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERS_ADDED = "users_added"; + @SerializedName(SERIALIZED_NAME_USERS_ADDED) + @javax.annotation.Nullable + private List usersAdded; + + public static final String SERIALIZED_NAME_USERS_UPDATED = "users_updated"; + @SerializedName(SERIALIZED_NAME_USERS_UPDATED) + @javax.annotation.Nullable + private List usersUpdated; + + public static final String SERIALIZED_NAME_USERS_DELETED = "users_deleted"; + @SerializedName(SERIALIZED_NAME_USERS_DELETED) + @javax.annotation.Nullable + private List usersDeleted; + + public ImportUsersResponse() { + } + + public ImportUsersResponse usersAdded(@javax.annotation.Nullable List usersAdded) { + this.usersAdded = usersAdded; + return this; + } + + public ImportUsersResponse addUsersAddedItem(ImportUserType usersAddedItem) { + if (this.usersAdded == null) { + this.usersAdded = new ArrayList<>(); } - - /** - * Get usersUpdated - * - * @return usersUpdated - */ - @javax.annotation.Nullable - public List getUsersUpdated() { - return usersUpdated; + this.usersAdded.add(usersAddedItem); + return this; + } + + /** + * Get usersAdded + * @return usersAdded + */ + @javax.annotation.Nullable + public List getUsersAdded() { + return usersAdded; + } + + public void setUsersAdded(@javax.annotation.Nullable List usersAdded) { + this.usersAdded = usersAdded; + } + + + public ImportUsersResponse usersUpdated(@javax.annotation.Nullable List usersUpdated) { + this.usersUpdated = usersUpdated; + return this; + } + + public ImportUsersResponse addUsersUpdatedItem(ImportUserType usersUpdatedItem) { + if (this.usersUpdated == null) { + this.usersUpdated = new ArrayList<>(); } - - public void setUsersUpdated(@javax.annotation.Nullable List usersUpdated) { - this.usersUpdated = usersUpdated; + this.usersUpdated.add(usersUpdatedItem); + return this; + } + + /** + * Get usersUpdated + * @return usersUpdated + */ + @javax.annotation.Nullable + public List getUsersUpdated() { + return usersUpdated; + } + + public void setUsersUpdated(@javax.annotation.Nullable List usersUpdated) { + this.usersUpdated = usersUpdated; + } + + + public ImportUsersResponse usersDeleted(@javax.annotation.Nullable List usersDeleted) { + this.usersDeleted = usersDeleted; + return this; + } + + public ImportUsersResponse addUsersDeletedItem(ImportUserType usersDeletedItem) { + if (this.usersDeleted == null) { + this.usersDeleted = new ArrayList<>(); } + this.usersDeleted.add(usersDeletedItem); + return this; + } - public ImportUsersResponse usersDeleted( - @javax.annotation.Nullable List usersDeleted) { - this.usersDeleted = usersDeleted; - return this; - } + /** + * Get usersDeleted + * @return usersDeleted + */ + @javax.annotation.Nullable + public List getUsersDeleted() { + return usersDeleted; + } - public ImportUsersResponse addUsersDeletedItem(ImportUserType usersDeletedItem) { - if (this.usersDeleted == null) { - this.usersDeleted = new ArrayList<>(); - } - this.usersDeleted.add(usersDeletedItem); - return this; - } + public void setUsersDeleted(@javax.annotation.Nullable List usersDeleted) { + this.usersDeleted = usersDeleted; + } - /** - * Get usersDeleted - * - * @return usersDeleted - */ - @javax.annotation.Nullable - public List getUsersDeleted() { - return usersDeleted; - } - public void setUsersDeleted(@javax.annotation.Nullable List usersDeleted) { - this.usersDeleted = usersDeleted; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ImportUsersResponse importUsersResponse = (ImportUsersResponse) o; - return Objects.equals(this.usersAdded, importUsersResponse.usersAdded) - && Objects.equals(this.usersUpdated, importUsersResponse.usersUpdated) - && Objects.equals(this.usersDeleted, importUsersResponse.usersDeleted); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - 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())); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public int hashCode() { - return Objects.hash(usersAdded, usersUpdated, usersDeleted); + ImportUsersResponse importUsersResponse = (ImportUsersResponse) o; + return Objects.equals(this.usersAdded, importUsersResponse.usersAdded) && + Objects.equals(this.usersUpdated, importUsersResponse.usersUpdated) && + Objects.equals(this.usersDeleted, importUsersResponse.usersDeleted); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(usersAdded, usersUpdated, usersDeleted); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUsersResponse {\n"); + sb.append(" usersAdded: ").append(toIndentedString(usersAdded)).append("\n"); + sb.append(" usersUpdated: ").append(toIndentedString(usersUpdated)).append("\n"); + sb.append(" usersDeleted: ").append(toIndentedString(usersDeleted)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ImportUsersResponse {\n"); - sb.append(" usersAdded: ").append(toIndentedString(usersAdded)).append("\n"); - sb.append(" usersUpdated: ").append(toIndentedString(usersUpdated)).append("\n"); - sb.append(" usersDeleted: ").append(toIndentedString(usersDeleted)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("users_added"); + openapiFields.add("users_updated"); + openapiFields.add("users_deleted"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUsersResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUsersResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImportUsersResponse is not found in the empty JSON string", ImportUsersResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("users_added"); - openapiFields.add("users_updated"); - openapiFields.add("users_deleted"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ImportUsersResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ImportUsersResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ImportUsersResponse is not found in" - + " the empty JSON string", - ImportUsersResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ImportUsersResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ImportUsersResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ImportUsersResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportUsersResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("users_added") != null && !jsonObj.get("users_added").isJsonNull()) { - JsonArray jsonArrayusersAdded = jsonObj.getAsJsonArray("users_added"); - if (jsonArrayusersAdded != null) { - // ensure the json data is an array - if (!jsonObj.get("users_added").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `users_added` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("users_added").toString())); - } - - // validate the optional field `users_added` (array) - for (int i = 0; i < jsonArrayusersAdded.size(); i++) { - ImportUserType.validateJsonElement(jsonArrayusersAdded.get(i)); - } - ; - } + if (jsonObj.get("users_added") != null && !jsonObj.get("users_added").isJsonNull()) { + JsonArray jsonArrayusersAdded = jsonObj.getAsJsonArray("users_added"); + if (jsonArrayusersAdded != null) { + // ensure the json data is an array + if (!jsonObj.get("users_added").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `users_added` to be an array in the JSON string but got `%s`", jsonObj.get("users_added").toString())); + } + + // validate the optional field `users_added` (array) + for (int i = 0; i < jsonArrayusersAdded.size(); i++) { + ImportUserType.validateJsonElement(jsonArrayusersAdded.get(i)); + }; } - if (jsonObj.get("users_updated") != null && !jsonObj.get("users_updated").isJsonNull()) { - JsonArray jsonArrayusersUpdated = jsonObj.getAsJsonArray("users_updated"); - if (jsonArrayusersUpdated != null) { - // ensure the json data is an array - if (!jsonObj.get("users_updated").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `users_updated` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("users_updated").toString())); - } - - // validate the optional field `users_updated` (array) - for (int i = 0; i < jsonArrayusersUpdated.size(); i++) { - ImportUserType.validateJsonElement(jsonArrayusersUpdated.get(i)); - } - ; - } + } + if (jsonObj.get("users_updated") != null && !jsonObj.get("users_updated").isJsonNull()) { + JsonArray jsonArrayusersUpdated = jsonObj.getAsJsonArray("users_updated"); + if (jsonArrayusersUpdated != null) { + // ensure the json data is an array + if (!jsonObj.get("users_updated").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `users_updated` to be an array in the JSON string but got `%s`", jsonObj.get("users_updated").toString())); + } + + // validate the optional field `users_updated` (array) + for (int i = 0; i < jsonArrayusersUpdated.size(); i++) { + ImportUserType.validateJsonElement(jsonArrayusersUpdated.get(i)); + }; } - if (jsonObj.get("users_deleted") != null && !jsonObj.get("users_deleted").isJsonNull()) { - JsonArray jsonArrayusersDeleted = jsonObj.getAsJsonArray("users_deleted"); - if (jsonArrayusersDeleted != null) { - // ensure the json data is an array - if (!jsonObj.get("users_deleted").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `users_deleted` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("users_deleted").toString())); - } - - // validate the optional field `users_deleted` (array) - for (int i = 0; i < jsonArrayusersDeleted.size(); i++) { - ImportUserType.validateJsonElement(jsonArrayusersDeleted.get(i)); - } - ; - } + } + if (jsonObj.get("users_deleted") != null && !jsonObj.get("users_deleted").isJsonNull()) { + JsonArray jsonArrayusersDeleted = jsonObj.getAsJsonArray("users_deleted"); + if (jsonArrayusersDeleted != null) { + // ensure the json data is an array + if (!jsonObj.get("users_deleted").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `users_deleted` to be an array in the JSON string but got `%s`", jsonObj.get("users_deleted").toString())); + } + + // validate the optional field `users_deleted` (array) + for (int i = 0; i < jsonArrayusersDeleted.size(); i++) { + ImportUserType.validateJsonElement(jsonArrayusersDeleted.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportUsersResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportUsersResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ImportUsersResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportUsersResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportUsersResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of ImportUsersResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportUsersResponse - * @throws IOException if the JSON string is invalid with respect to ImportUsersResponse - */ - public static ImportUsersResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportUsersResponse.class); - } - - /** - * Convert an instance of ImportUsersResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUsersResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUsersResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImportUsersResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUsersResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ImportUsersResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ImportUsersResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUsersResponse + * @throws IOException if the JSON string is invalid with respect to ImportUsersResponse + */ + public static ImportUsersResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUsersResponse.class); + } + + /** + * Convert an instance of ImportUsersResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java index 051d14cd9..27f745c9e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java @@ -4,318 +4,304 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** InputEurekaNLSRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class InputEurekaNLSRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AGENT_VERSION = "agentVersion"; - - @SerializedName(SERIALIZED_NAME_AGENT_VERSION) - @javax.annotation.Nullable - private Integer agentVersion; - - public static final String SERIALIZED_NAME_BYPASS_CACHE = "bypassCache"; - - @SerializedName(SERIALIZED_NAME_BYPASS_CACHE) - @javax.annotation.Nullable - private Boolean bypassCache; - - public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; - - @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) - @javax.annotation.Nullable - private List instructions; - - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) - @javax.annotation.Nullable - private String query; - - public InputEurekaNLSRequest() {} - - public InputEurekaNLSRequest agentVersion(@javax.annotation.Nullable Integer agentVersion) { - this.agentVersion = agentVersion; - return this; - } - /** - * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. - * - * @return agentVersion - */ - @javax.annotation.Nullable - public Integer getAgentVersion() { - return agentVersion; - } - - public void setAgentVersion(@javax.annotation.Nullable Integer agentVersion) { - this.agentVersion = agentVersion; - } - - public InputEurekaNLSRequest bypassCache(@javax.annotation.Nullable Boolean bypassCache) { - this.bypassCache = bypassCache; - return this; - } - - /** - * If true, results are not returned from cache & calculated every time. Can incur high - * costs & latency. - * - * @return bypassCache - */ - @javax.annotation.Nullable - public Boolean getBypassCache() { - return bypassCache; - } - - public void setBypassCache(@javax.annotation.Nullable Boolean bypassCache) { - this.bypassCache = bypassCache; - } - - public InputEurekaNLSRequest instructions( - @javax.annotation.Nullable List instructions) { - this.instructions = instructions; - return this; - } - - public InputEurekaNLSRequest addInstructionsItem(String instructionsItem) { - if (this.instructions == null) { - this.instructions = new ArrayList<>(); - } - this.instructions.add(instructionsItem); - return this; - } - - /** - * User specific instructions for processing the @query. - * - * @return instructions - */ - @javax.annotation.Nullable - public List getInstructions() { - return instructions; - } - - public void setInstructions(@javax.annotation.Nullable List instructions) { - this.instructions = instructions; - } - - public InputEurekaNLSRequest query(@javax.annotation.Nullable String query) { - this.query = query; - return this; - } - - /** - * User query which is a topical/goal oriented question that needs to be broken down into - * smaller simple analytical questions. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public void setQuery(@javax.annotation.Nullable String query) { - this.query = query; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputEurekaNLSRequest inputEurekaNLSRequest = (InputEurekaNLSRequest) o; - return Objects.equals(this.agentVersion, inputEurekaNLSRequest.agentVersion) - && Objects.equals(this.bypassCache, inputEurekaNLSRequest.bypassCache) - && Objects.equals(this.instructions, inputEurekaNLSRequest.instructions) - && Objects.equals(this.query, inputEurekaNLSRequest.query); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(agentVersion, bypassCache, instructions, query); +/** + * InputEurekaNLSRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class InputEurekaNLSRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AGENT_VERSION = "agentVersion"; + @SerializedName(SERIALIZED_NAME_AGENT_VERSION) + @javax.annotation.Nullable + private Integer agentVersion; + + public static final String SERIALIZED_NAME_BYPASS_CACHE = "bypassCache"; + @SerializedName(SERIALIZED_NAME_BYPASS_CACHE) + @javax.annotation.Nullable + private Boolean bypassCache; + + public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; + @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) + @javax.annotation.Nullable + private List instructions; + + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable + private String query; + + public InputEurekaNLSRequest() { + } + + public InputEurekaNLSRequest agentVersion(@javax.annotation.Nullable Integer agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + * @return agentVersion + */ + @javax.annotation.Nullable + public Integer getAgentVersion() { + return agentVersion; + } + + public void setAgentVersion(@javax.annotation.Nullable Integer agentVersion) { + this.agentVersion = agentVersion; + } + + + public InputEurekaNLSRequest bypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + return this; + } + + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + * @return bypassCache + */ + @javax.annotation.Nullable + public Boolean getBypassCache() { + return bypassCache; + } + + public void setBypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + } + + + public InputEurekaNLSRequest instructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + return this; + } + + public InputEurekaNLSRequest addInstructionsItem(String instructionsItem) { + if (this.instructions == null) { + this.instructions = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.instructions.add(instructionsItem); + return this; + } + + /** + * User specific instructions for processing the @query. + * @return instructions + */ + @javax.annotation.Nullable + public List getInstructions() { + return instructions; + } + + public void setInstructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + } + + + public InputEurekaNLSRequest query(@javax.annotation.Nullable String query) { + this.query = query; + return this; + } + + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + * @return query + */ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nullable String query) { + this.query = query; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InputEurekaNLSRequest {\n"); - sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); - sb.append(" bypassCache: ").append(toIndentedString(bypassCache)).append("\n"); - sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + InputEurekaNLSRequest inputEurekaNLSRequest = (InputEurekaNLSRequest) o; + return Objects.equals(this.agentVersion, inputEurekaNLSRequest.agentVersion) && + Objects.equals(this.bypassCache, inputEurekaNLSRequest.bypassCache) && + Objects.equals(this.instructions, inputEurekaNLSRequest.instructions) && + Objects.equals(this.query, inputEurekaNLSRequest.query); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(agentVersion, bypassCache, instructions, query); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("agentVersion"); - openapiFields.add("bypassCache"); - openapiFields.add("instructions"); - openapiFields.add("query"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InputEurekaNLSRequest {\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" bypassCache: ").append(toIndentedString(bypassCache)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InputEurekaNLSRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InputEurekaNLSRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in InputEurekaNLSRequest is not found in" - + " the empty JSON string", - InputEurekaNLSRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("agentVersion"); + openapiFields.add("bypassCache"); + openapiFields.add("instructions"); + openapiFields.add("query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InputEurekaNLSRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InputEurekaNLSRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InputEurekaNLSRequest is not found in the empty JSON string", InputEurekaNLSRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!InputEurekaNLSRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `InputEurekaNLSRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InputEurekaNLSRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InputEurekaNLSRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("instructions") != null - && !jsonObj.get("instructions").isJsonNull() - && !jsonObj.get("instructions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `instructions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("instructions").toString())); - } - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) - && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("query").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InputEurekaNLSRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InputEurekaNLSRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(InputEurekaNLSRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, InputEurekaNLSRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InputEurekaNLSRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of InputEurekaNLSRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputEurekaNLSRequest - * @throws IOException if the JSON string is invalid with respect to InputEurekaNLSRequest - */ - public static InputEurekaNLSRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InputEurekaNLSRequest.class); - } - - /** - * Convert an instance of InputEurekaNLSRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("instructions") != null && !jsonObj.get("instructions").isJsonNull() && !jsonObj.get("instructions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `instructions` to be an array in the JSON string but got `%s`", jsonObj.get("instructions").toString())); + } + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InputEurekaNLSRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InputEurekaNLSRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InputEurekaNLSRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InputEurekaNLSRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InputEurekaNLSRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of InputEurekaNLSRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InputEurekaNLSRequest + * @throws IOException if the JSON string is invalid with respect to InputEurekaNLSRequest + */ + public static InputEurekaNLSRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InputEurekaNLSRequest.class); + } + + /** + * Convert an instance of InputEurekaNLSRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/InputVariableValue.java b/sdks/java/src/main/java/com/thoughtspot/client/model/InputVariableValue.java deleted file mode 100644 index a51eaa9c9..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/InputVariableValue.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import com.google.gson.Gson; -import 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; - -/** InputVariableValue */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class InputVariableValue implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nonnull - private String value; - - 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_PRIORITY = "priority"; - - @SerializedName(SERIALIZED_NAME_PRIORITY) - @javax.annotation.Nullable - private Integer priority; - - public InputVariableValue() {} - - public InputVariableValue value(@javax.annotation.Nonnull String value) { - this.value = value; - return this; - } - - /** - * The connection property value - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; - } - - public InputVariableValue 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 InputVariableValue 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 InputVariableValue 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 InputVariableValue priority(@javax.annotation.Nullable Integer priority) { - this.priority = priority; - return this; - } - - /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher - * priority will be picked. - * - * @return priority - */ - @javax.annotation.Nullable - public Integer getPriority() { - return priority; - } - - public void setPriority(@javax.annotation.Nullable Integer priority) { - this.priority = priority; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InputVariableValue inputVariableValue = (InputVariableValue) o; - return Objects.equals(this.value, inputVariableValue.value) - && Objects.equals(this.orgIdentifier, inputVariableValue.orgIdentifier) - && Objects.equals(this.principalType, inputVariableValue.principalType) - && Objects.equals(this.principalIdentifier, inputVariableValue.principalIdentifier) - && Objects.equals(this.priority, inputVariableValue.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(value, orgIdentifier, principalType, principalIdentifier, 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 InputVariableValue {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); - sb.append(" principalIdentifier: ") - .append(toIndentedString(principalIdentifier)) - .append("\n"); - sb.append(" 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("value"); - openapiFields.add("org_identifier"); - openapiFields.add("principal_type"); - openapiFields.add("principal_identifier"); - openapiFields.add("priority"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("value"); - 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 InputVariableValue - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InputVariableValue.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in InputVariableValue is not found in" - + " the empty JSON string", - InputVariableValue.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!InputVariableValue.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `InputVariableValue` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InputVariableValue.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("value").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())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InputVariableValue.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InputVariableValue' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(InputVariableValue.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, InputVariableValue value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InputVariableValue read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of InputVariableValue given an JSON string - * - * @param jsonString JSON string - * @return An instance of InputVariableValue - * @throws IOException if the JSON string is invalid with respect to InputVariableValue - */ - public static InputVariableValue fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InputVariableValue.class); - } - - /** - * Convert an instance of InputVariableValue to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java index 1d0459bf3..d364062bc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java @@ -4,301 +4,293 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Metadata objects. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class JWTMetadataObject implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - /** Gets or Sets type */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOGICAL_TABLE("LOGICAL_TABLE"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; +import com.thoughtspot.client.JSON; - public JWTMetadataObject() {} +/** + * Metadata objects. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class JWTMetadataObject implements Serializable { + private static final long serialVersionUID = 1L; - public JWTMetadataObject identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; - /** - * Get identifier - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } + private String value; - public JWTMetadataObject type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; + TypeEnum(String value) { + this.value = value; } - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - JWTMetadataObject jwTMetadataObject = (JWTMetadataObject) o; - return Objects.equals(this.identifier, jwTMetadataObject.identifier) - && Objects.equals(this.type, jwTMetadataObject.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public JWTMetadataObject() { + } + + public JWTMetadataObject identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get identifier + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public JWTMetadataObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JWTMetadataObject {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + JWTMetadataObject jwTMetadataObject = (JWTMetadataObject) o; + return Objects.equals(this.identifier, jwTMetadataObject.identifier) && + Objects.equals(this.type, jwTMetadataObject.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTMetadataObject {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to JWTMetadataObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!JWTMetadataObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in JWTMetadataObject is not found in the" - + " empty JSON string", - JWTMetadataObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTMetadataObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTMetadataObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JWTMetadataObject is not found in the empty JSON string", JWTMetadataObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!JWTMetadataObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `JWTMetadataObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JWTMetadataObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JWTMetadataObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!JWTMetadataObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'JWTMetadataObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(JWTMetadataObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, JWTMetadataObject value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public JWTMetadataObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of JWTMetadataObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of JWTMetadataObject - * @throws IOException if the JSON string is invalid with respect to JWTMetadataObject - */ - public static JWTMetadataObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, JWTMetadataObject.class); - } - - /** - * Convert an instance of JWTMetadataObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTMetadataObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTMetadataObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JWTMetadataObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTMetadataObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JWTMetadataObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of JWTMetadataObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTMetadataObject + * @throws IOException if the JSON string is invalid with respect to JWTMetadataObject + */ + public static JWTMetadataObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTMetadataObject.class); + } + + /** + * Convert an instance of JWTMetadataObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java index 5a44f667f..33ca768bb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java @@ -4,261 +4,260 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** List of runtime parameters need to set during the session. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class JWTParameter implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; - - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; - - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; - - public JWTParameter() {} - - public JWTParameter runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * Runtime filter parameter type in JWT. - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } - - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } - - public JWTParameter runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } - - /** - * Runtime sort parameter type in JWT. - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } - - public JWTParameter runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } - - /** - * Runtime param override type in JWT. - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } - - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - JWTParameter jwTParameter = (JWTParameter) o; - return Objects.equals(this.runtimeFilter, jwTParameter.runtimeFilter) - && Objects.equals(this.runtimeSort, jwTParameter.runtimeSort) - && Objects.equals(this.runtimeParamOverride, jwTParameter.runtimeParamOverride); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(runtimeFilter, runtimeSort, runtimeParamOverride); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * List of runtime parameters need to set during the session. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class JWTParameter implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public JWTParameter() { + } + + public JWTParameter runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * Runtime filter parameter type in JWT. + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + + public JWTParameter runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * Runtime sort parameter type in JWT. + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + + public JWTParameter runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * Runtime param override type in JWT. + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JWTParameter {\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + JWTParameter jwTParameter = (JWTParameter) o; + return Objects.equals(this.runtimeFilter, jwTParameter.runtimeFilter) && + Objects.equals(this.runtimeSort, jwTParameter.runtimeSort) && + Objects.equals(this.runtimeParamOverride, jwTParameter.runtimeParamOverride); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeFilter, runtimeSort, runtimeParamOverride); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("runtime_filter"); - openapiFields.add("runtime_sort"); - openapiFields.add("runtime_param_override"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTParameter {\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to JWTParameter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!JWTParameter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in JWTParameter is not found in the" - + " empty JSON string", - JWTParameter.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTParameter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTParameter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JWTParameter is not found in the empty JSON string", JWTParameter.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!JWTParameter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `JWTParameter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JWTParameter.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JWTParameter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!JWTParameter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'JWTParameter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(JWTParameter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, JWTParameter value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public JWTParameter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } - /** - * Create an instance of JWTParameter given an JSON string - * - * @param jsonString JSON string - * @return An instance of JWTParameter - * @throws IOException if the JSON string is invalid with respect to JWTParameter - */ - public static JWTParameter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, JWTParameter.class); - } - - /** - * Convert an instance of JWTParameter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTParameter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTParameter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JWTParameter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTParameter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JWTParameter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of JWTParameter given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTParameter + * @throws IOException if the JSON string is invalid with respect to JWTParameter + */ + public static JWTParameter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTParameter.class); + } + + /** + * Convert an instance of JWTParameter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java index 322db9aef..9812831a3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java @@ -4,281 +4,270 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.JWTMetadataObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use - * user_parameters instead.* + * JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class JWTUserOptions implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; - - @SerializedName(SERIALIZED_NAME_PARAMETERS) - @javax.annotation.Nullable - private List parameters; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - public JWTUserOptions() {} - - public JWTUserOptions parameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - return this; - } - - public JWTUserOptions addParametersItem(Object parametersItem) { - if (this.parameters == null) { - this.parameters = new ArrayList<>(); - } - this.parameters.add(parametersItem); - return this; - } + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; - /** - * Get parameters - * - * @return parameters - */ - @javax.annotation.Nullable - public List getParameters() { - return parameters; - } + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; - public void setParameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - } + public JWTUserOptions() { + } - public JWTUserOptions metadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; - } + public JWTUserOptions parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } - public JWTUserOptions addMetadataItem(JWTMetadataObject metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; + public JWTUserOptions addParametersItem(Object parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); } - - /** - * Get metadata - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; + this.parameters.add(parametersItem); + return this; + } + + /** + * Get parameters + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + + public JWTUserOptions metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public JWTUserOptions addMetadataItem(JWTMetadataObject metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } + this.metadata.add(metadataItem); + return this; + } - public void setMetadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; - } + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - JWTUserOptions jwTUserOptions = (JWTUserOptions) o; - return Objects.equals(this.parameters, jwTUserOptions.parameters) - && Objects.equals(this.metadata, jwTUserOptions.metadata); - } + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(parameters, metadata); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JWTUserOptions {\n"); - sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + JWTUserOptions jwTUserOptions = (JWTUserOptions) o; + return Objects.equals(this.parameters, jwTUserOptions.parameters) && + Objects.equals(this.metadata, jwTUserOptions.metadata); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(parameters, metadata); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("parameters"); - openapiFields.add("metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTUserOptions {\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to JWTUserOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!JWTUserOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in JWTUserOptions is not found in the" - + " empty JSON string", - JWTUserOptions.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("parameters"); + openapiFields.add("metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTUserOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTUserOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JWTUserOptions is not found in the empty JSON string", JWTUserOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!JWTUserOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `JWTUserOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JWTUserOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JWTUserOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("parameters") != null - && !jsonObj.get("parameters").isJsonNull() - && !jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameters` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("parameters").toString())); - } - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - JWTMetadataObject.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } + // ensure the optional json data is an array if present + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull() && !jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + JWTMetadataObject.validateJsonElement(jsonArraymetadata.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!JWTUserOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'JWTUserOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(JWTUserOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, JWTUserOptions value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public JWTUserOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of JWTUserOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of JWTUserOptions - * @throws IOException if the JSON string is invalid with respect to JWTUserOptions - */ - public static JWTUserOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, JWTUserOptions.class); - } - - /** - * Convert an instance of JWTUserOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTUserOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTUserOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JWTUserOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTUserOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JWTUserOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of JWTUserOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTUserOptions + * @throws IOException if the JSON string is invalid with respect to JWTUserOptions + */ + public static JWTUserOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTUserOptions.class); + } + + /** + * Convert an instance of JWTUserOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java index 02dcf7e8f..115189a68 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java @@ -4,236 +4,231 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.JWTParameter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use - * user_parameters instead.* + * JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class JWTUserOptionsFull implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; - @SerializedName(SERIALIZED_NAME_PARAMETERS) - @javax.annotation.Nullable - private List parameters; - - public JWTUserOptionsFull() {} - - public JWTUserOptionsFull parameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - return this; - } + public JWTUserOptionsFull() { + } - public JWTUserOptionsFull addParametersItem(JWTParameter parametersItem) { - if (this.parameters == null) { - this.parameters = new ArrayList<>(); - } - this.parameters.add(parametersItem); - return this; - } + public JWTUserOptionsFull parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } - /** - * Get parameters - * - * @return parameters - */ - @javax.annotation.Nullable - public List getParameters() { - return parameters; + public JWTUserOptionsFull addParametersItem(JWTParameter parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); } + this.parameters.add(parametersItem); + return this; + } - public void setParameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - } + /** + * Get parameters + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - JWTUserOptionsFull jwTUserOptionsFull = (JWTUserOptionsFull) o; - return Objects.equals(this.parameters, jwTUserOptionsFull.parameters); - } + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(parameters); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JWTUserOptionsFull {\n"); - sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + JWTUserOptionsFull jwTUserOptionsFull = (JWTUserOptionsFull) o; + return Objects.equals(this.parameters, jwTUserOptionsFull.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(parameters); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("parameters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTUserOptionsFull {\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to JWTUserOptionsFull - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!JWTUserOptionsFull.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in JWTUserOptionsFull is not found in" - + " the empty JSON string", - JWTUserOptionsFull.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTUserOptionsFull + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTUserOptionsFull.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JWTUserOptionsFull is not found in the empty JSON string", JWTUserOptionsFull.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!JWTUserOptionsFull.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `JWTUserOptionsFull` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JWTUserOptionsFull.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JWTUserOptionsFull` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); - if (jsonArrayparameters != null) { - // ensure the json data is an array - if (!jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("parameters").toString())); - } - - // validate the optional field `parameters` (array) - for (int i = 0; i < jsonArrayparameters.size(); i++) { - JWTParameter.validateJsonElement(jsonArrayparameters.get(i)); - } - ; - } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + JWTParameter.validateJsonElement(jsonArrayparameters.get(i)); + }; } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!JWTUserOptionsFull.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'JWTUserOptionsFull' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(JWTUserOptionsFull.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, JWTUserOptionsFull value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public JWTUserOptionsFull read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of JWTUserOptionsFull given an JSON string - * - * @param jsonString JSON string - * @return An instance of JWTUserOptionsFull - * @throws IOException if the JSON string is invalid with respect to JWTUserOptionsFull - */ - public static JWTUserOptionsFull fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, JWTUserOptionsFull.class); - } - - /** - * Convert an instance of JWTUserOptionsFull to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTUserOptionsFull.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTUserOptionsFull' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JWTUserOptionsFull.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTUserOptionsFull value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JWTUserOptionsFull read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of JWTUserOptionsFull given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTUserOptionsFull + * @throws IOException if the JSON string is invalid with respect to JWTUserOptionsFull + */ + public static JWTUserOptionsFull fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTUserOptionsFull.class); + } + + /** + * Convert an instance of JWTUserOptionsFull to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LBContextInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LBContextInput.java index b465cdadf..6117a7466 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LBContextInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LBContextInput.java @@ -4,247 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** LBContextInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LBContextInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_LIVEBOARD_IDENTIFIER = "liveboard_identifier"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDENTIFIER) - @javax.annotation.Nonnull - private String liveboardIdentifier; - - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIER = - "visualization_identifier"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIER) - @javax.annotation.Nonnull - private String visualizationIdentifier; - - public LBContextInput() {} - - public LBContextInput liveboardIdentifier( - @javax.annotation.Nonnull String liveboardIdentifier) { - this.liveboardIdentifier = liveboardIdentifier; - return this; - } - - /** - * Unique identifier of the liveboard. - * - * @return liveboardIdentifier - */ - @javax.annotation.Nonnull - public String getLiveboardIdentifier() { - return liveboardIdentifier; - } - - public void setLiveboardIdentifier(@javax.annotation.Nonnull String liveboardIdentifier) { - this.liveboardIdentifier = liveboardIdentifier; - } - - public LBContextInput visualizationIdentifier( - @javax.annotation.Nonnull String visualizationIdentifier) { - this.visualizationIdentifier = visualizationIdentifier; - return this; - } - - /** - * Unique identifier of the visualization. - * - * @return visualizationIdentifier - */ - @javax.annotation.Nonnull - public String getVisualizationIdentifier() { - return visualizationIdentifier; - } - - public void setVisualizationIdentifier( - @javax.annotation.Nonnull String visualizationIdentifier) { - this.visualizationIdentifier = visualizationIdentifier; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LBContextInput lbContextInput = (LBContextInput) o; - return Objects.equals(this.liveboardIdentifier, lbContextInput.liveboardIdentifier) - && Objects.equals( - this.visualizationIdentifier, lbContextInput.visualizationIdentifier); +/** + * LBContextInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LBContextInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_LIVEBOARD_IDENTIFIER = "liveboard_identifier"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nonnull + private String liveboardIdentifier; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIER = "visualization_identifier"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIER) + @javax.annotation.Nonnull + private String visualizationIdentifier; + + public LBContextInput() { + } + + public LBContextInput liveboardIdentifier(@javax.annotation.Nonnull String liveboardIdentifier) { + this.liveboardIdentifier = liveboardIdentifier; + return this; + } + + /** + * Unique identifier of the liveboard. + * @return liveboardIdentifier + */ + @javax.annotation.Nonnull + public String getLiveboardIdentifier() { + return liveboardIdentifier; + } + + public void setLiveboardIdentifier(@javax.annotation.Nonnull String liveboardIdentifier) { + this.liveboardIdentifier = liveboardIdentifier; + } + + + public LBContextInput visualizationIdentifier(@javax.annotation.Nonnull String visualizationIdentifier) { + this.visualizationIdentifier = visualizationIdentifier; + return this; + } + + /** + * Unique identifier of the visualization. + * @return visualizationIdentifier + */ + @javax.annotation.Nonnull + public String getVisualizationIdentifier() { + return visualizationIdentifier; + } + + public void setVisualizationIdentifier(@javax.annotation.Nonnull String visualizationIdentifier) { + this.visualizationIdentifier = visualizationIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(liveboardIdentifier, visualizationIdentifier); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LBContextInput {\n"); - sb.append(" liveboardIdentifier: ") - .append(toIndentedString(liveboardIdentifier)) - .append("\n"); - sb.append(" visualizationIdentifier: ") - .append(toIndentedString(visualizationIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + LBContextInput lbContextInput = (LBContextInput) o; + return Objects.equals(this.liveboardIdentifier, lbContextInput.liveboardIdentifier) && + Objects.equals(this.visualizationIdentifier, lbContextInput.visualizationIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(liveboardIdentifier, visualizationIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LBContextInput {\n"); + sb.append(" liveboardIdentifier: ").append(toIndentedString(liveboardIdentifier)).append("\n"); + sb.append(" visualizationIdentifier: ").append(toIndentedString(visualizationIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("liveboard_identifier"); + openapiFields.add("visualization_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("liveboard_identifier"); + openapiRequiredFields.add("visualization_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 LBContextInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LBContextInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LBContextInput is not found in the empty JSON string", LBContextInput.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("liveboard_identifier"); - openapiFields.add("visualization_identifier"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("liveboard_identifier"); - openapiRequiredFields.add("visualization_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 LBContextInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LBContextInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LBContextInput is not found in the" - + " empty JSON string", - LBContextInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LBContextInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LBContextInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LBContextInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LBContextInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LBContextInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LBContextInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + 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("liveboard_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `liveboard_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("liveboard_identifier").toString())); - } - if (!jsonObj.get("visualization_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("visualization_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LBContextInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LBContextInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LBContextInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LBContextInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LBContextInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LBContextInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of LBContextInput - * @throws IOException if the JSON string is invalid with respect to LBContextInput - */ - public static LBContextInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LBContextInput.class); - } - - /** - * Convert an instance of LBContextInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `liveboard_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("liveboard_identifier").toString())); + } + if (!jsonObj.get("visualization_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visualization_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LBContextInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LBContextInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LBContextInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LBContextInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LBContextInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of LBContextInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of LBContextInput + * @throws IOException if the JSON string is invalid with respect to LBContextInput + */ + public static LBContextInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LBContextInput.class); + } + + /** + * Convert an instance of LBContextInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java index b9d4d3769..0d5c6e3d8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java @@ -4,524 +4,472 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** LiveboardContent */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LiveboardContent implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT = - "available_data_row_count"; - - @SerializedName(SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT) - @javax.annotation.Nonnull - private Integer availableDataRowCount; - - public static final String SERIALIZED_NAME_COLUMN_NAMES = "column_names"; - - @SerializedName(SERIALIZED_NAME_COLUMN_NAMES) - @javax.annotation.Nonnull - private List columnNames; - - public static final String SERIALIZED_NAME_DATA_ROWS = "data_rows"; - - @SerializedName(SERIALIZED_NAME_DATA_ROWS) - @javax.annotation.Nonnull - private List dataRows; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nonnull - private Integer recordOffset; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nonnull - private Integer recordSize; - - public static final String SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT = "returned_data_row_count"; - - @SerializedName(SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT) - @javax.annotation.Nonnull - private Integer returnedDataRowCount; - - public static final String SERIALIZED_NAME_SAMPLING_RATIO = "sampling_ratio"; - - @SerializedName(SERIALIZED_NAME_SAMPLING_RATIO) - @javax.annotation.Nonnull - private Float samplingRatio; - - public static final String SERIALIZED_NAME_VISUALIZATION_ID = "visualization_id"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_ID) - @javax.annotation.Nullable - private String visualizationId; - - public static final String SERIALIZED_NAME_VISUALIZATION_NAME = "visualization_name"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_NAME) - @javax.annotation.Nullable - private String visualizationName; - - public LiveboardContent() {} - - public LiveboardContent availableDataRowCount( - @javax.annotation.Nonnull Integer availableDataRowCount) { - this.availableDataRowCount = availableDataRowCount; - return this; - } - - /** - * Total available data row count. - * - * @return availableDataRowCount - */ - @javax.annotation.Nonnull - public Integer getAvailableDataRowCount() { - return availableDataRowCount; - } - - public void setAvailableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { - this.availableDataRowCount = availableDataRowCount; - } - - public LiveboardContent columnNames(@javax.annotation.Nonnull List columnNames) { - this.columnNames = columnNames; - return this; - } - - public LiveboardContent addColumnNamesItem(String columnNamesItem) { - if (this.columnNames == null) { - this.columnNames = new ArrayList<>(); - } - this.columnNames.add(columnNamesItem); - return this; - } - - /** - * Name of the columns. - * - * @return columnNames - */ - @javax.annotation.Nonnull - public List getColumnNames() { - return columnNames; - } - - public void setColumnNames(@javax.annotation.Nonnull List columnNames) { - this.columnNames = columnNames; - } - - public LiveboardContent dataRows(@javax.annotation.Nonnull List dataRows) { - this.dataRows = dataRows; - return this; - } - - public LiveboardContent addDataRowsItem(Object dataRowsItem) { - if (this.dataRows == null) { - this.dataRows = new ArrayList<>(); - } - this.dataRows.add(dataRowsItem); - return this; - } - - /** - * Rows of data set. - * - * @return dataRows - */ - @javax.annotation.Nonnull - public List getDataRows() { - return dataRows; - } - - public void setDataRows(@javax.annotation.Nonnull List dataRows) { - this.dataRows = dataRows; - } - - public LiveboardContent recordOffset(@javax.annotation.Nonnull Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nonnull - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public LiveboardContent recordSize(@javax.annotation.Nonnull Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nonnull - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { - this.recordSize = recordSize; - } - - public LiveboardContent returnedDataRowCount( - @javax.annotation.Nonnull Integer returnedDataRowCount) { - this.returnedDataRowCount = returnedDataRowCount; - return this; - } - - /** - * Total returned data row count. - * - * @return returnedDataRowCount - */ - @javax.annotation.Nonnull - public Integer getReturnedDataRowCount() { - return returnedDataRowCount; - } - - public void setReturnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { - this.returnedDataRowCount = returnedDataRowCount; - } - - public LiveboardContent samplingRatio(@javax.annotation.Nonnull Float samplingRatio) { - this.samplingRatio = samplingRatio; - return this; - } - - /** - * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the - * data set to the total number of keys expected in the query. If the value is 1.0, this means - * that the complete result is returned. - * - * @return samplingRatio - */ - @javax.annotation.Nonnull - public Float getSamplingRatio() { - return samplingRatio; - } - - public void setSamplingRatio(@javax.annotation.Nonnull Float samplingRatio) { - this.samplingRatio = samplingRatio; - } - - public LiveboardContent visualizationId(@javax.annotation.Nullable String visualizationId) { - this.visualizationId = visualizationId; - return this; - } - - /** - * Unique ID of the visualization. - * - * @return visualizationId - */ - @javax.annotation.Nullable - public String getVisualizationId() { - return visualizationId; - } - - public void setVisualizationId(@javax.annotation.Nullable String visualizationId) { - this.visualizationId = visualizationId; - } - - public LiveboardContent visualizationName(@javax.annotation.Nullable String visualizationName) { - this.visualizationName = visualizationName; - return this; - } - - /** - * Name of the visualization. - * - * @return visualizationName - */ - @javax.annotation.Nullable - public String getVisualizationName() { - return visualizationName; - } - - public void setVisualizationName(@javax.annotation.Nullable String visualizationName) { - this.visualizationName = visualizationName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveboardContent liveboardContent = (LiveboardContent) o; - return Objects.equals(this.availableDataRowCount, liveboardContent.availableDataRowCount) - && Objects.equals(this.columnNames, liveboardContent.columnNames) - && Objects.equals(this.dataRows, liveboardContent.dataRows) - && Objects.equals(this.recordOffset, liveboardContent.recordOffset) - && Objects.equals(this.recordSize, liveboardContent.recordSize) - && Objects.equals(this.returnedDataRowCount, liveboardContent.returnedDataRowCount) - && Objects.equals(this.samplingRatio, liveboardContent.samplingRatio) - && Objects.equals(this.visualizationId, liveboardContent.visualizationId) - && Objects.equals(this.visualizationName, liveboardContent.visualizationName); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - availableDataRowCount, - columnNames, - dataRows, - recordOffset, - recordSize, - returnedDataRowCount, - samplingRatio, - visualizationId, - visualizationName); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveboardContent {\n"); - sb.append(" availableDataRowCount: ") - .append(toIndentedString(availableDataRowCount)) - .append("\n"); - sb.append(" columnNames: ").append(toIndentedString(columnNames)).append("\n"); - sb.append(" dataRows: ").append(toIndentedString(dataRows)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" returnedDataRowCount: ") - .append(toIndentedString(returnedDataRowCount)) - .append("\n"); - sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); - sb.append(" visualizationId: ").append(toIndentedString(visualizationId)).append("\n"); - sb.append(" visualizationName: ") - .append(toIndentedString(visualizationName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("available_data_row_count"); - openapiFields.add("column_names"); - openapiFields.add("data_rows"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("returned_data_row_count"); - openapiFields.add("sampling_ratio"); - openapiFields.add("visualization_id"); - openapiFields.add("visualization_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("available_data_row_count"); - openapiRequiredFields.add("column_names"); - openapiRequiredFields.add("data_rows"); - openapiRequiredFields.add("record_offset"); - openapiRequiredFields.add("record_size"); - openapiRequiredFields.add("returned_data_row_count"); - openapiRequiredFields.add("sampling_ratio"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LiveboardContent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LiveboardContent.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LiveboardContent is not found in the" - + " empty JSON string", - LiveboardContent.openapiRequiredFields.toString())); - } +/** + * LiveboardContent + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LiveboardContent implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT = "available_data_row_count"; + @SerializedName(SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer availableDataRowCount; + + public static final String SERIALIZED_NAME_COLUMN_NAMES = "column_names"; + @SerializedName(SERIALIZED_NAME_COLUMN_NAMES) + @javax.annotation.Nonnull + private List columnNames; + + public static final String SERIALIZED_NAME_DATA_ROWS = "data_rows"; + @SerializedName(SERIALIZED_NAME_DATA_ROWS) + @javax.annotation.Nonnull + private List dataRows; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nonnull + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nonnull + private Integer recordSize; + + public static final String SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT = "returned_data_row_count"; + @SerializedName(SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer returnedDataRowCount; + + public static final String SERIALIZED_NAME_SAMPLING_RATIO = "sampling_ratio"; + @SerializedName(SERIALIZED_NAME_SAMPLING_RATIO) + @javax.annotation.Nonnull + private Float samplingRatio; + + public static final String SERIALIZED_NAME_VISUALIZATION_ID = "visualization_id"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_ID) + @javax.annotation.Nullable + private String visualizationId; + + public static final String SERIALIZED_NAME_VISUALIZATION_NAME = "visualization_name"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_NAME) + @javax.annotation.Nullable + private String visualizationName; + + public LiveboardContent() { + } + + public LiveboardContent availableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + return this; + } + + /** + * Total available data row count. + * @return availableDataRowCount + */ + @javax.annotation.Nonnull + public Integer getAvailableDataRowCount() { + return availableDataRowCount; + } + + public void setAvailableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + } + + + public LiveboardContent columnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + return this; + } + + public LiveboardContent addColumnNamesItem(String columnNamesItem) { + if (this.columnNames == null) { + this.columnNames = new ArrayList<>(); + } + this.columnNames.add(columnNamesItem); + return this; + } + + /** + * Name of the columns. + * @return columnNames + */ + @javax.annotation.Nonnull + public List getColumnNames() { + return columnNames; + } + + public void setColumnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + } + + + public LiveboardContent dataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + return this; + } + + public LiveboardContent addDataRowsItem(Object dataRowsItem) { + if (this.dataRows == null) { + this.dataRows = new ArrayList<>(); + } + this.dataRows.add(dataRowsItem); + return this; + } + + /** + * Rows of data set. + * @return dataRows + */ + @javax.annotation.Nonnull + public List getDataRows() { + return dataRows; + } + + public void setDataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + } + + + public LiveboardContent recordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nonnull + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public LiveboardContent recordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nonnull + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + } + + + public LiveboardContent returnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + return this; + } + + /** + * Total returned data row count. + * @return returnedDataRowCount + */ + @javax.annotation.Nonnull + public Integer getReturnedDataRowCount() { + return returnedDataRowCount; + } + + public void setReturnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + } + + + public LiveboardContent samplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + * @return samplingRatio + */ + @javax.annotation.Nonnull + public Float getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + } + + + public LiveboardContent visualizationId(@javax.annotation.Nullable String visualizationId) { + this.visualizationId = visualizationId; + return this; + } + + /** + * Unique ID of the visualization. + * @return visualizationId + */ + @javax.annotation.Nullable + public String getVisualizationId() { + return visualizationId; + } + + public void setVisualizationId(@javax.annotation.Nullable String visualizationId) { + this.visualizationId = visualizationId; + } + + + public LiveboardContent visualizationName(@javax.annotation.Nullable String visualizationName) { + this.visualizationName = visualizationName; + return this; + } + + /** + * Name of the visualization. + * @return visualizationName + */ + @javax.annotation.Nullable + public String getVisualizationName() { + return visualizationName; + } + + public void setVisualizationName(@javax.annotation.Nullable String visualizationName) { + this.visualizationName = visualizationName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiveboardContent liveboardContent = (LiveboardContent) o; + return Objects.equals(this.availableDataRowCount, liveboardContent.availableDataRowCount) && + Objects.equals(this.columnNames, liveboardContent.columnNames) && + Objects.equals(this.dataRows, liveboardContent.dataRows) && + Objects.equals(this.recordOffset, liveboardContent.recordOffset) && + Objects.equals(this.recordSize, liveboardContent.recordSize) && + Objects.equals(this.returnedDataRowCount, liveboardContent.returnedDataRowCount) && + Objects.equals(this.samplingRatio, liveboardContent.samplingRatio) && + Objects.equals(this.visualizationId, liveboardContent.visualizationId) && + Objects.equals(this.visualizationName, liveboardContent.visualizationName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(availableDataRowCount, columnNames, dataRows, recordOffset, recordSize, returnedDataRowCount, samplingRatio, visualizationId, visualizationName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardContent {\n"); + sb.append(" availableDataRowCount: ").append(toIndentedString(availableDataRowCount)).append("\n"); + sb.append(" columnNames: ").append(toIndentedString(columnNames)).append("\n"); + sb.append(" dataRows: ").append(toIndentedString(dataRows)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" returnedDataRowCount: ").append(toIndentedString(returnedDataRowCount)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" visualizationId: ").append(toIndentedString(visualizationId)).append("\n"); + sb.append(" visualizationName: ").append(toIndentedString(visualizationName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("available_data_row_count"); + openapiFields.add("column_names"); + openapiFields.add("data_rows"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("returned_data_row_count"); + openapiFields.add("sampling_ratio"); + openapiFields.add("visualization_id"); + openapiFields.add("visualization_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("available_data_row_count"); + openapiRequiredFields.add("column_names"); + openapiRequiredFields.add("data_rows"); + openapiRequiredFields.add("record_offset"); + openapiRequiredFields.add("record_size"); + openapiRequiredFields.add("returned_data_row_count"); + openapiRequiredFields.add("sampling_ratio"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardContent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LiveboardContent is not found in the empty JSON string", LiveboardContent.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LiveboardContent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LiveboardContent` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LiveboardContent.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LiveboardContent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LiveboardContent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardContent.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("column_names") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("column_names").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_names` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("column_names").toString())); - } - // ensure the required json array is present - if (jsonObj.get("data_rows") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("data_rows").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_rows` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("data_rows").toString())); - } - if ((jsonObj.get("visualization_id") != null - && !jsonObj.get("visualization_id").isJsonNull()) - && !jsonObj.get("visualization_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_id").toString())); - } - if ((jsonObj.get("visualization_name") != null - && !jsonObj.get("visualization_name").isJsonNull()) - && !jsonObj.get("visualization_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LiveboardContent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LiveboardContent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LiveboardContent.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LiveboardContent value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LiveboardContent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LiveboardContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of LiveboardContent - * @throws IOException if the JSON string is invalid with respect to LiveboardContent - */ - public static LiveboardContent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LiveboardContent.class); - } - - /** - * Convert an instance of LiveboardContent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the required json array is present + if (jsonObj.get("column_names") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("column_names").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `column_names` to be an array in the JSON string but got `%s`", jsonObj.get("column_names").toString())); + } + // ensure the required json array is present + if (jsonObj.get("data_rows") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("data_rows").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data_rows` to be an array in the JSON string but got `%s`", jsonObj.get("data_rows").toString())); + } + if ((jsonObj.get("visualization_id") != null && !jsonObj.get("visualization_id").isJsonNull()) && !jsonObj.get("visualization_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visualization_id").toString())); + } + if ((jsonObj.get("visualization_name") != null && !jsonObj.get("visualization_name").isJsonNull()) && !jsonObj.get("visualization_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visualization_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardContent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardContent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LiveboardContent.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardContent value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiveboardContent read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LiveboardContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardContent + * @throws IOException if the JSON string is invalid with respect to LiveboardContent + */ + public static LiveboardContent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardContent.class); + } + + /** + * Convert an instance of LiveboardContent to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java index 3d5fe3476..eb1390cb6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java @@ -4,295 +4,285 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.LiveboardContent; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** LiveboardDataResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LiveboardDataResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nonnull - private String metadataId; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nonnull - private String metadataName; - - public static final String SERIALIZED_NAME_CONTENTS = "contents"; - - @SerializedName(SERIALIZED_NAME_CONTENTS) - @javax.annotation.Nonnull - private List contents; - - public LiveboardDataResponse() {} - - public LiveboardDataResponse metadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - return this; - } - - /** - * The unique identifier of the object - * - * @return metadataId - */ - @javax.annotation.Nonnull - public String getMetadataId() { - return metadataId; - } - - public void setMetadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - } - - public LiveboardDataResponse metadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - return this; - } - - /** - * Name of the metadata object - * - * @return metadataName - */ - @javax.annotation.Nonnull - public String getMetadataName() { - return metadataName; - } +import com.thoughtspot.client.JSON; - public void setMetadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; +/** + * LiveboardDataResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LiveboardDataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + @SerializedName(SERIALIZED_NAME_CONTENTS) + @javax.annotation.Nonnull + private List contents; + + public LiveboardDataResponse() { + } + + public LiveboardDataResponse metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * The unique identifier of the object + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + + public LiveboardDataResponse metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + + public LiveboardDataResponse contents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + return this; + } + + public LiveboardDataResponse addContentsItem(LiveboardContent contentsItem) { + if (this.contents == null) { + this.contents = new ArrayList<>(); } + this.contents.add(contentsItem); + return this; + } - public LiveboardDataResponse contents( - @javax.annotation.Nonnull List contents) { - this.contents = contents; - return this; - } + /** + * Data content of metadata objects + * @return contents + */ + @javax.annotation.Nonnull + public List getContents() { + return contents; + } - public LiveboardDataResponse addContentsItem(LiveboardContent contentsItem) { - if (this.contents == null) { - this.contents = new ArrayList<>(); - } - this.contents.add(contentsItem); - return this; - } + public void setContents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + } - /** - * Data content of metadata objects - * - * @return contents - */ - @javax.annotation.Nonnull - public List getContents() { - return contents; - } - public void setContents(@javax.annotation.Nonnull List contents) { - this.contents = contents; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveboardDataResponse liveboardDataResponse = (LiveboardDataResponse) o; - return Objects.equals(this.metadataId, liveboardDataResponse.metadataId) - && Objects.equals(this.metadataName, liveboardDataResponse.metadataName) - && Objects.equals(this.contents, liveboardDataResponse.contents); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(metadataId, metadataName, contents); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveboardDataResponse {\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); - sb.append("}"); - return sb.toString(); + LiveboardDataResponse liveboardDataResponse = (LiveboardDataResponse) o; + return Objects.equals(this.metadataId, liveboardDataResponse.metadataId) && + Objects.equals(this.metadataName, liveboardDataResponse.metadataName) && + Objects.equals(this.contents, liveboardDataResponse.contents); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, contents); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardDataResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("contents"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("contents"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardDataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardDataResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LiveboardDataResponse is not found in the empty JSON string", LiveboardDataResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_id"); - openapiFields.add("metadata_name"); - openapiFields.add("contents"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_id"); - openapiRequiredFields.add("metadata_name"); - openapiRequiredFields.add("contents"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LiveboardDataResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LiveboardDataResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LiveboardDataResponse is not found in" - + " the empty JSON string", - LiveboardDataResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LiveboardDataResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LiveboardDataResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LiveboardDataResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LiveboardDataResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LiveboardDataResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardDataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - if (!jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("contents").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contents` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("contents").toString())); - } - - JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); - // validate the required field `contents` (array) - for (int i = 0; i < jsonArraycontents.size(); i++) { - LiveboardContent.validateJsonElement(jsonArraycontents.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LiveboardDataResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LiveboardDataResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LiveboardDataResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LiveboardDataResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LiveboardDataResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LiveboardDataResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LiveboardDataResponse - * @throws IOException if the JSON string is invalid with respect to LiveboardDataResponse - */ - public static LiveboardDataResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LiveboardDataResponse.class); - } - - /** - * Convert an instance of LiveboardDataResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("contents").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `contents` to be an array in the JSON string but got `%s`", jsonObj.get("contents").toString())); + } + + JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); + // validate the required field `contents` (array) + for (int i = 0; i < jsonArraycontents.size(); i++) { + LiveboardContent.validateJsonElement(jsonArraycontents.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardDataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardDataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LiveboardDataResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardDataResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiveboardDataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of LiveboardDataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardDataResponse + * @throws IOException if the JSON string is invalid with respect to LiveboardDataResponse + */ + public static LiveboardDataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardDataResponse.class); + } + + /** + * Convert an instance of LiveboardDataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java index 98d0ac92b..d59d59f29 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java @@ -4,224 +4,218 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Options to specify details of Liveboard. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * Options to specify details of Liveboard. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class LiveboardOptions implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = - "visualization_identifiers"; + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = "visualization_identifiers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nonnull + private List visualizationIdentifiers; - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) - @javax.annotation.Nonnull - private List visualizationIdentifiers; + public LiveboardOptions() { + } - public LiveboardOptions() {} + public LiveboardOptions visualizationIdentifiers(@javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } - public LiveboardOptions visualizationIdentifiers( - @javax.annotation.Nonnull List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - return this; + public LiveboardOptions addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } - public LiveboardOptions addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { - if (this.visualizationIdentifiers == null) { - this.visualizationIdentifiers = new ArrayList<>(); - } - this.visualizationIdentifiers.add(visualizationIdentifiersItem); - return this; - } + /** + * Unique ID or name of visualizations. + * @return visualizationIdentifiers + */ + @javax.annotation.Nonnull + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } - /** - * Unique ID or name of visualizations. - * - * @return visualizationIdentifiers - */ - @javax.annotation.Nonnull - public List getVisualizationIdentifiers() { - return visualizationIdentifiers; - } + public void setVisualizationIdentifiers(@javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } - public void setVisualizationIdentifiers( - @javax.annotation.Nonnull List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveboardOptions liveboardOptions = (LiveboardOptions) o; - return Objects.equals( - this.visualizationIdentifiers, liveboardOptions.visualizationIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(visualizationIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveboardOptions {\n"); - sb.append(" visualizationIdentifiers: ") - .append(toIndentedString(visualizationIdentifiers)) - .append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("visualization_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("visualization_identifiers"); + LiveboardOptions liveboardOptions = (LiveboardOptions) o; + return Objects.equals(this.visualizationIdentifiers, liveboardOptions.visualizationIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(visualizationIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardOptions {\n"); + sb.append(" visualizationIdentifiers: ").append(toIndentedString(visualizationIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LiveboardOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LiveboardOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LiveboardOptions is not found in the" - + " empty JSON string", - LiveboardOptions.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visualization_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("visualization_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LiveboardOptions is not found in the empty JSON string", LiveboardOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LiveboardOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LiveboardOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LiveboardOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LiveboardOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LiveboardOptions.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardOptions.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("visualization_identifiers") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("visualization_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LiveboardOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LiveboardOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LiveboardOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LiveboardOptions value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LiveboardOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LiveboardOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of LiveboardOptions - * @throws IOException if the JSON string is invalid with respect to LiveboardOptions - */ - public static LiveboardOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LiveboardOptions.class); - } - - /** - * Convert an instance of LiveboardOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the required json array is present + if (jsonObj.get("visualization_identifiers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LiveboardOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiveboardOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of LiveboardOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardOptions + * @throws IOException if the JSON string is invalid with respect to LiveboardOptions + */ + public static LiveboardOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardOptions.class); + } + + /** + * Convert an instance of LiveboardOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java index 79fca3fb9..9526d3237 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java @@ -4,225 +4,218 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Options to specify details of Liveboard. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * Options to specify details of Liveboard. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class LiveboardOptionsInput implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = - "visualization_identifiers"; + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = "visualization_identifiers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nonnull + private List visualizationIdentifiers; - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) - @javax.annotation.Nonnull - private List visualizationIdentifiers; + public LiveboardOptionsInput() { + } - public LiveboardOptionsInput() {} + public LiveboardOptionsInput visualizationIdentifiers(@javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } - public LiveboardOptionsInput visualizationIdentifiers( - @javax.annotation.Nonnull List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - return this; + public LiveboardOptionsInput addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } - public LiveboardOptionsInput addVisualizationIdentifiersItem( - String visualizationIdentifiersItem) { - if (this.visualizationIdentifiers == null) { - this.visualizationIdentifiers = new ArrayList<>(); - } - this.visualizationIdentifiers.add(visualizationIdentifiersItem); - return this; - } + /** + * Unique ID or name of visualizations. + * @return visualizationIdentifiers + */ + @javax.annotation.Nonnull + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } - /** - * Unique ID or name of visualizations. - * - * @return visualizationIdentifiers - */ - @javax.annotation.Nonnull - public List getVisualizationIdentifiers() { - return visualizationIdentifiers; - } + public void setVisualizationIdentifiers(@javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } - public void setVisualizationIdentifiers( - @javax.annotation.Nonnull List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveboardOptionsInput liveboardOptionsInput = (LiveboardOptionsInput) o; - return Objects.equals( - this.visualizationIdentifiers, liveboardOptionsInput.visualizationIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(visualizationIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveboardOptionsInput {\n"); - sb.append(" visualizationIdentifiers: ") - .append(toIndentedString(visualizationIdentifiers)) - .append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("visualization_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("visualization_identifiers"); + LiveboardOptionsInput liveboardOptionsInput = (LiveboardOptionsInput) o; + return Objects.equals(this.visualizationIdentifiers, liveboardOptionsInput.visualizationIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(visualizationIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardOptionsInput {\n"); + sb.append(" visualizationIdentifiers: ").append(toIndentedString(visualizationIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LiveboardOptionsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LiveboardOptionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LiveboardOptionsInput is not found in" - + " the empty JSON string", - LiveboardOptionsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visualization_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("visualization_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardOptionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LiveboardOptionsInput is not found in the empty JSON string", LiveboardOptionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LiveboardOptionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LiveboardOptionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LiveboardOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LiveboardOptionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LiveboardOptionsInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardOptionsInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("visualization_identifiers") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("visualization_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LiveboardOptionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LiveboardOptionsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LiveboardOptionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LiveboardOptionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LiveboardOptionsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LiveboardOptionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of LiveboardOptionsInput - * @throws IOException if the JSON string is invalid with respect to LiveboardOptionsInput - */ - public static LiveboardOptionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LiveboardOptionsInput.class); - } - - /** - * Convert an instance of LiveboardOptionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the required json array is present + if (jsonObj.get("visualization_identifiers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LiveboardOptionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardOptionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LiveboardOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of LiveboardOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardOptionsInput + * @throws IOException if the JSON string is invalid with respect to LiveboardOptionsInput + */ + public static LiveboardOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardOptionsInput.class); + } + + /** + * Convert an instance of LiveboardOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java index 5296e669a..0b018403d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java @@ -4,238 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** LogResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LogResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DATE = "date"; - - @SerializedName(SERIALIZED_NAME_DATE) - @javax.annotation.Nonnull - private String date; - - public static final String SERIALIZED_NAME_LOG = "log"; - - @SerializedName(SERIALIZED_NAME_LOG) - @javax.annotation.Nonnull - private String log; - - public LogResponse() {} - - public LogResponse date(@javax.annotation.Nonnull String date) { - this.date = date; - return this; - } - - /** - * Date timestamp of the log entry - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - public void setDate(@javax.annotation.Nonnull String date) { - this.date = date; - } - - public LogResponse log(@javax.annotation.Nonnull String log) { - this.log = log; - return this; - } - - /** - * Log data - * - * @return log - */ - @javax.annotation.Nonnull - public String getLog() { - return log; - } - - public void setLog(@javax.annotation.Nonnull String log) { - this.log = log; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogResponse logResponse = (LogResponse) o; - return Objects.equals(this.date, logResponse.date) - && Objects.equals(this.log, logResponse.log); +/** + * LogResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LogResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATE = "date"; + @SerializedName(SERIALIZED_NAME_DATE) + @javax.annotation.Nonnull + private String date; + + public static final String SERIALIZED_NAME_LOG = "log"; + @SerializedName(SERIALIZED_NAME_LOG) + @javax.annotation.Nonnull + private String log; + + public LogResponse() { + } + + public LogResponse date(@javax.annotation.Nonnull String date) { + this.date = date; + return this; + } + + /** + * Date timestamp of the log entry + * @return date + */ + @javax.annotation.Nonnull + public String getDate() { + return date; + } + + public void setDate(@javax.annotation.Nonnull String date) { + this.date = date; + } + + + public LogResponse log(@javax.annotation.Nonnull String log) { + this.log = log; + return this; + } + + /** + * Log data + * @return log + */ + @javax.annotation.Nonnull + public String getLog() { + return log; + } + + public void setLog(@javax.annotation.Nonnull String log) { + this.log = log; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(date, log); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LogResponse {\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" log: ").append(toIndentedString(log)).append("\n"); - sb.append("}"); - return sb.toString(); + LogResponse logResponse = (LogResponse) o; + return Objects.equals(this.date, logResponse.date) && + Objects.equals(this.log, logResponse.log); + } + + @Override + public int hashCode() { + return Objects.hash(date, log); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LogResponse {\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" log: ").append(toIndentedString(log)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("date"); + openapiFields.add("log"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("date"); + openapiRequiredFields.add("log"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LogResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LogResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LogResponse is not found in the empty JSON string", LogResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("date"); - openapiFields.add("log"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("log"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LogResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LogResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LogResponse is not found in the empty" - + " JSON string", - LogResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LogResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LogResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LogResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LogResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LogResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LogResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `date` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("date").toString())); - } - if (!jsonObj.get("log").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `log` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("log").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LogResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LogResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LogResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LogResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LogResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LogResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of LogResponse - * @throws IOException if the JSON string is invalid with respect to LogResponse - */ - public static LogResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LogResponse.class); - } - - /** - * Convert an instance of LogResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date").toString())); + } + if (!jsonObj.get("log").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `log` to be a primitive type in the JSON string but got `%s`", jsonObj.get("log").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LogResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LogResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LogResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LogResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LogResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of LogResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LogResponse + * @throws IOException if the JSON string is invalid with respect to LogResponse + */ + public static LogResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LogResponse.class); + } + + /** + * Convert an instance of LogResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java index 2e38c0181..1881e2243 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java @@ -4,312 +4,296 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** LoginRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class LoginRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - - @SerializedName(SERIALIZED_NAME_PASSWORD) - @javax.annotation.Nullable - private String password; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - public static final String SERIALIZED_NAME_REMEMBER_ME = "remember_me"; - - @SerializedName(SERIALIZED_NAME_REMEMBER_ME) - @javax.annotation.Nullable - private Boolean rememberMe = false; - - public LoginRequest() {} - - public LoginRequest username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username of the ThoughtSpot user - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - - public LoginRequest password(@javax.annotation.Nullable String password) { - this.password = password; - return this; - } - - /** - * Password of the user account - * - * @return password - */ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - public void setPassword(@javax.annotation.Nullable String password) { - this.password = password; - } - - public LoginRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - /** - * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to - * the Org context of their previous login session. - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - public LoginRequest rememberMe(@javax.annotation.Nullable Boolean rememberMe) { - this.rememberMe = rememberMe; - return this; - } - - /** - * A flag to remember the user session. When set to true, a session cookie is created and used - * in subsequent API requests. - * - * @return rememberMe - */ - @javax.annotation.Nullable - public Boolean getRememberMe() { - return rememberMe; - } - - public void setRememberMe(@javax.annotation.Nullable Boolean rememberMe) { - this.rememberMe = rememberMe; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LoginRequest loginRequest = (LoginRequest) o; - return Objects.equals(this.username, loginRequest.username) - && Objects.equals(this.password, loginRequest.password) - && Objects.equals(this.orgIdentifier, loginRequest.orgIdentifier) - && Objects.equals(this.rememberMe, loginRequest.rememberMe); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(username, password, orgIdentifier, rememberMe); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * LoginRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LoginRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_REMEMBER_ME = "remember_me"; + @SerializedName(SERIALIZED_NAME_REMEMBER_ME) + @javax.annotation.Nullable + private Boolean rememberMe = false; + + public LoginRequest() { + } + + public LoginRequest username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + public LoginRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + + public LoginRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + public LoginRequest rememberMe(@javax.annotation.Nullable Boolean rememberMe) { + this.rememberMe = rememberMe; + return this; + } + + /** + * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + * @return rememberMe + */ + @javax.annotation.Nullable + public Boolean getRememberMe() { + return rememberMe; + } + + public void setRememberMe(@javax.annotation.Nullable Boolean rememberMe) { + this.rememberMe = rememberMe; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LoginRequest {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" rememberMe: ").append(toIndentedString(rememberMe)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + LoginRequest loginRequest = (LoginRequest) o; + return Objects.equals(this.username, loginRequest.username) && + Objects.equals(this.password, loginRequest.password) && + Objects.equals(this.orgIdentifier, loginRequest.orgIdentifier) && + Objects.equals(this.rememberMe, loginRequest.rememberMe); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, orgIdentifier, rememberMe); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("org_identifier"); - openapiFields.add("remember_me"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoginRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" rememberMe: ").append(toIndentedString(rememberMe)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LoginRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LoginRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in LoginRequest is not found in the" - + " empty JSON string", - LoginRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("org_identifier"); + openapiFields.add("remember_me"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoginRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoginRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LoginRequest is not found in the empty JSON string", LoginRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LoginRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `LoginRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LoginRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoginRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) - && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("password").toString())); - } - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoginRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoginRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(LoginRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, LoginRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoginRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of LoginRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoginRequest - * @throws IOException if the JSON string is invalid with respect to LoginRequest - */ - public static LoginRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoginRequest.class); - } - - /** - * Convert an instance of LoginRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoginRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoginRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoginRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoginRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LoginRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of LoginRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoginRequest + * @throws IOException if the JSON string is invalid with respect to LoginRequest + */ + public static LoginRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoginRequest.class); + } + + /** + * Convert an instance of LoginRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java index 8283dc198..95004a73f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java @@ -4,273 +4,267 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionConfig; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** MetadataAssociationItem */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataAssociationItem implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; - - @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) - @javax.annotation.Nonnull - private ActionConfig actionConfig; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private String type; - - public MetadataAssociationItem() {} - - public MetadataAssociationItem actionConfig( - @javax.annotation.Nonnull ActionConfig actionConfig) { - this.actionConfig = actionConfig; - return this; - } - - /** - * Get actionConfig - * - * @return actionConfig - */ - @javax.annotation.Nonnull - public ActionConfig getActionConfig() { - return actionConfig; - } - - public void setActionConfig(@javax.annotation.Nonnull ActionConfig actionConfig) { - this.actionConfig = actionConfig; - } - - public MetadataAssociationItem identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } - - public MetadataAssociationItem type(@javax.annotation.Nonnull String type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataAssociationItem metadataAssociationItem = (MetadataAssociationItem) o; - return Objects.equals(this.actionConfig, metadataAssociationItem.actionConfig) - && Objects.equals(this.identifier, metadataAssociationItem.identifier) - && Objects.equals(this.type, metadataAssociationItem.type); - } - - @Override - public int hashCode() { - return Objects.hash(actionConfig, identifier, type); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataAssociationItem {\n"); - sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * MetadataAssociationItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataAssociationItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; + @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) + @javax.annotation.Nonnull + private ActionConfig actionConfig; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public MetadataAssociationItem() { + } + + public MetadataAssociationItem actionConfig(@javax.annotation.Nonnull ActionConfig actionConfig) { + this.actionConfig = actionConfig; + return this; + } + + /** + * Get actionConfig + * @return actionConfig + */ + @javax.annotation.Nonnull + public ActionConfig getActionConfig() { + return actionConfig; + } + + public void setActionConfig(@javax.annotation.Nonnull ActionConfig actionConfig) { + this.actionConfig = actionConfig; + } + + + public MetadataAssociationItem identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public MetadataAssociationItem type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("action_config"); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("action_config"); - openapiRequiredFields.add("identifier"); - openapiRequiredFields.add("type"); + MetadataAssociationItem metadataAssociationItem = (MetadataAssociationItem) o; + return Objects.equals(this.actionConfig, metadataAssociationItem.actionConfig) && + Objects.equals(this.identifier, metadataAssociationItem.identifier) && + Objects.equals(this.type, metadataAssociationItem.type); + } + + @Override + public int hashCode() { + return Objects.hash(actionConfig, identifier, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataAssociationItem {\n"); + sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataAssociationItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataAssociationItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataAssociationItem is not found" - + " in the empty JSON string", - MetadataAssociationItem.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_config"); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("action_config"); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataAssociationItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataAssociationItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataAssociationItem is not found in the empty JSON string", MetadataAssociationItem.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataAssociationItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataAssociationItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataAssociationItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataAssociationItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetadataAssociationItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataAssociationItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `action_config` - ActionConfig.validateJsonElement(jsonObj.get("action_config")); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataAssociationItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataAssociationItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataAssociationItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataAssociationItem value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataAssociationItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataAssociationItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataAssociationItem - * @throws IOException if the JSON string is invalid with respect to MetadataAssociationItem - */ - public static MetadataAssociationItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataAssociationItem.class); - } - - /** - * Convert an instance of MetadataAssociationItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `action_config` + ActionConfig.validateJsonElement(jsonObj.get("action_config")); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataAssociationItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataAssociationItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataAssociationItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataAssociationItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataAssociationItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataAssociationItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataAssociationItem + * @throws IOException if the JSON string is invalid with respect to MetadataAssociationItem + */ + public static MetadataAssociationItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataAssociationItem.class); + } + + /** + * Convert an instance of MetadataAssociationItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java index 5d74f1622..6979da115 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java @@ -4,373 +4,328 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataContext */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataContext implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS = "data_source_identifiers"; - - @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS) - @javax.annotation.Nullable - private List dataSourceIdentifiers; - - public static final String SERIALIZED_NAME_ANSWER_IDENTIFIERS = "answer_identifiers"; - - @SerializedName(SERIALIZED_NAME_ANSWER_IDENTIFIERS) - @javax.annotation.Nullable - private List answerIdentifiers; - - public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; - - @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) - @javax.annotation.Nullable - private String conversationIdentifier; - - public static final String SERIALIZED_NAME_LIVEBOARD_IDENTIFIERS = "liveboard_identifiers"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDENTIFIERS) - @javax.annotation.Nullable - private List liveboardIdentifiers; - - public MetadataContext() {} - - public MetadataContext dataSourceIdentifiers( - @javax.annotation.Nullable List dataSourceIdentifiers) { - this.dataSourceIdentifiers = dataSourceIdentifiers; - return this; - } - - public MetadataContext addDataSourceIdentifiersItem(String dataSourceIdentifiersItem) { - if (this.dataSourceIdentifiers == null) { - this.dataSourceIdentifiers = new ArrayList<>(); - } - this.dataSourceIdentifiers.add(dataSourceIdentifiersItem); - return this; - } - - /** - * List of data_source_identifiers to provide context for breaking down user query into - * analytical queries that can be run on them. - * - * @return dataSourceIdentifiers - */ - @javax.annotation.Nullable - public List getDataSourceIdentifiers() { - return dataSourceIdentifiers; - } - - public void setDataSourceIdentifiers( - @javax.annotation.Nullable List dataSourceIdentifiers) { - this.dataSourceIdentifiers = dataSourceIdentifiers; - } - - public MetadataContext answerIdentifiers( - @javax.annotation.Nullable List answerIdentifiers) { - this.answerIdentifiers = answerIdentifiers; - return this; - } - - public MetadataContext addAnswerIdentifiersItem(String answerIdentifiersItem) { - if (this.answerIdentifiers == null) { - this.answerIdentifiers = new ArrayList<>(); - } - this.answerIdentifiers.add(answerIdentifiersItem); - return this; - } - - /** - * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. - * - * @return answerIdentifiers - */ - @javax.annotation.Nullable - public List getAnswerIdentifiers() { - return answerIdentifiers; - } - - public void setAnswerIdentifiers(@javax.annotation.Nullable List answerIdentifiers) { - this.answerIdentifiers = answerIdentifiers; - } - - public MetadataContext conversationIdentifier( - @javax.annotation.Nullable String conversationIdentifier) { - this.conversationIdentifier = conversationIdentifier; - return this; - } - - /** - * Unique identifier to denote current conversation. - * - * @return conversationIdentifier - */ - @javax.annotation.Nullable - public String getConversationIdentifier() { - return conversationIdentifier; - } - public void setConversationIdentifier( - @javax.annotation.Nullable String conversationIdentifier) { - this.conversationIdentifier = conversationIdentifier; - } +import com.thoughtspot.client.JSON; - public MetadataContext liveboardIdentifiers( - @javax.annotation.Nullable List liveboardIdentifiers) { - this.liveboardIdentifiers = liveboardIdentifiers; - return this; +/** + * MetadataContext + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataContext implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS = "data_source_identifiers"; + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS) + @javax.annotation.Nullable + private List dataSourceIdentifiers; + + public static final String SERIALIZED_NAME_ANSWER_IDENTIFIERS = "answer_identifiers"; + @SerializedName(SERIALIZED_NAME_ANSWER_IDENTIFIERS) + @javax.annotation.Nullable + private List answerIdentifiers; + + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nullable + private String conversationIdentifier; + + public static final String SERIALIZED_NAME_LIVEBOARD_IDENTIFIERS = "liveboard_identifiers"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List liveboardIdentifiers; + + public MetadataContext() { + } + + public MetadataContext dataSourceIdentifiers(@javax.annotation.Nullable List dataSourceIdentifiers) { + this.dataSourceIdentifiers = dataSourceIdentifiers; + return this; + } + + public MetadataContext addDataSourceIdentifiersItem(String dataSourceIdentifiersItem) { + if (this.dataSourceIdentifiers == null) { + this.dataSourceIdentifiers = new ArrayList<>(); } - - public MetadataContext addLiveboardIdentifiersItem(String liveboardIdentifiersItem) { - if (this.liveboardIdentifiers == null) { - this.liveboardIdentifiers = new ArrayList<>(); - } - this.liveboardIdentifiers.add(liveboardIdentifiersItem); - return this; + this.dataSourceIdentifiers.add(dataSourceIdentifiersItem); + return this; + } + + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + * @return dataSourceIdentifiers + */ + @javax.annotation.Nullable + public List getDataSourceIdentifiers() { + return dataSourceIdentifiers; + } + + public void setDataSourceIdentifiers(@javax.annotation.Nullable List dataSourceIdentifiers) { + this.dataSourceIdentifiers = dataSourceIdentifiers; + } + + + public MetadataContext answerIdentifiers(@javax.annotation.Nullable List answerIdentifiers) { + this.answerIdentifiers = answerIdentifiers; + return this; + } + + public MetadataContext addAnswerIdentifiersItem(String answerIdentifiersItem) { + if (this.answerIdentifiers == null) { + this.answerIdentifiers = new ArrayList<>(); } - - /** - * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. - * - * @return liveboardIdentifiers - */ - @javax.annotation.Nullable - public List getLiveboardIdentifiers() { - return liveboardIdentifiers; + this.answerIdentifiers.add(answerIdentifiersItem); + return this; + } + + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + * @return answerIdentifiers + */ + @javax.annotation.Nullable + public List getAnswerIdentifiers() { + return answerIdentifiers; + } + + public void setAnswerIdentifiers(@javax.annotation.Nullable List answerIdentifiers) { + this.answerIdentifiers = answerIdentifiers; + } + + + public MetadataContext conversationIdentifier(@javax.annotation.Nullable String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } + + /** + * Unique identifier to denote current conversation. + * @return conversationIdentifier + */ + @javax.annotation.Nullable + public String getConversationIdentifier() { + return conversationIdentifier; + } + + public void setConversationIdentifier(@javax.annotation.Nullable String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } + + + public MetadataContext liveboardIdentifiers(@javax.annotation.Nullable List liveboardIdentifiers) { + this.liveboardIdentifiers = liveboardIdentifiers; + return this; + } + + public MetadataContext addLiveboardIdentifiersItem(String liveboardIdentifiersItem) { + if (this.liveboardIdentifiers == null) { + this.liveboardIdentifiers = new ArrayList<>(); } + this.liveboardIdentifiers.add(liveboardIdentifiersItem); + return this; + } - public void setLiveboardIdentifiers( - @javax.annotation.Nullable List liveboardIdentifiers) { - this.liveboardIdentifiers = liveboardIdentifiers; - } + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + * @return liveboardIdentifiers + */ + @javax.annotation.Nullable + public List getLiveboardIdentifiers() { + return liveboardIdentifiers; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataContext metadataContext = (MetadataContext) o; - return Objects.equals(this.dataSourceIdentifiers, metadataContext.dataSourceIdentifiers) - && Objects.equals(this.answerIdentifiers, metadataContext.answerIdentifiers) - && Objects.equals( - this.conversationIdentifier, metadataContext.conversationIdentifier) - && Objects.equals(this.liveboardIdentifiers, metadataContext.liveboardIdentifiers); - } + public void setLiveboardIdentifiers(@javax.annotation.Nullable List liveboardIdentifiers) { + this.liveboardIdentifiers = liveboardIdentifiers; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash( - dataSourceIdentifiers, - answerIdentifiers, - conversationIdentifier, - liveboardIdentifiers); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataContext {\n"); - sb.append(" dataSourceIdentifiers: ") - .append(toIndentedString(dataSourceIdentifiers)) - .append("\n"); - sb.append(" answerIdentifiers: ") - .append(toIndentedString(answerIdentifiers)) - .append("\n"); - sb.append(" conversationIdentifier: ") - .append(toIndentedString(conversationIdentifier)) - .append("\n"); - sb.append(" liveboardIdentifiers: ") - .append(toIndentedString(liveboardIdentifiers)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + MetadataContext metadataContext = (MetadataContext) o; + return Objects.equals(this.dataSourceIdentifiers, metadataContext.dataSourceIdentifiers) && + Objects.equals(this.answerIdentifiers, metadataContext.answerIdentifiers) && + Objects.equals(this.conversationIdentifier, metadataContext.conversationIdentifier) && + Objects.equals(this.liveboardIdentifiers, metadataContext.liveboardIdentifiers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dataSourceIdentifiers, answerIdentifiers, conversationIdentifier, liveboardIdentifiers); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data_source_identifiers"); - openapiFields.add("answer_identifiers"); - openapiFields.add("conversation_identifier"); - openapiFields.add("liveboard_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataContext {\n"); + sb.append(" dataSourceIdentifiers: ").append(toIndentedString(dataSourceIdentifiers)).append("\n"); + sb.append(" answerIdentifiers: ").append(toIndentedString(answerIdentifiers)).append("\n"); + sb.append(" conversationIdentifier: ").append(toIndentedString(conversationIdentifier)).append("\n"); + sb.append(" liveboardIdentifiers: ").append(toIndentedString(liveboardIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataContext - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataContext.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataContext is not found in the" - + " empty JSON string", - MetadataContext.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_source_identifiers"); + openapiFields.add("answer_identifiers"); + openapiFields.add("conversation_identifier"); + openapiFields.add("liveboard_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataContext is not found in the empty JSON string", MetadataContext.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataContext` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataContext.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("data_source_identifiers") != null - && !jsonObj.get("data_source_identifiers").isJsonNull() - && !jsonObj.get("data_source_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_source_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("data_source_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("answer_identifiers") != null - && !jsonObj.get("answer_identifiers").isJsonNull() - && !jsonObj.get("answer_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `answer_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("answer_identifiers").toString())); - } - if ((jsonObj.get("conversation_identifier") != null - && !jsonObj.get("conversation_identifier").isJsonNull()) - && !jsonObj.get("conversation_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `conversation_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("conversation_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("liveboard_identifiers") != null - && !jsonObj.get("liveboard_identifiers").isJsonNull() - && !jsonObj.get("liveboard_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `liveboard_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("liveboard_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataContext.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataContext' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataContext.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataContext value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataContext read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataContext given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataContext - * @throws IOException if the JSON string is invalid with respect to MetadataContext - */ - public static MetadataContext fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataContext.class); - } - - /** - * Convert an instance of MetadataContext to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("data_source_identifiers") != null && !jsonObj.get("data_source_identifiers").isJsonNull() && !jsonObj.get("data_source_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data_source_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("data_source_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("answer_identifiers") != null && !jsonObj.get("answer_identifiers").isJsonNull() && !jsonObj.get("answer_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `answer_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("answer_identifiers").toString())); + } + if ((jsonObj.get("conversation_identifier") != null && !jsonObj.get("conversation_identifier").isJsonNull()) && !jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conversation_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conversation_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("liveboard_identifiers") != null && !jsonObj.get("liveboard_identifiers").isJsonNull() && !jsonObj.get("liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `liveboard_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("liveboard_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataContext.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataContext value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataContext read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataContext + * @throws IOException if the JSON string is invalid with respect to MetadataContext + */ + public static MetadataContext fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataContext.class); + } + + /** + * Convert an instance of MetadataContext to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java index 19590cbfc..d979beade 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java @@ -4,300 +4,293 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - /** Gets or Sets type */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; +import com.thoughtspot.client.JSON; - public MetadataInput() {} +/** + * MetadataInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataInput implements Serializable { + private static final long serialVersionUID = 1L; - public MetadataInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; - /** - * Get identifier - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"); - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } + private String value; - public MetadataInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; + TypeEnum(String value) { + this.value = value; } - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - MetadataInput metadataInput = (MetadataInput) o; - return Objects.equals(this.identifier, metadataInput.identifier) - && Objects.equals(this.type, metadataInput.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public MetadataInput() { + } + + public MetadataInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get identifier + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public MetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + MetadataInput metadataInput = (MetadataInput) o; + return Objects.equals(this.identifier, metadataInput.identifier) && + Objects.equals(this.type, metadataInput.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataInput is not found in the" - + " empty JSON string", - MetadataInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataInput is not found in the empty JSON string", MetadataInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataInput - * @throws IOException if the JSON string is invalid with respect to MetadataInput - */ - public static MetadataInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataInput.class); - } - - /** - * Convert an instance of MetadataInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataInput + * @throws IOException if the JSON string is invalid with respect to MetadataInput + */ + public static MetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataInput.class); + } + + /** + * Convert an instance of MetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java index ff10cd0fc..1d931487b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java @@ -4,515 +4,472 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** MetadataListItemInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataListItemInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; - - @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) - @javax.annotation.Nullable - private String objIdentifier; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is - * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. - * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a - * column of any data object such as table, worksheet or view. 5. CONNECTION for creating or - * modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for - * group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one - * or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"), - - TAG("TAG"), - - USER("USER"), - - USER_GROUP("USER_GROUP"), - - LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), - - INSIGHT_SPEC("INSIGHT_SPEC"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - /** Gets or Sets subtypes */ - @JsonAdapter(SubtypesEnum.Adapter.class) - public enum SubtypesEnum { - ONE_TO_ONE_LOGICAL("ONE_TO_ONE_LOGICAL"), - - WORKSHEET("WORKSHEET"), - - PRIVATE_WORKSHEET("PRIVATE_WORKSHEET"), - - USER_DEFINED("USER_DEFINED"), - - AGGR_WORKSHEET("AGGR_WORKSHEET"), - - SQL_VIEW("SQL_VIEW"); - - private String value; - - SubtypesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SubtypesEnum fromValue(String value) { - for (SubtypesEnum b : SubtypesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SubtypesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SubtypesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SubtypesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - SubtypesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SUBTYPES = "subtypes"; - - @SerializedName(SERIALIZED_NAME_SUBTYPES) - @javax.annotation.Nullable - private List subtypes; - - public MetadataListItemInput() {} +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public MetadataListItemInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } +import com.thoughtspot.client.JSON; - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; +/** + * MetadataListItemInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), + + INSIGHT_SPEC("INSIGHT_SPEC"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - public MetadataListItemInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; - return this; + public String getValue() { + return value; } - /** - * CustomObjectId of the metadata. - * - * @return objIdentifier - */ - @javax.annotation.Nullable - public String getObjIdentifier() { - return objIdentifier; + @Override + public String toString() { + return String.valueOf(value); } - public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public MetadataListItemInput namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; + 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); + } } - /** - * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard - * match. - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + /** + * Gets or Sets subtypes + */ + @JsonAdapter(SubtypesEnum.Adapter.class) + public enum SubtypesEnum { + ONE_TO_ONE_LOGICAL("ONE_TO_ONE_LOGICAL"), + + WORKSHEET("WORKSHEET"), + + PRIVATE_WORKSHEET("PRIVATE_WORKSHEET"), + + USER_DEFINED("USER_DEFINED"), + + AGGR_WORKSHEET("AGGR_WORKSHEET"), + + SQL_VIEW("SQL_VIEW"); + + private String value; + + SubtypesEnum(String value) { + this.value = value; } - public MetadataListItemInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; + public String getValue() { + return value; } - /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is - * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. - * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a - * column of any data object such as table, worksheet or view. 5. CONNECTION for creating or - * modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for - * group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one - * or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + @Override + public String toString() { + return String.valueOf(value); } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public static SubtypesEnum fromValue(String value) { + for (SubtypesEnum b : SubtypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public MetadataListItemInput subtypes(@javax.annotation.Nullable List subtypes) { - this.subtypes = subtypes; - return this; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SubtypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SubtypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SubtypesEnum.fromValue(value); + } } - public MetadataListItemInput addSubtypesItem(SubtypesEnum subtypesItem) { - if (this.subtypes == null) { - this.subtypes = new ArrayList<>(); - } - this.subtypes.add(subtypesItem); - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SubtypesEnum.fromValue(value); } - - /** - * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. - * 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. - * 6. SQL_VIEW Version: 10.11.0.cl or later - * - * @return subtypes - */ - @javax.annotation.Nullable - public List getSubtypes() { - return subtypes; + } + + public static final String SERIALIZED_NAME_SUBTYPES = "subtypes"; + @SerializedName(SERIALIZED_NAME_SUBTYPES) + @javax.annotation.Nullable + private List subtypes; + + public MetadataListItemInput() { + } + + public MetadataListItemInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public MetadataListItemInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * CustomObjectId of the metadata. + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + + public MetadataListItemInput namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public MetadataListItemInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public MetadataListItemInput subtypes(@javax.annotation.Nullable List subtypes) { + this.subtypes = subtypes; + return this; + } + + public MetadataListItemInput addSubtypesItem(SubtypesEnum subtypesItem) { + if (this.subtypes == null) { + this.subtypes = new ArrayList<>(); } + this.subtypes.add(subtypesItem); + return this; + } - public void setSubtypes(@javax.annotation.Nullable List subtypes) { - this.subtypes = subtypes; - } + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + * @return subtypes + */ + @javax.annotation.Nullable + public List getSubtypes() { + return subtypes; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataListItemInput metadataListItemInput = (MetadataListItemInput) o; - return Objects.equals(this.identifier, metadataListItemInput.identifier) - && Objects.equals(this.objIdentifier, metadataListItemInput.objIdentifier) - && Objects.equals(this.namePattern, metadataListItemInput.namePattern) - && Objects.equals(this.type, metadataListItemInput.type) - && Objects.equals(this.subtypes, metadataListItemInput.subtypes); - } + public void setSubtypes(@javax.annotation.Nullable List subtypes) { + this.subtypes = subtypes; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(identifier, objIdentifier, namePattern, type, subtypes); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataListItemInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" subtypes: ").append(toIndentedString(subtypes)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + MetadataListItemInput metadataListItemInput = (MetadataListItemInput) o; + return Objects.equals(this.identifier, metadataListItemInput.identifier) && + Objects.equals(this.objIdentifier, metadataListItemInput.objIdentifier) && + Objects.equals(this.namePattern, metadataListItemInput.namePattern) && + Objects.equals(this.type, metadataListItemInput.type) && + Objects.equals(this.subtypes, metadataListItemInput.subtypes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, objIdentifier, namePattern, type, subtypes); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("obj_identifier"); - openapiFields.add("name_pattern"); - openapiFields.add("type"); - openapiFields.add("subtypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataListItemInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" subtypes: ").append(toIndentedString(subtypes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataListItemInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataListItemInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataListItemInput is not found in" - + " the empty JSON string", - MetadataListItemInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("type"); + openapiFields.add("subtypes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataListItemInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataListItemInput is not found in the empty JSON string", MetadataListItemInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataListItemInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataListItemInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataListItemInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataListItemInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) - && !jsonObj.get("obj_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `obj_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("obj_identifier").toString())); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("subtypes") != null - && !jsonObj.get("subtypes").isJsonNull() - && !jsonObj.get("subtypes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `subtypes` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("subtypes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataListItemInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataListItemInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataListItemInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataListItemInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataListItemInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataListItemInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataListItemInput - * @throws IOException if the JSON string is invalid with respect to MetadataListItemInput - */ - public static MetadataListItemInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataListItemInput.class); - } - - /** - * Convert an instance of MetadataListItemInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `obj_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obj_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("subtypes") != null && !jsonObj.get("subtypes").isJsonNull() && !jsonObj.get("subtypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `subtypes` to be an array in the JSON string but got `%s`", jsonObj.get("subtypes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataListItemInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataListItemInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataListItemInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataListItemInput + * @throws IOException if the JSON string is invalid with respect to MetadataListItemInput + */ + public static MetadataListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataListItemInput.class); + } + + /** + * Convert an instance of MetadataListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java index 34f58e9e4..9a41b03b8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java @@ -4,320 +4,307 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataObject */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataObject implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - CUSTOM_ACTION("CUSTOM_ACTION"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public MetadataObject() {} - - public MetadataObject identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - /** - * Unique ID or name of the metadata - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } +import com.thoughtspot.client.JSON; - public MetadataObject type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; +/** + * MetadataObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CUSTOM_ACTION("CUSTOM_ACTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - MetadataObject metadataObject = (MetadataObject) o; - return Objects.equals(this.identifier, metadataObject.identifier) - && Objects.equals(this.type, metadataObject.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public MetadataObject() { + } + + public MetadataObject identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public MetadataObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataObject {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + MetadataObject metadataObject = (MetadataObject) o; + return Objects.equals(this.identifier, metadataObject.identifier) && + Objects.equals(this.type, metadataObject.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataObject {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataObject is not found in the" - + " empty JSON string", - MetadataObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataObject is not found in the empty JSON string", MetadataObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetadataObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataObject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataObject - * @throws IOException if the JSON string is invalid with respect to MetadataObject - */ - public static MetadataObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataObject.class); - } - - /** - * Convert an instance of MetadataObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataObject + * @throws IOException if the JSON string is invalid with respect to MetadataObject + */ + public static MetadataObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataObject.class); + } + + /** + * Convert an instance of MetadataObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java index c62b04138..6d4598413 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java @@ -4,345 +4,330 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - /** Gets or Sets type */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - public static final String SERIALIZED_NAME_TYPE = "type"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private TypeEnum type; +/** + * MetadataResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataResponse implements Serializable { + private static final long serialVersionUID = 1L; - public MetadataResponse() {} + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; - public MetadataResponse name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; - /** - * Get name - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"); - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } + private String value; - public MetadataResponse id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; + TypeEnum(String value) { + this.value = value; } - /** - * Get id - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; + public String getValue() { + return value; } - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public MetadataResponse type(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - MetadataResponse metadataResponse = (MetadataResponse) o; - return Objects.equals(this.name, metadataResponse.name) - && Objects.equals(this.id, metadataResponse.id) - && Objects.equals(this.type, metadataResponse.type); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(name, id, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public MetadataResponse() { + } + + public MetadataResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public MetadataResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public MetadataResponse type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataResponse {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + MetadataResponse metadataResponse = (MetadataResponse) o; + return Objects.equals(this.name, metadataResponse.name) && + Objects.equals(this.id, metadataResponse.id) && + Objects.equals(this.type, metadataResponse.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, id, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataResponse {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataResponse is not found in the" - + " empty JSON string", - MetadataResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataResponse is not found in the empty JSON string", MetadataResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetadataResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataResponse - * @throws IOException if the JSON string is invalid with respect to MetadataResponse - */ - public static MetadataResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataResponse.class); - } - - /** - * Convert an instance of MetadataResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataResponse + * @throws IOException if the JSON string is invalid with respect to MetadataResponse + */ + public static MetadataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataResponse.class); + } + + /** + * Convert an instance of MetadataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java index 4ba38fbca..04259baac 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java @@ -4,625 +4,565 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** Metadata Search Response Object. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataSearchResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nullable - private String metadataId; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nullable - private String metadataName; - - /** Type of the metadata. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"), - - TAG("TAG"), - - USER("USER"), - - USER_GROUP("USER_GROUP"), - - LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), - - INSIGHT_SPEC("INSIGHT_SPEC"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nonnull - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_METADATA_OBJ_ID = "metadata_obj_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_OBJ_ID) - @javax.annotation.Nullable - private String metadataObjId; - - public static final String SERIALIZED_NAME_DEPENDENT_OBJECTS = "dependent_objects"; - - @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECTS) - @javax.annotation.Nullable - private Object dependentObjects; - - public static final String SERIALIZED_NAME_INCOMPLETE_OBJECTS = "incomplete_objects"; - - @SerializedName(SERIALIZED_NAME_INCOMPLETE_OBJECTS) - @javax.annotation.Nullable - private List incompleteObjects; - - public static final String SERIALIZED_NAME_METADATA_DETAIL = "metadata_detail"; - - @SerializedName(SERIALIZED_NAME_METADATA_DETAIL) - @javax.annotation.Nullable - private Object metadataDetail; - - public static final String SERIALIZED_NAME_METADATA_HEADER = "metadata_header"; - - @SerializedName(SERIALIZED_NAME_METADATA_HEADER) - @javax.annotation.Nullable - private Object metadataHeader; - - public static final String SERIALIZED_NAME_VISUALIZATION_HEADERS = "visualization_headers"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_HEADERS) - @javax.annotation.Nullable - private List visualizationHeaders; - - public static final String SERIALIZED_NAME_STATS = "stats"; - - @SerializedName(SERIALIZED_NAME_STATS) - @javax.annotation.Nullable - private Object stats; - - public MetadataSearchResponse() {} - - public MetadataSearchResponse metadataId(@javax.annotation.Nullable String metadataId) { - this.metadataId = metadataId; - return this; - } - - /** - * Unique identifier of the metadata. - * - * @return metadataId - */ - @javax.annotation.Nullable - public String getMetadataId() { - return metadataId; - } - - public void setMetadataId(@javax.annotation.Nullable String metadataId) { - this.metadataId = metadataId; - } - - public MetadataSearchResponse metadataName(@javax.annotation.Nullable String metadataName) { - this.metadataName = metadataName; - return this; - } - - /** - * Name of the metadata. - * - * @return metadataName - */ - @javax.annotation.Nullable - public String getMetadataName() { - return metadataName; - } - - public void setMetadataName(@javax.annotation.Nullable String metadataName) { - this.metadataName = metadataName; - } - - public MetadataSearchResponse metadataType( - @javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of the metadata. - * - * @return metadataType - */ - @javax.annotation.Nonnull - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public MetadataSearchResponse metadataObjId(@javax.annotation.Nullable String metadataObjId) { - this.metadataObjId = metadataObjId; - return this; - } - - /** - * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) - * - * @return metadataObjId - */ - @javax.annotation.Nullable - public String getMetadataObjId() { - return metadataObjId; - } - - public void setMetadataObjId(@javax.annotation.Nullable String metadataObjId) { - this.metadataObjId = metadataObjId; - } - - public MetadataSearchResponse dependentObjects( - @javax.annotation.Nullable Object dependentObjects) { - this.dependentObjects = dependentObjects; - return this; - } - - /** - * Details of dependent objects of the metadata objects. - * - * @return dependentObjects - */ - @javax.annotation.Nullable - public Object getDependentObjects() { - return dependentObjects; - } - - public void setDependentObjects(@javax.annotation.Nullable Object dependentObjects) { - this.dependentObjects = dependentObjects; - } - - public MetadataSearchResponse incompleteObjects( - @javax.annotation.Nullable List incompleteObjects) { - this.incompleteObjects = incompleteObjects; - return this; - } - - public MetadataSearchResponse addIncompleteObjectsItem(Object incompleteObjectsItem) { - if (this.incompleteObjects == null) { - this.incompleteObjects = new ArrayList<>(); - } - this.incompleteObjects.add(incompleteObjectsItem); - return this; - } - - /** - * Details of incomplete information of the metadata objects if any. - * - * @return incompleteObjects - */ - @javax.annotation.Nullable - public List getIncompleteObjects() { - return incompleteObjects; - } - - public void setIncompleteObjects(@javax.annotation.Nullable List incompleteObjects) { - this.incompleteObjects = incompleteObjects; - } - - public MetadataSearchResponse metadataDetail(@javax.annotation.Nullable Object metadataDetail) { - this.metadataDetail = metadataDetail; - return this; - } - - /** - * Complete details of the metadata objects. - * - * @return metadataDetail - */ - @javax.annotation.Nullable - public Object getMetadataDetail() { - return metadataDetail; - } - - public void setMetadataDetail(@javax.annotation.Nullable Object metadataDetail) { - this.metadataDetail = metadataDetail; - } - - public MetadataSearchResponse metadataHeader(@javax.annotation.Nullable Object metadataHeader) { - this.metadataHeader = metadataHeader; - return this; - } - - /** - * Header information of the metadata objects. - * - * @return metadataHeader - */ - @javax.annotation.Nullable - public Object getMetadataHeader() { - return metadataHeader; - } - - public void setMetadataHeader(@javax.annotation.Nullable Object metadataHeader) { - this.metadataHeader = metadataHeader; - } - - public MetadataSearchResponse visualizationHeaders( - @javax.annotation.Nullable List visualizationHeaders) { - this.visualizationHeaders = visualizationHeaders; - return this; - } - - public MetadataSearchResponse addVisualizationHeadersItem(Object visualizationHeadersItem) { - if (this.visualizationHeaders == null) { - this.visualizationHeaders = new ArrayList<>(); - } - this.visualizationHeaders.add(visualizationHeadersItem); - return this; - } - - /** - * Visualization header information of the metadata objects. - * - * @return visualizationHeaders - */ - @javax.annotation.Nullable - public List getVisualizationHeaders() { - return visualizationHeaders; - } - - public void setVisualizationHeaders( - @javax.annotation.Nullable List visualizationHeaders) { - this.visualizationHeaders = visualizationHeaders; - } - - public MetadataSearchResponse stats(@javax.annotation.Nullable Object stats) { - this.stats = stats; - return this; - } - - /** - * Stats of the metadata object. Includes views, favorites, last_accessed. - * - * @return stats - */ - @javax.annotation.Nullable - public Object getStats() { - return stats; - } - - public void setStats(@javax.annotation.Nullable Object stats) { - this.stats = stats; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataSearchResponse metadataSearchResponse = (MetadataSearchResponse) o; - return Objects.equals(this.metadataId, metadataSearchResponse.metadataId) - && Objects.equals(this.metadataName, metadataSearchResponse.metadataName) - && Objects.equals(this.metadataType, metadataSearchResponse.metadataType) - && Objects.equals(this.metadataObjId, metadataSearchResponse.metadataObjId) - && Objects.equals(this.dependentObjects, metadataSearchResponse.dependentObjects) - && Objects.equals(this.incompleteObjects, metadataSearchResponse.incompleteObjects) - && Objects.equals(this.metadataDetail, metadataSearchResponse.metadataDetail) - && Objects.equals(this.metadataHeader, metadataSearchResponse.metadataHeader) - && Objects.equals( - this.visualizationHeaders, metadataSearchResponse.visualizationHeaders) - && Objects.equals(this.stats, metadataSearchResponse.stats); - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - 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())); - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - @Override - public int hashCode() { - return Objects.hash( - metadataId, - metadataName, - metadataType, - metadataObjId, - dependentObjects, - incompleteObjects, - metadataDetail, - metadataHeader, - visualizationHeaders, - stats); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * Metadata Search Response Object. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nullable + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nullable + private String metadataName; + + /** + * Type of the metadata. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), + + INSIGHT_SPEC("INSIGHT_SPEC"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataSearchResponse {\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" metadataObjId: ").append(toIndentedString(metadataObjId)).append("\n"); - sb.append(" dependentObjects: ").append(toIndentedString(dependentObjects)).append("\n"); - sb.append(" incompleteObjects: ") - .append(toIndentedString(incompleteObjects)) - .append("\n"); - sb.append(" metadataDetail: ").append(toIndentedString(metadataDetail)).append("\n"); - sb.append(" metadataHeader: ").append(toIndentedString(metadataHeader)).append("\n"); - sb.append(" visualizationHeaders: ") - .append(toIndentedString(visualizationHeaders)) - .append("\n"); - sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_id"); - openapiFields.add("metadata_name"); - openapiFields.add("metadata_type"); - openapiFields.add("metadata_obj_id"); - openapiFields.add("dependent_objects"); - openapiFields.add("incomplete_objects"); - openapiFields.add("metadata_detail"); - openapiFields.add("metadata_header"); - openapiFields.add("visualization_headers"); - openapiFields.add("stats"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_type"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataSearchResponse - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataSearchResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataSearchResponse is not found" - + " in the empty JSON string", - MetadataSearchResponse.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_OBJ_ID = "metadata_obj_id"; + @SerializedName(SERIALIZED_NAME_METADATA_OBJ_ID) + @javax.annotation.Nullable + private String metadataObjId; + + public static final String SERIALIZED_NAME_DEPENDENT_OBJECTS = "dependent_objects"; + @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECTS) + @javax.annotation.Nullable + private Object dependentObjects; + + public static final String SERIALIZED_NAME_INCOMPLETE_OBJECTS = "incomplete_objects"; + @SerializedName(SERIALIZED_NAME_INCOMPLETE_OBJECTS) + @javax.annotation.Nullable + private List incompleteObjects; + + public static final String SERIALIZED_NAME_METADATA_DETAIL = "metadata_detail"; + @SerializedName(SERIALIZED_NAME_METADATA_DETAIL) + @javax.annotation.Nullable + private Object metadataDetail; + + public static final String SERIALIZED_NAME_METADATA_HEADER = "metadata_header"; + @SerializedName(SERIALIZED_NAME_METADATA_HEADER) + @javax.annotation.Nullable + private Object metadataHeader; + + public static final String SERIALIZED_NAME_VISUALIZATION_HEADERS = "visualization_headers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_HEADERS) + @javax.annotation.Nullable + private List visualizationHeaders; + + public static final String SERIALIZED_NAME_STATS = "stats"; + @SerializedName(SERIALIZED_NAME_STATS) + @javax.annotation.Nullable + private Object stats; + + public MetadataSearchResponse() { + } + + public MetadataSearchResponse metadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the metadata. + * @return metadataId + */ + @javax.annotation.Nullable + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + } + + + public MetadataSearchResponse metadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata. + * @return metadataName + */ + @javax.annotation.Nullable + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + } + + + public MetadataSearchResponse metadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata. + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public MetadataSearchResponse metadataObjId(@javax.annotation.Nullable String metadataObjId) { + this.metadataObjId = metadataObjId; + return this; + } + + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + * @return metadataObjId + */ + @javax.annotation.Nullable + public String getMetadataObjId() { + return metadataObjId; + } + + public void setMetadataObjId(@javax.annotation.Nullable String metadataObjId) { + this.metadataObjId = metadataObjId; + } + + + public MetadataSearchResponse dependentObjects(@javax.annotation.Nullable Object dependentObjects) { + this.dependentObjects = dependentObjects; + return this; + } + + /** + * Details of dependent objects of the metadata objects. + * @return dependentObjects + */ + @javax.annotation.Nullable + public Object getDependentObjects() { + return dependentObjects; + } + + public void setDependentObjects(@javax.annotation.Nullable Object dependentObjects) { + this.dependentObjects = dependentObjects; + } + + + public MetadataSearchResponse incompleteObjects(@javax.annotation.Nullable List incompleteObjects) { + this.incompleteObjects = incompleteObjects; + return this; + } + + public MetadataSearchResponse addIncompleteObjectsItem(Object incompleteObjectsItem) { + if (this.incompleteObjects == null) { + this.incompleteObjects = new ArrayList<>(); + } + this.incompleteObjects.add(incompleteObjectsItem); + return this; + } + + /** + * Details of incomplete information of the metadata objects if any. + * @return incompleteObjects + */ + @javax.annotation.Nullable + public List getIncompleteObjects() { + return incompleteObjects; + } + + public void setIncompleteObjects(@javax.annotation.Nullable List incompleteObjects) { + this.incompleteObjects = incompleteObjects; + } + + + public MetadataSearchResponse metadataDetail(@javax.annotation.Nullable Object metadataDetail) { + this.metadataDetail = metadataDetail; + return this; + } + + /** + * Complete details of the metadata objects. + * @return metadataDetail + */ + @javax.annotation.Nullable + public Object getMetadataDetail() { + return metadataDetail; + } + + public void setMetadataDetail(@javax.annotation.Nullable Object metadataDetail) { + this.metadataDetail = metadataDetail; + } + + + public MetadataSearchResponse metadataHeader(@javax.annotation.Nullable Object metadataHeader) { + this.metadataHeader = metadataHeader; + return this; + } + + /** + * Header information of the metadata objects. + * @return metadataHeader + */ + @javax.annotation.Nullable + public Object getMetadataHeader() { + return metadataHeader; + } + + public void setMetadataHeader(@javax.annotation.Nullable Object metadataHeader) { + this.metadataHeader = metadataHeader; + } + + + public MetadataSearchResponse visualizationHeaders(@javax.annotation.Nullable List visualizationHeaders) { + this.visualizationHeaders = visualizationHeaders; + return this; + } + + public MetadataSearchResponse addVisualizationHeadersItem(Object visualizationHeadersItem) { + if (this.visualizationHeaders == null) { + this.visualizationHeaders = new ArrayList<>(); + } + this.visualizationHeaders.add(visualizationHeadersItem); + return this; + } + + /** + * Visualization header information of the metadata objects. + * @return visualizationHeaders + */ + @javax.annotation.Nullable + public List getVisualizationHeaders() { + return visualizationHeaders; + } + + public void setVisualizationHeaders(@javax.annotation.Nullable List visualizationHeaders) { + this.visualizationHeaders = visualizationHeaders; + } + + + public MetadataSearchResponse stats(@javax.annotation.Nullable Object stats) { + this.stats = stats; + return this; + } + + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + * @return stats + */ + @javax.annotation.Nullable + public Object getStats() { + return stats; + } + + public void setStats(@javax.annotation.Nullable Object stats) { + this.stats = stats; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataSearchResponse metadataSearchResponse = (MetadataSearchResponse) o; + return Objects.equals(this.metadataId, metadataSearchResponse.metadataId) && + Objects.equals(this.metadataName, metadataSearchResponse.metadataName) && + Objects.equals(this.metadataType, metadataSearchResponse.metadataType) && + Objects.equals(this.metadataObjId, metadataSearchResponse.metadataObjId) && + Objects.equals(this.dependentObjects, metadataSearchResponse.dependentObjects) && + Objects.equals(this.incompleteObjects, metadataSearchResponse.incompleteObjects) && + Objects.equals(this.metadataDetail, metadataSearchResponse.metadataDetail) && + Objects.equals(this.metadataHeader, metadataSearchResponse.metadataHeader) && + Objects.equals(this.visualizationHeaders, metadataSearchResponse.visualizationHeaders) && + Objects.equals(this.stats, metadataSearchResponse.stats); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, metadataType, metadataObjId, dependentObjects, incompleteObjects, metadataDetail, metadataHeader, visualizationHeaders, stats); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataSearchResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataObjId: ").append(toIndentedString(metadataObjId)).append("\n"); + sb.append(" dependentObjects: ").append(toIndentedString(dependentObjects)).append("\n"); + sb.append(" incompleteObjects: ").append(toIndentedString(incompleteObjects)).append("\n"); + sb.append(" metadataDetail: ").append(toIndentedString(metadataDetail)).append("\n"); + sb.append(" metadataHeader: ").append(toIndentedString(metadataHeader)).append("\n"); + sb.append(" visualizationHeaders: ").append(toIndentedString(visualizationHeaders)).append("\n"); + sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_obj_id"); + openapiFields.add("dependent_objects"); + openapiFields.add("incomplete_objects"); + openapiFields.add("metadata_detail"); + openapiFields.add("metadata_header"); + openapiFields.add("visualization_headers"); + openapiFields.add("stats"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataSearchResponse is not found in the empty JSON string", MetadataSearchResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataSearchResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataSearchResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetadataSearchResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataSearchResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) - && !jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - if ((jsonObj.get("metadata_name") != null && !jsonObj.get("metadata_name").isJsonNull()) - && !jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - if (!jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the required field `metadata_type` - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - if ((jsonObj.get("metadata_obj_id") != null && !jsonObj.get("metadata_obj_id").isJsonNull()) - && !jsonObj.get("metadata_obj_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_obj_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("metadata_obj_id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("incomplete_objects") != null - && !jsonObj.get("incomplete_objects").isJsonNull() - && !jsonObj.get("incomplete_objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `incomplete_objects` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("incomplete_objects").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("visualization_headers") != null - && !jsonObj.get("visualization_headers").isJsonNull() - && !jsonObj.get("visualization_headers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_headers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("visualization_headers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataSearchResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataSearchResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataSearchResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataSearchResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataSearchResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataSearchResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataSearchResponse - * @throws IOException if the JSON string is invalid with respect to MetadataSearchResponse - */ - public static MetadataSearchResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataSearchResponse.class); - } - - /** - * Convert an instance of MetadataSearchResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) && !jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + if ((jsonObj.get("metadata_name") != null && !jsonObj.get("metadata_name").isJsonNull()) && !jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + if ((jsonObj.get("metadata_obj_id") != null && !jsonObj.get("metadata_obj_id").isJsonNull()) && !jsonObj.get("metadata_obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_obj_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_obj_id").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("incomplete_objects") != null && !jsonObj.get("incomplete_objects").isJsonNull() && !jsonObj.get("incomplete_objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `incomplete_objects` to be an array in the JSON string but got `%s`", jsonObj.get("incomplete_objects").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_headers") != null && !jsonObj.get("visualization_headers").isJsonNull() && !jsonObj.get("visualization_headers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_headers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_headers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataSearchResponse + * @throws IOException if the JSON string is invalid with respect to MetadataSearchResponse + */ + public static MetadataSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataSearchResponse.class); + } + + /** + * Convert an instance of MetadataSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java index 0e6cd1fa3..7946b3fd8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java @@ -4,371 +4,363 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Sort options. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class MetadataSearchSortOptions implements Serializable { - private static final long serialVersionUID = 1L; - - /** Name of the field to apply the sort on. */ - @JsonAdapter(FieldNameEnum.Adapter.class) - public enum FieldNameEnum { - NAME("NAME"), - - DISPLAY_NAME("DISPLAY_NAME"), - AUTHOR("AUTHOR"), - - CREATED("CREATED"), - - MODIFIED("MODIFIED"), - - VIEWS("VIEWS"), - - FAVORITES("FAVORITES"), - - LAST_ACCESSED("LAST_ACCESSED"); - - private String value; - - FieldNameEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FieldNameEnum fromValue(String value) { - for (FieldNameEnum b : FieldNameEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FieldNameEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FieldNameEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FieldNameEnum.fromValue(value); - } +/** + * Sort options. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MetadataSearchSortOptions implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Name of the field to apply the sort on. + */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"), + + VIEWS("VIEWS"), + + FAVORITES("FAVORITES"), + + LAST_ACCESSED("LAST_ACCESSED"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; - - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nullable - private FieldNameEnum fieldName; - - /** Sort order : ASC(Ascending) or DESC(Descending). */ - @JsonAdapter(OrderEnum.Adapter.class) - public enum OrderEnum { - ASC("ASC"), - - DESC("DESC"); - - private String value; - - OrderEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OrderEnum fromValue(String value) { - for (OrderEnum b : OrderEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OrderEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OrderEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OrderEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_ORDER = "order"; - - @SerializedName(SERIALIZED_NAME_ORDER) - @javax.annotation.Nullable - private OrderEnum order; - - public MetadataSearchSortOptions() {} - - public MetadataSearchSortOptions fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Name of the field to apply the sort on. - * - * @return fieldName - */ - @javax.annotation.Nullable - public FieldNameEnum getFieldName() { - return fieldName; + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; + 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 MetadataSearchSortOptions order(@javax.annotation.Nullable OrderEnum order) { - this.order = order; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); } - - /** - * Sort order : ASC(Ascending) or DESC(Descending). - * - * @return order - */ - @javax.annotation.Nullable - public OrderEnum getOrder() { - return order; + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName; + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; } - public void setOrder(@javax.annotation.Nullable OrderEnum order) { - this.order = order; + public String getValue() { + return value; } @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataSearchSortOptions metadataSearchSortOptions = (MetadataSearchSortOptions) o; - return Objects.equals(this.fieldName, metadataSearchSortOptions.fieldName) - && Objects.equals(this.order, metadataSearchSortOptions.order); + public String toString() { + return String.valueOf(value); } - 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())); + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - @Override - public int hashCode() { - return Objects.hash(fieldName, order); + 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); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataSearchSortOptions {\n"); - sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public MetadataSearchSortOptions() { + } + + public MetadataSearchSortOptions fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public MetadataSearchSortOptions order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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(); + MetadataSearchSortOptions metadataSearchSortOptions = (MetadataSearchSortOptions) o; + return Objects.equals(this.fieldName, metadataSearchSortOptions.fieldName) && + Objects.equals(this.order, metadataSearchSortOptions.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; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataSearchSortOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataSearchSortOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MetadataSearchSortOptions is not" - + " found in the empty JSON string", - MetadataSearchSortOptions.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataSearchSortOptions {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataSearchSortOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataSearchSortOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataSearchSortOptions is not found in the empty JSON string", MetadataSearchSortOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MetadataSearchSortOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `MetadataSearchSortOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataSearchSortOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataSearchSortOptions` 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 (!MetadataSearchSortOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataSearchSortOptions' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MetadataSearchSortOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataSearchSortOptions value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetadataSearchSortOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataSearchSortOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataSearchSortOptions - * @throws IOException if the JSON string is invalid with respect to MetadataSearchSortOptions - */ - public static MetadataSearchSortOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataSearchSortOptions.class); - } - - /** - * Convert an instance of MetadataSearchSortOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataSearchSortOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataSearchSortOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataSearchSortOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataSearchSortOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataSearchSortOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of MetadataSearchSortOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataSearchSortOptions + * @throws IOException if the JSON string is invalid with respect to MetadataSearchSortOptions + */ + public static MetadataSearchSortOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataSearchSortOptions.class); + } + + /** + * Convert an instance of MetadataSearchSortOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java index 513443ad4..4e4b285c2 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java @@ -4,308 +4,291 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ModelTableList */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ModelTableList implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; - - @SerializedName(SERIALIZED_NAME_MODEL_NAME) - @javax.annotation.Nonnull - private String modelName; - - public static final String SERIALIZED_NAME_MODEL_PATH = "model_path"; - - @SerializedName(SERIALIZED_NAME_MODEL_PATH) - @javax.annotation.Nullable - private String modelPath; - - public static final String SERIALIZED_NAME_TABLES = "tables"; - - @SerializedName(SERIALIZED_NAME_TABLES) - @javax.annotation.Nonnull - private List tables; - public ModelTableList() {} - - public ModelTableList modelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - return this; - } - - /** - * Name of the Model. - * - * @return modelName - */ - @javax.annotation.Nonnull - public String getModelName() { - return modelName; - } - - public void setModelName(@javax.annotation.Nonnull String modelName) { - this.modelName = modelName; - } - - public ModelTableList modelPath(@javax.annotation.Nullable String modelPath) { - this.modelPath = modelPath; - return this; - } - - /** - * Model directory path, this is optional param and required if there are duplicate models with - * the same name. - * - * @return modelPath - */ - @javax.annotation.Nullable - public String getModelPath() { - return modelPath; - } - - public void setModelPath(@javax.annotation.Nullable String modelPath) { - this.modelPath = modelPath; - } +import com.thoughtspot.client.JSON; - public ModelTableList tables(@javax.annotation.Nonnull List tables) { - this.tables = tables; - return this; +/** + * ModelTableList + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelTableList implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; + @SerializedName(SERIALIZED_NAME_MODEL_NAME) + @javax.annotation.Nonnull + private String modelName; + + public static final String SERIALIZED_NAME_MODEL_PATH = "model_path"; + @SerializedName(SERIALIZED_NAME_MODEL_PATH) + @javax.annotation.Nullable + private String modelPath; + + public static final String SERIALIZED_NAME_TABLES = "tables"; + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nonnull + private List tables; + + public ModelTableList() { + } + + public ModelTableList modelName(@javax.annotation.Nonnull String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Name of the Model. + * @return modelName + */ + @javax.annotation.Nonnull + public String getModelName() { + return modelName; + } + + public void setModelName(@javax.annotation.Nonnull String modelName) { + this.modelName = modelName; + } + + + public ModelTableList modelPath(@javax.annotation.Nullable String modelPath) { + this.modelPath = modelPath; + return this; + } + + /** + * Model directory path, this is optional param and required if there are duplicate models with the same name. + * @return modelPath + */ + @javax.annotation.Nullable + public String getModelPath() { + return modelPath; + } + + public void setModelPath(@javax.annotation.Nullable String modelPath) { + this.modelPath = modelPath; + } + + + public ModelTableList tables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + return this; + } + + public ModelTableList addTablesItem(String tablesItem) { + if (this.tables == null) { + this.tables = new ArrayList<>(); } + this.tables.add(tablesItem); + return this; + } - public ModelTableList addTablesItem(String tablesItem) { - if (this.tables == null) { - this.tables = new ArrayList<>(); - } - this.tables.add(tablesItem); - return this; - } + /** + * List of Tables. + * @return tables + */ + @javax.annotation.Nonnull + public List getTables() { + return tables; + } - /** - * List of Tables. - * - * @return tables - */ - @javax.annotation.Nonnull - public List getTables() { - return tables; - } + public void setTables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + } - public void setTables(@javax.annotation.Nonnull List tables) { - this.tables = tables; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelTableList modelTableList = (ModelTableList) o; - return Objects.equals(this.modelName, modelTableList.modelName) - && Objects.equals(this.modelPath, modelTableList.modelPath) - && Objects.equals(this.tables, modelTableList.tables); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(modelName, modelPath, tables); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + ModelTableList modelTableList = (ModelTableList) o; + return Objects.equals(this.modelName, modelTableList.modelName) && + Objects.equals(this.modelPath, modelTableList.modelPath) && + Objects.equals(this.tables, modelTableList.tables); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(modelName, modelPath, tables); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelTableList {\n"); - sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); - sb.append(" modelPath: ").append(toIndentedString(modelPath)).append("\n"); - sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelTableList {\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" modelPath: ").append(toIndentedString(modelPath)).append("\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("model_name"); + openapiFields.add("model_path"); + openapiFields.add("tables"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("model_name"); + openapiRequiredFields.add("tables"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModelTableList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModelTableList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModelTableList is not found in the empty JSON string", ModelTableList.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("model_name"); - openapiFields.add("model_path"); - openapiFields.add("tables"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("model_name"); - openapiRequiredFields.add("tables"); - } + } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ModelTableList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ModelTableList.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ModelTableList is not found in the" - + " empty JSON string", - ModelTableList.openapiRequiredFields.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ModelTableList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelTableList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ModelTableList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ModelTableList` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ModelTableList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ModelTableList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("model_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `model_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("model_name").toString())); - } - if ((jsonObj.get("model_path") != null && !jsonObj.get("model_path").isJsonNull()) - && !jsonObj.get("model_path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `model_path` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("model_path").toString())); - } - // ensure the required json array is present - if (jsonObj.get("tables") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("tables").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tables` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("tables").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ModelTableList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ModelTableList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ModelTableList.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ModelTableList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ModelTableList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ModelTableList given an JSON string - * - * @param jsonString JSON string - * @return An instance of ModelTableList - * @throws IOException if the JSON string is invalid with respect to ModelTableList - */ - public static ModelTableList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ModelTableList.class); - } - - /** - * Convert an instance of ModelTableList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("model_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `model_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model_name").toString())); + } + if ((jsonObj.get("model_path") != null && !jsonObj.get("model_path").isJsonNull()) && !jsonObj.get("model_path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `model_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model_path").toString())); + } + // ensure the required json array is present + if (jsonObj.get("tables") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("tables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tables` to be an array in the JSON string but got `%s`", jsonObj.get("tables").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModelTableList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModelTableList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModelTableList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModelTableList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModelTableList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ModelTableList given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModelTableList + * @throws IOException if the JSON string is invalid with respect to ModelTableList + */ + public static ModelTableList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModelTableList.class); + } + + /** + * Convert an instance of ModelTableList to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java index 783dd5de5..ebc9bba75 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java @@ -4,247 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** The object representation with ID and Name. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ObjectIDAndName implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public ObjectIDAndName() {} - - public ObjectIDAndName id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the object. - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public ObjectIDAndName name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the object. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ObjectIDAndName objectIDAndName = (ObjectIDAndName) o; - return Objects.equals(this.id, objectIDAndName.id) - && Objects.equals(this.name, objectIDAndName.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ObjectIDAndName {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ObjectIDAndName - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ObjectIDAndName.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ObjectIDAndName is not found in the" - + " empty JSON string", - ObjectIDAndName.openapiRequiredFields.toString())); - } +/** + * The object representation with ID and Name. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ObjectIDAndName implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public ObjectIDAndName() { + } + + public ObjectIDAndName id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public ObjectIDAndName name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the object. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectIDAndName objectIDAndName = (ObjectIDAndName) o; + return Objects.equals(this.id, objectIDAndName.id) && + Objects.equals(this.name, objectIDAndName.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectIDAndName {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ObjectIDAndName + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ObjectIDAndName.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectIDAndName is not found in the empty JSON string", ObjectIDAndName.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ObjectIDAndName.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ObjectIDAndName` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ObjectIDAndName.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectIDAndName` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectIDAndName.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectIDAndName' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ObjectIDAndName.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectIDAndName value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectIDAndName read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectIDAndName given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectIDAndName - * @throws IOException if the JSON string is invalid with respect to ObjectIDAndName - */ - public static ObjectIDAndName fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectIDAndName.class); - } - - /** - * Convert an instance of ObjectIDAndName to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ObjectIDAndName.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ObjectIDAndName' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ObjectIDAndName.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ObjectIDAndName value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ObjectIDAndName read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ObjectIDAndName given an JSON string + * + * @param jsonString JSON string + * @return An instance of ObjectIDAndName + * @throws IOException if the JSON string is invalid with respect to ObjectIDAndName + */ + public static ObjectIDAndName fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ObjectIDAndName.class); + } + + /** + * Convert an instance of ObjectIDAndName to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java index fcd5e60e8..6c609a0ce 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java @@ -4,230 +4,233 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** The current Org context of the user. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Org implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private Integer id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public Org() {} - - public Org id(@javax.annotation.Nonnull Integer id) { - this.id = id; - return this; - } - - /** - * The ID of the object. - * - * @return id - */ - @javax.annotation.Nonnull - public Integer getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull Integer id) { - this.id = id; - } - - public Org name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the object. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Org org = (Org) o; - return Objects.equals(this.id, org.id) && Objects.equals(this.name, org.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Org {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * The current Org context of the user. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Org implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public Org() { + } + + public Org id(@javax.annotation.Nonnull Integer id) { + this.id = id; + return this; + } + + /** + * The ID of the object. + * @return id + */ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Integer id) { + this.id = id; + } + + + public Org name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the object. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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"); + Org org = (Org) o; + return Objects.equals(this.id, org.id) && + Objects.equals(this.name, org.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Org {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Org - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Org.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Org is not found in the empty JSON" - + " string", - Org.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Org + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Org.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Org is not found in the empty JSON string", Org.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Org.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Org`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Org.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Org` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Org.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Org.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Org.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Org' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Org.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Org value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Org read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Org given an JSON string - * - * @param jsonString JSON string - * @return An instance of Org - * @throws IOException if the JSON string is invalid with respect to Org - */ - public static Org fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Org.class); - } - - /** - * Convert an instance of Org to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Org.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Org' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Org.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Org value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Org read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Org given an JSON string + * + * @param jsonString JSON string + * @return An instance of Org + * @throws IOException if the JSON string is invalid with respect to Org + */ + public static Org fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Org.class); + } + + /** + * Convert an instance of Org to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java new file mode 100644 index 000000000..30a8ae9c3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java @@ -0,0 +1,447 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfigInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..e1c6281bd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigResponse.java @@ -0,0 +1,257 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfig; +import com.thoughtspot.client.model.OrgDetails; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..6afe78e90 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgDetails.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/OrgInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgInfo.java index d5526a667..d97822690 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgInfo.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgInfo.java @@ -4,248 +4,244 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** OrgInfo */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrgInfo implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private Integer id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public OrgInfo() {} - - public OrgInfo id(@javax.annotation.Nonnull Integer id) { - this.id = id; - return this; - } - - /** - * Id. - * - * @return id - */ - @javax.annotation.Nonnull - public Integer getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull Integer id) { - this.id = id; - } - - public OrgInfo name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgInfo orgInfo = (OrgInfo) o; - return Objects.equals(this.id, orgInfo.id) && Objects.equals(this.name, orgInfo.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgInfo {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrgInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrgInfo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrgInfo is not found in the empty" - + " JSON string", - OrgInfo.openapiRequiredFields.toString())); - } +/** + * OrgInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OrgInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public OrgInfo() { + } + + public OrgInfo id(@javax.annotation.Nonnull Integer id) { + this.id = id; + return this; + } + + /** + * Id. + * @return id + */ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Integer id) { + this.id = id; + } + + + public OrgInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgInfo orgInfo = (OrgInfo) o; + return Objects.equals(this.id, orgInfo.id) && + Objects.equals(this.name, orgInfo.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrgInfo is not found in the empty JSON string", OrgInfo.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrgInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `OrgInfo`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrgInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrgInfo.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrgInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrgInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrgInfo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrgInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrgInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrgInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrgInfo - * @throws IOException if the JSON string is invalid with respect to OrgInfo - */ - public static OrgInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrgInfo.class); - } - - /** - * Convert an instance of OrgInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrgInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrgInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrgInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgInfo + * @throws IOException if the JSON string is invalid with respect to OrgInfo + */ + public static OrgInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgInfo.class); + } + + /** + * Convert an instance of OrgInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java new file mode 100644 index 000000000..ec1ab8349 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java @@ -0,0 +1,311 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/OrgResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgResponse.java index 8d895cd71..0ec704d6f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgResponse.java @@ -4,457 +4,438 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** OrgResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrgResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Integer id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - /** Status of the Org. */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("ACTIVE"), - - IN_ACTIVE("IN_ACTIVE"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private StatusEnum status; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Visibility of the Org. */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHOW("SHOW"), - - HIDDEN("HIDDEN"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public OrgResponse() {} - - public OrgResponse id(@javax.annotation.Nullable Integer id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the Org. - * - * @return id - */ - @javax.annotation.Nullable - public Integer getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Integer id) { - this.id = id; - } - - public OrgResponse name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - /** - * Name of the Org. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - public OrgResponse status(@javax.annotation.Nullable StatusEnum status) { - this.status = status; - return this; +/** + * OrgResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OrgResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + /** + * Status of the Org. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + IN_ACTIVE("IN_ACTIVE"); + + private String value; + + StatusEnum(String value) { + this.value = value; } - /** - * Status of the Org. - * - * @return status - */ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; + public String getValue() { + return value; } - public void setStatus(@javax.annotation.Nullable StatusEnum status) { - this.status = status; + @Override + public String toString() { + return String.valueOf(value); } - public OrgResponse description(@javax.annotation.Nullable String description) { - this.description = description; - return this; + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - /** - * Description of the Org. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } } - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); } - - public OrgResponse visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Visibility of the Org. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHOW("SHOW"), + + HIDDEN("HIDDEN"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; } - /** - * Visibility of the Org. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; + public String getValue() { + return value; } - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - OrgResponse orgResponse = (OrgResponse) o; - return Objects.equals(this.id, orgResponse.id) - && Objects.equals(this.name, orgResponse.name) - && Objects.equals(this.status, orgResponse.status) - && Objects.equals(this.description, orgResponse.description) - && Objects.equals(this.visibility, orgResponse.visibility); + } + return null; } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(id, name, status, description, visibility); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public OrgResponse() { + } + + public OrgResponse id(@javax.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the Org. + * @return id + */ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nullable Integer id) { + this.id = id; + } + + + public OrgResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the Org. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public OrgResponse status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the Org. + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public OrgResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public OrgResponse visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the Org. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + OrgResponse orgResponse = (OrgResponse) o; + return Objects.equals(this.id, orgResponse.id) && + Objects.equals(this.name, orgResponse.name) && + Objects.equals(this.status, orgResponse.status) && + Objects.equals(this.description, orgResponse.description) && + Objects.equals(this.visibility, orgResponse.visibility); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, description, visibility); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("status"); - openapiFields.add("description"); - openapiFields.add("visibility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrgResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrgResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrgResponse is not found in the empty" - + " JSON string", - OrgResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("status"); + openapiFields.add("description"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrgResponse is not found in the empty JSON string", OrgResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrgResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `OrgResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrgResponse` 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("status") != null && !jsonObj.get("status").isJsonNull()) - && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrgResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrgResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrgResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrgResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrgResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrgResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrgResponse - * @throws IOException if the JSON string is invalid with respect to OrgResponse - */ - public static OrgResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrgResponse.class); - } - - /** - * Convert an instance of OrgResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrgResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrgResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of OrgResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgResponse + * @throws IOException if the JSON string is invalid with respect to OrgResponse + */ + public static OrgResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgResponse.class); + } + + /** + * Convert an instance of OrgResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java index 5a2b691e8..672b1edef 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java @@ -4,237 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** OrgType */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class OrgType implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Integer id; - - public OrgType() {} - - public OrgType name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public OrgType id(@javax.annotation.Nullable Integer id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nullable - public Integer getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Integer id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgType orgType = (OrgType) o; - return Objects.equals(this.name, orgType.name) && Objects.equals(this.id, orgType.id); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(name, id); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgType {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrgType - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrgType.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in OrgType is not found in the empty" - + " JSON string", - OrgType.openapiRequiredFields.toString())); - } +/** + * OrgType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OrgType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private Integer id; + + public OrgType() { + } + + public OrgType name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public OrgType id(@javax.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nullable Integer id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgType orgType = (OrgType) o; + return Objects.equals(this.name, orgType.name) && + Objects.equals(this.id, orgType.id); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, id); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgType {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrgType is not found in the empty JSON string", OrgType.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrgType.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `OrgType`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrgType` 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("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrgType.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrgType' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(OrgType.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, OrgType value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrgType read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of OrgType given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrgType - * @throws IOException if the JSON string is invalid with respect to OrgType - */ - public static OrgType fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrgType.class); - } - - /** - * Convert an instance of OrgType to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrgType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrgType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrgType given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgType + * @throws IOException if the JSON string is invalid with respect to OrgType + */ + public static OrgType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgType.class); + } + + /** + * Convert an instance of OrgType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java index 0515ce635..d26490ee8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java @@ -4,254 +4,249 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Filter Rules to be applied on Objects. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ParameterValues implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_VALUES = "values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nonnull - private List values; - - public ParameterValues() {} - - public ParameterValues name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * The name of the column to apply the filter on. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ParameterValues values(@javax.annotation.Nonnull List values) { - this.values = values; - return this; - } - - public ParameterValues addValuesItem(Object valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; - } - - /** - * The values to filter on. Only single value is supported currently. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; - } - - public void setValues(@javax.annotation.Nonnull List values) { - this.values = values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParameterValues parameterValues = (ParameterValues) o; - return Objects.equals(this.name, parameterValues.name) - && Objects.equals(this.values, parameterValues.values); - } - - @Override - public int hashCode() { - return Objects.hash(name, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParameterValues {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("values"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("values"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ParameterValues - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ParameterValues.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ParameterValues is not found in the" - + " empty JSON string", - ParameterValues.openapiRequiredFields.toString())); - } +/** + * Filter Rules to be applied on Objects. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ParameterValues implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public ParameterValues() { + } + + public ParameterValues name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the column to apply the filter on. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ParameterValues values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public ParameterValues addValuesItem(Object valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * The values to filter on. Only single value is supported currently. + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterValues parameterValues = (ParameterValues) o; + return Objects.equals(this.name, parameterValues.name) && + Objects.equals(this.values, parameterValues.values); + } + + @Override + public int hashCode() { + return Objects.hash(name, values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterValues {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParameterValues + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParameterValues.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ParameterValues is not found in the empty JSON string", ParameterValues.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ParameterValues.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ParameterValues` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ParameterValues.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ParameterValues` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ParameterValues.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParameterValues.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - // ensure the required json array is present - if (jsonObj.get("values") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `values` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("values").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ParameterValues.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ParameterValues' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ParameterValues.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ParameterValues value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ParameterValues read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ParameterValues given an JSON string - * - * @param jsonString JSON string - * @return An instance of ParameterValues - * @throws IOException if the JSON string is invalid with respect to ParameterValues - */ - public static ParameterValues fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ParameterValues.class); - } - - /** - * Convert an instance of ParameterValues to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParameterValues.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParameterValues' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ParameterValues.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ParameterValues value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ParameterValues read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ParameterValues given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParameterValues + * @throws IOException if the JSON string is invalid with respect to ParameterValues + */ + public static ParameterValues fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParameterValues.class); + } + + /** + * Convert an instance of ParameterValues to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java index 006a42673..08bb89d74 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java @@ -4,469 +4,438 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ParameterizeMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ParameterizeMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of metadata object to parameterize. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LOGICAL_TABLE("LOGICAL_TABLE"), - - CONNECTION("CONNECTION"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nullable - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - /** Type of field in the metadata to parameterize. */ - @JsonAdapter(FieldTypeEnum.Adapter.class) - public enum FieldTypeEnum { - ATTRIBUTE("ATTRIBUTE"), - - CONNECTION_PROPERTY("CONNECTION_PROPERTY"); - - private String value; - - FieldTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FieldTypeEnum fromValue(String value) { - for (FieldTypeEnum b : FieldTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FieldTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FieldTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; - - @SerializedName(SERIALIZED_NAME_FIELD_TYPE) - @javax.annotation.Nonnull - private FieldTypeEnum fieldType; - - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; - - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nonnull - private String fieldName; - - public static final String SERIALIZED_NAME_VARIABLE_IDENTIFIER = "variable_identifier"; - - @SerializedName(SERIALIZED_NAME_VARIABLE_IDENTIFIER) - @javax.annotation.Nonnull - private String variableIdentifier; - - public ParameterizeMetadataRequest() {} - - public ParameterizeMetadataRequest metadataType( - @javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of metadata object to parameterize. - * - * @return metadataType - */ - @javax.annotation.Nullable - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public ParameterizeMetadataRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * Unique ID or name of the metadata object to parameterize. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } +import com.thoughtspot.client.JSON; - public ParameterizeMetadataRequest fieldType( - @javax.annotation.Nonnull FieldTypeEnum fieldType) { - this.fieldType = fieldType; - return this; - } +/** + * ParameterizeMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ParameterizeMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * Type of field in the metadata to parameterize. - * - * @return fieldType - */ - @javax.annotation.Nonnull - public FieldTypeEnum getFieldType() { - return fieldType; - } + /** + * Type of metadata object to parameterize. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"); - public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { - this.fieldType = fieldType; - } + private String value; - public ParameterizeMetadataRequest fieldName(@javax.annotation.Nonnull String fieldName) { - this.fieldName = fieldName; - return this; + MetadataTypeEnum(String value) { + this.value = value; } - /** - * Name of the field which needs to be parameterized. - * - * @return fieldName - */ - @javax.annotation.Nonnull - public String getFieldName() { - return fieldName; + public String getValue() { + return value; } - public void setFieldName(@javax.annotation.Nonnull String fieldName) { - this.fieldName = fieldName; + @Override + public String toString() { + return String.valueOf(value); } - public ParameterizeMetadataRequest variableIdentifier( - @javax.annotation.Nonnull String variableIdentifier) { - this.variableIdentifier = variableIdentifier; - return this; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Unique ID or name of the variable to use for parameterization - * - * @return variableIdentifier - */ - @javax.annotation.Nonnull - public String getVariableIdentifier() { - return variableIdentifier; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - public void setVariableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { - this.variableIdentifier = variableIdentifier; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParameterizeMetadataRequest parameterizeMetadataRequest = (ParameterizeMetadataRequest) o; - return Objects.equals(this.metadataType, parameterizeMetadataRequest.metadataType) - && Objects.equals( - this.metadataIdentifier, parameterizeMetadataRequest.metadataIdentifier) - && Objects.equals(this.fieldType, parameterizeMetadataRequest.fieldType) - && Objects.equals(this.fieldName, parameterizeMetadataRequest.fieldName) - && Objects.equals( - this.variableIdentifier, parameterizeMetadataRequest.variableIdentifier); + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** + * Type of field in the metadata to parameterize. + */ + @JsonAdapter(FieldTypeEnum.Adapter.class) + public enum FieldTypeEnum { + ATTRIBUTE("ATTRIBUTE"), + + CONNECTION_PROPERTY("CONNECTION_PROPERTY"); + + private String value; + + FieldTypeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - metadataType, metadataIdentifier, fieldType, fieldName, variableIdentifier); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParameterizeMetadataRequest {\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); - sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); - sb.append(" variableIdentifier: ") - .append(toIndentedString(variableIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static FieldTypeEnum fromValue(String value) { + for (FieldTypeEnum b : FieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_type"); - openapiFields.add("metadata_identifier"); - openapiFields.add("field_type"); - openapiFields.add("field_name"); - openapiFields.add("variable_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); - openapiRequiredFields.add("field_type"); - openapiRequiredFields.add("field_name"); - openapiRequiredFields.add("variable_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ParameterizeMetadataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ParameterizeMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ParameterizeMetadataRequest is not" - + " found in the empty JSON string", - ParameterizeMetadataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + FieldTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; + @SerializedName(SERIALIZED_NAME_FIELD_TYPE) + @javax.annotation.Nonnull + private FieldTypeEnum fieldType; + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nonnull + private String fieldName; + + public static final String SERIALIZED_NAME_VARIABLE_IDENTIFIER = "variable_identifier"; + @SerializedName(SERIALIZED_NAME_VARIABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String variableIdentifier; + + public ParameterizeMetadataRequest() { + } + + public ParameterizeMetadataRequest metadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to parameterize. + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public ParameterizeMetadataRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object to parameterize. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public ParameterizeMetadataRequest fieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Type of field in the metadata to parameterize. + * @return fieldType + */ + @javax.annotation.Nonnull + public FieldTypeEnum getFieldType() { + return fieldType; + } + + public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + } + + + public ParameterizeMetadataRequest fieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field which needs to be parameterized. + * @return fieldName + */ + @javax.annotation.Nonnull + public String getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + } + + + public ParameterizeMetadataRequest variableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + return this; + } + + /** + * Unique ID or name of the variable to use for parameterization + * @return variableIdentifier + */ + @javax.annotation.Nonnull + public String getVariableIdentifier() { + return variableIdentifier; + } + + public void setVariableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterizeMetadataRequest parameterizeMetadataRequest = (ParameterizeMetadataRequest) o; + return Objects.equals(this.metadataType, parameterizeMetadataRequest.metadataType) && + Objects.equals(this.metadataIdentifier, parameterizeMetadataRequest.metadataIdentifier) && + Objects.equals(this.fieldType, parameterizeMetadataRequest.fieldType) && + Objects.equals(this.fieldName, parameterizeMetadataRequest.fieldName) && + Objects.equals(this.variableIdentifier, parameterizeMetadataRequest.variableIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(metadataType, metadataIdentifier, fieldType, fieldName, variableIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterizeMetadataRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" variableIdentifier: ").append(toIndentedString(variableIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("field_type"); + openapiFields.add("field_name"); + openapiFields.add("variable_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("field_type"); + openapiRequiredFields.add("field_name"); + openapiRequiredFields.add("variable_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParameterizeMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParameterizeMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ParameterizeMetadataRequest is not found in the empty JSON string", ParameterizeMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ParameterizeMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ParameterizeMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ParameterizeMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ParameterizeMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ParameterizeMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParameterizeMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) - && !jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the optional field `metadata_type` - if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - } - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if (!jsonObj.get("field_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `field_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("field_type").toString())); - } - // validate the required field `field_type` - FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); - if (!jsonObj.get("field_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `field_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("field_name").toString())); - } - if (!jsonObj.get("variable_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `variable_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("variable_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ParameterizeMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ParameterizeMetadataRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ParameterizeMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ParameterizeMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ParameterizeMetadataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ParameterizeMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ParameterizeMetadataRequest - * @throws IOException if the JSON string is invalid with respect to ParameterizeMetadataRequest - */ - public static ParameterizeMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ParameterizeMetadataRequest.class); - } - - /** - * Convert an instance of ParameterizeMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("field_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_type").toString())); + } + // validate the required field `field_type` + FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); + if (!jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + if (!jsonObj.get("variable_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `variable_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variable_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParameterizeMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParameterizeMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ParameterizeMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ParameterizeMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ParameterizeMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ParameterizeMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParameterizeMetadataRequest + * @throws IOException if the JSON string is invalid with respect to ParameterizeMetadataRequest + */ + public static ParameterizeMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParameterizeMetadataRequest.class); + } + + /** + * Convert an instance of ParameterizeMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java index 317bb5a0a..fbb3a3343 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java @@ -4,247 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ParametersListItem */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ParametersListItem implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_KEY = "key"; - - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public ParametersListItem() {} - - public ParametersListItem key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * Key for the url query parameter - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - public ParametersListItem value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * Value for the url query parameter - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParametersListItem parametersListItem = (ParametersListItem) o; - return Objects.equals(this.key, parametersListItem.key) - && Objects.equals(this.value, parametersListItem.value); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParametersListItem {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ParametersListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ParametersListItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ParametersListItem is not found in" - + " the empty JSON string", - ParametersListItem.openapiRequiredFields.toString())); - } +/** + * ParametersListItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ParametersListItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public ParametersListItem() { + } + + public ParametersListItem key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Key for the url query parameter + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + + public ParametersListItem value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Value for the url query parameter + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParametersListItem parametersListItem = (ParametersListItem) o; + return Objects.equals(this.key, parametersListItem.key) && + Objects.equals(this.value, parametersListItem.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParametersListItem {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParametersListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParametersListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ParametersListItem is not found in the empty JSON string", ParametersListItem.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ParametersListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ParametersListItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ParametersListItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ParametersListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) - && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) - && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ParametersListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ParametersListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ParametersListItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ParametersListItem value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ParametersListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ParametersListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of ParametersListItem - * @throws IOException if the JSON string is invalid with respect to ParametersListItem - */ - public static ParametersListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ParametersListItem.class); - } - - /** - * Convert an instance of ParametersListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParametersListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParametersListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ParametersListItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ParametersListItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ParametersListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ParametersListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParametersListItem + * @throws IOException if the JSON string is invalid with respect to ParametersListItem + */ + public static ParametersListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParametersListItem.class); + } + + /** + * Convert an instance of ParametersListItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java index ab8fd87a1..6ad7c1370 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java @@ -4,248 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ParametersListItemInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ParametersListItemInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_KEY = "key"; - - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public ParametersListItemInput() {} - - public ParametersListItemInput key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * Key for the url query parameter - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - public ParametersListItemInput value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * Value for the url query parameter - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParametersListItemInput parametersListItemInput = (ParametersListItemInput) o; - return Objects.equals(this.key, parametersListItemInput.key) - && Objects.equals(this.value, parametersListItemInput.value); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParametersListItemInput {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ParametersListItemInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ParametersListItemInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ParametersListItemInput is not found" - + " in the empty JSON string", - ParametersListItemInput.openapiRequiredFields.toString())); - } +/** + * ParametersListItemInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ParametersListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public ParametersListItemInput() { + } + + public ParametersListItemInput key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Key for the url query parameter + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + + public ParametersListItemInput value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Value for the url query parameter + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParametersListItemInput parametersListItemInput = (ParametersListItemInput) o; + return Objects.equals(this.key, parametersListItemInput.key) && + Objects.equals(this.value, parametersListItemInput.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParametersListItemInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParametersListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParametersListItemInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ParametersListItemInput is not found in the empty JSON string", ParametersListItemInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ParametersListItemInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ParametersListItemInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ParametersListItemInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ParametersListItemInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) - && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `key` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) - && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ParametersListItemInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ParametersListItemInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ParametersListItemInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ParametersListItemInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ParametersListItemInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ParametersListItemInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ParametersListItemInput - * @throws IOException if the JSON string is invalid with respect to ParametersListItemInput - */ - public static ParametersListItemInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ParametersListItemInput.class); - } - - /** - * Convert an instance of ParametersListItemInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParametersListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParametersListItemInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ParametersListItemInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ParametersListItemInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ParametersListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ParametersListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParametersListItemInput + * @throws IOException if the JSON string is invalid with respect to ParametersListItemInput + */ + public static ParametersListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParametersListItemInput.class); + } + + /** + * Convert an instance of ParametersListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java index 30e78bf50..f19c1cbeb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java @@ -4,523 +4,485 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Options for PDF export. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PdfOptions implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COMPLETE_LIVEBOARD = "complete_liveboard"; - - @SerializedName(SERIALIZED_NAME_COMPLETE_LIVEBOARD) - @javax.annotation.Nullable - private Boolean completeLiveboard; - - public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) - @javax.annotation.Nullable - private Boolean includeCoverPage; - - public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) - @javax.annotation.Nullable - private Boolean includeCustomLogo; - - public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) - @javax.annotation.Nullable - private Boolean includeFilterPage; - - public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; - @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) - @javax.annotation.Nullable - private Boolean includePageNumber; - - public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; - - @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) - @javax.annotation.Nullable - private String pageFooterText; - - public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; - - @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) - @javax.annotation.Nullable - private String pageOrientation; - - /** Page size. */ - @JsonAdapter(PageSizeEnum.Adapter.class) - public enum PageSizeEnum { - A4("A4"); - - private String value; - - PageSizeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PageSizeEnum fromValue(String value) { - for (PageSizeEnum b : PageSizeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PageSizeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PageSizeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PageSizeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; - - @SerializedName(SERIALIZED_NAME_PAGE_SIZE) - @javax.annotation.Nullable - private PageSizeEnum pageSize; - - public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; - - @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) - @javax.annotation.Nullable - private Boolean truncateTable; - - public PdfOptions() {} - - public PdfOptions completeLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { - this.completeLiveboard = completeLiveboard; - return this; - } - - /** - * Indicates whether to include complete Liveboard. - * - * @return completeLiveboard - */ - @javax.annotation.Nullable - public Boolean getCompleteLiveboard() { - return completeLiveboard; - } - - public void setCompleteLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { - this.completeLiveboard = completeLiveboard; - } - - public PdfOptions includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - return this; - } - - /** - * Indicates whether to include cover page with the Liveboard title. - * - * @return includeCoverPage - */ - @javax.annotation.Nullable - public Boolean getIncludeCoverPage() { - return includeCoverPage; - } - - public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - } - - public PdfOptions includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { - this.includeCustomLogo = includeCustomLogo; - return this; - } - - /** - * Indicates whether to include customized wide logo in the footer if available. - * - * @return includeCustomLogo - */ - @javax.annotation.Nullable - public Boolean getIncludeCustomLogo() { - return includeCustomLogo; - } - - public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { - this.includeCustomLogo = includeCustomLogo; - } - - public PdfOptions includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - return this; - } - - /** - * Indicates whether to include a page with all applied filters. - * - * @return includeFilterPage - */ - @javax.annotation.Nullable - public Boolean getIncludeFilterPage() { - return includeFilterPage; - } - - public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - } - - public PdfOptions includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - return this; - } - - /** - * Indicates whether to include page number in the footer of each page - * - * @return includePageNumber - */ - @javax.annotation.Nullable - public Boolean getIncludePageNumber() { - return includePageNumber; - } - - public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - } - - public PdfOptions pageFooterText(@javax.annotation.Nullable String pageFooterText) { - this.pageFooterText = pageFooterText; - return this; - } - - /** - * Text to include in the footer of each page. - * - * @return pageFooterText - */ - @javax.annotation.Nullable - public String getPageFooterText() { - return pageFooterText; - } - - public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { - this.pageFooterText = pageFooterText; - } - - public PdfOptions pageOrientation(@javax.annotation.Nullable String pageOrientation) { - this.pageOrientation = pageOrientation; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Page orientation of the PDF. - * - * @return pageOrientation - */ - @javax.annotation.Nullable - public String getPageOrientation() { - return pageOrientation; - } +/** + * Options for PDF export. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PdfOptions implements Serializable { + private static final long serialVersionUID = 1L; - public void setPageOrientation(@javax.annotation.Nullable String pageOrientation) { - this.pageOrientation = pageOrientation; - } + public static final String SERIALIZED_NAME_COMPLETE_LIVEBOARD = "complete_liveboard"; + @SerializedName(SERIALIZED_NAME_COMPLETE_LIVEBOARD) + @javax.annotation.Nullable + private Boolean completeLiveboard; - public PdfOptions pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { - this.pageSize = pageSize; - return this; - } + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage; - /** - * Page size. - * - * @return pageSize - */ - @javax.annotation.Nullable - public PageSizeEnum getPageSize() { - return pageSize; - } + public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; + @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) + @javax.annotation.Nullable + private Boolean includeCustomLogo; - public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { - this.pageSize = pageSize; - } + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage; - public PdfOptions truncateTable(@javax.annotation.Nullable Boolean truncateTable) { - this.truncateTable = truncateTable; - return this; - } + public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; + @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) + @javax.annotation.Nullable + private Boolean includePageNumber; - /** - * Indicates whether to include only first page of the tables. - * - * @return truncateTable - */ - @javax.annotation.Nullable - public Boolean getTruncateTable() { - return truncateTable; - } + public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; + @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) + @javax.annotation.Nullable + private String pageFooterText; - public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { - this.truncateTable = truncateTable; - } + public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; + @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) + @javax.annotation.Nullable + private String pageOrientation; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PdfOptions pdfOptions = (PdfOptions) o; - return Objects.equals(this.completeLiveboard, pdfOptions.completeLiveboard) - && Objects.equals(this.includeCoverPage, pdfOptions.includeCoverPage) - && Objects.equals(this.includeCustomLogo, pdfOptions.includeCustomLogo) - && Objects.equals(this.includeFilterPage, pdfOptions.includeFilterPage) - && Objects.equals(this.includePageNumber, pdfOptions.includePageNumber) - && Objects.equals(this.pageFooterText, pdfOptions.pageFooterText) - && Objects.equals(this.pageOrientation, pdfOptions.pageOrientation) - && Objects.equals(this.pageSize, pdfOptions.pageSize) - && Objects.equals(this.truncateTable, pdfOptions.truncateTable); - } + /** + * Page size. + */ + @JsonAdapter(PageSizeEnum.Adapter.class) + public enum PageSizeEnum { + A4("A4"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - completeLiveboard, - includeCoverPage, - includeCustomLogo, - includeFilterPage, - includePageNumber, - pageFooterText, - pageOrientation, - pageSize, - truncateTable); + PageSizeEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PdfOptions {\n"); - sb.append(" completeLiveboard: ") - .append(toIndentedString(completeLiveboard)) - .append("\n"); - sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); - sb.append(" includeCustomLogo: ") - .append(toIndentedString(includeCustomLogo)) - .append("\n"); - sb.append(" includeFilterPage: ") - .append(toIndentedString(includeFilterPage)) - .append("\n"); - sb.append(" includePageNumber: ") - .append(toIndentedString(includePageNumber)) - .append("\n"); - sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); - sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PageSizeEnum fromValue(String value) { + for (PageSizeEnum b : PageSizeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("complete_liveboard"); - openapiFields.add("include_cover_page"); - openapiFields.add("include_custom_logo"); - openapiFields.add("include_filter_page"); - openapiFields.add("include_page_number"); - openapiFields.add("page_footer_text"); - openapiFields.add("page_orientation"); - openapiFields.add("page_size"); - openapiFields.add("truncate_table"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageSizeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageSizeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PdfOptions - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PdfOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PdfOptions is not found in the empty" - + " JSON string", - PdfOptions.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PageSizeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + @javax.annotation.Nullable + private PageSizeEnum pageSize; + + public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; + @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) + @javax.annotation.Nullable + private Boolean truncateTable; + + public PdfOptions() { + } + + public PdfOptions completeLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + return this; + } + + /** + * Indicates whether to include complete Liveboard. + * @return completeLiveboard + */ + @javax.annotation.Nullable + public Boolean getCompleteLiveboard() { + return completeLiveboard; + } + + public void setCompleteLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + } + + + public PdfOptions includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include cover page with the Liveboard title. + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + + public PdfOptions includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + return this; + } + + /** + * Indicates whether to include customized wide logo in the footer if available. + * @return includeCustomLogo + */ + @javax.annotation.Nullable + public Boolean getIncludeCustomLogo() { + return includeCustomLogo; + } + + public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + } + + + public PdfOptions includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + + public PdfOptions includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + return this; + } + + /** + * Indicates whether to include page number in the footer of each page + * @return includePageNumber + */ + @javax.annotation.Nullable + public Boolean getIncludePageNumber() { + return includePageNumber; + } + + public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + } + + + public PdfOptions pageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + return this; + } + + /** + * Text to include in the footer of each page. + * @return pageFooterText + */ + @javax.annotation.Nullable + public String getPageFooterText() { + return pageFooterText; + } + + public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + } + + + public PdfOptions pageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + return this; + } + + /** + * Page orientation of the PDF. + * @return pageOrientation + */ + @javax.annotation.Nullable + public String getPageOrientation() { + return pageOrientation; + } + + public void setPageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + } + + + public PdfOptions pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Page size. + * @return pageSize + */ + @javax.annotation.Nullable + public PageSizeEnum getPageSize() { + return pageSize; + } + + public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + } + + + public PdfOptions truncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + return this; + } + + /** + * Indicates whether to include only first page of the tables. + * @return truncateTable + */ + @javax.annotation.Nullable + public Boolean getTruncateTable() { + return truncateTable; + } + + public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PdfOptions pdfOptions = (PdfOptions) o; + return Objects.equals(this.completeLiveboard, pdfOptions.completeLiveboard) && + Objects.equals(this.includeCoverPage, pdfOptions.includeCoverPage) && + Objects.equals(this.includeCustomLogo, pdfOptions.includeCustomLogo) && + Objects.equals(this.includeFilterPage, pdfOptions.includeFilterPage) && + Objects.equals(this.includePageNumber, pdfOptions.includePageNumber) && + Objects.equals(this.pageFooterText, pdfOptions.pageFooterText) && + Objects.equals(this.pageOrientation, pdfOptions.pageOrientation) && + Objects.equals(this.pageSize, pdfOptions.pageSize) && + Objects.equals(this.truncateTable, pdfOptions.truncateTable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(completeLiveboard, includeCoverPage, includeCustomLogo, includeFilterPage, includePageNumber, pageFooterText, pageOrientation, pageSize, truncateTable); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PdfOptions {\n"); + sb.append(" completeLiveboard: ").append(toIndentedString(completeLiveboard)).append("\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeCustomLogo: ").append(toIndentedString(includeCustomLogo)).append("\n"); + sb.append(" includeFilterPage: ").append(toIndentedString(includeFilterPage)).append("\n"); + sb.append(" includePageNumber: ").append(toIndentedString(includePageNumber)).append("\n"); + sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("complete_liveboard"); + openapiFields.add("include_cover_page"); + openapiFields.add("include_custom_logo"); + openapiFields.add("include_filter_page"); + openapiFields.add("include_page_number"); + openapiFields.add("page_footer_text"); + openapiFields.add("page_orientation"); + openapiFields.add("page_size"); + openapiFields.add("truncate_table"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PdfOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PdfOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PdfOptions is not found in the empty JSON string", PdfOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PdfOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PdfOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PdfOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PdfOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("page_footer_text") != null - && !jsonObj.get("page_footer_text").isJsonNull()) - && !jsonObj.get("page_footer_text").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_footer_text` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("page_footer_text").toString())); - } - if ((jsonObj.get("page_orientation") != null - && !jsonObj.get("page_orientation").isJsonNull()) - && !jsonObj.get("page_orientation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_orientation` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("page_orientation").toString())); - } - if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) - && !jsonObj.get("page_size").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_size` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("page_size").toString())); - } - // validate the optional field `page_size` - if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { - PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PdfOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PdfOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PdfOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PdfOptions value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PdfOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PdfOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of PdfOptions - * @throws IOException if the JSON string is invalid with respect to PdfOptions - */ - public static PdfOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PdfOptions.class); - } - - /** - * Convert an instance of PdfOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("page_footer_text") != null && !jsonObj.get("page_footer_text").isJsonNull()) && !jsonObj.get("page_footer_text").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_footer_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_footer_text").toString())); + } + if ((jsonObj.get("page_orientation") != null && !jsonObj.get("page_orientation").isJsonNull()) && !jsonObj.get("page_orientation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_orientation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_orientation").toString())); + } + if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) && !jsonObj.get("page_size").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_size` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_size").toString())); + } + // validate the optional field `page_size` + if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { + PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PdfOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PdfOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PdfOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PdfOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PdfOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PdfOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of PdfOptions + * @throws IOException if the JSON string is invalid with respect to PdfOptions + */ + public static PdfOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PdfOptions.class); + } + + /** + * Convert an instance of PdfOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java index daed0bcaa..d19d5b21c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java @@ -4,460 +4,430 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** PdfOptionsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PdfOptionsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) - @javax.annotation.Nullable - private Boolean includeCoverPage = true; - - public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) - @javax.annotation.Nullable - private Boolean includeCustomLogo = true; - - public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) - @javax.annotation.Nullable - private Boolean includeFilterPage = true; - - public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) - @javax.annotation.Nullable - private Boolean includePageNumber = true; - - /** Page orientation of the PDF. */ - @JsonAdapter(PageOrientationEnum.Adapter.class) - public enum PageOrientationEnum { - PORTRAIT("PORTRAIT"), - - LANDSCAPE("LANDSCAPE"); - - private String value; - - PageOrientationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PageOrientationEnum fromValue(String value) { - for (PageOrientationEnum b : PageOrientationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PageOrientationEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PageOrientationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PageOrientationEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PageOrientationEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; - - @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) - @javax.annotation.Nullable - private PageOrientationEnum pageOrientation = PageOrientationEnum.PORTRAIT; - - public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; - - @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) - @javax.annotation.Nullable - private Boolean truncateTable = false; - - public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; - - @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) - @javax.annotation.Nullable - private String pageFooterText; - - public PdfOptionsInput() {} - - public PdfOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - return this; - } - - /** - * Indicates whether to include the cover page with the Liveboard title. - * - * @return includeCoverPage - */ - @javax.annotation.Nullable - public Boolean getIncludeCoverPage() { - return includeCoverPage; - } - - public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - } - - public PdfOptionsInput includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { - this.includeCustomLogo = includeCustomLogo; - return this; - } - - /** - * Indicates whether to include customized wide logo in the footer if available. - * - * @return includeCustomLogo - */ - @javax.annotation.Nullable - public Boolean getIncludeCustomLogo() { - return includeCustomLogo; - } - - public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { - this.includeCustomLogo = includeCustomLogo; - } - - public PdfOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - return this; - } - - /** - * Indicates whether to include a page with all applied filters. - * - * @return includeFilterPage - */ - @javax.annotation.Nullable - public Boolean getIncludeFilterPage() { - return includeFilterPage; - } - - public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - } - public PdfOptionsInput includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - return this; - } - - /** - * Indicates whether to include page number in the footer of each page. - * - * @return includePageNumber - */ - @javax.annotation.Nullable - public Boolean getIncludePageNumber() { - return includePageNumber; - } - - public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - } - - public PdfOptionsInput pageOrientation( - @javax.annotation.Nullable PageOrientationEnum pageOrientation) { - this.pageOrientation = pageOrientation; - return this; - } - - /** - * Page orientation of the PDF. - * - * @return pageOrientation - */ - @javax.annotation.Nullable - public PageOrientationEnum getPageOrientation() { - return pageOrientation; - } - - public void setPageOrientation(@javax.annotation.Nullable PageOrientationEnum pageOrientation) { - this.pageOrientation = pageOrientation; - } - - public PdfOptionsInput truncateTable(@javax.annotation.Nullable Boolean truncateTable) { - this.truncateTable = truncateTable; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Indicates whether to include only the first page of the tables. - * - * @return truncateTable - */ - @javax.annotation.Nullable - public Boolean getTruncateTable() { - return truncateTable; - } +/** + * PdfOptionsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PdfOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; - public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { - this.truncateTable = truncateTable; - } + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage = true; - public PdfOptionsInput pageFooterText(@javax.annotation.Nullable String pageFooterText) { - this.pageFooterText = pageFooterText; - return this; - } + public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; + @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) + @javax.annotation.Nullable + private Boolean includeCustomLogo = true; - /** - * Text to include in the footer of each page. - * - * @return pageFooterText - */ - @javax.annotation.Nullable - public String getPageFooterText() { - return pageFooterText; - } + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage = true; - public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { - this.pageFooterText = pageFooterText; - } + public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; + @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) + @javax.annotation.Nullable + private Boolean includePageNumber = true; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PdfOptionsInput pdfOptionsInput = (PdfOptionsInput) o; - return Objects.equals(this.includeCoverPage, pdfOptionsInput.includeCoverPage) - && Objects.equals(this.includeCustomLogo, pdfOptionsInput.includeCustomLogo) - && Objects.equals(this.includeFilterPage, pdfOptionsInput.includeFilterPage) - && Objects.equals(this.includePageNumber, pdfOptionsInput.includePageNumber) - && Objects.equals(this.pageOrientation, pdfOptionsInput.pageOrientation) - && Objects.equals(this.truncateTable, pdfOptionsInput.truncateTable) - && Objects.equals(this.pageFooterText, pdfOptionsInput.pageFooterText); - } + /** + * Page orientation of the PDF. + */ + @JsonAdapter(PageOrientationEnum.Adapter.class) + public enum PageOrientationEnum { + PORTRAIT("PORTRAIT"), + + LANDSCAPE("LANDSCAPE"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - includeCoverPage, - includeCustomLogo, - includeFilterPage, - includePageNumber, - pageOrientation, - truncateTable, - pageFooterText); + PageOrientationEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PdfOptionsInput {\n"); - sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); - sb.append(" includeCustomLogo: ") - .append(toIndentedString(includeCustomLogo)) - .append("\n"); - sb.append(" includeFilterPage: ") - .append(toIndentedString(includeFilterPage)) - .append("\n"); - sb.append(" includePageNumber: ") - .append(toIndentedString(includePageNumber)) - .append("\n"); - sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); - sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); - sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PageOrientationEnum fromValue(String value) { + for (PageOrientationEnum b : PageOrientationEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("include_cover_page"); - openapiFields.add("include_custom_logo"); - openapiFields.add("include_filter_page"); - openapiFields.add("include_page_number"); - openapiFields.add("page_orientation"); - openapiFields.add("truncate_table"); - openapiFields.add("page_footer_text"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageOrientationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageOrientationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageOrientationEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PdfOptionsInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PdfOptionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PdfOptionsInput is not found in the" - + " empty JSON string", - PdfOptionsInput.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PageOrientationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; + @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) + @javax.annotation.Nullable + private PageOrientationEnum pageOrientation = PageOrientationEnum.PORTRAIT; + + public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; + @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) + @javax.annotation.Nullable + private Boolean truncateTable = false; + + public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; + @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) + @javax.annotation.Nullable + private String pageFooterText; + + public PdfOptionsInput() { + } + + public PdfOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include the cover page with the Liveboard title. + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + + public PdfOptionsInput includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + return this; + } + + /** + * Indicates whether to include customized wide logo in the footer if available. + * @return includeCustomLogo + */ + @javax.annotation.Nullable + public Boolean getIncludeCustomLogo() { + return includeCustomLogo; + } + + public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + } + + + public PdfOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + + public PdfOptionsInput includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + return this; + } + + /** + * Indicates whether to include page number in the footer of each page. + * @return includePageNumber + */ + @javax.annotation.Nullable + public Boolean getIncludePageNumber() { + return includePageNumber; + } + + public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + } + + + public PdfOptionsInput pageOrientation(@javax.annotation.Nullable PageOrientationEnum pageOrientation) { + this.pageOrientation = pageOrientation; + return this; + } + + /** + * Page orientation of the PDF. + * @return pageOrientation + */ + @javax.annotation.Nullable + public PageOrientationEnum getPageOrientation() { + return pageOrientation; + } + + public void setPageOrientation(@javax.annotation.Nullable PageOrientationEnum pageOrientation) { + this.pageOrientation = pageOrientation; + } + + + public PdfOptionsInput truncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + return this; + } + + /** + * Indicates whether to include only the first page of the tables. + * @return truncateTable + */ + @javax.annotation.Nullable + public Boolean getTruncateTable() { + return truncateTable; + } + + public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + } + + + public PdfOptionsInput pageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + return this; + } + + /** + * Text to include in the footer of each page. + * @return pageFooterText + */ + @javax.annotation.Nullable + public String getPageFooterText() { + return pageFooterText; + } + + public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PdfOptionsInput pdfOptionsInput = (PdfOptionsInput) o; + return Objects.equals(this.includeCoverPage, pdfOptionsInput.includeCoverPage) && + Objects.equals(this.includeCustomLogo, pdfOptionsInput.includeCustomLogo) && + Objects.equals(this.includeFilterPage, pdfOptionsInput.includeFilterPage) && + Objects.equals(this.includePageNumber, pdfOptionsInput.includePageNumber) && + Objects.equals(this.pageOrientation, pdfOptionsInput.pageOrientation) && + Objects.equals(this.truncateTable, pdfOptionsInput.truncateTable) && + Objects.equals(this.pageFooterText, pdfOptionsInput.pageFooterText); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(includeCoverPage, includeCustomLogo, includeFilterPage, includePageNumber, pageOrientation, truncateTable, pageFooterText); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PdfOptionsInput {\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeCustomLogo: ").append(toIndentedString(includeCustomLogo)).append("\n"); + sb.append(" includeFilterPage: ").append(toIndentedString(includeFilterPage)).append("\n"); + sb.append(" includePageNumber: ").append(toIndentedString(includePageNumber)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); + sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_cover_page"); + openapiFields.add("include_custom_logo"); + openapiFields.add("include_filter_page"); + openapiFields.add("include_page_number"); + openapiFields.add("page_orientation"); + openapiFields.add("truncate_table"); + openapiFields.add("page_footer_text"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PdfOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PdfOptionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PdfOptionsInput is not found in the empty JSON string", PdfOptionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PdfOptionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PdfOptionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PdfOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PdfOptionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("page_orientation") != null - && !jsonObj.get("page_orientation").isJsonNull()) - && !jsonObj.get("page_orientation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_orientation` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("page_orientation").toString())); - } - // validate the optional field `page_orientation` - if (jsonObj.get("page_orientation") != null - && !jsonObj.get("page_orientation").isJsonNull()) { - PageOrientationEnum.validateJsonElement(jsonObj.get("page_orientation")); - } - if ((jsonObj.get("page_footer_text") != null - && !jsonObj.get("page_footer_text").isJsonNull()) - && !jsonObj.get("page_footer_text").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_footer_text` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("page_footer_text").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PdfOptionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PdfOptionsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PdfOptionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PdfOptionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PdfOptionsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PdfOptionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PdfOptionsInput - * @throws IOException if the JSON string is invalid with respect to PdfOptionsInput - */ - public static PdfOptionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PdfOptionsInput.class); - } - - /** - * Convert an instance of PdfOptionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("page_orientation") != null && !jsonObj.get("page_orientation").isJsonNull()) && !jsonObj.get("page_orientation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_orientation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_orientation").toString())); + } + // validate the optional field `page_orientation` + if (jsonObj.get("page_orientation") != null && !jsonObj.get("page_orientation").isJsonNull()) { + PageOrientationEnum.validateJsonElement(jsonObj.get("page_orientation")); + } + if ((jsonObj.get("page_footer_text") != null && !jsonObj.get("page_footer_text").isJsonNull()) && !jsonObj.get("page_footer_text").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_footer_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_footer_text").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PdfOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PdfOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PdfOptionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PdfOptionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PdfOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PdfOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PdfOptionsInput + * @throws IOException if the JSON string is invalid with respect to PdfOptionsInput + */ + public static PdfOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PdfOptionsInput.class); + } + + /** + * Convert an instance of PdfOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java index 48dc09ee2..3c1a499f5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java @@ -4,290 +4,292 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Details of users or groups. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PermissionInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_PRINCIPAL = "principal"; - - @SerializedName(SERIALIZED_NAME_PRINCIPAL) - @javax.annotation.Nonnull - private PrincipalsInput principal; - - /** Object share mode. */ - @JsonAdapter(ShareModeEnum.Adapter.class) - public enum ShareModeEnum { - READ_ONLY("READ_ONLY"), - - MODIFY("MODIFY"), - - NO_ACCESS("NO_ACCESS"); - - private String value; - - ShareModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ShareModeEnum fromValue(String value) { - for (ShareModeEnum b : ShareModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ShareModeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ShareModeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ShareModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ShareModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SHARE_MODE = "share_mode"; - - @SerializedName(SERIALIZED_NAME_SHARE_MODE) - @javax.annotation.Nonnull - private ShareModeEnum shareMode; - - public PermissionInput() {} - - public PermissionInput principal(@javax.annotation.Nonnull PrincipalsInput principal) { - this.principal = principal; - return this; - } - - /** - * Get principal - * - * @return principal - */ - @javax.annotation.Nonnull - public PrincipalsInput getPrincipal() { - return principal; - } - - public void setPrincipal(@javax.annotation.Nonnull PrincipalsInput principal) { - this.principal = principal; - } - - public PermissionInput shareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { - this.shareMode = shareMode; - return this; - } - - /** - * Object share mode. - * - * @return shareMode - */ - @javax.annotation.Nonnull - public ShareModeEnum getShareMode() { - return shareMode; - } - - public void setShareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { - this.shareMode = shareMode; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PermissionInput permissionInput = (PermissionInput) o; - return Objects.equals(this.principal, permissionInput.principal) - && Objects.equals(this.shareMode, permissionInput.shareMode); +/** + * Details of users or groups. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PermissionInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPAL = "principal"; + @SerializedName(SERIALIZED_NAME_PRINCIPAL) + @javax.annotation.Nonnull + private PrincipalsInput principal; + + /** + * Object share mode. + */ + @JsonAdapter(ShareModeEnum.Adapter.class) + public enum ShareModeEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + ShareModeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(principal, shareMode); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PermissionInput {\n"); - sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); - sb.append(" shareMode: ").append(toIndentedString(shareMode)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static ShareModeEnum fromValue(String value) { + for (ShareModeEnum b : ShareModeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("principal"); - openapiFields.add("share_mode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("principal"); - openapiRequiredFields.add("share_mode"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ShareModeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ShareModeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ShareModeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PermissionInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PermissionInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PermissionInput is not found in the" - + " empty JSON string", - PermissionInput.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + ShareModeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SHARE_MODE = "share_mode"; + @SerializedName(SERIALIZED_NAME_SHARE_MODE) + @javax.annotation.Nonnull + private ShareModeEnum shareMode; + + public PermissionInput() { + } + + public PermissionInput principal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + return this; + } + + /** + * Get principal + * @return principal + */ + @javax.annotation.Nonnull + public PrincipalsInput getPrincipal() { + return principal; + } + + public void setPrincipal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + } + + + public PermissionInput shareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + return this; + } + + /** + * Object share mode. + * @return shareMode + */ + @javax.annotation.Nonnull + public ShareModeEnum getShareMode() { + return shareMode; + } + + public void setShareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionInput permissionInput = (PermissionInput) o; + return Objects.equals(this.principal, permissionInput.principal) && + Objects.equals(this.shareMode, permissionInput.shareMode); + } + + @Override + public int hashCode() { + return Objects.hash(principal, shareMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionInput {\n"); + sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); + sb.append(" shareMode: ").append(toIndentedString(shareMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principal"); + openapiFields.add("share_mode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("principal"); + openapiRequiredFields.add("share_mode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PermissionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PermissionInput is not found in the empty JSON string", PermissionInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PermissionInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PermissionInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PermissionInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PermissionInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PermissionInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PermissionInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `principal` - PrincipalsInput.validateJsonElement(jsonObj.get("principal")); - if (!jsonObj.get("share_mode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `share_mode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("share_mode").toString())); - } - // validate the required field `share_mode` - ShareModeEnum.validateJsonElement(jsonObj.get("share_mode")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PermissionInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PermissionInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PermissionInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PermissionInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PermissionInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PermissionInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionInput - * @throws IOException if the JSON string is invalid with respect to PermissionInput - */ - public static PermissionInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PermissionInput.class); - } - - /** - * Convert an instance of PermissionInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `principal` + PrincipalsInput.validateJsonElement(jsonObj.get("principal")); + if (!jsonObj.get("share_mode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `share_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("share_mode").toString())); + } + // validate the required field `share_mode` + ShareModeEnum.validateJsonElement(jsonObj.get("share_mode")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PermissionInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PermissionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PermissionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionInput + * @throws IOException if the JSON string is invalid with respect to PermissionInput + */ + public static PermissionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionInput.class); + } + + /** + * Convert an instance of PermissionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java index 3a8a79df2..502518de4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java @@ -4,215 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** PermissionOfMetadataResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * PermissionOfMetadataResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class PermissionOfMetadataResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_METADATA_PERMISSION_DETAILS = - "metadata_permission_details"; + public static final String SERIALIZED_NAME_METADATA_PERMISSION_DETAILS = "metadata_permission_details"; + @SerializedName(SERIALIZED_NAME_METADATA_PERMISSION_DETAILS) + @javax.annotation.Nullable + private Object metadataPermissionDetails; - @SerializedName(SERIALIZED_NAME_METADATA_PERMISSION_DETAILS) - @javax.annotation.Nullable - private Object metadataPermissionDetails; + public PermissionOfMetadataResponse() { + } - public PermissionOfMetadataResponse() {} + public PermissionOfMetadataResponse metadataPermissionDetails(@javax.annotation.Nullable Object metadataPermissionDetails) { + this.metadataPermissionDetails = metadataPermissionDetails; + return this; + } - public PermissionOfMetadataResponse metadataPermissionDetails( - @javax.annotation.Nullable Object metadataPermissionDetails) { - this.metadataPermissionDetails = metadataPermissionDetails; - return this; - } + /** + * Get metadataPermissionDetails + * @return metadataPermissionDetails + */ + @javax.annotation.Nullable + public Object getMetadataPermissionDetails() { + return metadataPermissionDetails; + } - /** - * Get metadataPermissionDetails - * - * @return metadataPermissionDetails - */ - @javax.annotation.Nullable - public Object getMetadataPermissionDetails() { - return metadataPermissionDetails; - } + public void setMetadataPermissionDetails(@javax.annotation.Nullable Object metadataPermissionDetails) { + this.metadataPermissionDetails = metadataPermissionDetails; + } - public void setMetadataPermissionDetails( - @javax.annotation.Nullable Object metadataPermissionDetails) { - this.metadataPermissionDetails = metadataPermissionDetails; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PermissionOfMetadataResponse permissionOfMetadataResponse = - (PermissionOfMetadataResponse) o; - return Objects.equals( - this.metadataPermissionDetails, - permissionOfMetadataResponse.metadataPermissionDetails); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(metadataPermissionDetails); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + PermissionOfMetadataResponse permissionOfMetadataResponse = (PermissionOfMetadataResponse) o; + return Objects.equals(this.metadataPermissionDetails, permissionOfMetadataResponse.metadataPermissionDetails); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataPermissionDetails); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PermissionOfMetadataResponse {\n"); - sb.append(" metadataPermissionDetails: ") - .append(toIndentedString(metadataPermissionDetails)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionOfMetadataResponse {\n"); + sb.append(" metadataPermissionDetails: ").append(toIndentedString(metadataPermissionDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_permission_details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PermissionOfMetadataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionOfMetadataResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PermissionOfMetadataResponse is not found in the empty JSON string", PermissionOfMetadataResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_permission_details"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PermissionOfMetadataResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PermissionOfMetadataResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PermissionOfMetadataResponse is not" - + " found in the empty JSON string", - PermissionOfMetadataResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PermissionOfMetadataResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PermissionOfMetadataResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PermissionOfMetadataResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PermissionOfMetadataResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PermissionOfMetadataResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PermissionOfMetadataResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PermissionOfMetadataResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PermissionOfMetadataResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PermissionOfMetadataResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PermissionOfMetadataResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionOfMetadataResponse - * @throws IOException if the JSON string is invalid with respect to - * PermissionOfMetadataResponse - */ - public static PermissionOfMetadataResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PermissionOfMetadataResponse.class); - } + } - /** - * Convert an instance of PermissionOfMetadataResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionOfMetadataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionOfMetadataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PermissionOfMetadataResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionOfMetadataResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PermissionOfMetadataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PermissionOfMetadataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionOfMetadataResponse + * @throws IOException if the JSON string is invalid with respect to PermissionOfMetadataResponse + */ + public static PermissionOfMetadataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionOfMetadataResponse.class); + } + + /** + * Convert an instance of PermissionOfMetadataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java index 1cbf3b9c2..18a695c60 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java @@ -4,216 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** PermissionOfPrincipalsResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * PermissionOfPrincipalsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class PermissionOfPrincipalsResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_PRINCIPAL_PERMISSION_DETAILS = - "principal_permission_details"; + public static final String SERIALIZED_NAME_PRINCIPAL_PERMISSION_DETAILS = "principal_permission_details"; + @SerializedName(SERIALIZED_NAME_PRINCIPAL_PERMISSION_DETAILS) + @javax.annotation.Nullable + private Object principalPermissionDetails; - @SerializedName(SERIALIZED_NAME_PRINCIPAL_PERMISSION_DETAILS) - @javax.annotation.Nullable - private Object principalPermissionDetails; + public PermissionOfPrincipalsResponse() { + } - public PermissionOfPrincipalsResponse() {} + public PermissionOfPrincipalsResponse principalPermissionDetails(@javax.annotation.Nullable Object principalPermissionDetails) { + this.principalPermissionDetails = principalPermissionDetails; + return this; + } - public PermissionOfPrincipalsResponse principalPermissionDetails( - @javax.annotation.Nullable Object principalPermissionDetails) { - this.principalPermissionDetails = principalPermissionDetails; - return this; - } + /** + * Get principalPermissionDetails + * @return principalPermissionDetails + */ + @javax.annotation.Nullable + public Object getPrincipalPermissionDetails() { + return principalPermissionDetails; + } - /** - * Get principalPermissionDetails - * - * @return principalPermissionDetails - */ - @javax.annotation.Nullable - public Object getPrincipalPermissionDetails() { - return principalPermissionDetails; - } + public void setPrincipalPermissionDetails(@javax.annotation.Nullable Object principalPermissionDetails) { + this.principalPermissionDetails = principalPermissionDetails; + } - public void setPrincipalPermissionDetails( - @javax.annotation.Nullable Object principalPermissionDetails) { - this.principalPermissionDetails = principalPermissionDetails; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PermissionOfPrincipalsResponse permissionOfPrincipalsResponse = - (PermissionOfPrincipalsResponse) o; - return Objects.equals( - this.principalPermissionDetails, - permissionOfPrincipalsResponse.principalPermissionDetails); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(principalPermissionDetails); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + PermissionOfPrincipalsResponse permissionOfPrincipalsResponse = (PermissionOfPrincipalsResponse) o; + return Objects.equals(this.principalPermissionDetails, permissionOfPrincipalsResponse.principalPermissionDetails); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(principalPermissionDetails); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PermissionOfPrincipalsResponse {\n"); - sb.append(" principalPermissionDetails: ") - .append(toIndentedString(principalPermissionDetails)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionOfPrincipalsResponse {\n"); + sb.append(" principalPermissionDetails: ").append(toIndentedString(principalPermissionDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principal_permission_details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PermissionOfPrincipalsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionOfPrincipalsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PermissionOfPrincipalsResponse is not found in the empty JSON string", PermissionOfPrincipalsResponse.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("principal_permission_details"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PermissionOfPrincipalsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PermissionOfPrincipalsResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PermissionOfPrincipalsResponse is not" - + " found in the empty JSON string", - PermissionOfPrincipalsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PermissionOfPrincipalsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PermissionOfPrincipalsResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PermissionOfPrincipalsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PermissionOfPrincipalsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PermissionOfPrincipalsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PermissionOfPrincipalsResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PermissionOfPrincipalsResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PermissionOfPrincipalsResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PermissionOfPrincipalsResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PermissionOfPrincipalsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionOfPrincipalsResponse - * @throws IOException if the JSON string is invalid with respect to - * PermissionOfPrincipalsResponse - */ - public static PermissionOfPrincipalsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PermissionOfPrincipalsResponse.class); - } + } - /** - * Convert an instance of PermissionOfPrincipalsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionOfPrincipalsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionOfPrincipalsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PermissionOfPrincipalsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionOfPrincipalsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PermissionOfPrincipalsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PermissionOfPrincipalsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionOfPrincipalsResponse + * @throws IOException if the JSON string is invalid with respect to PermissionOfPrincipalsResponse + */ + public static PermissionOfPrincipalsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionOfPrincipalsResponse.class); + } + + /** + * Convert an instance of PermissionOfPrincipalsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java index 97aa7f6fd..99df0e6dc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java @@ -4,328 +4,309 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** MetadataType InputType used in Permission API's */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PermissionsMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public PermissionsMetadataTypeInput() {} - - public PermissionsMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This - * attribute is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public PermissionsMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; +/** + * MetadataType InputType used in Permission API's + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PermissionsMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Unique ID or name of the metadata object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - PermissionsMetadataTypeInput permissionsMetadataTypeInput = - (PermissionsMetadataTypeInput) o; - return Objects.equals(this.type, permissionsMetadataTypeInput.type) - && Objects.equals(this.identifier, permissionsMetadataTypeInput.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public PermissionsMetadataTypeInput() { + } + + public PermissionsMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public PermissionsMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PermissionsMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + PermissionsMetadataTypeInput permissionsMetadataTypeInput = (PermissionsMetadataTypeInput) o; + return Objects.equals(this.type, permissionsMetadataTypeInput.type) && + Objects.equals(this.identifier, permissionsMetadataTypeInput.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionsMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * PermissionsMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PermissionsMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PermissionsMetadataTypeInput is not" - + " found in the empty JSON string", - PermissionsMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PermissionsMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionsMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PermissionsMetadataTypeInput is not found in the empty JSON string", PermissionsMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PermissionsMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PermissionsMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PermissionsMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PermissionsMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PermissionsMetadataTypeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PermissionsMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PermissionsMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PermissionsMetadataTypeInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(PermissionsMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PermissionsMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PermissionsMetadataTypeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PermissionsMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionsMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to - * PermissionsMetadataTypeInput - */ - public static PermissionsMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PermissionsMetadataTypeInput.class); - } - - /** - * Convert an instance of PermissionsMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionsMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionsMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PermissionsMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionsMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PermissionsMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PermissionsMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionsMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to PermissionsMetadataTypeInput + */ + public static PermissionsMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionsMetadataTypeInput.class); + } + + /** + * Convert an instance of PermissionsMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java index c39663249..7f3818237 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java @@ -4,364 +4,344 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** PngOptionsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PngOptionsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) - @javax.annotation.Nullable - private Boolean includeCoverPage = false; - - public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) - @javax.annotation.Nullable - private Boolean includeFilterPage = false; - - public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; - - @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) - @javax.annotation.Nullable - private String personalisedViewId; - - public static final String SERIALIZED_NAME_IMAGE_RESOLUTION = "image_resolution"; - - @SerializedName(SERIALIZED_NAME_IMAGE_RESOLUTION) - @javax.annotation.Nullable - private Integer imageResolution; - - public static final String SERIALIZED_NAME_IMAGE_SCALE = "image_scale"; - - @SerializedName(SERIALIZED_NAME_IMAGE_SCALE) - @javax.annotation.Nullable - private Integer imageScale; - - public static final String SERIALIZED_NAME_INCLUDE_HEADER = "include_header"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_HEADER) - @javax.annotation.Nullable - private Boolean includeHeader = false; - - public PngOptionsInput() {} - - public PngOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - return this; - } - - /** - * Indicates whether to include the cover page with the Liveboard title. - * - * @return includeCoverPage - */ - @javax.annotation.Nullable - public Boolean getIncludeCoverPage() { - return includeCoverPage; - } - - public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - } - - public PngOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - return this; - } - - /** - * Indicates whether to include a page with all applied filters. - * - * @return includeFilterPage - */ - @javax.annotation.Nullable - public Boolean getIncludeFilterPage() { - return includeFilterPage; - } - - public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - } - - public PngOptionsInput personalisedViewId( - @javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; - return this; - } - - /** - * Indicates personalised view of the Liveboard in case of png - * - * @return personalisedViewId - */ - @javax.annotation.Nullable - public String getPersonalisedViewId() { - return personalisedViewId; - } - - public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; - } - - public PngOptionsInput imageResolution(@javax.annotation.Nullable Integer imageResolution) { - this.imageResolution = imageResolution; - return this; - } - - /** - * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl - * or later - * - * @return imageResolution - */ - @javax.annotation.Nullable - public Integer getImageResolution() { - return imageResolution; - } - - public void setImageResolution(@javax.annotation.Nullable Integer imageResolution) { - this.imageResolution = imageResolution; - } - - public PngOptionsInput imageScale(@javax.annotation.Nullable Integer imageScale) { - this.imageScale = imageScale; - return this; - } - - /** - * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later - * - * @return imageScale - */ - @javax.annotation.Nullable - public Integer getImageScale() { - return imageScale; - } - public void setImageScale(@javax.annotation.Nullable Integer imageScale) { - this.imageScale = imageScale; - } - - public PngOptionsInput includeHeader(@javax.annotation.Nullable Boolean includeHeader) { - this.includeHeader = includeHeader; - return this; - } - - /** - * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later - * - * @return includeHeader - */ - @javax.annotation.Nullable - public Boolean getIncludeHeader() { - return includeHeader; - } - - public void setIncludeHeader(@javax.annotation.Nullable Boolean includeHeader) { - this.includeHeader = includeHeader; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PngOptionsInput pngOptionsInput = (PngOptionsInput) o; - return Objects.equals(this.includeCoverPage, pngOptionsInput.includeCoverPage) - && Objects.equals(this.includeFilterPage, pngOptionsInput.includeFilterPage) - && Objects.equals(this.personalisedViewId, pngOptionsInput.personalisedViewId) - && Objects.equals(this.imageResolution, pngOptionsInput.imageResolution) - && Objects.equals(this.imageScale, pngOptionsInput.imageScale) - && Objects.equals(this.includeHeader, pngOptionsInput.includeHeader); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - includeCoverPage, - includeFilterPage, - personalisedViewId, - imageResolution, - imageScale, - includeHeader); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * PngOptionsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PngOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage = false; + + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage = false; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public static final String SERIALIZED_NAME_IMAGE_RESOLUTION = "image_resolution"; + @SerializedName(SERIALIZED_NAME_IMAGE_RESOLUTION) + @javax.annotation.Nullable + private Integer imageResolution; + + public static final String SERIALIZED_NAME_IMAGE_SCALE = "image_scale"; + @SerializedName(SERIALIZED_NAME_IMAGE_SCALE) + @javax.annotation.Nullable + private Integer imageScale; + + public static final String SERIALIZED_NAME_INCLUDE_HEADER = "include_header"; + @SerializedName(SERIALIZED_NAME_INCLUDE_HEADER) + @javax.annotation.Nullable + private Boolean includeHeader = false; + + public PngOptionsInput() { + } + + public PngOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include the cover page with the Liveboard title. + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + + public PngOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + + public PngOptionsInput personalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Indicates personalised view of the Liveboard in case of png + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + + public PngOptionsInput imageResolution(@javax.annotation.Nullable Integer imageResolution) { + this.imageResolution = imageResolution; + return this; + } + + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + * @return imageResolution + */ + @javax.annotation.Nullable + public Integer getImageResolution() { + return imageResolution; + } + + public void setImageResolution(@javax.annotation.Nullable Integer imageResolution) { + this.imageResolution = imageResolution; + } + + + public PngOptionsInput imageScale(@javax.annotation.Nullable Integer imageScale) { + this.imageScale = imageScale; + return this; + } + + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + * @return imageScale + */ + @javax.annotation.Nullable + public Integer getImageScale() { + return imageScale; + } + + public void setImageScale(@javax.annotation.Nullable Integer imageScale) { + this.imageScale = imageScale; + } + + + public PngOptionsInput includeHeader(@javax.annotation.Nullable Boolean includeHeader) { + this.includeHeader = includeHeader; + return this; + } + + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + * @return includeHeader + */ + @javax.annotation.Nullable + public Boolean getIncludeHeader() { + return includeHeader; + } + + public void setIncludeHeader(@javax.annotation.Nullable Boolean includeHeader) { + this.includeHeader = includeHeader; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PngOptionsInput {\n"); - sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); - sb.append(" includeFilterPage: ") - .append(toIndentedString(includeFilterPage)) - .append("\n"); - sb.append(" personalisedViewId: ") - .append(toIndentedString(personalisedViewId)) - .append("\n"); - sb.append(" imageResolution: ").append(toIndentedString(imageResolution)).append("\n"); - sb.append(" imageScale: ").append(toIndentedString(imageScale)).append("\n"); - sb.append(" includeHeader: ").append(toIndentedString(includeHeader)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + PngOptionsInput pngOptionsInput = (PngOptionsInput) o; + return Objects.equals(this.includeCoverPage, pngOptionsInput.includeCoverPage) && + Objects.equals(this.includeFilterPage, pngOptionsInput.includeFilterPage) && + Objects.equals(this.personalisedViewId, pngOptionsInput.personalisedViewId) && + Objects.equals(this.imageResolution, pngOptionsInput.imageResolution) && + Objects.equals(this.imageScale, pngOptionsInput.imageScale) && + Objects.equals(this.includeHeader, pngOptionsInput.includeHeader); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(includeCoverPage, includeFilterPage, personalisedViewId, imageResolution, imageScale, includeHeader); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("include_cover_page"); - openapiFields.add("include_filter_page"); - openapiFields.add("personalised_view_id"); - openapiFields.add("image_resolution"); - openapiFields.add("image_scale"); - openapiFields.add("include_header"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PngOptionsInput {\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeFilterPage: ").append(toIndentedString(includeFilterPage)).append("\n"); + sb.append(" personalisedViewId: ").append(toIndentedString(personalisedViewId)).append("\n"); + sb.append(" imageResolution: ").append(toIndentedString(imageResolution)).append("\n"); + sb.append(" imageScale: ").append(toIndentedString(imageScale)).append("\n"); + sb.append(" includeHeader: ").append(toIndentedString(includeHeader)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PngOptionsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PngOptionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PngOptionsInput is not found in the" - + " empty JSON string", - PngOptionsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_cover_page"); + openapiFields.add("include_filter_page"); + openapiFields.add("personalised_view_id"); + openapiFields.add("image_resolution"); + openapiFields.add("image_scale"); + openapiFields.add("include_header"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PngOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PngOptionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PngOptionsInput is not found in the empty JSON string", PngOptionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PngOptionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PngOptionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PngOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PngOptionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("personalised_view_id") != null - && !jsonObj.get("personalised_view_id").isJsonNull()) - && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `personalised_view_id` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("personalised_view_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PngOptionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PngOptionsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PngOptionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PngOptionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PngOptionsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PngOptionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PngOptionsInput - * @throws IOException if the JSON string is invalid with respect to PngOptionsInput - */ - public static PngOptionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PngOptionsInput.class); - } + if ((jsonObj.get("personalised_view_id") != null && !jsonObj.get("personalised_view_id").isJsonNull()) && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `personalised_view_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("personalised_view_id").toString())); + } + } - /** - * Convert an instance of PngOptionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PngOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PngOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PngOptionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PngOptionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PngOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PngOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PngOptionsInput + * @throws IOException if the JSON string is invalid with respect to PngOptionsInput + */ + public static PngOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PngOptionsInput.class); + } + + /** + * Convert an instance of PngOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java index aa03d02c7..6a59af4f8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java @@ -4,313 +4,303 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** PrincipalsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PrincipalsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - /** Principal type. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - USER("USER"), - - USER_GROUP("USER_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public PrincipalsInput() {} - - public PrincipalsInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the principal object such as a user or group. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } +import com.thoughtspot.client.JSON; - public PrincipalsInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; +/** + * PrincipalsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PrincipalsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Principal type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Principal type. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrincipalsInput principalsInput = (PrincipalsInput) o; - return Objects.equals(this.identifier, principalsInput.identifier) - && Objects.equals(this.type, principalsInput.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public PrincipalsInput() { + } + + public PrincipalsInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the principal object such as a user or group. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public PrincipalsInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Principal type. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrincipalsInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + PrincipalsInput principalsInput = (PrincipalsInput) o; + return Objects.equals(this.identifier, principalsInput.identifier) && + Objects.equals(this.type, principalsInput.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrincipalsInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PrincipalsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PrincipalsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PrincipalsInput is not found in the" - + " empty JSON string", - PrincipalsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrincipalsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrincipalsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrincipalsInput is not found in the empty JSON string", PrincipalsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PrincipalsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PrincipalsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrincipalsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrincipalsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrincipalsInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrincipalsInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrincipalsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrincipalsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PrincipalsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PrincipalsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrincipalsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PrincipalsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrincipalsInput - * @throws IOException if the JSON string is invalid with respect to PrincipalsInput - */ - public static PrincipalsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrincipalsInput.class); - } - - /** - * Convert an instance of PrincipalsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrincipalsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrincipalsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrincipalsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrincipalsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrincipalsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PrincipalsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrincipalsInput + * @throws IOException if the JSON string is invalid with respect to PrincipalsInput + */ + public static PrincipalsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrincipalsInput.class); + } + + /** + * Convert an instance of PrincipalsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java index bc62a8c9d..4a0f37794 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java @@ -4,239 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** PrincipalsListItem */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PrincipalsListItem implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private String type; - - public PrincipalsListItem() {} - - public PrincipalsListItem identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the user or group. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } - - public PrincipalsListItem type(@javax.annotation.Nonnull String type) { - this.type = type; - return this; - } - - /** - * Principal type. Valid values are - * - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrincipalsListItem principalsListItem = (PrincipalsListItem) o; - return Objects.equals(this.identifier, principalsListItem.identifier) - && Objects.equals(this.type, principalsListItem.type); +/** + * PrincipalsListItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PrincipalsListItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public PrincipalsListItem() { + } + + public PrincipalsListItem identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the user or group. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public PrincipalsListItem type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Principal type. Valid values are + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(identifier, type); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrincipalsListItem {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + PrincipalsListItem principalsListItem = (PrincipalsListItem) o; + return Objects.equals(this.identifier, principalsListItem.identifier) && + Objects.equals(this.type, principalsListItem.type); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrincipalsListItem {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrincipalsListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrincipalsListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrincipalsListItem is not found in the empty JSON string", PrincipalsListItem.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PrincipalsListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PrincipalsListItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PrincipalsListItem is not found in" - + " the empty JSON string", - PrincipalsListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PrincipalsListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PrincipalsListItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrincipalsListItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrincipalsListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrincipalsListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrincipalsListItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrincipalsListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrincipalsListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PrincipalsListItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PrincipalsListItem value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrincipalsListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PrincipalsListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrincipalsListItem - * @throws IOException if the JSON string is invalid with respect to PrincipalsListItem - */ - public static PrincipalsListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrincipalsListItem.class); - } - - /** - * Convert an instance of PrincipalsListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrincipalsListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrincipalsListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrincipalsListItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrincipalsListItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrincipalsListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PrincipalsListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrincipalsListItem + * @throws IOException if the JSON string is invalid with respect to PrincipalsListItem + */ + public static PrincipalsListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrincipalsListItem.class); + } + + /** + * Convert an instance of PrincipalsListItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java index 1b002147f..f2334ee70 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java @@ -4,240 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** PrincipalsListItemInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PrincipalsListItemInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private String type; - - public PrincipalsListItemInput() {} - - public PrincipalsListItemInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the user or group. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } - - public PrincipalsListItemInput type(@javax.annotation.Nonnull String type) { - this.type = type; - return this; - } - - /** - * Principal type. - * - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrincipalsListItemInput principalsListItemInput = (PrincipalsListItemInput) o; - return Objects.equals(this.identifier, principalsListItemInput.identifier) - && Objects.equals(this.type, principalsListItemInput.type); +/** + * PrincipalsListItemInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PrincipalsListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public PrincipalsListItemInput() { + } + + public PrincipalsListItemInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the user or group. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public PrincipalsListItemInput type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Principal type. + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(identifier, type); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrincipalsListItemInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + PrincipalsListItemInput principalsListItemInput = (PrincipalsListItemInput) o; + return Objects.equals(this.identifier, principalsListItemInput.identifier) && + Objects.equals(this.type, principalsListItemInput.type); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrincipalsListItemInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrincipalsListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrincipalsListItemInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrincipalsListItemInput is not found in the empty JSON string", PrincipalsListItemInput.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PrincipalsListItemInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PrincipalsListItemInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PrincipalsListItemInput is not found" - + " in the empty JSON string", - PrincipalsListItemInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PrincipalsListItemInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PrincipalsListItemInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrincipalsListItemInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrincipalsListItemInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrincipalsListItemInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrincipalsListItemInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrincipalsListItemInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrincipalsListItemInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PrincipalsListItemInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PrincipalsListItemInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrincipalsListItemInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PrincipalsListItemInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrincipalsListItemInput - * @throws IOException if the JSON string is invalid with respect to PrincipalsListItemInput - */ - public static PrincipalsListItemInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrincipalsListItemInput.class); - } - - /** - * Convert an instance of PrincipalsListItemInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrincipalsListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrincipalsListItemInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrincipalsListItemInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrincipalsListItemInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrincipalsListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PrincipalsListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrincipalsListItemInput + * @throws IOException if the JSON string is invalid with respect to PrincipalsListItemInput + */ + public static PrincipalsListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrincipalsListItemInput.class); + } + + /** + * Convert an instance of PrincipalsListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java index 0a9b8e9e9..f0c773893 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java @@ -4,316 +4,305 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** PublishMetadataListItem */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PublishMetadataListItem implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - /** Type of metadata. Required if identifier is name. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public PublishMetadataListItem() {} - - public PublishMetadataListItem identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - } +import com.thoughtspot.client.JSON; - public PublishMetadataListItem type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; +/** + * PublishMetadataListItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PublishMetadataListItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if identifier is name. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Type of metadata. Required if identifier is name. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public String getValue() { + return value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - PublishMetadataListItem publishMetadataListItem = (PublishMetadataListItem) o; - return Objects.equals(this.identifier, publishMetadataListItem.identifier) - && Objects.equals(this.type, publishMetadataListItem.type); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public PublishMetadataListItem() { + } + + public PublishMetadataListItem identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + public PublishMetadataListItem type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if identifier is name. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PublishMetadataListItem {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + PublishMetadataListItem publishMetadataListItem = (PublishMetadataListItem) o; + return Objects.equals(this.identifier, publishMetadataListItem.identifier) && + Objects.equals(this.type, publishMetadataListItem.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublishMetadataListItem {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PublishMetadataListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PublishMetadataListItem.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PublishMetadataListItem is not found" - + " in the empty JSON string", - PublishMetadataListItem.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublishMetadataListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublishMetadataListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PublishMetadataListItem is not found in the empty JSON string", PublishMetadataListItem.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PublishMetadataListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PublishMetadataListItem` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PublishMetadataListItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PublishMetadataListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PublishMetadataListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PublishMetadataListItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PublishMetadataListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PublishMetadataListItem' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PublishMetadataListItem.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PublishMetadataListItem value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PublishMetadataListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PublishMetadataListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of PublishMetadataListItem - * @throws IOException if the JSON string is invalid with respect to PublishMetadataListItem - */ - public static PublishMetadataListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PublishMetadataListItem.class); - } - - /** - * Convert an instance of PublishMetadataListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublishMetadataListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublishMetadataListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PublishMetadataListItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PublishMetadataListItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PublishMetadataListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PublishMetadataListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublishMetadataListItem + * @throws IOException if the JSON string is invalid with respect to PublishMetadataListItem + */ + public static PublishMetadataListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublishMetadataListItem.class); + } + + /** + * Convert an instance of PublishMetadataListItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java index dfc941170..e8a311967 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java @@ -4,320 +4,304 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PublishMetadataListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** PublishMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class PublishMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nonnull - private List orgIdentifiers; - - public static final String SERIALIZED_NAME_SKIP_VALIDATION = "skip_validation"; - - @SerializedName(SERIALIZED_NAME_SKIP_VALIDATION) - @javax.annotation.Nullable - private Boolean skipValidation; - - public PublishMetadataRequest() {} - - public PublishMetadataRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; - } - - public PublishMetadataRequest addMetadataItem(PublishMetadataListItem metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata objects to be published. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } - - public PublishMetadataRequest orgIdentifiers( - @javax.annotation.Nonnull List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; - } - - public PublishMetadataRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } - - /** - * Unique ID or name of orgs to which metadata objects should be published. - * - * @return orgIdentifiers - */ - @javax.annotation.Nonnull - public List getOrgIdentifiers() { - return orgIdentifiers; - } - - public void setOrgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } +import com.thoughtspot.client.JSON; - public PublishMetadataRequest skipValidation( - @javax.annotation.Nullable Boolean skipValidation) { - this.skipValidation = skipValidation; - return this; +/** + * PublishMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PublishMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nonnull + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_SKIP_VALIDATION = "skip_validation"; + @SerializedName(SERIALIZED_NAME_SKIP_VALIDATION) + @javax.annotation.Nullable + private Boolean skipValidation; + + public PublishMetadataRequest() { + } + + public PublishMetadataRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public PublishMetadataRequest addMetadataItem(PublishMetadataListItem metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - /** - * Skip validations of objects to be published. - * - * @return skipValidation - */ - @javax.annotation.Nullable - public Boolean getSkipValidation() { - return skipValidation; + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects to be published. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public PublishMetadataRequest orgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public PublishMetadataRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); } - - public void setSkipValidation(@javax.annotation.Nullable Boolean skipValidation) { - this.skipValidation = skipValidation; + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique ID or name of orgs to which metadata objects should be published. + * @return orgIdentifiers + */ + @javax.annotation.Nonnull + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public PublishMetadataRequest skipValidation(@javax.annotation.Nullable Boolean skipValidation) { + this.skipValidation = skipValidation; + return this; + } + + /** + * Skip validations of objects to be published. + * @return skipValidation + */ + @javax.annotation.Nullable + public Boolean getSkipValidation() { + return skipValidation; + } + + public void setSkipValidation(@javax.annotation.Nullable Boolean skipValidation) { + this.skipValidation = skipValidation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PublishMetadataRequest publishMetadataRequest = (PublishMetadataRequest) o; - return Objects.equals(this.metadata, publishMetadataRequest.metadata) - && Objects.equals(this.orgIdentifiers, publishMetadataRequest.orgIdentifiers) - && Objects.equals(this.skipValidation, publishMetadataRequest.skipValidation); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + PublishMetadataRequest publishMetadataRequest = (PublishMetadataRequest) o; + return Objects.equals(this.metadata, publishMetadataRequest.metadata) && + Objects.equals(this.orgIdentifiers, publishMetadataRequest.orgIdentifiers) && + Objects.equals(this.skipValidation, publishMetadataRequest.skipValidation); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, orgIdentifiers, skipValidation); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(metadata, orgIdentifiers, skipValidation); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublishMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" skipValidation: ").append(toIndentedString(skipValidation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("org_identifiers"); + openapiFields.add("skip_validation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("org_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublishMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublishMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PublishMetadataRequest is not found in the empty JSON string", PublishMetadataRequest.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PublishMetadataRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" skipValidation: ").append(toIndentedString(skipValidation)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PublishMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PublishMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } - return o.toString().replace("\n", "\n "); - } + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("org_identifiers"); - openapiFields.add("skip_validation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("org_identifiers"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PublishMetadataRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PublishMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in PublishMetadataRequest is not found" - + " in the empty JSON string", - PublishMetadataRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PublishMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `PublishMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PublishMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PublishMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - PublishMetadataListItem.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - // ensure the required json array is present - if (jsonObj.get("org_identifiers") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PublishMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PublishMetadataRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(PublishMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, PublishMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PublishMetadataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of PublishMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PublishMetadataRequest - * @throws IOException if the JSON string is invalid with respect to PublishMetadataRequest - */ - public static PublishMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PublishMetadataRequest.class); - } - - /** - * Convert an instance of PublishMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PublishMetadataListItem.validateJsonElement(jsonArraymetadata.get(i)); + }; + // ensure the required json array is present + if (jsonObj.get("org_identifiers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublishMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublishMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PublishMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PublishMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PublishMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of PublishMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublishMetadataRequest + * @throws IOException if the JSON string is invalid with respect to PublishMetadataRequest + */ + public static PublishMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublishMetadataRequest.class); + } + + /** + * Convert an instance of PublishMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java index f5af0c12f..7a5527cd6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java @@ -4,465 +4,414 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.InputEurekaNLSRequest; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** QueryGetDecomposedQueryRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class QueryGetDecomposedQueryRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ANSWER_IDS = "answerIds"; - - @SerializedName(SERIALIZED_NAME_ANSWER_IDS) - @javax.annotation.Nullable - private List answerIds; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private List content; - - public static final String SERIALIZED_NAME_CONVERSATION_ID = "conversationId"; - - @SerializedName(SERIALIZED_NAME_CONVERSATION_ID) - @javax.annotation.Nullable - private String conversationId; - - public static final String SERIALIZED_NAME_LIVEBOARD_IDS = "liveboardIds"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDS) - @javax.annotation.Nullable - private List liveboardIds; - - public static final String SERIALIZED_NAME_MAX_DECOMPOSED_QUERIES = "maxDecomposedQueries"; - - @SerializedName(SERIALIZED_NAME_MAX_DECOMPOSED_QUERIES) - @javax.annotation.Nullable - private Integer maxDecomposedQueries; - - public static final String SERIALIZED_NAME_NLS_REQUEST = "nlsRequest"; - - @SerializedName(SERIALIZED_NAME_NLS_REQUEST) - @javax.annotation.Nullable - private InputEurekaNLSRequest nlsRequest; - - public static final String SERIALIZED_NAME_WORKSHEET_IDS = "worksheetIds"; - - @SerializedName(SERIALIZED_NAME_WORKSHEET_IDS) - @javax.annotation.Nullable - private List worksheetIds; - - public QueryGetDecomposedQueryRequest() {} - - public QueryGetDecomposedQueryRequest answerIds( - @javax.annotation.Nullable List answerIds) { - this.answerIds = answerIds; - return this; - } - - public QueryGetDecomposedQueryRequest addAnswerIdsItem(String answerIdsItem) { - if (this.answerIds == null) { - this.answerIds = new ArrayList<>(); - } - this.answerIds.add(answerIdsItem); - return this; - } - - /** - * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. - * - * @return answerIds - */ - @javax.annotation.Nullable - public List getAnswerIds() { - return answerIds; - } - - public void setAnswerIds(@javax.annotation.Nullable List answerIds) { - this.answerIds = answerIds; - } - - public QueryGetDecomposedQueryRequest content(@javax.annotation.Nullable List content) { - this.content = content; - return this; - } - - public QueryGetDecomposedQueryRequest addContentItem(String contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); - } - this.content.add(contentItem); - return this; - } - - /** - * User provided content like text data, csv data as a string message to provide context & - * potentially improve the quality of the response. - * - * @return content - */ - @javax.annotation.Nullable - public List getContent() { - return content; - } - - public void setContent(@javax.annotation.Nullable List content) { - this.content = content; - } - - public QueryGetDecomposedQueryRequest conversationId( - @javax.annotation.Nullable String conversationId) { - this.conversationId = conversationId; - return this; - } - - /** - * Unique identifier to denote current conversation. - * - * @return conversationId - */ - @javax.annotation.Nullable - public String getConversationId() { - return conversationId; - } - - public void setConversationId(@javax.annotation.Nullable String conversationId) { - this.conversationId = conversationId; - } - - public QueryGetDecomposedQueryRequest liveboardIds( - @javax.annotation.Nullable List liveboardIds) { - this.liveboardIds = liveboardIds; - return this; - } - - public QueryGetDecomposedQueryRequest addLiveboardIdsItem(String liveboardIdsItem) { - if (this.liveboardIds == null) { - this.liveboardIds = new ArrayList<>(); - } - this.liveboardIds.add(liveboardIdsItem); - return this; - } - - /** - * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. - * - * @return liveboardIds - */ - @javax.annotation.Nullable - public List getLiveboardIds() { - return liveboardIds; - } - - public void setLiveboardIds(@javax.annotation.Nullable List liveboardIds) { - this.liveboardIds = liveboardIds; - } - - public QueryGetDecomposedQueryRequest maxDecomposedQueries( - @javax.annotation.Nullable Integer maxDecomposedQueries) { - this.maxDecomposedQueries = maxDecomposedQueries; - return this; - } - - /** - * Maximum number of decomposed queries that is allowed in the response, default = 5. - * - * @return maxDecomposedQueries - */ - @javax.annotation.Nullable - public Integer getMaxDecomposedQueries() { - return maxDecomposedQueries; - } - - public void setMaxDecomposedQueries(@javax.annotation.Nullable Integer maxDecomposedQueries) { - this.maxDecomposedQueries = maxDecomposedQueries; - } - - public QueryGetDecomposedQueryRequest nlsRequest( - @javax.annotation.Nullable InputEurekaNLSRequest nlsRequest) { - this.nlsRequest = nlsRequest; - return this; - } - - /** - * NLSRequest object containing user query & instructions. - * - * @return nlsRequest - */ - @javax.annotation.Nullable - public InputEurekaNLSRequest getNlsRequest() { - return nlsRequest; - } - - public void setNlsRequest(@javax.annotation.Nullable InputEurekaNLSRequest nlsRequest) { - this.nlsRequest = nlsRequest; - } - - public QueryGetDecomposedQueryRequest worksheetIds( - @javax.annotation.Nullable List worksheetIds) { - this.worksheetIds = worksheetIds; - return this; - } - - public QueryGetDecomposedQueryRequest addWorksheetIdsItem(String worksheetIdsItem) { - if (this.worksheetIds == null) { - this.worksheetIds = new ArrayList<>(); - } - this.worksheetIds.add(worksheetIdsItem); - return this; - } - - /** - * List of worksheetIds to provide context for decomposing user query into analytical queries - * that can be run on them. - * - * @return worksheetIds - */ - @javax.annotation.Nullable - public List getWorksheetIds() { - return worksheetIds; - } - - public void setWorksheetIds(@javax.annotation.Nullable List worksheetIds) { - this.worksheetIds = worksheetIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = - (QueryGetDecomposedQueryRequest) o; - return Objects.equals(this.answerIds, queryGetDecomposedQueryRequest.answerIds) - && Objects.equals(this.content, queryGetDecomposedQueryRequest.content) - && Objects.equals( - this.conversationId, queryGetDecomposedQueryRequest.conversationId) - && Objects.equals(this.liveboardIds, queryGetDecomposedQueryRequest.liveboardIds) - && Objects.equals( - this.maxDecomposedQueries, - queryGetDecomposedQueryRequest.maxDecomposedQueries) - && Objects.equals(this.nlsRequest, queryGetDecomposedQueryRequest.nlsRequest) - && Objects.equals(this.worksheetIds, queryGetDecomposedQueryRequest.worksheetIds); - } - - @Override - public int hashCode() { - return Objects.hash( - answerIds, - content, - conversationId, - liveboardIds, - maxDecomposedQueries, - nlsRequest, - worksheetIds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QueryGetDecomposedQueryRequest {\n"); - sb.append(" answerIds: ").append(toIndentedString(answerIds)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); - sb.append(" liveboardIds: ").append(toIndentedString(liveboardIds)).append("\n"); - sb.append(" maxDecomposedQueries: ") - .append(toIndentedString(maxDecomposedQueries)) - .append("\n"); - sb.append(" nlsRequest: ").append(toIndentedString(nlsRequest)).append("\n"); - sb.append(" worksheetIds: ").append(toIndentedString(worksheetIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("answerIds"); - openapiFields.add("content"); - openapiFields.add("conversationId"); - openapiFields.add("liveboardIds"); - openapiFields.add("maxDecomposedQueries"); - openapiFields.add("nlsRequest"); - openapiFields.add("worksheetIds"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * QueryGetDecomposedQueryRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!QueryGetDecomposedQueryRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in QueryGetDecomposedQueryRequest is not" - + " found in the empty JSON string", - QueryGetDecomposedQueryRequest.openapiRequiredFields.toString())); - } +/** + * QueryGetDecomposedQueryRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueryGetDecomposedQueryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ANSWER_IDS = "answerIds"; + @SerializedName(SERIALIZED_NAME_ANSWER_IDS) + @javax.annotation.Nullable + private List answerIds; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable + private List content; + + public static final String SERIALIZED_NAME_CONVERSATION_ID = "conversationId"; + @SerializedName(SERIALIZED_NAME_CONVERSATION_ID) + @javax.annotation.Nullable + private String conversationId; + + public static final String SERIALIZED_NAME_LIVEBOARD_IDS = "liveboardIds"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDS) + @javax.annotation.Nullable + private List liveboardIds; + + public static final String SERIALIZED_NAME_MAX_DECOMPOSED_QUERIES = "maxDecomposedQueries"; + @SerializedName(SERIALIZED_NAME_MAX_DECOMPOSED_QUERIES) + @javax.annotation.Nullable + private Integer maxDecomposedQueries; + + public static final String SERIALIZED_NAME_NLS_REQUEST = "nlsRequest"; + @SerializedName(SERIALIZED_NAME_NLS_REQUEST) + @javax.annotation.Nullable + private InputEurekaNLSRequest nlsRequest; + + public static final String SERIALIZED_NAME_WORKSHEET_IDS = "worksheetIds"; + @SerializedName(SERIALIZED_NAME_WORKSHEET_IDS) + @javax.annotation.Nullable + private List worksheetIds; + + public QueryGetDecomposedQueryRequest() { + } + + public QueryGetDecomposedQueryRequest answerIds(@javax.annotation.Nullable List answerIds) { + this.answerIds = answerIds; + return this; + } + + public QueryGetDecomposedQueryRequest addAnswerIdsItem(String answerIdsItem) { + if (this.answerIds == null) { + this.answerIds = new ArrayList<>(); + } + this.answerIds.add(answerIdsItem); + return this; + } + + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + * @return answerIds + */ + @javax.annotation.Nullable + public List getAnswerIds() { + return answerIds; + } + + public void setAnswerIds(@javax.annotation.Nullable List answerIds) { + this.answerIds = answerIds; + } + + + public QueryGetDecomposedQueryRequest content(@javax.annotation.Nullable List content) { + this.content = content; + return this; + } + + public QueryGetDecomposedQueryRequest addContentItem(String contentItem) { + if (this.content == null) { + this.content = new ArrayList<>(); + } + this.content.add(contentItem); + return this; + } + + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + * @return content + */ + @javax.annotation.Nullable + public List getContent() { + return content; + } + + public void setContent(@javax.annotation.Nullable List content) { + this.content = content; + } + + + public QueryGetDecomposedQueryRequest conversationId(@javax.annotation.Nullable String conversationId) { + this.conversationId = conversationId; + return this; + } + + /** + * Unique identifier to denote current conversation. + * @return conversationId + */ + @javax.annotation.Nullable + public String getConversationId() { + return conversationId; + } + + public void setConversationId(@javax.annotation.Nullable String conversationId) { + this.conversationId = conversationId; + } + + + public QueryGetDecomposedQueryRequest liveboardIds(@javax.annotation.Nullable List liveboardIds) { + this.liveboardIds = liveboardIds; + return this; + } + + public QueryGetDecomposedQueryRequest addLiveboardIdsItem(String liveboardIdsItem) { + if (this.liveboardIds == null) { + this.liveboardIds = new ArrayList<>(); + } + this.liveboardIds.add(liveboardIdsItem); + return this; + } + + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + * @return liveboardIds + */ + @javax.annotation.Nullable + public List getLiveboardIds() { + return liveboardIds; + } + + public void setLiveboardIds(@javax.annotation.Nullable List liveboardIds) { + this.liveboardIds = liveboardIds; + } + + + public QueryGetDecomposedQueryRequest maxDecomposedQueries(@javax.annotation.Nullable Integer maxDecomposedQueries) { + this.maxDecomposedQueries = maxDecomposedQueries; + return this; + } + + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + * @return maxDecomposedQueries + */ + @javax.annotation.Nullable + public Integer getMaxDecomposedQueries() { + return maxDecomposedQueries; + } + + public void setMaxDecomposedQueries(@javax.annotation.Nullable Integer maxDecomposedQueries) { + this.maxDecomposedQueries = maxDecomposedQueries; + } + + + public QueryGetDecomposedQueryRequest nlsRequest(@javax.annotation.Nullable InputEurekaNLSRequest nlsRequest) { + this.nlsRequest = nlsRequest; + return this; + } + + /** + * NLSRequest object containing user query & instructions. + * @return nlsRequest + */ + @javax.annotation.Nullable + public InputEurekaNLSRequest getNlsRequest() { + return nlsRequest; + } + + public void setNlsRequest(@javax.annotation.Nullable InputEurekaNLSRequest nlsRequest) { + this.nlsRequest = nlsRequest; + } + + + public QueryGetDecomposedQueryRequest worksheetIds(@javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + return this; + } + + public QueryGetDecomposedQueryRequest addWorksheetIdsItem(String worksheetIdsItem) { + if (this.worksheetIds == null) { + this.worksheetIds = new ArrayList<>(); + } + this.worksheetIds.add(worksheetIdsItem); + return this; + } + + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + * @return worksheetIds + */ + @javax.annotation.Nullable + public List getWorksheetIds() { + return worksheetIds; + } + + public void setWorksheetIds(@javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = (QueryGetDecomposedQueryRequest) o; + return Objects.equals(this.answerIds, queryGetDecomposedQueryRequest.answerIds) && + Objects.equals(this.content, queryGetDecomposedQueryRequest.content) && + Objects.equals(this.conversationId, queryGetDecomposedQueryRequest.conversationId) && + Objects.equals(this.liveboardIds, queryGetDecomposedQueryRequest.liveboardIds) && + Objects.equals(this.maxDecomposedQueries, queryGetDecomposedQueryRequest.maxDecomposedQueries) && + Objects.equals(this.nlsRequest, queryGetDecomposedQueryRequest.nlsRequest) && + Objects.equals(this.worksheetIds, queryGetDecomposedQueryRequest.worksheetIds); + } + + @Override + public int hashCode() { + return Objects.hash(answerIds, content, conversationId, liveboardIds, maxDecomposedQueries, nlsRequest, worksheetIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryGetDecomposedQueryRequest {\n"); + sb.append(" answerIds: ").append(toIndentedString(answerIds)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); + sb.append(" liveboardIds: ").append(toIndentedString(liveboardIds)).append("\n"); + sb.append(" maxDecomposedQueries: ").append(toIndentedString(maxDecomposedQueries)).append("\n"); + sb.append(" nlsRequest: ").append(toIndentedString(nlsRequest)).append("\n"); + sb.append(" worksheetIds: ").append(toIndentedString(worksheetIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("answerIds"); + openapiFields.add("content"); + openapiFields.add("conversationId"); + openapiFields.add("liveboardIds"); + openapiFields.add("maxDecomposedQueries"); + openapiFields.add("nlsRequest"); + openapiFields.add("worksheetIds"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QueryGetDecomposedQueryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryGetDecomposedQueryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QueryGetDecomposedQueryRequest is not found in the empty JSON string", QueryGetDecomposedQueryRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!QueryGetDecomposedQueryRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `QueryGetDecomposedQueryRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QueryGetDecomposedQueryRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QueryGetDecomposedQueryRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("answerIds") != null - && !jsonObj.get("answerIds").isJsonNull() - && !jsonObj.get("answerIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `answerIds` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("answerIds").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("content") != null - && !jsonObj.get("content").isJsonNull() - && !jsonObj.get("content").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `content` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("content").toString())); - } - if ((jsonObj.get("conversationId") != null && !jsonObj.get("conversationId").isJsonNull()) - && !jsonObj.get("conversationId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `conversationId` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("conversationId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("liveboardIds") != null - && !jsonObj.get("liveboardIds").isJsonNull() - && !jsonObj.get("liveboardIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `liveboardIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("liveboardIds").toString())); - } - // validate the optional field `nlsRequest` - if (jsonObj.get("nlsRequest") != null && !jsonObj.get("nlsRequest").isJsonNull()) { - InputEurekaNLSRequest.validateJsonElement(jsonObj.get("nlsRequest")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("worksheetIds") != null - && !jsonObj.get("worksheetIds").isJsonNull() - && !jsonObj.get("worksheetIds").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `worksheetIds` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("worksheetIds").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!QueryGetDecomposedQueryRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'QueryGetDecomposedQueryRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(QueryGetDecomposedQueryRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, QueryGetDecomposedQueryRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public QueryGetDecomposedQueryRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of QueryGetDecomposedQueryRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of QueryGetDecomposedQueryRequest - * @throws IOException if the JSON string is invalid with respect to - * QueryGetDecomposedQueryRequest - */ - public static QueryGetDecomposedQueryRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, QueryGetDecomposedQueryRequest.class); - } - - /** - * Convert an instance of QueryGetDecomposedQueryRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the optional json data is an array if present + if (jsonObj.get("answerIds") != null && !jsonObj.get("answerIds").isJsonNull() && !jsonObj.get("answerIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `answerIds` to be an array in the JSON string but got `%s`", jsonObj.get("answerIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull() && !jsonObj.get("content").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `content` to be an array in the JSON string but got `%s`", jsonObj.get("content").toString())); + } + if ((jsonObj.get("conversationId") != null && !jsonObj.get("conversationId").isJsonNull()) && !jsonObj.get("conversationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conversationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conversationId").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("liveboardIds") != null && !jsonObj.get("liveboardIds").isJsonNull() && !jsonObj.get("liveboardIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `liveboardIds` to be an array in the JSON string but got `%s`", jsonObj.get("liveboardIds").toString())); + } + // validate the optional field `nlsRequest` + if (jsonObj.get("nlsRequest") != null && !jsonObj.get("nlsRequest").isJsonNull()) { + InputEurekaNLSRequest.validateJsonElement(jsonObj.get("nlsRequest")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("worksheetIds") != null && !jsonObj.get("worksheetIds").isJsonNull() && !jsonObj.get("worksheetIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `worksheetIds` to be an array in the JSON string but got `%s`", jsonObj.get("worksheetIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryGetDecomposedQueryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QueryGetDecomposedQueryRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QueryGetDecomposedQueryRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QueryGetDecomposedQueryRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QueryGetDecomposedQueryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QueryGetDecomposedQueryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryGetDecomposedQueryRequest + * @throws IOException if the JSON string is invalid with respect to QueryGetDecomposedQueryRequest + */ + public static QueryGetDecomposedQueryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QueryGetDecomposedQueryRequest.class); + } + + /** + * Convert an instance of QueryGetDecomposedQueryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java index 1e691319a..05c7c3277 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java @@ -4,280 +4,270 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** Recipient configuration which includes email address, ID or name of the users and groups. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RecipientDetails implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_EMAILS = "emails"; +/** + * Recipient configuration which includes email address, ID or name of the users and groups. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RecipientDetails implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_EMAILS) - @javax.annotation.Nullable - private List emails; + public static final String SERIALIZED_NAME_EMAILS = "emails"; + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails; - public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; - @SerializedName(SERIALIZED_NAME_PRINCIPALS) - @javax.annotation.Nullable - private List principals; + public RecipientDetails() { + } - public RecipientDetails() {} + public RecipientDetails emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } - public RecipientDetails emails(@javax.annotation.Nullable List emails) { - this.emails = emails; - return this; + public RecipientDetails addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); } - - public RecipientDetails addEmailsItem(String emailsItem) { - if (this.emails == null) { - this.emails = new ArrayList<>(); - } - this.emails.add(emailsItem); - return this; + this.emails.add(emailsItem); + return this; + } + + /** + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + + public RecipientDetails principals(@javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public RecipientDetails addPrincipalsItem(PrincipalsListItem principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); } + this.principals.add(principalsItem); + return this; + } - /** - * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. - * - * @return emails - */ - @javax.annotation.Nullable - public List getEmails() { - return emails; - } + /** + * List of user or groups to subscribe for the scheduled job notifications. + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } - public void setEmails(@javax.annotation.Nullable List emails) { - this.emails = emails; - } + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } - public RecipientDetails principals( - @javax.annotation.Nullable List principals) { - this.principals = principals; - return this; - } - public RecipientDetails addPrincipalsItem(PrincipalsListItem principalsItem) { - if (this.principals == null) { - this.principals = new ArrayList<>(); - } - this.principals.add(principalsItem); - return this; - } - /** - * List of user or groups to subscribe for the scheduled job notifications. - * - * @return principals - */ - @javax.annotation.Nullable - public List getPrincipals() { - return principals; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setPrincipals(@javax.annotation.Nullable List principals) { - this.principals = principals; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecipientDetails recipientDetails = (RecipientDetails) o; - return Objects.equals(this.emails, recipientDetails.emails) - && Objects.equals(this.principals, recipientDetails.principals); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(emails, principals); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecipientDetails {\n"); - sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); - sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + RecipientDetails recipientDetails = (RecipientDetails) o; + return Objects.equals(this.emails, recipientDetails.emails) && + Objects.equals(this.principals, recipientDetails.principals); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(emails, principals); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("emails"); - openapiFields.add("principals"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecipientDetails {\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecipientDetails - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecipientDetails.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RecipientDetails is not found in the" - + " empty JSON string", - RecipientDetails.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("emails"); + openapiFields.add("principals"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecipientDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RecipientDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RecipientDetails is not found in the empty JSON string", RecipientDetails.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecipientDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RecipientDetails` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RecipientDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecipientDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("emails") != null - && !jsonObj.get("emails").isJsonNull() - && !jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `emails` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("emails").toString())); - } - if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { - JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); - if (jsonArrayprincipals != null) { - // ensure the json data is an array - if (!jsonObj.get("principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `principals` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("principals").toString())); - } - - // validate the optional field `principals` (array) - for (int i = 0; i < jsonArrayprincipals.size(); i++) { - PrincipalsListItem.validateJsonElement(jsonArrayprincipals.get(i)); - } - ; - } + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull() && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); + } + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `principals` to be an array in the JSON string but got `%s`", jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsListItem.validateJsonElement(jsonArrayprincipals.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecipientDetails.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecipientDetails' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RecipientDetails.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RecipientDetails value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecipientDetails read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of RecipientDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecipientDetails - * @throws IOException if the JSON string is invalid with respect to RecipientDetails - */ - public static RecipientDetails fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecipientDetails.class); - } - - /** - * Convert an instance of RecipientDetails to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RecipientDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RecipientDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RecipientDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RecipientDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RecipientDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RecipientDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of RecipientDetails + * @throws IOException if the JSON string is invalid with respect to RecipientDetails + */ + public static RecipientDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RecipientDetails.class); + } + + /** + * Convert an instance of RecipientDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java index f01dbb8d6..b76c7d33f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java @@ -4,280 +4,270 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsListItemInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** Recipients of the scheduled job notification. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RecipientDetailsInput implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_EMAILS = "emails"; +/** + * Recipients of the scheduled job notification. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RecipientDetailsInput implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_EMAILS) - @javax.annotation.Nullable - private List emails; + public static final String SERIALIZED_NAME_EMAILS = "emails"; + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails; - public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; - @SerializedName(SERIALIZED_NAME_PRINCIPALS) - @javax.annotation.Nullable - private List principals; + public RecipientDetailsInput() { + } - public RecipientDetailsInput() {} + public RecipientDetailsInput emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } - public RecipientDetailsInput emails(@javax.annotation.Nullable List emails) { - this.emails = emails; - return this; + public RecipientDetailsInput addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); } - - public RecipientDetailsInput addEmailsItem(String emailsItem) { - if (this.emails == null) { - this.emails = new ArrayList<>(); - } - this.emails.add(emailsItem); - return this; + this.emails.add(emailsItem); + return this; + } + + /** + * Emails of the recipients. + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + + public RecipientDetailsInput principals(@javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public RecipientDetailsInput addPrincipalsItem(PrincipalsListItemInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); } + this.principals.add(principalsItem); + return this; + } - /** - * Emails of the recipients. - * - * @return emails - */ - @javax.annotation.Nullable - public List getEmails() { - return emails; - } + /** + * User or groups to be set as recipients of the schedule notifications. + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } - public void setEmails(@javax.annotation.Nullable List emails) { - this.emails = emails; - } + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } - public RecipientDetailsInput principals( - @javax.annotation.Nullable List principals) { - this.principals = principals; - return this; - } - public RecipientDetailsInput addPrincipalsItem(PrincipalsListItemInput principalsItem) { - if (this.principals == null) { - this.principals = new ArrayList<>(); - } - this.principals.add(principalsItem); - return this; - } - /** - * User or groups to be set as recipients of the schedule notifications. - * - * @return principals - */ - @javax.annotation.Nullable - public List getPrincipals() { - return principals; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setPrincipals(@javax.annotation.Nullable List principals) { - this.principals = principals; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecipientDetailsInput recipientDetailsInput = (RecipientDetailsInput) o; - return Objects.equals(this.emails, recipientDetailsInput.emails) - && Objects.equals(this.principals, recipientDetailsInput.principals); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(emails, principals); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecipientDetailsInput {\n"); - sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); - sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + RecipientDetailsInput recipientDetailsInput = (RecipientDetailsInput) o; + return Objects.equals(this.emails, recipientDetailsInput.emails) && + Objects.equals(this.principals, recipientDetailsInput.principals); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(emails, principals); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("emails"); - openapiFields.add("principals"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecipientDetailsInput {\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecipientDetailsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecipientDetailsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RecipientDetailsInput is not found in" - + " the empty JSON string", - RecipientDetailsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("emails"); + openapiFields.add("principals"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecipientDetailsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RecipientDetailsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RecipientDetailsInput is not found in the empty JSON string", RecipientDetailsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecipientDetailsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RecipientDetailsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RecipientDetailsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecipientDetailsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("emails") != null - && !jsonObj.get("emails").isJsonNull() - && !jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `emails` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("emails").toString())); - } - if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { - JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); - if (jsonArrayprincipals != null) { - // ensure the json data is an array - if (!jsonObj.get("principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `principals` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("principals").toString())); - } - - // validate the optional field `principals` (array) - for (int i = 0; i < jsonArrayprincipals.size(); i++) { - PrincipalsListItemInput.validateJsonElement(jsonArrayprincipals.get(i)); - } - ; - } + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull() && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); + } + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `principals` to be an array in the JSON string but got `%s`", jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsListItemInput.validateJsonElement(jsonArrayprincipals.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecipientDetailsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecipientDetailsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RecipientDetailsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RecipientDetailsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecipientDetailsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of RecipientDetailsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecipientDetailsInput - * @throws IOException if the JSON string is invalid with respect to RecipientDetailsInput - */ - public static RecipientDetailsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecipientDetailsInput.class); - } - - /** - * Convert an instance of RecipientDetailsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RecipientDetailsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RecipientDetailsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RecipientDetailsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RecipientDetailsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RecipientDetailsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RecipientDetailsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of RecipientDetailsInput + * @throws IOException if the JSON string is invalid with respect to RecipientDetailsInput + */ + public static RecipientDetailsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RecipientDetailsInput.class); + } + + /** + * Convert an instance of RecipientDetailsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java index 2b3860630..534df348b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java @@ -4,1166 +4,1137 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** RegionalSettingsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RegionalSettingsInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** ISO code to be appended with currency values. */ - @JsonAdapter(CurrencyFormatEnum.Adapter.class) - public enum CurrencyFormatEnum { - ADP("ADP"), - - AED("AED"), - - AFN("AFN"), - - ALL("ALL"), - - AMD("AMD"), - - ANG("ANG"), - - AOA("AOA"), - - ARA("ARA"), - - ARS("ARS"), - - ATS("ATS"), - - AUD("AUD"), - - AWG("AWG"), - - AZN("AZN"), - - BAM("BAM"), - - BBD("BBD"), - - BDT("BDT"), - - BEF("BEF"), - - BGL("BGL"), - - BGM("BGM"), - - BGN("BGN"), - - BHD("BHD"), - - BIF("BIF"), - - BMD("BMD"), - - BND("BND"), - - BOB("BOB"), - - BOP("BOP"), - - BOV("BOV"), - - BRL("BRL"), - - BSD("BSD"), - - BTN("BTN"), - - BUK("BUK"), - - BWP("BWP"), - - BYN("BYN"), - - BZD("BZD"), - - CAD("CAD"), - - CDF("CDF"), - - CHE("CHE"), - - CHF("CHF"), - - CHW("CHW"), - - CLE("CLE"), - - CLP("CLP"), - - CNX("CNX"), - - CNY("CNY"), - - COP("COP"), - - COU("COU"), - - CRC("CRC"), - - CSK("CSK"), - - CUC("CUC"), - - CUP("CUP"), - - CVE("CVE"), - - CYP("CYP"), - - CZK("CZK"), - - DDM("DDM"), - - DEM("DEM"), - - DJF("DJF"), - - DKK("DKK"), - - DOP("DOP"), - - DZD("DZD"), - - ECS("ECS"), - - ECV("ECV"), - - EEK("EEK"), - - EGP("EGP"), - - ERN("ERN"), - - ESP("ESP"), - - ETB("ETB"), - - EUR("EUR"), - - FIM("FIM"), - - FJD("FJD"), - - FKP("FKP"), - - FRF("FRF"), - - GBP("GBP"), - - GEK("GEK"), - - GEL("GEL"), - - GHS("GHS"), - - GIP("GIP"), - - GMD("GMD"), - - GNF("GNF"), - - GNS("GNS"), - - GQE("GQE"), - - GRD("GRD"), - - GTQ("GTQ"), - - GWE("GWE"), - - GWP("GWP"), - - GYD("GYD"), - - HKD("HKD"), - - HNL("HNL"), - - HRD("HRD"), - - HRK("HRK"), - - HTG("HTG"), - - HUF("HUF"), - - IDR("IDR"), - - IEP("IEP"), - - ILP("ILP"), - - ILS("ILS"), - - INR("INR"), - - IQD("IQD"), - - IRR("IRR"), - - ISK("ISK"), - - ITL("ITL"), - - JMD("JMD"), - - JOD("JOD"), - - JPY("JPY"), - - KES("KES"), - - KGS("KGS"), - - KHR("KHR"), - - KMF("KMF"), - - KPW("KPW"), - - KRW("KRW"), - - KWD("KWD"), - - KYD("KYD"), - - KZT("KZT"), - - LAK("LAK"), - - LBP("LBP"), - - LKR("LKR"), - - LRD("LRD"), - - LSL("LSL"), - - LTL("LTL"), - - LTT("LTT"), - - LUC("LUC"), - - LUF("LUF"), - - LUL("LUL"), - - LVL("LVL"), - - LVR("LVR"), - - LYD("LYD"), - - MAD("MAD"), - - MAF("MAF"), - - MCF("MCF"), - - MDC("MDC"), - - MDL("MDL"), - - MGA("MGA"), - - MGF("MGF"), - - MKD("MKD"), - - MLF("MLF"), - - MMK("MMK"), - - MNT("MNT"), - - MOP("MOP"), - - MRU("MRU"), - - MTL("MTL"), - - MTP("MTP"), - - MUR("MUR"), - - MVR("MVR"), - - MWK("MWK"), - - MXN("MXN"), - - MXV("MXV"), - - MYR("MYR"), - - MZE("MZE"), - - MZN("MZN"), - - NAD("NAD"), - - NGN("NGN"), - - NIO("NIO"), - - NLG("NLG"), - - NOK("NOK"), - - NPR("NPR"), - - NZD("NZD"), - - OMR("OMR"), - - PAB("PAB"), - - PEI("PEI"), - - PEN("PEN"), - - PGK("PGK"), - - PHP("PHP"), - - PKR("PKR"), - - PLN("PLN"), - - PTE("PTE"), - - PYG("PYG"), - - QAR("QAR"), - - RHD("RHD"), - - RON("RON"), - - RSD("RSD"), - - RUB("RUB"), - - RWF("RWF"), - - SAR("SAR"), - - SBD("SBD"), - - SCR("SCR"), - - SDG("SDG"), - - SEK("SEK"), - - SGD("SGD"), - - SHP("SHP"), - - SIT("SIT"), - - SKK("SKK"), - - SLL("SLL"), - - SOS("SOS"), - - SRD("SRD"), - - SRG("SRG"), - - SSP("SSP"), - - STN("STN"), - - SUR("SUR"), - - SVC("SVC"), - - SYP("SYP"), - - SZL("SZL"), - - THB("THB"), - - TJR("TJR"), - - TJS("TJS"), - - TMT("TMT"), - - TND("TND"), - - TOP("TOP"), - - TPE("TPE"), - - TRY("TRY"), - TTD("TTD"), - - TWD("TWD"), - - TZS("TZS"), - - UAH("UAH"), - - UAK("UAK"), - - UGX("UGX"), - - USD("USD"), - - UYU("UYU"), - - UYW("UYW"), - - UZS("UZS"), - - VES("VES"), - - VND("VND"), - - VUV("VUV"), - - WST("WST"), - - XAF("XAF"), - - XAG("XAG"), - - XAU("XAU"), - - XBA("XBA"), - - XBB("XBB"), - - XCD("XCD"), - - XDR("XDR"), - - XEU("XEU"), - - XFO("XFO"), - - XFU("XFU"), - - XOF("XOF"), - - XPD("XPD"), - - XPF("XPF"), - - XPT("XPT"), - - XRE("XRE"), - - XSU("XSU"), - - XTS("XTS"), - - XUA("XUA"), - - XXX("XXX"), - - YDD("YDD"), - - YER("YER"), - - ZAR("ZAR"), - - ZMW("ZMW"); - - private String value; - - CurrencyFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CurrencyFormatEnum fromValue(String value) { - for (CurrencyFormatEnum b : CurrencyFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CurrencyFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CurrencyFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CurrencyFormatEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - CurrencyFormatEnum.fromValue(value); - } +/** + * RegionalSettingsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RegionalSettingsInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ISO code to be appended with currency values. + */ + @JsonAdapter(CurrencyFormatEnum.Adapter.class) + public enum CurrencyFormatEnum { + ADP("ADP"), + + AED("AED"), + + AFN("AFN"), + + ALL("ALL"), + + AMD("AMD"), + + ANG("ANG"), + + AOA("AOA"), + + ARA("ARA"), + + ARS("ARS"), + + ATS("ATS"), + + AUD("AUD"), + + AWG("AWG"), + + AZN("AZN"), + + BAM("BAM"), + + BBD("BBD"), + + BDT("BDT"), + + BEF("BEF"), + + BGL("BGL"), + + BGM("BGM"), + + BGN("BGN"), + + BHD("BHD"), + + BIF("BIF"), + + BMD("BMD"), + + BND("BND"), + + BOB("BOB"), + + BOP("BOP"), + + BOV("BOV"), + + BRL("BRL"), + + BSD("BSD"), + + BTN("BTN"), + + BUK("BUK"), + + BWP("BWP"), + + BYN("BYN"), + + BZD("BZD"), + + CAD("CAD"), + + CDF("CDF"), + + CHE("CHE"), + + CHF("CHF"), + + CHW("CHW"), + + CLE("CLE"), + + CLP("CLP"), + + CNX("CNX"), + + CNY("CNY"), + + COP("COP"), + + COU("COU"), + + CRC("CRC"), + + CSK("CSK"), + + CUC("CUC"), + + CUP("CUP"), + + CVE("CVE"), + + CYP("CYP"), + + CZK("CZK"), + + DDM("DDM"), + + DEM("DEM"), + + DJF("DJF"), + + DKK("DKK"), + + DOP("DOP"), + + DZD("DZD"), + + ECS("ECS"), + + ECV("ECV"), + + EEK("EEK"), + + EGP("EGP"), + + ERN("ERN"), + + ESP("ESP"), + + ETB("ETB"), + + EUR("EUR"), + + FIM("FIM"), + + FJD("FJD"), + + FKP("FKP"), + + FRF("FRF"), + + GBP("GBP"), + + GEK("GEK"), + + GEL("GEL"), + + GHS("GHS"), + + GIP("GIP"), + + GMD("GMD"), + + GNF("GNF"), + + GNS("GNS"), + + GQE("GQE"), + + GRD("GRD"), + + GTQ("GTQ"), + + GWE("GWE"), + + GWP("GWP"), + + GYD("GYD"), + + HKD("HKD"), + + HNL("HNL"), + + HRD("HRD"), + + HRK("HRK"), + + HTG("HTG"), + + HUF("HUF"), + + IDR("IDR"), + + IEP("IEP"), + + ILP("ILP"), + + ILS("ILS"), + + INR("INR"), + + IQD("IQD"), + + IRR("IRR"), + + ISK("ISK"), + + ITL("ITL"), + + JMD("JMD"), + + JOD("JOD"), + + JPY("JPY"), + + KES("KES"), + + KGS("KGS"), + + KHR("KHR"), + + KMF("KMF"), + + KPW("KPW"), + + KRW("KRW"), + + KWD("KWD"), + + KYD("KYD"), + + KZT("KZT"), + + LAK("LAK"), + + LBP("LBP"), + + LKR("LKR"), + + LRD("LRD"), + + LSL("LSL"), + + LTL("LTL"), + + LTT("LTT"), + + LUC("LUC"), + + LUF("LUF"), + + LUL("LUL"), + + LVL("LVL"), + + LVR("LVR"), + + LYD("LYD"), + + MAD("MAD"), + + MAF("MAF"), + + MCF("MCF"), + + MDC("MDC"), + + MDL("MDL"), + + MGA("MGA"), + + MGF("MGF"), + + MKD("MKD"), + + MLF("MLF"), + + MMK("MMK"), + + MNT("MNT"), + + MOP("MOP"), + + MRU("MRU"), + + MTL("MTL"), + + MTP("MTP"), + + MUR("MUR"), + + MVR("MVR"), + + MWK("MWK"), + + MXN("MXN"), + + MXV("MXV"), + + MYR("MYR"), + + MZE("MZE"), + + MZN("MZN"), + + NAD("NAD"), + + NGN("NGN"), + + NIO("NIO"), + + NLG("NLG"), + + NOK("NOK"), + + NPR("NPR"), + + NZD("NZD"), + + OMR("OMR"), + + PAB("PAB"), + + PEI("PEI"), + + PEN("PEN"), + + PGK("PGK"), + + PHP("PHP"), + + PKR("PKR"), + + PLN("PLN"), + + PTE("PTE"), + + PYG("PYG"), + + QAR("QAR"), + + RHD("RHD"), + + RON("RON"), + + RSD("RSD"), + + RUB("RUB"), + + RWF("RWF"), + + SAR("SAR"), + + SBD("SBD"), + + SCR("SCR"), + + SDG("SDG"), + + SEK("SEK"), + + SGD("SGD"), + + SHP("SHP"), + + SIT("SIT"), + + SKK("SKK"), + + SLL("SLL"), + + SOS("SOS"), + + SRD("SRD"), + + SRG("SRG"), + + SSP("SSP"), + + STN("STN"), + + SUR("SUR"), + + SVC("SVC"), + + SYP("SYP"), + + SZL("SZL"), + + THB("THB"), + + TJR("TJR"), + + TJS("TJS"), + + TMT("TMT"), + + TND("TND"), + + TOP("TOP"), + + TPE("TPE"), + + TRY("TRY"), + + TTD("TTD"), + + TWD("TWD"), + + TZS("TZS"), + + UAH("UAH"), + + UAK("UAK"), + + UGX("UGX"), + + USD("USD"), + + UYU("UYU"), + + UYW("UYW"), + + UZS("UZS"), + + VES("VES"), + + VND("VND"), + + VUV("VUV"), + + WST("WST"), + + XAF("XAF"), + + XAG("XAG"), + + XAU("XAU"), + + XBA("XBA"), + + XBB("XBB"), + + XCD("XCD"), + + XDR("XDR"), + + XEU("XEU"), + + XFO("XFO"), + + XFU("XFU"), + + XOF("XOF"), + + XPD("XPD"), + + XPF("XPF"), + + XPT("XPT"), + + XRE("XRE"), + + XSU("XSU"), + + XTS("XTS"), + + XUA("XUA"), + + XXX("XXX"), + + YDD("YDD"), + + YER("YER"), + + ZAR("ZAR"), + + ZMW("ZMW"); + + private String value; + + CurrencyFormatEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_CURRENCY_FORMAT = "currency_format"; - - @SerializedName(SERIALIZED_NAME_CURRENCY_FORMAT) - @javax.annotation.Nullable - private CurrencyFormatEnum currencyFormat; - - /** Indicates the locale to be used for all formattings. */ - @JsonAdapter(UserLocaleEnum.Adapter.class) - public enum UserLocaleEnum { - EN_CA("en-CA"), - - EN_GB("en-GB"), - - EN_US("en-US"), - - DE_DE("de-DE"), - - JA_JP("ja-JP"), - - ZH_CN("zh-CN"), - - PT_BR("pt-BR"), - - FR_FR("fr-FR"), - - FR_CA("fr-CA"), - - ES_US("es-US"), - - DA_DK("da-DK"), - - ES_ES("es-ES"), - - FI_FI("fi-FI"), - - SV_SE("sv-SE"), - - NB_NO("nb-NO"), - - PT_PT("pt-PT"), - - NL_NL("nl-NL"), - - IT_IT("it-IT"), - - RU_RU("ru-RU"), - - EN_IN("en-IN"), - - DE_CH("de-CH"), - - EN_NZ("en-NZ"), - - ES_MX("es-MX"), - - EN_AU("en-AU"), - - ZH_HANT("zh-Hant"), - - KO_KR("ko-KR"), - - EN_DE("en-DE"); - - private String value; - - UserLocaleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static UserLocaleEnum fromValue(String value) { - for (UserLocaleEnum b : UserLocaleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final UserLocaleEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public UserLocaleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return UserLocaleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - UserLocaleEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_USER_LOCALE = "user_locale"; - - @SerializedName(SERIALIZED_NAME_USER_LOCALE) - @javax.annotation.Nullable - private UserLocaleEnum userLocale; - - /** Indicates the locale to be used for number formatting. */ - @JsonAdapter(NumberFormatLocaleEnum.Adapter.class) - public enum NumberFormatLocaleEnum { - EN_CA("en-CA"), - - EN_GB("en-GB"), - - EN_US("en-US"), - - DE_DE("de-DE"), - - JA_JP("ja-JP"), - - ZH_CN("zh-CN"), - - PT_BR("pt-BR"), - - FR_FR("fr-FR"), - - FR_CA("fr-CA"), - - ES_US("es-US"), - - DA_DK("da-DK"), - - ES_ES("es-ES"), - - FI_FI("fi-FI"), - - SV_SE("sv-SE"), - - NB_NO("nb-NO"), - - PT_PT("pt-PT"), - - NL_NL("nl-NL"), - - IT_IT("it-IT"), - - RU_RU("ru-RU"), - - EN_IN("en-IN"), - - DE_CH("de-CH"), - - EN_NZ("en-NZ"), - - ES_MX("es-MX"), - - EN_AU("en-AU"), - - ZH_HANT("zh-Hant"), - - KO_KR("ko-KR"), - - EN_DE("en-DE"); - - private String value; - - NumberFormatLocaleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static NumberFormatLocaleEnum fromValue(String value) { - for (NumberFormatLocaleEnum b : NumberFormatLocaleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final NumberFormatLocaleEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public NumberFormatLocaleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return NumberFormatLocaleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - NumberFormatLocaleEnum.fromValue(value); - } + @Override + public String toString() { + return String.valueOf(value); } - public static final String SERIALIZED_NAME_NUMBER_FORMAT_LOCALE = "number_format_locale"; - - @SerializedName(SERIALIZED_NAME_NUMBER_FORMAT_LOCALE) - @javax.annotation.Nullable - private NumberFormatLocaleEnum numberFormatLocale; - - /** Indicates the locale to be used for date formatting. */ - @JsonAdapter(DateFormatLocaleEnum.Adapter.class) - public enum DateFormatLocaleEnum { - EN_CA("en-CA"), - - EN_GB("en-GB"), - - EN_US("en-US"), - - DE_DE("de-DE"), - - JA_JP("ja-JP"), - - ZH_CN("zh-CN"), - - PT_BR("pt-BR"), - - FR_FR("fr-FR"), - - FR_CA("fr-CA"), - - ES_US("es-US"), - - DA_DK("da-DK"), - - ES_ES("es-ES"), - - FI_FI("fi-FI"), - - SV_SE("sv-SE"), - - NB_NO("nb-NO"), - - PT_PT("pt-PT"), - - NL_NL("nl-NL"), - - IT_IT("it-IT"), - - RU_RU("ru-RU"), - - EN_IN("en-IN"), - - DE_CH("de-CH"), - - EN_NZ("en-NZ"), - - ES_MX("es-MX"), - - EN_AU("en-AU"), - - ZH_HANT("zh-Hant"), - - KO_KR("ko-KR"), - - EN_DE("en-DE"); - - private String value; - - DateFormatLocaleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DateFormatLocaleEnum fromValue(String value) { - for (DateFormatLocaleEnum b : DateFormatLocaleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DateFormatLocaleEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DateFormatLocaleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DateFormatLocaleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DateFormatLocaleEnum.fromValue(value); + public static CurrencyFormatEnum fromValue(String value) { + for (CurrencyFormatEnum b : CurrencyFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } + } + return null; } - public static final String SERIALIZED_NAME_DATE_FORMAT_LOCALE = "date_format_locale"; - - @SerializedName(SERIALIZED_NAME_DATE_FORMAT_LOCALE) - @javax.annotation.Nullable - private DateFormatLocaleEnum dateFormatLocale; - - public RegionalSettingsInput() {} - - public RegionalSettingsInput currencyFormat( - @javax.annotation.Nullable CurrencyFormatEnum currencyFormat) { - this.currencyFormat = currencyFormat; - return this; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CurrencyFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CurrencyFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CurrencyFormatEnum.fromValue(value); + } } - /** - * ISO code to be appended with currency values. - * - * @return currencyFormat - */ - @javax.annotation.Nullable - public CurrencyFormatEnum getCurrencyFormat() { - return currencyFormat; - } - - public void setCurrencyFormat(@javax.annotation.Nullable CurrencyFormatEnum currencyFormat) { - this.currencyFormat = currencyFormat; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CurrencyFormatEnum.fromValue(value); } - - public RegionalSettingsInput userLocale(@javax.annotation.Nullable UserLocaleEnum userLocale) { - this.userLocale = userLocale; - return this; + } + + public static final String SERIALIZED_NAME_CURRENCY_FORMAT = "currency_format"; + @SerializedName(SERIALIZED_NAME_CURRENCY_FORMAT) + @javax.annotation.Nullable + private CurrencyFormatEnum currencyFormat; + + /** + * Indicates the locale to be used for all formattings. + */ + @JsonAdapter(UserLocaleEnum.Adapter.class) + public enum UserLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + UserLocaleEnum(String value) { + this.value = value; } - /** - * Indicates the locale to be used for all formattings. - * - * @return userLocale - */ - @javax.annotation.Nullable - public UserLocaleEnum getUserLocale() { - return userLocale; + public String getValue() { + return value; } - public void setUserLocale(@javax.annotation.Nullable UserLocaleEnum userLocale) { - this.userLocale = userLocale; + @Override + public String toString() { + return String.valueOf(value); } - public RegionalSettingsInput numberFormatLocale( - @javax.annotation.Nullable NumberFormatLocaleEnum numberFormatLocale) { - this.numberFormatLocale = numberFormatLocale; - return this; + public static UserLocaleEnum fromValue(String value) { + for (UserLocaleEnum b : UserLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - /** - * Indicates the locale to be used for number formatting. - * - * @return numberFormatLocale - */ - @javax.annotation.Nullable - public NumberFormatLocaleEnum getNumberFormatLocale() { - return numberFormatLocale; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UserLocaleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UserLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UserLocaleEnum.fromValue(value); + } } - public void setNumberFormatLocale( - @javax.annotation.Nullable NumberFormatLocaleEnum numberFormatLocale) { - this.numberFormatLocale = numberFormatLocale; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UserLocaleEnum.fromValue(value); } - - public RegionalSettingsInput dateFormatLocale( - @javax.annotation.Nullable DateFormatLocaleEnum dateFormatLocale) { - this.dateFormatLocale = dateFormatLocale; - return this; + } + + public static final String SERIALIZED_NAME_USER_LOCALE = "user_locale"; + @SerializedName(SERIALIZED_NAME_USER_LOCALE) + @javax.annotation.Nullable + private UserLocaleEnum userLocale; + + /** + * Indicates the locale to be used for number formatting. + */ + @JsonAdapter(NumberFormatLocaleEnum.Adapter.class) + public enum NumberFormatLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + NumberFormatLocaleEnum(String value) { + this.value = value; } - /** - * Indicates the locale to be used for date formatting. - * - * @return dateFormatLocale - */ - @javax.annotation.Nullable - public DateFormatLocaleEnum getDateFormatLocale() { - return dateFormatLocale; + public String getValue() { + return value; } - public void setDateFormatLocale( - @javax.annotation.Nullable DateFormatLocaleEnum dateFormatLocale) { - this.dateFormatLocale = dateFormatLocale; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static NumberFormatLocaleEnum fromValue(String value) { + for (NumberFormatLocaleEnum b : NumberFormatLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; } - RegionalSettingsInput regionalSettingsInput = (RegionalSettingsInput) o; - return Objects.equals(this.currencyFormat, regionalSettingsInput.currencyFormat) - && Objects.equals(this.userLocale, regionalSettingsInput.userLocale) - && Objects.equals(this.numberFormatLocale, regionalSettingsInput.numberFormatLocale) - && Objects.equals(this.dateFormatLocale, regionalSettingsInput.dateFormatLocale); + } + return null; } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NumberFormatLocaleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NumberFormatLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NumberFormatLocaleEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash(currencyFormat, userLocale, numberFormatLocale, dateFormatLocale); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NumberFormatLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_NUMBER_FORMAT_LOCALE = "number_format_locale"; + @SerializedName(SERIALIZED_NAME_NUMBER_FORMAT_LOCALE) + @javax.annotation.Nullable + private NumberFormatLocaleEnum numberFormatLocale; + + /** + * Indicates the locale to be used for date formatting. + */ + @JsonAdapter(DateFormatLocaleEnum.Adapter.class) + public enum DateFormatLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + DateFormatLocaleEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RegionalSettingsInput {\n"); - sb.append(" currencyFormat: ").append(toIndentedString(currencyFormat)).append("\n"); - sb.append(" userLocale: ").append(toIndentedString(userLocale)).append("\n"); - sb.append(" numberFormatLocale: ") - .append(toIndentedString(numberFormatLocale)) - .append("\n"); - sb.append(" dateFormatLocale: ").append(toIndentedString(dateFormatLocale)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static DateFormatLocaleEnum fromValue(String value) { + for (DateFormatLocaleEnum b : DateFormatLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("currency_format"); - openapiFields.add("user_locale"); - openapiFields.add("number_format_locale"); - openapiFields.add("date_format_locale"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DateFormatLocaleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DateFormatLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DateFormatLocaleEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RegionalSettingsInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RegionalSettingsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RegionalSettingsInput is not found in" - + " the empty JSON string", - RegionalSettingsInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RegionalSettingsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RegionalSettingsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("currency_format") != null && !jsonObj.get("currency_format").isJsonNull()) - && !jsonObj.get("currency_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `currency_format` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("currency_format").toString())); - } - // validate the optional field `currency_format` - if (jsonObj.get("currency_format") != null - && !jsonObj.get("currency_format").isJsonNull()) { - CurrencyFormatEnum.validateJsonElement(jsonObj.get("currency_format")); - } - if ((jsonObj.get("user_locale") != null && !jsonObj.get("user_locale").isJsonNull()) - && !jsonObj.get("user_locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_locale` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("user_locale").toString())); - } - // validate the optional field `user_locale` - if (jsonObj.get("user_locale") != null && !jsonObj.get("user_locale").isJsonNull()) { - UserLocaleEnum.validateJsonElement(jsonObj.get("user_locale")); - } - if ((jsonObj.get("number_format_locale") != null - && !jsonObj.get("number_format_locale").isJsonNull()) - && !jsonObj.get("number_format_locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `number_format_locale` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("number_format_locale").toString())); - } - // validate the optional field `number_format_locale` - if (jsonObj.get("number_format_locale") != null - && !jsonObj.get("number_format_locale").isJsonNull()) { - NumberFormatLocaleEnum.validateJsonElement(jsonObj.get("number_format_locale")); - } - if ((jsonObj.get("date_format_locale") != null - && !jsonObj.get("date_format_locale").isJsonNull()) - && !jsonObj.get("date_format_locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `date_format_locale` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("date_format_locale").toString())); - } - // validate the optional field `date_format_locale` - if (jsonObj.get("date_format_locale") != null - && !jsonObj.get("date_format_locale").isJsonNull()) { - DateFormatLocaleEnum.validateJsonElement(jsonObj.get("date_format_locale")); - } + String value = jsonElement.getAsString(); + DateFormatLocaleEnum.fromValue(value); } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RegionalSettingsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RegionalSettingsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RegionalSettingsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RegionalSettingsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RegionalSettingsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } + } + + public static final String SERIALIZED_NAME_DATE_FORMAT_LOCALE = "date_format_locale"; + @SerializedName(SERIALIZED_NAME_DATE_FORMAT_LOCALE) + @javax.annotation.Nullable + private DateFormatLocaleEnum dateFormatLocale; + + public RegionalSettingsInput() { + } + + public RegionalSettingsInput currencyFormat(@javax.annotation.Nullable CurrencyFormatEnum currencyFormat) { + this.currencyFormat = currencyFormat; + return this; + } + + /** + * ISO code to be appended with currency values. + * @return currencyFormat + */ + @javax.annotation.Nullable + public CurrencyFormatEnum getCurrencyFormat() { + return currencyFormat; + } + + public void setCurrencyFormat(@javax.annotation.Nullable CurrencyFormatEnum currencyFormat) { + this.currencyFormat = currencyFormat; + } + + + public RegionalSettingsInput userLocale(@javax.annotation.Nullable UserLocaleEnum userLocale) { + this.userLocale = userLocale; + return this; + } + + /** + * Indicates the locale to be used for all formattings. + * @return userLocale + */ + @javax.annotation.Nullable + public UserLocaleEnum getUserLocale() { + return userLocale; + } + + public void setUserLocale(@javax.annotation.Nullable UserLocaleEnum userLocale) { + this.userLocale = userLocale; + } + + + public RegionalSettingsInput numberFormatLocale(@javax.annotation.Nullable NumberFormatLocaleEnum numberFormatLocale) { + this.numberFormatLocale = numberFormatLocale; + return this; + } + + /** + * Indicates the locale to be used for number formatting. + * @return numberFormatLocale + */ + @javax.annotation.Nullable + public NumberFormatLocaleEnum getNumberFormatLocale() { + return numberFormatLocale; + } + + public void setNumberFormatLocale(@javax.annotation.Nullable NumberFormatLocaleEnum numberFormatLocale) { + this.numberFormatLocale = numberFormatLocale; + } + + + public RegionalSettingsInput dateFormatLocale(@javax.annotation.Nullable DateFormatLocaleEnum dateFormatLocale) { + this.dateFormatLocale = dateFormatLocale; + return this; + } + + /** + * Indicates the locale to be used for date formatting. + * @return dateFormatLocale + */ + @javax.annotation.Nullable + public DateFormatLocaleEnum getDateFormatLocale() { + return dateFormatLocale; + } + + public void setDateFormatLocale(@javax.annotation.Nullable DateFormatLocaleEnum dateFormatLocale) { + this.dateFormatLocale = dateFormatLocale; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Create an instance of RegionalSettingsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of RegionalSettingsInput - * @throws IOException if the JSON string is invalid with respect to RegionalSettingsInput - */ - public static RegionalSettingsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RegionalSettingsInput.class); + if (o == null || getClass() != o.getClass()) { + return false; + } + RegionalSettingsInput regionalSettingsInput = (RegionalSettingsInput) o; + return Objects.equals(this.currencyFormat, regionalSettingsInput.currencyFormat) && + Objects.equals(this.userLocale, regionalSettingsInput.userLocale) && + Objects.equals(this.numberFormatLocale, regionalSettingsInput.numberFormatLocale) && + Objects.equals(this.dateFormatLocale, regionalSettingsInput.dateFormatLocale); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(currencyFormat, userLocale, numberFormatLocale, dateFormatLocale); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegionalSettingsInput {\n"); + sb.append(" currencyFormat: ").append(toIndentedString(currencyFormat)).append("\n"); + sb.append(" userLocale: ").append(toIndentedString(userLocale)).append("\n"); + sb.append(" numberFormatLocale: ").append(toIndentedString(numberFormatLocale)).append("\n"); + sb.append(" dateFormatLocale: ").append(toIndentedString(dateFormatLocale)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("currency_format"); + openapiFields.add("user_locale"); + openapiFields.add("number_format_locale"); + openapiFields.add("date_format_locale"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RegionalSettingsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegionalSettingsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RegionalSettingsInput is not found in the empty JSON string", RegionalSettingsInput.openapiRequiredFields.toString())); + } + } - /** - * Convert an instance of RegionalSettingsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RegionalSettingsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RegionalSettingsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("currency_format") != null && !jsonObj.get("currency_format").isJsonNull()) && !jsonObj.get("currency_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currency_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency_format").toString())); + } + // validate the optional field `currency_format` + if (jsonObj.get("currency_format") != null && !jsonObj.get("currency_format").isJsonNull()) { + CurrencyFormatEnum.validateJsonElement(jsonObj.get("currency_format")); + } + if ((jsonObj.get("user_locale") != null && !jsonObj.get("user_locale").isJsonNull()) && !jsonObj.get("user_locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_locale").toString())); + } + // validate the optional field `user_locale` + if (jsonObj.get("user_locale") != null && !jsonObj.get("user_locale").isJsonNull()) { + UserLocaleEnum.validateJsonElement(jsonObj.get("user_locale")); + } + if ((jsonObj.get("number_format_locale") != null && !jsonObj.get("number_format_locale").isJsonNull()) && !jsonObj.get("number_format_locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `number_format_locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("number_format_locale").toString())); + } + // validate the optional field `number_format_locale` + if (jsonObj.get("number_format_locale") != null && !jsonObj.get("number_format_locale").isJsonNull()) { + NumberFormatLocaleEnum.validateJsonElement(jsonObj.get("number_format_locale")); + } + if ((jsonObj.get("date_format_locale") != null && !jsonObj.get("date_format_locale").isJsonNull()) && !jsonObj.get("date_format_locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `date_format_locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date_format_locale").toString())); + } + // validate the optional field `date_format_locale` + if (jsonObj.get("date_format_locale") != null && !jsonObj.get("date_format_locale").isJsonNull()) { + DateFormatLocaleEnum.validateJsonElement(jsonObj.get("date_format_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegionalSettingsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegionalSettingsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RegionalSettingsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RegionalSettingsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RegionalSettingsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RegionalSettingsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegionalSettingsInput + * @throws IOException if the JSON string is invalid with respect to RegionalSettingsInput + */ + public static RegionalSettingsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RegionalSettingsInput.class); + } + + /** + * Convert an instance of RegionalSettingsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java index 55f7480df..5321df87f 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java @@ -4,446 +4,399 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Org; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** RepoConfigObject */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RepoConfigObject implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; - - @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) - @javax.annotation.Nullable - private String repositoryUrl; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; - - @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) - @javax.annotation.Nullable - private String commitBranchName; - - public static final String SERIALIZED_NAME_BRANCHES = "branches"; - - @SerializedName(SERIALIZED_NAME_BRANCHES) - @javax.annotation.Nullable - private List branches; - - public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; - - @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) - @javax.annotation.Nullable - private Boolean enableGuidMapping; - - public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = - "configuration_branch_name"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) - @javax.annotation.Nullable - private String configurationBranchName; - - public static final String SERIALIZED_NAME_ORG = "org"; - - @SerializedName(SERIALIZED_NAME_ORG) - @javax.annotation.Nullable - private Org org; - - public RepoConfigObject() {} - - public RepoConfigObject repositoryUrl(@javax.annotation.Nullable String repositoryUrl) { - this.repositoryUrl = repositoryUrl; - return this; - } - - /** - * Remote repository URL configured - * - * @return repositoryUrl - */ - @javax.annotation.Nullable - public String getRepositoryUrl() { - return repositoryUrl; - } - - public void setRepositoryUrl(@javax.annotation.Nullable String repositoryUrl) { - this.repositoryUrl = repositoryUrl; - } - - public RepoConfigObject username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username to authenticate connection to the version control system - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - - public RepoConfigObject commitBranchName(@javax.annotation.Nullable String commitBranchName) { - this.commitBranchName = commitBranchName; - return this; - } - - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. - * - * @return commitBranchName - */ - @javax.annotation.Nullable - public String getCommitBranchName() { - return commitBranchName; - } - - public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { - this.commitBranchName = commitBranchName; - } - - public RepoConfigObject branches(@javax.annotation.Nullable List branches) { - this.branches = branches; - return this; - } - - public RepoConfigObject addBranchesItem(String branchesItem) { - if (this.branches == null) { - this.branches = new ArrayList<>(); - } - this.branches.add(branchesItem); - return this; - } - /** - * Branches that have been pulled in local repository - * - * @return branches - */ - @javax.annotation.Nullable - public List getBranches() { - return branches; - } - - public void setBranches(@javax.annotation.Nullable List branches) { - this.branches = branches; - } - - public RepoConfigObject enableGuidMapping( - @javax.annotation.Nullable Boolean enableGuidMapping) { - this.enableGuidMapping = enableGuidMapping; - return this; - } - - /** - * Maintain mapping of guid for the deployment to an instance - * - * @return enableGuidMapping - */ - @javax.annotation.Nullable - public Boolean getEnableGuidMapping() { - return enableGuidMapping; - } - - public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { - this.enableGuidMapping = enableGuidMapping; - } - - public RepoConfigObject configurationBranchName( - @javax.annotation.Nullable String configurationBranchName) { - this.configurationBranchName = configurationBranchName; - return this; - } - - /** - * Name of the branch where the configuration files related to operations between Thoughtspot - * and version control repo should be maintained. - * - * @return configurationBranchName - */ - @javax.annotation.Nullable - public String getConfigurationBranchName() { - return configurationBranchName; - } - - public void setConfigurationBranchName( - @javax.annotation.Nullable String configurationBranchName) { - this.configurationBranchName = configurationBranchName; - } - - public RepoConfigObject org(@javax.annotation.Nullable Org org) { - this.org = org; - return this; - } - - /** - * Get org - * - * @return org - */ - @javax.annotation.Nullable - public Org getOrg() { - return org; - } - - public void setOrg(@javax.annotation.Nullable Org org) { - this.org = org; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepoConfigObject repoConfigObject = (RepoConfigObject) o; - return Objects.equals(this.repositoryUrl, repoConfigObject.repositoryUrl) - && Objects.equals(this.username, repoConfigObject.username) - && Objects.equals(this.commitBranchName, repoConfigObject.commitBranchName) - && Objects.equals(this.branches, repoConfigObject.branches) - && Objects.equals(this.enableGuidMapping, repoConfigObject.enableGuidMapping) - && Objects.equals( - this.configurationBranchName, repoConfigObject.configurationBranchName) - && Objects.equals(this.org, repoConfigObject.org); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - repositoryUrl, - username, - commitBranchName, - branches, - enableGuidMapping, - configurationBranchName, - org); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepoConfigObject {\n"); - sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); - sb.append(" branches: ").append(toIndentedString(branches)).append("\n"); - sb.append(" enableGuidMapping: ") - .append(toIndentedString(enableGuidMapping)) - .append("\n"); - sb.append(" configurationBranchName: ") - .append(toIndentedString(configurationBranchName)) - .append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("repository_url"); - openapiFields.add("username"); - openapiFields.add("commit_branch_name"); - openapiFields.add("branches"); - openapiFields.add("enable_guid_mapping"); - openapiFields.add("configuration_branch_name"); - openapiFields.add("org"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RepoConfigObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RepoConfigObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RepoConfigObject is not found in the" - + " empty JSON string", - RepoConfigObject.openapiRequiredFields.toString())); - } +/** + * RepoConfigObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RepoConfigObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; + @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) + @javax.annotation.Nullable + private String repositoryUrl; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; + @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) + @javax.annotation.Nullable + private String commitBranchName; + + public static final String SERIALIZED_NAME_BRANCHES = "branches"; + @SerializedName(SERIALIZED_NAME_BRANCHES) + @javax.annotation.Nullable + private List branches; + + public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; + @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) + @javax.annotation.Nullable + private Boolean enableGuidMapping; + + public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = "configuration_branch_name"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) + @javax.annotation.Nullable + private String configurationBranchName; + + public static final String SERIALIZED_NAME_ORG = "org"; + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private Org org; + + public RepoConfigObject() { + } + + public RepoConfigObject repositoryUrl(@javax.annotation.Nullable String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * Remote repository URL configured + * @return repositoryUrl + */ + @javax.annotation.Nullable + public String getRepositoryUrl() { + return repositoryUrl; + } + + public void setRepositoryUrl(@javax.annotation.Nullable String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + } + + + public RepoConfigObject username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username to authenticate connection to the version control system + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + public RepoConfigObject commitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + return this; + } + + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + * @return commitBranchName + */ + @javax.annotation.Nullable + public String getCommitBranchName() { + return commitBranchName; + } + + public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + } + + + public RepoConfigObject branches(@javax.annotation.Nullable List branches) { + this.branches = branches; + return this; + } + + public RepoConfigObject addBranchesItem(String branchesItem) { + if (this.branches == null) { + this.branches = new ArrayList<>(); + } + this.branches.add(branchesItem); + return this; + } + + /** + * Branches that have been pulled in local repository + * @return branches + */ + @javax.annotation.Nullable + public List getBranches() { + return branches; + } + + public void setBranches(@javax.annotation.Nullable List branches) { + this.branches = branches; + } + + + public RepoConfigObject enableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + return this; + } + + /** + * Maintain mapping of guid for the deployment to an instance + * @return enableGuidMapping + */ + @javax.annotation.Nullable + public Boolean getEnableGuidMapping() { + return enableGuidMapping; + } + + public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + } + + + public RepoConfigObject configurationBranchName(@javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + return this; + } + + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. + * @return configurationBranchName + */ + @javax.annotation.Nullable + public String getConfigurationBranchName() { + return configurationBranchName; + } + + public void setConfigurationBranchName(@javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + } + + + public RepoConfigObject org(@javax.annotation.Nullable Org org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + */ + @javax.annotation.Nullable + public Org getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable Org org) { + this.org = org; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepoConfigObject repoConfigObject = (RepoConfigObject) o; + return Objects.equals(this.repositoryUrl, repoConfigObject.repositoryUrl) && + Objects.equals(this.username, repoConfigObject.username) && + Objects.equals(this.commitBranchName, repoConfigObject.commitBranchName) && + Objects.equals(this.branches, repoConfigObject.branches) && + Objects.equals(this.enableGuidMapping, repoConfigObject.enableGuidMapping) && + Objects.equals(this.configurationBranchName, repoConfigObject.configurationBranchName) && + Objects.equals(this.org, repoConfigObject.org); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(repositoryUrl, username, commitBranchName, branches, enableGuidMapping, configurationBranchName, org); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepoConfigObject {\n"); + sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); + sb.append(" branches: ").append(toIndentedString(branches)).append("\n"); + sb.append(" enableGuidMapping: ").append(toIndentedString(enableGuidMapping)).append("\n"); + sb.append(" configurationBranchName: ").append(toIndentedString(configurationBranchName)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("repository_url"); + openapiFields.add("username"); + openapiFields.add("commit_branch_name"); + openapiFields.add("branches"); + openapiFields.add("enable_guid_mapping"); + openapiFields.add("configuration_branch_name"); + openapiFields.add("org"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RepoConfigObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RepoConfigObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RepoConfigObject is not found in the empty JSON string", RepoConfigObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RepoConfigObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RepoConfigObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RepoConfigObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepoConfigObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("repository_url") != null && !jsonObj.get("repository_url").isJsonNull()) - && !jsonObj.get("repository_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `repository_url` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("repository_url").toString())); - } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if ((jsonObj.get("commit_branch_name") != null - && !jsonObj.get("commit_branch_name").isJsonNull()) - && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_branch_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("commit_branch_name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("branches") != null - && !jsonObj.get("branches").isJsonNull() - && !jsonObj.get("branches").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branches` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("branches").toString())); - } - if ((jsonObj.get("configuration_branch_name") != null - && !jsonObj.get("configuration_branch_name").isJsonNull()) - && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `configuration_branch_name` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("configuration_branch_name").toString())); - } - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - Org.validateJsonElement(jsonObj.get("org")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RepoConfigObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RepoConfigObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RepoConfigObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RepoConfigObject value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RepoConfigObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RepoConfigObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepoConfigObject - * @throws IOException if the JSON string is invalid with respect to RepoConfigObject - */ - public static RepoConfigObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RepoConfigObject.class); - } - - /** - * Convert an instance of RepoConfigObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("repository_url") != null && !jsonObj.get("repository_url").isJsonNull()) && !jsonObj.get("repository_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `repository_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("repository_url").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("commit_branch_name") != null && !jsonObj.get("commit_branch_name").isJsonNull()) && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_branch_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("branches") != null && !jsonObj.get("branches").isJsonNull() && !jsonObj.get("branches").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `branches` to be an array in the JSON string but got `%s`", jsonObj.get("branches").toString())); + } + if ((jsonObj.get("configuration_branch_name") != null && !jsonObj.get("configuration_branch_name").isJsonNull()) && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configuration_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configuration_branch_name").toString())); + } + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + Org.validateJsonElement(jsonObj.get("org")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RepoConfigObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RepoConfigObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RepoConfigObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RepoConfigObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RepoConfigObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RepoConfigObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of RepoConfigObject + * @throws IOException if the JSON string is invalid with respect to RepoConfigObject + */ + public static RepoConfigObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RepoConfigObject.class); + } + + /** + * Convert an instance of RepoConfigObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java index 383c0b05d..15e853fd2 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java @@ -4,241 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ResetUserPasswordRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResetUserPasswordRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; - - @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) - @javax.annotation.Nonnull - private String newPassword; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nonnull - private String userIdentifier; - - public ResetUserPasswordRequest() {} - - public ResetUserPasswordRequest newPassword(@javax.annotation.Nonnull String newPassword) { - this.newPassword = newPassword; - return this; - } - - /** - * New password for the user. - * - * @return newPassword - */ - @javax.annotation.Nonnull - public String getNewPassword() { - return newPassword; - } - - public void setNewPassword(@javax.annotation.Nonnull String newPassword) { - this.newPassword = newPassword; - } - - public ResetUserPasswordRequest userIdentifier( - @javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * GUID or name of the user. - * - * @return userIdentifier - */ - @javax.annotation.Nonnull - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { - this.userIdentifier = userIdentifier; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResetUserPasswordRequest resetUserPasswordRequest = (ResetUserPasswordRequest) o; - return Objects.equals(this.newPassword, resetUserPasswordRequest.newPassword) - && Objects.equals(this.userIdentifier, resetUserPasswordRequest.userIdentifier); +/** + * ResetUserPasswordRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResetUserPasswordRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; + @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) + @javax.annotation.Nonnull + private String newPassword; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public ResetUserPasswordRequest() { + } + + public ResetUserPasswordRequest newPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + return this; + } + + /** + * New password for the user. + * @return newPassword + */ + @javax.annotation.Nonnull + public String getNewPassword() { + return newPassword; + } + + public void setNewPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + } + + + public ResetUserPasswordRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID or name of the user. + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(newPassword, userIdentifier); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResetUserPasswordRequest {\n"); - sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append("}"); - return sb.toString(); + ResetUserPasswordRequest resetUserPasswordRequest = (ResetUserPasswordRequest) o; + return Objects.equals(this.newPassword, resetUserPasswordRequest.newPassword) && + Objects.equals(this.userIdentifier, resetUserPasswordRequest.userIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(newPassword, userIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResetUserPasswordRequest {\n"); + sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("new_password"); + openapiFields.add("user_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("new_password"); + openapiRequiredFields.add("user_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResetUserPasswordRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResetUserPasswordRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResetUserPasswordRequest is not found in the empty JSON string", ResetUserPasswordRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("new_password"); - openapiFields.add("user_identifier"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("new_password"); - openapiRequiredFields.add("user_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResetUserPasswordRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResetUserPasswordRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResetUserPasswordRequest is not found" - + " in the empty JSON string", - ResetUserPasswordRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResetUserPasswordRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResetUserPasswordRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResetUserPasswordRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResetUserPasswordRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResetUserPasswordRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResetUserPasswordRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("new_password").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `new_password` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("new_password").toString())); - } - if (!jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResetUserPasswordRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResetUserPasswordRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResetUserPasswordRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResetUserPasswordRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResetUserPasswordRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResetUserPasswordRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResetUserPasswordRequest - * @throws IOException if the JSON string is invalid with respect to ResetUserPasswordRequest - */ - public static ResetUserPasswordRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResetUserPasswordRequest.class); - } - - /** - * Convert an instance of ResetUserPasswordRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("new_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `new_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("new_password").toString())); + } + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResetUserPasswordRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResetUserPasswordRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResetUserPasswordRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResetUserPasswordRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResetUserPasswordRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResetUserPasswordRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResetUserPasswordRequest + * @throws IOException if the JSON string is invalid with respect to ResetUserPasswordRequest + */ + public static ResetUserPasswordRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResetUserPasswordRequest.class); + } + + /** + * Convert an instance of ResetUserPasswordRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java index 3bd5d7319..85f86efc0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java @@ -4,211 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** The object representation with activation link. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseActivationURL implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACTIVATION_LINK = "activation_link"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_ACTIVATION_LINK) - @javax.annotation.Nullable - private String activationLink; +/** + * The object representation with activation link. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseActivationURL implements Serializable { + private static final long serialVersionUID = 1L; - public ResponseActivationURL() {} + public static final String SERIALIZED_NAME_ACTIVATION_LINK = "activation_link"; + @SerializedName(SERIALIZED_NAME_ACTIVATION_LINK) + @javax.annotation.Nullable + private String activationLink; - public ResponseActivationURL activationLink(@javax.annotation.Nullable String activationLink) { - this.activationLink = activationLink; - return this; - } + public ResponseActivationURL() { + } - /** - * Activation link to activate the user. - * - * @return activationLink - */ - @javax.annotation.Nullable - public String getActivationLink() { - return activationLink; - } + public ResponseActivationURL activationLink(@javax.annotation.Nullable String activationLink) { + this.activationLink = activationLink; + return this; + } - public void setActivationLink(@javax.annotation.Nullable String activationLink) { - this.activationLink = activationLink; - } + /** + * Activation link to activate the user. + * @return activationLink + */ + @javax.annotation.Nullable + public String getActivationLink() { + return activationLink; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseActivationURL responseActivationURL = (ResponseActivationURL) o; - return Objects.equals(this.activationLink, responseActivationURL.activationLink); - } + public void setActivationLink(@javax.annotation.Nullable String activationLink) { + this.activationLink = activationLink; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(activationLink); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseActivationURL {\n"); - sb.append(" activationLink: ").append(toIndentedString(activationLink)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ResponseActivationURL responseActivationURL = (ResponseActivationURL) o; + return Objects.equals(this.activationLink, responseActivationURL.activationLink); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(activationLink); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("activation_link"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseActivationURL {\n"); + sb.append(" activationLink: ").append(toIndentedString(activationLink)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseActivationURL - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseActivationURL.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseActivationURL is not found in" - + " the empty JSON string", - ResponseActivationURL.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("activation_link"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseActivationURL + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseActivationURL.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseActivationURL is not found in the empty JSON string", ResponseActivationURL.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseActivationURL.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseActivationURL` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseActivationURL.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseActivationURL` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("activation_link") != null && !jsonObj.get("activation_link").isJsonNull()) - && !jsonObj.get("activation_link").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `activation_link` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("activation_link").toString())); - } - } + if ((jsonObj.get("activation_link") != null && !jsonObj.get("activation_link").isJsonNull()) && !jsonObj.get("activation_link").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `activation_link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("activation_link").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseActivationURL.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseActivationURL' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseActivationURL.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseActivationURL value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseActivationURL read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseActivationURL given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseActivationURL - * @throws IOException if the JSON string is invalid with respect to ResponseActivationURL - */ - public static ResponseActivationURL fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseActivationURL.class); - } - - /** - * Convert an instance of ResponseActivationURL to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseActivationURL.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseActivationURL' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseActivationURL.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseActivationURL value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseActivationURL read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseActivationURL given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseActivationURL + * @throws IOException if the JSON string is invalid with respect to ResponseActivationURL + */ + public static ResponseActivationURL fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseActivationURL.class); + } + + /** + * Convert an instance of ResponseActivationURL to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java index 84a47cf81..f82b8b0f9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java @@ -4,211 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** ResponseCopyObject */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseCopyObject implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nullable - private String metadataId; +/** + * ResponseCopyObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseCopyObject implements Serializable { + private static final long serialVersionUID = 1L; - public ResponseCopyObject() {} + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nullable + private String metadataId; - public ResponseCopyObject metadataId(@javax.annotation.Nullable String metadataId) { - this.metadataId = metadataId; - return this; - } + public ResponseCopyObject() { + } - /** - * The unique identifier of the object. - * - * @return metadataId - */ - @javax.annotation.Nullable - public String getMetadataId() { - return metadataId; - } + public ResponseCopyObject metadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + return this; + } - public void setMetadataId(@javax.annotation.Nullable String metadataId) { - this.metadataId = metadataId; - } + /** + * The unique identifier of the object. + * @return metadataId + */ + @javax.annotation.Nullable + public String getMetadataId() { + return metadataId; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseCopyObject responseCopyObject = (ResponseCopyObject) o; - return Objects.equals(this.metadataId, responseCopyObject.metadataId); - } + public void setMetadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(metadataId); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseCopyObject {\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ResponseCopyObject responseCopyObject = (ResponseCopyObject) o; + return Objects.equals(this.metadataId, responseCopyObject.metadataId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseCopyObject {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseCopyObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseCopyObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseCopyObject is not found in" - + " the empty JSON string", - ResponseCopyObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseCopyObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseCopyObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseCopyObject is not found in the empty JSON string", ResponseCopyObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseCopyObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseCopyObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseCopyObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseCopyObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) - && !jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - } + if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) && !jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseCopyObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseCopyObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseCopyObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseCopyObject value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseCopyObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseCopyObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseCopyObject - * @throws IOException if the JSON string is invalid with respect to ResponseCopyObject - */ - public static ResponseCopyObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseCopyObject.class); - } - - /** - * Convert an instance of ResponseCopyObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseCopyObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseCopyObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseCopyObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseCopyObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseCopyObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseCopyObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseCopyObject + * @throws IOException if the JSON string is invalid with respect to ResponseCopyObject + */ + public static ResponseCopyObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseCopyObject.class); + } + + /** + * Convert an instance of ResponseCopyObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java index 9d6e3264a..0afdae0f4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java @@ -4,448 +4,412 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionDetails; +import com.thoughtspot.client.model.DefaultActionConfig; +import com.thoughtspot.client.model.MetadataAssociationItem; +import com.thoughtspot.client.model.ObjectIDAndName; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Custom action details */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseCustomAction implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; - - @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) - @javax.annotation.Nonnull - private ActionDetails actionDetails; - - public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) - @javax.annotation.Nonnull - private DefaultActionConfig defaultActionConfig; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_METADATA_ASSOCIATION = "metadata_association"; - - @SerializedName(SERIALIZED_NAME_METADATA_ASSOCIATION) - @javax.annotation.Nullable - private List metadataAssociation; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_USER_GROUPS = "user_groups"; - - @SerializedName(SERIALIZED_NAME_USER_GROUPS) - @javax.annotation.Nullable - private List userGroups; - - public ResponseCustomAction() {} - - public ResponseCustomAction actionDetails( - @javax.annotation.Nonnull ActionDetails actionDetails) { - this.actionDetails = actionDetails; - return this; - } - - /** - * Get actionDetails - * - * @return actionDetails - */ - @javax.annotation.Nonnull - public ActionDetails getActionDetails() { - return actionDetails; - } - - public void setActionDetails(@javax.annotation.Nonnull ActionDetails actionDetails) { - this.actionDetails = actionDetails; - } - - public ResponseCustomAction defaultActionConfig( - @javax.annotation.Nonnull DefaultActionConfig defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - return this; - } - - /** - * Get defaultActionConfig - * - * @return defaultActionConfig - */ - @javax.annotation.Nonnull - public DefaultActionConfig getDefaultActionConfig() { - return defaultActionConfig; - } - - public void setDefaultActionConfig( - @javax.annotation.Nonnull DefaultActionConfig defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - } - - public ResponseCustomAction id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - /** - * Unique Id of the custom action. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponseCustomAction metadataAssociation( - @javax.annotation.Nullable List metadataAssociation) { - this.metadataAssociation = metadataAssociation; - return this; - } - - public ResponseCustomAction addMetadataAssociationItem( - MetadataAssociationItem metadataAssociationItem) { - if (this.metadataAssociation == null) { - this.metadataAssociation = new ArrayList<>(); - } - this.metadataAssociation.add(metadataAssociationItem); - return this; - } - - /** - * Metadata objects to assign the the custom action to. - * - * @return metadataAssociation - */ - @javax.annotation.Nullable - public List getMetadataAssociation() { - return metadataAssociation; - } - - public void setMetadataAssociation( - @javax.annotation.Nullable List metadataAssociation) { - this.metadataAssociation = metadataAssociation; - } - - public ResponseCustomAction name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Unique name of the custom action. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ResponseCustomAction userGroups( - @javax.annotation.Nullable List userGroups) { - this.userGroups = userGroups; - return this; - } +import com.thoughtspot.client.JSON; - public ResponseCustomAction addUserGroupsItem(ObjectIDAndName userGroupsItem) { - if (this.userGroups == null) { - this.userGroups = new ArrayList<>(); - } - this.userGroups.add(userGroupsItem); - return this; +/** + * Custom action details + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseCustomAction implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; + @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) + @javax.annotation.Nonnull + private ActionDetails actionDetails; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nonnull + private DefaultActionConfig defaultActionConfig; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_METADATA_ASSOCIATION = "metadata_association"; + @SerializedName(SERIALIZED_NAME_METADATA_ASSOCIATION) + @javax.annotation.Nullable + private List metadataAssociation; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_USER_GROUPS = "user_groups"; + @SerializedName(SERIALIZED_NAME_USER_GROUPS) + @javax.annotation.Nullable + private List userGroups; + + public ResponseCustomAction() { + } + + public ResponseCustomAction actionDetails(@javax.annotation.Nonnull ActionDetails actionDetails) { + this.actionDetails = actionDetails; + return this; + } + + /** + * Get actionDetails + * @return actionDetails + */ + @javax.annotation.Nonnull + public ActionDetails getActionDetails() { + return actionDetails; + } + + public void setActionDetails(@javax.annotation.Nonnull ActionDetails actionDetails) { + this.actionDetails = actionDetails; + } + + + public ResponseCustomAction defaultActionConfig(@javax.annotation.Nonnull DefaultActionConfig defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Get defaultActionConfig + * @return defaultActionConfig + */ + @javax.annotation.Nonnull + public DefaultActionConfig getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig(@javax.annotation.Nonnull DefaultActionConfig defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + + public ResponseCustomAction id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique Id of the custom action. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponseCustomAction metadataAssociation(@javax.annotation.Nullable List metadataAssociation) { + this.metadataAssociation = metadataAssociation; + return this; + } + + public ResponseCustomAction addMetadataAssociationItem(MetadataAssociationItem metadataAssociationItem) { + if (this.metadataAssociation == null) { + this.metadataAssociation = new ArrayList<>(); } - - /** - * Unique ID or name of the User groups which are associated with the custom action. - * - * @return userGroups - */ - @javax.annotation.Nullable - public List getUserGroups() { - return userGroups; + this.metadataAssociation.add(metadataAssociationItem); + return this; + } + + /** + * Metadata objects to assign the the custom action to. + * @return metadataAssociation + */ + @javax.annotation.Nullable + public List getMetadataAssociation() { + return metadataAssociation; + } + + public void setMetadataAssociation(@javax.annotation.Nullable List metadataAssociation) { + this.metadataAssociation = metadataAssociation; + } + + + public ResponseCustomAction name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name of the custom action. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ResponseCustomAction userGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + return this; + } + + public ResponseCustomAction addUserGroupsItem(ObjectIDAndName userGroupsItem) { + if (this.userGroups == null) { + this.userGroups = new ArrayList<>(); } + this.userGroups.add(userGroupsItem); + return this; + } - public void setUserGroups(@javax.annotation.Nullable List userGroups) { - this.userGroups = userGroups; - } + /** + * Unique ID or name of the User groups which are associated with the custom action. + * @return userGroups + */ + @javax.annotation.Nullable + public List getUserGroups() { + return userGroups; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseCustomAction responseCustomAction = (ResponseCustomAction) o; - return Objects.equals(this.actionDetails, responseCustomAction.actionDetails) - && Objects.equals( - this.defaultActionConfig, responseCustomAction.defaultActionConfig) - && Objects.equals(this.id, responseCustomAction.id) - && Objects.equals( - this.metadataAssociation, responseCustomAction.metadataAssociation) - && Objects.equals(this.name, responseCustomAction.name) - && Objects.equals(this.userGroups, responseCustomAction.userGroups); - } + public void setUserGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash( - actionDetails, defaultActionConfig, id, metadataAssociation, name, userGroups); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseCustomAction {\n"); - sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); - sb.append(" defaultActionConfig: ") - .append(toIndentedString(defaultActionConfig)) - .append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" metadataAssociation: ") - .append(toIndentedString(metadataAssociation)) - .append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ResponseCustomAction responseCustomAction = (ResponseCustomAction) o; + return Objects.equals(this.actionDetails, responseCustomAction.actionDetails) && + Objects.equals(this.defaultActionConfig, responseCustomAction.defaultActionConfig) && + Objects.equals(this.id, responseCustomAction.id) && + Objects.equals(this.metadataAssociation, responseCustomAction.metadataAssociation) && + Objects.equals(this.name, responseCustomAction.name) && + Objects.equals(this.userGroups, responseCustomAction.userGroups); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(actionDetails, defaultActionConfig, id, metadataAssociation, name, userGroups); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("action_details"); - openapiFields.add("default_action_config"); - openapiFields.add("id"); - openapiFields.add("metadata_association"); - openapiFields.add("name"); - openapiFields.add("user_groups"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("action_details"); - openapiRequiredFields.add("default_action_config"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseCustomAction {\n"); + sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); + sb.append(" defaultActionConfig: ").append(toIndentedString(defaultActionConfig)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" metadataAssociation: ").append(toIndentedString(metadataAssociation)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseCustomAction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseCustomAction.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseCustomAction is not found in" - + " the empty JSON string", - ResponseCustomAction.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_details"); + openapiFields.add("default_action_config"); + openapiFields.add("id"); + openapiFields.add("metadata_association"); + openapiFields.add("name"); + openapiFields.add("user_groups"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("action_details"); + openapiRequiredFields.add("default_action_config"); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseCustomAction + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseCustomAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseCustomAction is not found in the empty JSON string", ResponseCustomAction.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseCustomAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseCustomAction` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseCustomAction.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseCustomAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseCustomAction.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseCustomAction.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `action_details` - ActionDetails.validateJsonElement(jsonObj.get("action_details")); - // validate the required field `default_action_config` - DefaultActionConfig.validateJsonElement(jsonObj.get("default_action_config")); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (jsonObj.get("metadata_association") != null - && !jsonObj.get("metadata_association").isJsonNull()) { - JsonArray jsonArraymetadataAssociation = jsonObj.getAsJsonArray("metadata_association"); - if (jsonArraymetadataAssociation != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata_association").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_association` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_association").toString())); - } - - // validate the optional field `metadata_association` (array) - for (int i = 0; i < jsonArraymetadataAssociation.size(); i++) { - MetadataAssociationItem.validateJsonElement( - jsonArraymetadataAssociation.get(i)); - } - ; - } + // validate the required field `action_details` + ActionDetails.validateJsonElement(jsonObj.get("action_details")); + // validate the required field `default_action_config` + DefaultActionConfig.validateJsonElement(jsonObj.get("default_action_config")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (jsonObj.get("metadata_association") != null && !jsonObj.get("metadata_association").isJsonNull()) { + JsonArray jsonArraymetadataAssociation = jsonObj.getAsJsonArray("metadata_association"); + if (jsonArraymetadataAssociation != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata_association").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_association` to be an array in the JSON string but got `%s`", jsonObj.get("metadata_association").toString())); + } + + // validate the optional field `metadata_association` (array) + for (int i = 0; i < jsonArraymetadataAssociation.size(); i++) { + MetadataAssociationItem.validateJsonElement(jsonArraymetadataAssociation.get(i)); + }; } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (jsonObj.get("user_groups") != null && !jsonObj.get("user_groups").isJsonNull()) { - JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("user_groups"); - if (jsonArrayuserGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("user_groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_groups` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_groups").toString())); - } - - // validate the optional field `user_groups` (array) - for (int i = 0; i < jsonArrayuserGroups.size(); i++) { - ObjectIDAndName.validateJsonElement(jsonArrayuserGroups.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseCustomAction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseCustomAction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseCustomAction.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseCustomAction value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseCustomAction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("user_groups") != null && !jsonObj.get("user_groups").isJsonNull()) { + JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("user_groups"); + if (jsonArrayuserGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("user_groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_groups` to be an array in the JSON string but got `%s`", jsonObj.get("user_groups").toString())); + } + + // validate the optional field `user_groups` (array) + for (int i = 0; i < jsonArrayuserGroups.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArrayuserGroups.get(i)); + }; } - } - - /** - * Create an instance of ResponseCustomAction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseCustomAction - * @throws IOException if the JSON string is invalid with respect to ResponseCustomAction - */ - public static ResponseCustomAction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseCustomAction.class); - } + } + } - /** - * Convert an instance of ResponseCustomAction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseCustomAction.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseCustomAction' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseCustomAction.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseCustomAction value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseCustomAction read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseCustomAction given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseCustomAction + * @throws IOException if the JSON string is invalid with respect to ResponseCustomAction + */ + public static ResponseCustomAction fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseCustomAction.class); + } + + /** + * Convert an instance of ResponseCustomAction to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java index 53b90a1c8..701aaca48 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java @@ -4,222 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseFailedEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Wrapper for the failed entities, as they are inside a 'data' field in the response. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * Wrapper for the failed entities, as they are inside a 'data' field in the response. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ResponseFailedEntities implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_DATA = "data"; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nonnull - private List data; + public ResponseFailedEntities() { + } - public ResponseFailedEntities() {} + public ResponseFailedEntities data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } - public ResponseFailedEntities data(@javax.annotation.Nonnull List data) { - this.data = data; - return this; + public ResponseFailedEntities addDataItem(ResponseFailedEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); } + this.data.add(dataItem); + return this; + } - public ResponseFailedEntities addDataItem(ResponseFailedEntity dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } - /** - * Get data - * - * @return data - */ - @javax.annotation.Nonnull - public List getData() { - return data; - } + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } - public void setData(@javax.annotation.Nonnull List data) { - this.data = data; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseFailedEntities responseFailedEntities = (ResponseFailedEntities) o; - return Objects.equals(this.data, responseFailedEntities.data); - } - @Override - public int hashCode() { - return Objects.hash(data); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseFailedEntities {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); + ResponseFailedEntities responseFailedEntities = (ResponseFailedEntities) o; + return Objects.equals(this.data, responseFailedEntities.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseFailedEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseFailedEntities - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseFailedEntities.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseFailedEntities is not found" - + " in the empty JSON string", - ResponseFailedEntities.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseFailedEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseFailedEntities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseFailedEntities is not found in the empty JSON string", ResponseFailedEntities.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseFailedEntities.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseFailedEntities` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseFailedEntities.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseFailedEntities` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseFailedEntities.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseFailedEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ResponseFailedEntity.validateJsonElement(jsonArraydata.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseFailedEntities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseFailedEntities' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseFailedEntities.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseFailedEntities value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseFailedEntities read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseFailedEntities given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseFailedEntities - * @throws IOException if the JSON string is invalid with respect to ResponseFailedEntities - */ - public static ResponseFailedEntities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseFailedEntities.class); - } - - /** - * Convert an instance of ResponseFailedEntities to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponseFailedEntity.validateJsonElement(jsonArraydata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseFailedEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseFailedEntities' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseFailedEntities.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseFailedEntities value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseFailedEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseFailedEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseFailedEntities + * @throws IOException if the JSON string is invalid with respect to ResponseFailedEntities + */ + public static ResponseFailedEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseFailedEntities.class); + } + + /** + * Convert an instance of ResponseFailedEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java index 372534e4c..c8438ccb9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java @@ -4,275 +4,267 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Unique ID of the failed worksheet. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseFailedEntity implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ERROR = "error"; - - @SerializedName(SERIALIZED_NAME_ERROR) - @javax.annotation.Nonnull - private String error; - - public ResponseFailedEntity() {} - - public ResponseFailedEntity id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponseFailedEntity name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the worksheet that failed to convert. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ResponseFailedEntity error(@javax.annotation.Nonnull String error) { - this.error = error; - return this; - } - - /** - * Error details related to the failed conversion. - * - * @return error - */ - @javax.annotation.Nonnull - public String getError() { - return error; - } - - public void setError(@javax.annotation.Nonnull String error) { - this.error = error; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseFailedEntity responseFailedEntity = (ResponseFailedEntity) o; - return Objects.equals(this.id, responseFailedEntity.id) - && Objects.equals(this.name, responseFailedEntity.name) - && Objects.equals(this.error, responseFailedEntity.error); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, error); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseFailedEntity {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Unique ID of the failed worksheet. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseFailedEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public ResponseFailedEntity() { + } + + public ResponseFailedEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponseFailedEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the worksheet that failed to convert. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ResponseFailedEntity error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error details related to the failed conversion. + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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"); + ResponseFailedEntity responseFailedEntity = (ResponseFailedEntity) o; + return Objects.equals(this.id, responseFailedEntity.id) && + Objects.equals(this.name, responseFailedEntity.name) && + Objects.equals(this.error, responseFailedEntity.error); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseFailedEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseFailedEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseFailedEntity.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseFailedEntity is not found in" - + " the empty JSON string", - ResponseFailedEntity.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseFailedEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseFailedEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseFailedEntity is not found in the empty JSON string", ResponseFailedEntity.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseFailedEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseFailedEntity` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseFailedEntity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseFailedEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseFailedEntity.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseFailedEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `error` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("error").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseFailedEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseFailedEntity' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseFailedEntity.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseFailedEntity value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseFailedEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseFailedEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseFailedEntity - * @throws IOException if the JSON string is invalid with respect to ResponseFailedEntity - */ - public static ResponseFailedEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseFailedEntity.class); - } - - /** - * Convert an instance of ResponseFailedEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseFailedEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseFailedEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseFailedEntity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseFailedEntity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseFailedEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseFailedEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseFailedEntity + * @throws IOException if the JSON string is invalid with respect to ResponseFailedEntity + */ + public static ResponseFailedEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseFailedEntity.class); + } + + /** + * Convert an instance of ResponseFailedEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java index dfa4b28de..31222f0ff 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java @@ -4,226 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseIncompleteEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; +import com.thoughtspot.client.JSON; + /** * Wrapper for the incomplete entities, as they are inside a 'data' field in the response. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ResponseIncompleteEntities implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DATA = "data"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nonnull - private List data; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; - public ResponseIncompleteEntities() {} + public ResponseIncompleteEntities() { + } - public ResponseIncompleteEntities data( - @javax.annotation.Nonnull List data) { - this.data = data; - return this; - } + public ResponseIncompleteEntities data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } - public ResponseIncompleteEntities addDataItem(ResponseIncompleteEntity dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; + public ResponseIncompleteEntities addDataItem(ResponseIncompleteEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); } + this.data.add(dataItem); + return this; + } - /** - * Get data - * - * @return data - */ - @javax.annotation.Nonnull - public List getData() { - return data; - } + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } - public void setData(@javax.annotation.Nonnull List data) { - this.data = data; - } + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseIncompleteEntities responseIncompleteEntities = (ResponseIncompleteEntities) o; - return Objects.equals(this.data, responseIncompleteEntities.data); - } - @Override - public int hashCode() { - return Objects.hash(data); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseIncompleteEntities {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); + ResponseIncompleteEntities responseIncompleteEntities = (ResponseIncompleteEntities) o; + return Objects.equals(this.data, responseIncompleteEntities.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseIncompleteEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseIncompleteEntities - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseIncompleteEntities.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseIncompleteEntities is not" - + " found in the empty JSON string", - ResponseIncompleteEntities.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseIncompleteEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseIncompleteEntities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseIncompleteEntities is not found in the empty JSON string", ResponseIncompleteEntities.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseIncompleteEntities.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseIncompleteEntities` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseIncompleteEntities.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseIncompleteEntities` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseIncompleteEntities.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseIncompleteEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ResponseIncompleteEntity.validateJsonElement(jsonArraydata.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseIncompleteEntities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseIncompleteEntities' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseIncompleteEntities.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseIncompleteEntities value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseIncompleteEntities read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseIncompleteEntities given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseIncompleteEntities - * @throws IOException if the JSON string is invalid with respect to ResponseIncompleteEntities - */ - public static ResponseIncompleteEntities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseIncompleteEntities.class); - } - - /** - * Convert an instance of ResponseIncompleteEntities to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponseIncompleteEntity.validateJsonElement(jsonArraydata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseIncompleteEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseIncompleteEntities' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseIncompleteEntities.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseIncompleteEntities value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseIncompleteEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseIncompleteEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseIncompleteEntities + * @throws IOException if the JSON string is invalid with respect to ResponseIncompleteEntities + */ + public static ResponseIncompleteEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseIncompleteEntities.class); + } + + /** + * Convert an instance of ResponseIncompleteEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java index 796a5ec6e..e98de23c7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java @@ -4,276 +4,267 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Unique ID of the incomplete worksheet. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseIncompleteEntity implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ERROR = "error"; - - @SerializedName(SERIALIZED_NAME_ERROR) - @javax.annotation.Nonnull - private String error; - - public ResponseIncompleteEntity() {} - - public ResponseIncompleteEntity id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponseIncompleteEntity name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the incomplete worksheet. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ResponseIncompleteEntity error(@javax.annotation.Nonnull String error) { - this.error = error; - return this; - } - - /** - * Error details related to the incomplete conversion. - * - * @return error - */ - @javax.annotation.Nonnull - public String getError() { - return error; - } - - public void setError(@javax.annotation.Nonnull String error) { - this.error = error; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseIncompleteEntity responseIncompleteEntity = (ResponseIncompleteEntity) o; - return Objects.equals(this.id, responseIncompleteEntity.id) - && Objects.equals(this.name, responseIncompleteEntity.name) - && Objects.equals(this.error, responseIncompleteEntity.error); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, error); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseIncompleteEntity {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Unique ID of the incomplete worksheet. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseIncompleteEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public ResponseIncompleteEntity() { + } + + public ResponseIncompleteEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponseIncompleteEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the incomplete worksheet. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ResponseIncompleteEntity error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error details related to the incomplete conversion. + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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"); + ResponseIncompleteEntity responseIncompleteEntity = (ResponseIncompleteEntity) o; + return Objects.equals(this.id, responseIncompleteEntity.id) && + Objects.equals(this.name, responseIncompleteEntity.name) && + Objects.equals(this.error, responseIncompleteEntity.error); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseIncompleteEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseIncompleteEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseIncompleteEntity.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseIncompleteEntity is not found" - + " in the empty JSON string", - ResponseIncompleteEntity.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseIncompleteEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseIncompleteEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseIncompleteEntity is not found in the empty JSON string", ResponseIncompleteEntity.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseIncompleteEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseIncompleteEntity` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseIncompleteEntity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseIncompleteEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseIncompleteEntity.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseIncompleteEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `error` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("error").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseIncompleteEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseIncompleteEntity' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseIncompleteEntity.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseIncompleteEntity value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseIncompleteEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseIncompleteEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseIncompleteEntity - * @throws IOException if the JSON string is invalid with respect to ResponseIncompleteEntity - */ - public static ResponseIncompleteEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseIncompleteEntity.class); - } - - /** - * Convert an instance of ResponseIncompleteEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseIncompleteEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseIncompleteEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseIncompleteEntity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseIncompleteEntity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseIncompleteEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseIncompleteEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseIncompleteEntity + * @throws IOException if the JSON string is invalid with respect to ResponseIncompleteEntity + */ + public static ResponseIncompleteEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseIncompleteEntity.class); + } + + /** + * Convert an instance of ResponseIncompleteEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java index 15ac39b10..1c9e765b7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java @@ -4,517 +4,474 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ResponseMessage */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseMessage implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; - - @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) - @javax.annotation.Nullable - private String sessionIdentifier; - - public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; - - @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) - @javax.annotation.Nullable - private Integer generationNumber; - - /** Type of the generated response. */ - @JsonAdapter(MessageTypeEnum.Adapter.class) - public enum MessageTypeEnum { - TS_ANSWER("TSAnswer"); - - private String value; - - MessageTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MessageTypeEnum fromValue(String value) { - for (MessageTypeEnum b : MessageTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MessageTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MessageTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MessageTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MessageTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_MESSAGE_TYPE = "message_type"; - - @SerializedName(SERIALIZED_NAME_MESSAGE_TYPE) - @javax.annotation.Nonnull - private MessageTypeEnum messageType; - - /** Generated visualization type. */ - @JsonAdapter(VisualizationTypeEnum.Adapter.class) - public enum VisualizationTypeEnum { - CHART("Chart"), - TABLE("Table"), - - UNDEFINED("Undefined"); - - private String value; - - VisualizationTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisualizationTypeEnum fromValue(String value) { - for (VisualizationTypeEnum b : VisualizationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisualizationTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisualizationTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisualizationTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisualizationTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISUALIZATION_TYPE = "visualization_type"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_TYPE) - @javax.annotation.Nullable - private VisualizationTypeEnum visualizationType; - - public static final String SERIALIZED_NAME_TOKENS = "tokens"; - - @SerializedName(SERIALIZED_NAME_TOKENS) - @javax.annotation.Nullable - private String tokens; - - public static final String SERIALIZED_NAME_DISPLAY_TOKENS = "display_tokens"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_TOKENS) - @javax.annotation.Nullable - private String displayTokens; - - public ResponseMessage() {} - - public ResponseMessage sessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - return this; - } - - /** - * Unique identifier of the generated response. - * - * @return sessionIdentifier - */ - @javax.annotation.Nullable - public String getSessionIdentifier() { - return sessionIdentifier; - } - - public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { - this.sessionIdentifier = sessionIdentifier; - } - - public ResponseMessage generationNumber(@javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Generate number of the response. - * - * @return generationNumber - */ - @javax.annotation.Nullable - public Integer getGenerationNumber() { - return generationNumber; - } +/** + * ResponseMessage + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseMessage implements Serializable { + private static final long serialVersionUID = 1L; - public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - } + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nullable + private String sessionIdentifier; - public ResponseMessage messageType(@javax.annotation.Nonnull MessageTypeEnum messageType) { - this.messageType = messageType; - return this; - } + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; - /** - * Type of the generated response. - * - * @return messageType - */ - @javax.annotation.Nonnull - public MessageTypeEnum getMessageType() { - return messageType; - } + /** + * Type of the generated response. + */ + @JsonAdapter(MessageTypeEnum.Adapter.class) + public enum MessageTypeEnum { + TS_ANSWER("TSAnswer"); - public void setMessageType(@javax.annotation.Nonnull MessageTypeEnum messageType) { - this.messageType = messageType; - } + private String value; - public ResponseMessage visualizationType( - @javax.annotation.Nullable VisualizationTypeEnum visualizationType) { - this.visualizationType = visualizationType; - return this; + MessageTypeEnum(String value) { + this.value = value; } - /** - * Generated visualization type. - * - * @return visualizationType - */ - @javax.annotation.Nullable - public VisualizationTypeEnum getVisualizationType() { - return visualizationType; + public String getValue() { + return value; } - public void setVisualizationType( - @javax.annotation.Nullable VisualizationTypeEnum visualizationType) { - this.visualizationType = visualizationType; + @Override + public String toString() { + return String.valueOf(value); } - public ResponseMessage tokens(@javax.annotation.Nullable String tokens) { - this.tokens = tokens; - return this; + public static MessageTypeEnum fromValue(String value) { + for (MessageTypeEnum b : MessageTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Tokens for the response. - * - * @return tokens - */ - @javax.annotation.Nullable - public String getTokens() { - return tokens; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MessageTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MessageTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MessageTypeEnum.fromValue(value); + } } - public void setTokens(@javax.annotation.Nullable String tokens) { - this.tokens = tokens; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MessageTypeEnum.fromValue(value); } - - public ResponseMessage displayTokens(@javax.annotation.Nullable String displayTokens) { - this.displayTokens = displayTokens; - return this; + } + + public static final String SERIALIZED_NAME_MESSAGE_TYPE = "message_type"; + @SerializedName(SERIALIZED_NAME_MESSAGE_TYPE) + @javax.annotation.Nonnull + private MessageTypeEnum messageType; + + /** + * Generated visualization type. + */ + @JsonAdapter(VisualizationTypeEnum.Adapter.class) + public enum VisualizationTypeEnum { + CHART("Chart"), + + TABLE("Table"), + + UNDEFINED("Undefined"); + + private String value; + + VisualizationTypeEnum(String value) { + this.value = value; } - /** - * User friendly tokens for the response. - * - * @return displayTokens - */ - @javax.annotation.Nullable - public String getDisplayTokens() { - return displayTokens; + public String getValue() { + return value; } - public void setDisplayTokens(@javax.annotation.Nullable String displayTokens) { - this.displayTokens = displayTokens; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static VisualizationTypeEnum fromValue(String value) { + for (VisualizationTypeEnum b : VisualizationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - ResponseMessage responseMessage = (ResponseMessage) o; - return Objects.equals(this.sessionIdentifier, responseMessage.sessionIdentifier) - && Objects.equals(this.generationNumber, responseMessage.generationNumber) - && Objects.equals(this.messageType, responseMessage.messageType) - && Objects.equals(this.visualizationType, responseMessage.visualizationType) - && Objects.equals(this.tokens, responseMessage.tokens) - && Objects.equals(this.displayTokens, responseMessage.displayTokens); + } + return null; } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisualizationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisualizationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisualizationTypeEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash( - sessionIdentifier, - generationNumber, - messageType, - visualizationType, - tokens, - displayTokens); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisualizationTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_VISUALIZATION_TYPE = "visualization_type"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_TYPE) + @javax.annotation.Nullable + private VisualizationTypeEnum visualizationType; + + public static final String SERIALIZED_NAME_TOKENS = "tokens"; + @SerializedName(SERIALIZED_NAME_TOKENS) + @javax.annotation.Nullable + private String tokens; + + public static final String SERIALIZED_NAME_DISPLAY_TOKENS = "display_tokens"; + @SerializedName(SERIALIZED_NAME_DISPLAY_TOKENS) + @javax.annotation.Nullable + private String displayTokens; + + public ResponseMessage() { + } + + public ResponseMessage sessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique identifier of the generated response. + * @return sessionIdentifier + */ + @javax.annotation.Nullable + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + + public ResponseMessage generationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generate number of the response. + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + + public ResponseMessage messageType(@javax.annotation.Nonnull MessageTypeEnum messageType) { + this.messageType = messageType; + return this; + } + + /** + * Type of the generated response. + * @return messageType + */ + @javax.annotation.Nonnull + public MessageTypeEnum getMessageType() { + return messageType; + } + + public void setMessageType(@javax.annotation.Nonnull MessageTypeEnum messageType) { + this.messageType = messageType; + } + + + public ResponseMessage visualizationType(@javax.annotation.Nullable VisualizationTypeEnum visualizationType) { + this.visualizationType = visualizationType; + return this; + } + + /** + * Generated visualization type. + * @return visualizationType + */ + @javax.annotation.Nullable + public VisualizationTypeEnum getVisualizationType() { + return visualizationType; + } + + public void setVisualizationType(@javax.annotation.Nullable VisualizationTypeEnum visualizationType) { + this.visualizationType = visualizationType; + } + + + public ResponseMessage tokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + return this; + } + + /** + * Tokens for the response. + * @return tokens + */ + @javax.annotation.Nullable + public String getTokens() { + return tokens; + } + + public void setTokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + } + + + public ResponseMessage displayTokens(@javax.annotation.Nullable String displayTokens) { + this.displayTokens = displayTokens; + return this; + } + + /** + * User friendly tokens for the response. + * @return displayTokens + */ + @javax.annotation.Nullable + public String getDisplayTokens() { + return displayTokens; + } + + public void setDisplayTokens(@javax.annotation.Nullable String displayTokens) { + this.displayTokens = displayTokens; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseMessage {\n"); - sb.append(" sessionIdentifier: ") - .append(toIndentedString(sessionIdentifier)) - .append("\n"); - sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); - sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n"); - sb.append(" visualizationType: ") - .append(toIndentedString(visualizationType)) - .append("\n"); - sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); - sb.append(" displayTokens: ").append(toIndentedString(displayTokens)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ResponseMessage responseMessage = (ResponseMessage) o; + return Objects.equals(this.sessionIdentifier, responseMessage.sessionIdentifier) && + Objects.equals(this.generationNumber, responseMessage.generationNumber) && + Objects.equals(this.messageType, responseMessage.messageType) && + Objects.equals(this.visualizationType, responseMessage.visualizationType) && + Objects.equals(this.tokens, responseMessage.tokens) && + Objects.equals(this.displayTokens, responseMessage.displayTokens); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(sessionIdentifier, generationNumber, messageType, visualizationType, tokens, displayTokens); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("session_identifier"); - openapiFields.add("generation_number"); - openapiFields.add("message_type"); - openapiFields.add("visualization_type"); - openapiFields.add("tokens"); - openapiFields.add("display_tokens"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("message_type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseMessage {\n"); + sb.append(" sessionIdentifier: ").append(toIndentedString(sessionIdentifier)).append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n"); + sb.append(" visualizationType: ").append(toIndentedString(visualizationType)).append("\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); + sb.append(" displayTokens: ").append(toIndentedString(displayTokens)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseMessage - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseMessage.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseMessage is not found in the" - + " empty JSON string", - ResponseMessage.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + openapiFields.add("message_type"); + openapiFields.add("visualization_type"); + openapiFields.add("tokens"); + openapiFields.add("display_tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("message_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseMessage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseMessage is not found in the empty JSON string", ResponseMessage.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseMessage` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseMessage.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseMessage.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseMessage.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("session_identifier") != null - && !jsonObj.get("session_identifier").isJsonNull()) - && !jsonObj.get("session_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `session_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("session_identifier").toString())); - } - if (!jsonObj.get("message_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `message_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("message_type").toString())); - } - // validate the required field `message_type` - MessageTypeEnum.validateJsonElement(jsonObj.get("message_type")); - if ((jsonObj.get("visualization_type") != null - && !jsonObj.get("visualization_type").isJsonNull()) - && !jsonObj.get("visualization_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_type` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_type").toString())); - } - // validate the optional field `visualization_type` - if (jsonObj.get("visualization_type") != null - && !jsonObj.get("visualization_type").isJsonNull()) { - VisualizationTypeEnum.validateJsonElement(jsonObj.get("visualization_type")); - } - if ((jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) - && !jsonObj.get("tokens").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokens` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tokens").toString())); - } - if ((jsonObj.get("display_tokens") != null && !jsonObj.get("display_tokens").isJsonNull()) - && !jsonObj.get("display_tokens").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_tokens` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("display_tokens").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseMessage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseMessage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseMessage.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseMessage value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseMessage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseMessage given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseMessage - * @throws IOException if the JSON string is invalid with respect to ResponseMessage - */ - public static ResponseMessage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseMessage.class); - } - - /** - * Convert an instance of ResponseMessage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("session_identifier") != null && !jsonObj.get("session_identifier").isJsonNull()) && !jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `session_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("session_identifier").toString())); + } + if (!jsonObj.get("message_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message_type").toString())); + } + // validate the required field `message_type` + MessageTypeEnum.validateJsonElement(jsonObj.get("message_type")); + if ((jsonObj.get("visualization_type") != null && !jsonObj.get("visualization_type").isJsonNull()) && !jsonObj.get("visualization_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visualization_type").toString())); + } + // validate the optional field `visualization_type` + if (jsonObj.get("visualization_type") != null && !jsonObj.get("visualization_type").isJsonNull()) { + VisualizationTypeEnum.validateJsonElement(jsonObj.get("visualization_type")); + } + if ((jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) && !jsonObj.get("tokens").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tokens` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tokens").toString())); + } + if ((jsonObj.get("display_tokens") != null && !jsonObj.get("display_tokens").isJsonNull()) && !jsonObj.get("display_tokens").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_tokens` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_tokens").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseMessage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseMessage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseMessage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseMessage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseMessage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseMessage given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseMessage + * @throws IOException if the JSON string is invalid with respect to ResponseMessage + */ + public static ResponseMessage fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseMessage.class); + } + + /** + * Convert an instance of ResponseMessage to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java index 9dd1ce282..a9619cac0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java @@ -4,233 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponsePostUpgradeFailedEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; +import com.thoughtspot.client.JSON; + /** - * Wrapper for the post-upgrade failed entities, as they are inside a 'data' field in the - * response. + * Wrapper for the post-upgrade failed entities, as they are inside a 'data' field in the response. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ResponsePostUpgradeFailedEntities implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DATA = "data"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nonnull - private List data; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; - public ResponsePostUpgradeFailedEntities() {} + public ResponsePostUpgradeFailedEntities() { + } - public ResponsePostUpgradeFailedEntities data( - @javax.annotation.Nonnull List data) { - this.data = data; - return this; - } + public ResponsePostUpgradeFailedEntities data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } - public ResponsePostUpgradeFailedEntities addDataItem(ResponsePostUpgradeFailedEntity dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; + public ResponsePostUpgradeFailedEntities addDataItem(ResponsePostUpgradeFailedEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); } + this.data.add(dataItem); + return this; + } - /** - * Get data - * - * @return data - */ - @javax.annotation.Nonnull - public List getData() { - return data; - } + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } - public void setData(@javax.annotation.Nonnull List data) { - this.data = data; - } + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponsePostUpgradeFailedEntities responsePostUpgradeFailedEntities = - (ResponsePostUpgradeFailedEntities) o; - return Objects.equals(this.data, responsePostUpgradeFailedEntities.data); - } - @Override - public int hashCode() { - return Objects.hash(data); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponsePostUpgradeFailedEntities {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); + ResponsePostUpgradeFailedEntities responsePostUpgradeFailedEntities = (ResponsePostUpgradeFailedEntities) o; + return Objects.equals(this.data, responsePostUpgradeFailedEntities.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponsePostUpgradeFailedEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ResponsePostUpgradeFailedEntities - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponsePostUpgradeFailedEntities.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponsePostUpgradeFailedEntities is" - + " not found in the empty JSON string", - ResponsePostUpgradeFailedEntities.openapiRequiredFields - .toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponsePostUpgradeFailedEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponsePostUpgradeFailedEntities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponsePostUpgradeFailedEntities is not found in the empty JSON string", ResponsePostUpgradeFailedEntities.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponsePostUpgradeFailedEntities.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponsePostUpgradeFailedEntities` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponsePostUpgradeFailedEntities.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponsePostUpgradeFailedEntities` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponsePostUpgradeFailedEntities.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponsePostUpgradeFailedEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ResponsePostUpgradeFailedEntity.validateJsonElement(jsonArraydata.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponsePostUpgradeFailedEntities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponsePostUpgradeFailedEntities' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ResponsePostUpgradeFailedEntities.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponsePostUpgradeFailedEntities value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponsePostUpgradeFailedEntities read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponsePostUpgradeFailedEntities given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponsePostUpgradeFailedEntities - * @throws IOException if the JSON string is invalid with respect to - * ResponsePostUpgradeFailedEntities - */ - public static ResponsePostUpgradeFailedEntities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponsePostUpgradeFailedEntities.class); - } - - /** - * Convert an instance of ResponsePostUpgradeFailedEntities to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponsePostUpgradeFailedEntity.validateJsonElement(jsonArraydata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponsePostUpgradeFailedEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponsePostUpgradeFailedEntities' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponsePostUpgradeFailedEntities.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponsePostUpgradeFailedEntities value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponsePostUpgradeFailedEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponsePostUpgradeFailedEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponsePostUpgradeFailedEntities + * @throws IOException if the JSON string is invalid with respect to ResponsePostUpgradeFailedEntities + */ + public static ResponsePostUpgradeFailedEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponsePostUpgradeFailedEntities.class); + } + + /** + * Convert an instance of ResponsePostUpgradeFailedEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java index 7a10d7b64..de89e4bdb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java @@ -4,281 +4,267 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Unique ID of the worksheet that failed post-upgrade. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponsePostUpgradeFailedEntity implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ERROR = "error"; - - @SerializedName(SERIALIZED_NAME_ERROR) - @javax.annotation.Nonnull - private String error; - - public ResponsePostUpgradeFailedEntity() {} - - public ResponsePostUpgradeFailedEntity id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponsePostUpgradeFailedEntity name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the worksheet that failed post-upgrade. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ResponsePostUpgradeFailedEntity error(@javax.annotation.Nonnull String error) { - this.error = error; - return this; - } - - /** - * Error details related to the post-upgrade failure. - * - * @return error - */ - @javax.annotation.Nonnull - public String getError() { - return error; - } - - public void setError(@javax.annotation.Nonnull String error) { - this.error = error; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponsePostUpgradeFailedEntity responsePostUpgradeFailedEntity = - (ResponsePostUpgradeFailedEntity) o; - return Objects.equals(this.id, responsePostUpgradeFailedEntity.id) - && Objects.equals(this.name, responsePostUpgradeFailedEntity.name) - && Objects.equals(this.error, responsePostUpgradeFailedEntity.error); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, error); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponsePostUpgradeFailedEntity {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Unique ID of the worksheet that failed post-upgrade. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponsePostUpgradeFailedEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public ResponsePostUpgradeFailedEntity() { + } + + public ResponsePostUpgradeFailedEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponsePostUpgradeFailedEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the worksheet that failed post-upgrade. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ResponsePostUpgradeFailedEntity error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error details related to the post-upgrade failure. + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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"); + ResponsePostUpgradeFailedEntity responsePostUpgradeFailedEntity = (ResponsePostUpgradeFailedEntity) o; + return Objects.equals(this.id, responsePostUpgradeFailedEntity.id) && + Objects.equals(this.name, responsePostUpgradeFailedEntity.name) && + Objects.equals(this.error, responsePostUpgradeFailedEntity.error); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponsePostUpgradeFailedEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ResponsePostUpgradeFailedEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponsePostUpgradeFailedEntity.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponsePostUpgradeFailedEntity is" - + " not found in the empty JSON string", - ResponsePostUpgradeFailedEntity.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponsePostUpgradeFailedEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponsePostUpgradeFailedEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponsePostUpgradeFailedEntity is not found in the empty JSON string", ResponsePostUpgradeFailedEntity.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponsePostUpgradeFailedEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponsePostUpgradeFailedEntity` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponsePostUpgradeFailedEntity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponsePostUpgradeFailedEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponsePostUpgradeFailedEntity.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponsePostUpgradeFailedEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `error` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("error").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponsePostUpgradeFailedEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponsePostUpgradeFailedEntity' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ResponsePostUpgradeFailedEntity.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponsePostUpgradeFailedEntity value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponsePostUpgradeFailedEntity read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponsePostUpgradeFailedEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponsePostUpgradeFailedEntity - * @throws IOException if the JSON string is invalid with respect to - * ResponsePostUpgradeFailedEntity - */ - public static ResponsePostUpgradeFailedEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponsePostUpgradeFailedEntity.class); - } - - /** - * Convert an instance of ResponsePostUpgradeFailedEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponsePostUpgradeFailedEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponsePostUpgradeFailedEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponsePostUpgradeFailedEntity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponsePostUpgradeFailedEntity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponsePostUpgradeFailedEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponsePostUpgradeFailedEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponsePostUpgradeFailedEntity + * @throws IOException if the JSON string is invalid with respect to ResponsePostUpgradeFailedEntity + */ + public static ResponsePostUpgradeFailedEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponsePostUpgradeFailedEntity.class); + } + + /** + * Convert an instance of ResponsePostUpgradeFailedEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java index 07bb4c7f9..ed3a243b5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java @@ -4,738 +4,668 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Author; +import com.thoughtspot.client.model.Frequency; +import com.thoughtspot.client.model.LiveboardOptions; +import com.thoughtspot.client.model.MetadataResponse; +import com.thoughtspot.client.model.PdfOptions; +import com.thoughtspot.client.model.RecipientDetails; +import com.thoughtspot.client.model.ResponseScheduleRun; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ResponseSchedule */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseSchedule implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AUTHOR = "author"; - - @SerializedName(SERIALIZED_NAME_AUTHOR) - @javax.annotation.Nonnull - private Author author; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Object creationTimeInMillis; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; - - @SerializedName(SERIALIZED_NAME_FILE_FORMAT) - @javax.annotation.Nonnull - private String fileFormat; - - public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; - - @SerializedName(SERIALIZED_NAME_FREQUENCY) - @javax.annotation.Nonnull - private Frequency frequency; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) - @javax.annotation.Nullable - private LiveboardOptions liveboardOptions; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private MetadataResponse metadata; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; - - @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) - @javax.annotation.Nullable - private PdfOptions pdfOptions; - - public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; - - @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) - @javax.annotation.Nonnull - private RecipientDetails recipientDetails; - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private String status; - - public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; - - @SerializedName(SERIALIZED_NAME_TIME_ZONE) - @javax.annotation.Nonnull - private String timeZone; - - public static final String SERIALIZED_NAME_HISTORY_RUNS = "history_runs"; - - @SerializedName(SERIALIZED_NAME_HISTORY_RUNS) - @javax.annotation.Nullable - private List historyRuns; - - public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; - - @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) - @javax.annotation.Nullable - private String personalisedViewId; - - public ResponseSchedule() {} - - public ResponseSchedule author(@javax.annotation.Nonnull Author author) { - this.author = author; - return this; - } - - /** - * Get author - * - * @return author - */ - @javax.annotation.Nonnull - public Author getAuthor() { - return author; - } - - public void setAuthor(@javax.annotation.Nonnull Author author) { - this.author = author; - } - - public ResponseSchedule creationTimeInMillis( - @javax.annotation.Nonnull Object creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Schedule creation time in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nonnull - public Object getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nonnull Object creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public ResponseSchedule description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the job. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public ResponseSchedule fileFormat(@javax.annotation.Nonnull String fileFormat) { - this.fileFormat = fileFormat; - return this; - } - - /** - * Export file format. - * - * @return fileFormat - */ - @javax.annotation.Nonnull - public String getFileFormat() { - return fileFormat; - } - - public void setFileFormat(@javax.annotation.Nonnull String fileFormat) { - this.fileFormat = fileFormat; - } - - public ResponseSchedule frequency(@javax.annotation.Nonnull Frequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get frequency - * - * @return frequency - */ - @javax.annotation.Nonnull - public Frequency getFrequency() { - return frequency; - } - - public void setFrequency(@javax.annotation.Nonnull Frequency frequency) { - this.frequency = frequency; - } - - public ResponseSchedule id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * GUID of the scheduled job. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponseSchedule liveboardOptions( - @javax.annotation.Nullable LiveboardOptions liveboardOptions) { - this.liveboardOptions = liveboardOptions; - return this; - } - - /** - * Get liveboardOptions - * - * @return liveboardOptions - */ - @javax.annotation.Nullable - public LiveboardOptions getLiveboardOptions() { - return liveboardOptions; - } - public void setLiveboardOptions(@javax.annotation.Nullable LiveboardOptions liveboardOptions) { - this.liveboardOptions = liveboardOptions; - } - - public ResponseSchedule metadata(@javax.annotation.Nonnull MetadataResponse metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get metadata - * - * @return metadata - */ - @javax.annotation.Nonnull - public MetadataResponse getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nonnull MetadataResponse metadata) { - this.metadata = metadata; - } - - public ResponseSchedule name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the scheduled job. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ResponseSchedule pdfOptions(@javax.annotation.Nullable PdfOptions pdfOptions) { - this.pdfOptions = pdfOptions; - return this; - } - - /** - * Get pdfOptions - * - * @return pdfOptions - */ - @javax.annotation.Nullable - public PdfOptions getPdfOptions() { - return pdfOptions; - } - - public void setPdfOptions(@javax.annotation.Nullable PdfOptions pdfOptions) { - this.pdfOptions = pdfOptions; - } - - public ResponseSchedule recipientDetails( - @javax.annotation.Nonnull RecipientDetails recipientDetails) { - this.recipientDetails = recipientDetails; - return this; - } - - /** - * Get recipientDetails - * - * @return recipientDetails - */ - @javax.annotation.Nonnull - public RecipientDetails getRecipientDetails() { - return recipientDetails; - } - - public void setRecipientDetails(@javax.annotation.Nonnull RecipientDetails recipientDetails) { - this.recipientDetails = recipientDetails; - } - - public ResponseSchedule status(@javax.annotation.Nullable String status) { - this.status = status; - return this; - } - - /** - * Status of the job - * - * @return status - */ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; - } - - public ResponseSchedule timeZone(@javax.annotation.Nonnull String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Time zone - * - * @return timeZone - */ - @javax.annotation.Nonnull - public String getTimeZone() { - return timeZone; - } - - public void setTimeZone(@javax.annotation.Nonnull String timeZone) { - this.timeZone = timeZone; - } - - public ResponseSchedule historyRuns( - @javax.annotation.Nullable List historyRuns) { - this.historyRuns = historyRuns; - return this; - } - - public ResponseSchedule addHistoryRunsItem(ResponseScheduleRun historyRunsItem) { - if (this.historyRuns == null) { - this.historyRuns = new ArrayList<>(); - } - this.historyRuns.add(historyRunsItem); - return this; - } - - /** - * Schedule runs history records. - * - * @return historyRuns - */ - @javax.annotation.Nullable - public List getHistoryRuns() { - return historyRuns; - } - - public void setHistoryRuns(@javax.annotation.Nullable List historyRuns) { - this.historyRuns = historyRuns; - } - - public ResponseSchedule personalisedViewId( - @javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; - return this; - } - - /** - * Personalised view id of the liveboard to be scheduled. - * - * @return personalisedViewId - */ - @javax.annotation.Nullable - public String getPersonalisedViewId() { - return personalisedViewId; - } - - public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseSchedule responseSchedule = (ResponseSchedule) o; - return Objects.equals(this.author, responseSchedule.author) - && Objects.equals(this.creationTimeInMillis, responseSchedule.creationTimeInMillis) - && Objects.equals(this.description, responseSchedule.description) - && Objects.equals(this.fileFormat, responseSchedule.fileFormat) - && Objects.equals(this.frequency, responseSchedule.frequency) - && Objects.equals(this.id, responseSchedule.id) - && Objects.equals(this.liveboardOptions, responseSchedule.liveboardOptions) - && Objects.equals(this.metadata, responseSchedule.metadata) - && Objects.equals(this.name, responseSchedule.name) - && Objects.equals(this.pdfOptions, responseSchedule.pdfOptions) - && Objects.equals(this.recipientDetails, responseSchedule.recipientDetails) - && Objects.equals(this.status, responseSchedule.status) - && Objects.equals(this.timeZone, responseSchedule.timeZone) - && Objects.equals(this.historyRuns, responseSchedule.historyRuns) - && Objects.equals(this.personalisedViewId, responseSchedule.personalisedViewId); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - author, - creationTimeInMillis, - description, - fileFormat, - frequency, - id, - liveboardOptions, - metadata, - name, - pdfOptions, - recipientDetails, - status, - timeZone, - historyRuns, - personalisedViewId); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseSchedule {\n"); - sb.append(" author: ").append(toIndentedString(author)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); - sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); - sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); - sb.append(" historyRuns: ").append(toIndentedString(historyRuns)).append("\n"); - sb.append(" personalisedViewId: ") - .append(toIndentedString(personalisedViewId)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("author"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("description"); - openapiFields.add("file_format"); - openapiFields.add("frequency"); - openapiFields.add("id"); - openapiFields.add("liveboard_options"); - openapiFields.add("metadata"); - openapiFields.add("name"); - openapiFields.add("pdf_options"); - openapiFields.add("recipient_details"); - openapiFields.add("status"); - openapiFields.add("time_zone"); - openapiFields.add("history_runs"); - openapiFields.add("personalised_view_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("author"); - openapiRequiredFields.add("creation_time_in_millis"); - openapiRequiredFields.add("file_format"); - openapiRequiredFields.add("frequency"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("recipient_details"); - openapiRequiredFields.add("time_zone"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseSchedule - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseSchedule.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseSchedule is not found in the" - + " empty JSON string", - ResponseSchedule.openapiRequiredFields.toString())); - } +/** + * ResponseSchedule + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseSchedule implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nonnull + private Author author; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Object creationTimeInMillis; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nonnull + private String fileFormat; + + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nonnull + private Frequency frequency; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) + @javax.annotation.Nullable + private LiveboardOptions liveboardOptions; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private MetadataResponse metadata; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private PdfOptions pdfOptions; + + public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) + @javax.annotation.Nonnull + private RecipientDetails recipientDetails; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private String status; + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nonnull + private String timeZone; + + public static final String SERIALIZED_NAME_HISTORY_RUNS = "history_runs"; + @SerializedName(SERIALIZED_NAME_HISTORY_RUNS) + @javax.annotation.Nullable + private List historyRuns; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public ResponseSchedule() { + } + + public ResponseSchedule author(@javax.annotation.Nonnull Author author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + */ + @javax.annotation.Nonnull + public Author getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nonnull Author author) { + this.author = author; + } + + + public ResponseSchedule creationTimeInMillis(@javax.annotation.Nonnull Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Schedule creation time in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Object getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public ResponseSchedule description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the job. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ResponseSchedule fileFormat(@javax.annotation.Nonnull String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * @return fileFormat + */ + @javax.annotation.Nonnull + public String getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nonnull String fileFormat) { + this.fileFormat = fileFormat; + } + + + public ResponseSchedule frequency(@javax.annotation.Nonnull Frequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get frequency + * @return frequency + */ + @javax.annotation.Nonnull + public Frequency getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nonnull Frequency frequency) { + this.frequency = frequency; + } + + + public ResponseSchedule id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * GUID of the scheduled job. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponseSchedule liveboardOptions(@javax.annotation.Nullable LiveboardOptions liveboardOptions) { + this.liveboardOptions = liveboardOptions; + return this; + } + + /** + * Get liveboardOptions + * @return liveboardOptions + */ + @javax.annotation.Nullable + public LiveboardOptions getLiveboardOptions() { + return liveboardOptions; + } + + public void setLiveboardOptions(@javax.annotation.Nullable LiveboardOptions liveboardOptions) { + this.liveboardOptions = liveboardOptions; + } + + + public ResponseSchedule metadata(@javax.annotation.Nonnull MetadataResponse metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nonnull + public MetadataResponse getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull MetadataResponse metadata) { + this.metadata = metadata; + } + + + public ResponseSchedule name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the scheduled job. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ResponseSchedule pdfOptions(@javax.annotation.Nullable PdfOptions pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * Get pdfOptions + * @return pdfOptions + */ + @javax.annotation.Nullable + public PdfOptions getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable PdfOptions pdfOptions) { + this.pdfOptions = pdfOptions; + } + + + public ResponseSchedule recipientDetails(@javax.annotation.Nonnull RecipientDetails recipientDetails) { + this.recipientDetails = recipientDetails; + return this; + } + + /** + * Get recipientDetails + * @return recipientDetails + */ + @javax.annotation.Nonnull + public RecipientDetails getRecipientDetails() { + return recipientDetails; + } + + public void setRecipientDetails(@javax.annotation.Nonnull RecipientDetails recipientDetails) { + this.recipientDetails = recipientDetails; + } + + + public ResponseSchedule status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Status of the job + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public ResponseSchedule timeZone(@javax.annotation.Nonnull String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Time zone + * @return timeZone + */ + @javax.annotation.Nonnull + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nonnull String timeZone) { + this.timeZone = timeZone; + } + + + public ResponseSchedule historyRuns(@javax.annotation.Nullable List historyRuns) { + this.historyRuns = historyRuns; + return this; + } + + public ResponseSchedule addHistoryRunsItem(ResponseScheduleRun historyRunsItem) { + if (this.historyRuns == null) { + this.historyRuns = new ArrayList<>(); + } + this.historyRuns.add(historyRunsItem); + return this; + } + + /** + * Schedule runs history records. + * @return historyRuns + */ + @javax.annotation.Nullable + public List getHistoryRuns() { + return historyRuns; + } + + public void setHistoryRuns(@javax.annotation.Nullable List historyRuns) { + this.historyRuns = historyRuns; + } + + + public ResponseSchedule personalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Personalised view id of the liveboard to be scheduled. + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseSchedule responseSchedule = (ResponseSchedule) o; + return Objects.equals(this.author, responseSchedule.author) && + Objects.equals(this.creationTimeInMillis, responseSchedule.creationTimeInMillis) && + Objects.equals(this.description, responseSchedule.description) && + Objects.equals(this.fileFormat, responseSchedule.fileFormat) && + Objects.equals(this.frequency, responseSchedule.frequency) && + Objects.equals(this.id, responseSchedule.id) && + Objects.equals(this.liveboardOptions, responseSchedule.liveboardOptions) && + Objects.equals(this.metadata, responseSchedule.metadata) && + Objects.equals(this.name, responseSchedule.name) && + Objects.equals(this.pdfOptions, responseSchedule.pdfOptions) && + Objects.equals(this.recipientDetails, responseSchedule.recipientDetails) && + Objects.equals(this.status, responseSchedule.status) && + Objects.equals(this.timeZone, responseSchedule.timeZone) && + Objects.equals(this.historyRuns, responseSchedule.historyRuns) && + Objects.equals(this.personalisedViewId, responseSchedule.personalisedViewId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(author, creationTimeInMillis, description, fileFormat, frequency, id, liveboardOptions, metadata, name, pdfOptions, recipientDetails, status, timeZone, historyRuns, personalisedViewId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseSchedule {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" historyRuns: ").append(toIndentedString(historyRuns)).append("\n"); + sb.append(" personalisedViewId: ").append(toIndentedString(personalisedViewId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("author"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("description"); + openapiFields.add("file_format"); + openapiFields.add("frequency"); + openapiFields.add("id"); + openapiFields.add("liveboard_options"); + openapiFields.add("metadata"); + openapiFields.add("name"); + openapiFields.add("pdf_options"); + openapiFields.add("recipient_details"); + openapiFields.add("status"); + openapiFields.add("time_zone"); + openapiFields.add("history_runs"); + openapiFields.add("personalised_view_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("author"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("file_format"); + openapiRequiredFields.add("frequency"); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("recipient_details"); + openapiRequiredFields.add("time_zone"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseSchedule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseSchedule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseSchedule is not found in the empty JSON string", ResponseSchedule.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseSchedule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseSchedule` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseSchedule.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseSchedule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseSchedule.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseSchedule.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `author` - Author.validateJsonElement(jsonObj.get("author")); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (!jsonObj.get("file_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_format").toString())); - } - // validate the required field `frequency` - Frequency.validateJsonElement(jsonObj.get("frequency")); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - // validate the optional field `liveboard_options` - if (jsonObj.get("liveboard_options") != null - && !jsonObj.get("liveboard_options").isJsonNull()) { - LiveboardOptions.validateJsonElement(jsonObj.get("liveboard_options")); - } - // validate the required field `metadata` - MetadataResponse.validateJsonElement(jsonObj.get("metadata")); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - // validate the optional field `pdf_options` - if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { - PdfOptions.validateJsonElement(jsonObj.get("pdf_options")); - } - // validate the required field `recipient_details` - RecipientDetails.validateJsonElement(jsonObj.get("recipient_details")); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) - && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - if (!jsonObj.get("time_zone").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `time_zone` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("time_zone").toString())); - } - if (jsonObj.get("history_runs") != null && !jsonObj.get("history_runs").isJsonNull()) { - JsonArray jsonArrayhistoryRuns = jsonObj.getAsJsonArray("history_runs"); - if (jsonArrayhistoryRuns != null) { - // ensure the json data is an array - if (!jsonObj.get("history_runs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `history_runs` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("history_runs").toString())); - } - - // validate the optional field `history_runs` (array) - for (int i = 0; i < jsonArrayhistoryRuns.size(); i++) { - ResponseScheduleRun.validateJsonElement(jsonArrayhistoryRuns.get(i)); - } - ; - } + // validate the required field `author` + Author.validateJsonElement(jsonObj.get("author")); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_format").toString())); + } + // validate the required field `frequency` + Frequency.validateJsonElement(jsonObj.get("frequency")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + // validate the optional field `liveboard_options` + if (jsonObj.get("liveboard_options") != null && !jsonObj.get("liveboard_options").isJsonNull()) { + LiveboardOptions.validateJsonElement(jsonObj.get("liveboard_options")); + } + // validate the required field `metadata` + MetadataResponse.validateJsonElement(jsonObj.get("metadata")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + PdfOptions.validateJsonElement(jsonObj.get("pdf_options")); + } + // validate the required field `recipient_details` + RecipientDetails.validateJsonElement(jsonObj.get("recipient_details")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_zone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_zone").toString())); + } + if (jsonObj.get("history_runs") != null && !jsonObj.get("history_runs").isJsonNull()) { + JsonArray jsonArrayhistoryRuns = jsonObj.getAsJsonArray("history_runs"); + if (jsonArrayhistoryRuns != null) { + // ensure the json data is an array + if (!jsonObj.get("history_runs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `history_runs` to be an array in the JSON string but got `%s`", jsonObj.get("history_runs").toString())); + } + + // validate the optional field `history_runs` (array) + for (int i = 0; i < jsonArrayhistoryRuns.size(); i++) { + ResponseScheduleRun.validateJsonElement(jsonArrayhistoryRuns.get(i)); + }; } - if ((jsonObj.get("personalised_view_id") != null - && !jsonObj.get("personalised_view_id").isJsonNull()) - && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `personalised_view_id` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("personalised_view_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseSchedule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseSchedule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseSchedule.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseSchedule value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseSchedule read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseSchedule given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseSchedule - * @throws IOException if the JSON string is invalid with respect to ResponseSchedule - */ - public static ResponseSchedule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseSchedule.class); - } - - /** - * Convert an instance of ResponseSchedule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + if ((jsonObj.get("personalised_view_id") != null && !jsonObj.get("personalised_view_id").isJsonNull()) && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `personalised_view_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseSchedule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseSchedule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseSchedule.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseSchedule value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseSchedule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseSchedule given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseSchedule + * @throws IOException if the JSON string is invalid with respect to ResponseSchedule + */ + public static ResponseSchedule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseSchedule.class); + } + + /** + * Convert an instance of ResponseSchedule to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java index 5adab4e0f..480503829 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java @@ -4,354 +4,334 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Schedule run response object */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseScheduleRun implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_START_TIME_IN_MILLIS = "start_time_in_millis"; - @SerializedName(SERIALIZED_NAME_START_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Integer startTimeInMillis; - - public static final String SERIALIZED_NAME_END_TIME_IN_MILLIS = "end_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_END_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Integer endTimeInMillis; - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nonnull - private String status; - - public static final String SERIALIZED_NAME_DETAIL = "detail"; - - @SerializedName(SERIALIZED_NAME_DETAIL) - @javax.annotation.Nullable - private String detail; - - public ResponseScheduleRun() {} - - public ResponseScheduleRun id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * GUID of the scheduled job. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponseScheduleRun startTimeInMillis( - @javax.annotation.Nonnull Integer startTimeInMillis) { - this.startTimeInMillis = startTimeInMillis; - return this; - } - - /** - * Schedule run start time in milliseconds. - * - * @return startTimeInMillis - */ - @javax.annotation.Nonnull - public Integer getStartTimeInMillis() { - return startTimeInMillis; - } - - public void setStartTimeInMillis(@javax.annotation.Nonnull Integer startTimeInMillis) { - this.startTimeInMillis = startTimeInMillis; - } - - public ResponseScheduleRun endTimeInMillis(@javax.annotation.Nonnull Integer endTimeInMillis) { - this.endTimeInMillis = endTimeInMillis; - return this; - } - - /** - * Schedule run end time in milliseconds. - * - * @return endTimeInMillis - */ - @javax.annotation.Nonnull - public Integer getEndTimeInMillis() { - return endTimeInMillis; - } - - public void setEndTimeInMillis(@javax.annotation.Nonnull Integer endTimeInMillis) { - this.endTimeInMillis = endTimeInMillis; - } - - public ResponseScheduleRun status(@javax.annotation.Nonnull String status) { - this.status = status; - return this; - } - - /** - * Status of the schedule run. - * - * @return status - */ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nonnull String status) { - this.status = status; - } - - public ResponseScheduleRun detail(@javax.annotation.Nullable String detail) { - this.detail = detail; - return this; - } - - /** - * Message details related to the schedule run. - * - * @return detail - */ - @javax.annotation.Nullable - public String getDetail() { - return detail; - } - - public void setDetail(@javax.annotation.Nullable String detail) { - this.detail = detail; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseScheduleRun responseScheduleRun = (ResponseScheduleRun) o; - return Objects.equals(this.id, responseScheduleRun.id) - && Objects.equals(this.startTimeInMillis, responseScheduleRun.startTimeInMillis) - && Objects.equals(this.endTimeInMillis, responseScheduleRun.endTimeInMillis) - && Objects.equals(this.status, responseScheduleRun.status) - && Objects.equals(this.detail, responseScheduleRun.detail); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, startTimeInMillis, endTimeInMillis, status, detail); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * Schedule run response object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseScheduleRun implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_START_TIME_IN_MILLIS = "start_time_in_millis"; + @SerializedName(SERIALIZED_NAME_START_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Integer startTimeInMillis; + + public static final String SERIALIZED_NAME_END_TIME_IN_MILLIS = "end_time_in_millis"; + @SerializedName(SERIALIZED_NAME_END_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Integer endTimeInMillis; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public static final String SERIALIZED_NAME_DETAIL = "detail"; + @SerializedName(SERIALIZED_NAME_DETAIL) + @javax.annotation.Nullable + private String detail; + + public ResponseScheduleRun() { + } + + public ResponseScheduleRun id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * GUID of the scheduled job. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponseScheduleRun startTimeInMillis(@javax.annotation.Nonnull Integer startTimeInMillis) { + this.startTimeInMillis = startTimeInMillis; + return this; + } + + /** + * Schedule run start time in milliseconds. + * @return startTimeInMillis + */ + @javax.annotation.Nonnull + public Integer getStartTimeInMillis() { + return startTimeInMillis; + } + + public void setStartTimeInMillis(@javax.annotation.Nonnull Integer startTimeInMillis) { + this.startTimeInMillis = startTimeInMillis; + } + + + public ResponseScheduleRun endTimeInMillis(@javax.annotation.Nonnull Integer endTimeInMillis) { + this.endTimeInMillis = endTimeInMillis; + return this; + } + + /** + * Schedule run end time in milliseconds. + * @return endTimeInMillis + */ + @javax.annotation.Nonnull + public Integer getEndTimeInMillis() { + return endTimeInMillis; + } + + public void setEndTimeInMillis(@javax.annotation.Nonnull Integer endTimeInMillis) { + this.endTimeInMillis = endTimeInMillis; + } + + + public ResponseScheduleRun status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Status of the schedule run. + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public ResponseScheduleRun detail(@javax.annotation.Nullable String detail) { + this.detail = detail; + return this; + } + + /** + * Message details related to the schedule run. + * @return detail + */ + @javax.annotation.Nullable + public String getDetail() { + return detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = detail; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseScheduleRun {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" startTimeInMillis: ") - .append(toIndentedString(startTimeInMillis)) - .append("\n"); - sb.append(" endTimeInMillis: ").append(toIndentedString(endTimeInMillis)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ResponseScheduleRun responseScheduleRun = (ResponseScheduleRun) o; + return Objects.equals(this.id, responseScheduleRun.id) && + Objects.equals(this.startTimeInMillis, responseScheduleRun.startTimeInMillis) && + Objects.equals(this.endTimeInMillis, responseScheduleRun.endTimeInMillis) && + Objects.equals(this.status, responseScheduleRun.status) && + Objects.equals(this.detail, responseScheduleRun.detail); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, startTimeInMillis, endTimeInMillis, status, detail); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("start_time_in_millis"); - openapiFields.add("end_time_in_millis"); - openapiFields.add("status"); - openapiFields.add("detail"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("start_time_in_millis"); - openapiRequiredFields.add("end_time_in_millis"); - openapiRequiredFields.add("status"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseScheduleRun {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" startTimeInMillis: ").append(toIndentedString(startTimeInMillis)).append("\n"); + sb.append(" endTimeInMillis: ").append(toIndentedString(endTimeInMillis)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseScheduleRun - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseScheduleRun.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseScheduleRun is not found in" - + " the empty JSON string", - ResponseScheduleRun.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("start_time_in_millis"); + openapiFields.add("end_time_in_millis"); + openapiFields.add("status"); + openapiFields.add("detail"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("start_time_in_millis"); + openapiRequiredFields.add("end_time_in_millis"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseScheduleRun + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseScheduleRun.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseScheduleRun is not found in the empty JSON string", ResponseScheduleRun.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseScheduleRun.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseScheduleRun` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseScheduleRun.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseScheduleRun` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseScheduleRun.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseScheduleRun.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) - && !jsonObj.get("detail").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `detail` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("detail").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseScheduleRun.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseScheduleRun' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseScheduleRun.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseScheduleRun value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseScheduleRun read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseScheduleRun given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseScheduleRun - * @throws IOException if the JSON string is invalid with respect to ResponseScheduleRun - */ - public static ResponseScheduleRun fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseScheduleRun.class); - } - - /** - * Convert an instance of ResponseScheduleRun to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) && !jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `detail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("detail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseScheduleRun.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseScheduleRun' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseScheduleRun.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseScheduleRun value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseScheduleRun read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseScheduleRun given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseScheduleRun + * @throws IOException if the JSON string is invalid with respect to ResponseScheduleRun + */ + public static ResponseScheduleRun fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseScheduleRun.class); + } + + /** + * Convert an instance of ResponseScheduleRun to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java index 072ae875f..8219ead1d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java @@ -4,226 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseSuccessfulEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; +import com.thoughtspot.client.JSON; + /** * Wrapper for the successful entities, as they are inside a 'data' field in the response. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ResponseSuccessfulEntities implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DATA = "data"; + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nonnull - private List data; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; - public ResponseSuccessfulEntities() {} + public ResponseSuccessfulEntities() { + } - public ResponseSuccessfulEntities data( - @javax.annotation.Nonnull List data) { - this.data = data; - return this; - } + public ResponseSuccessfulEntities data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } - public ResponseSuccessfulEntities addDataItem(ResponseSuccessfulEntity dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; + public ResponseSuccessfulEntities addDataItem(ResponseSuccessfulEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); } + this.data.add(dataItem); + return this; + } - /** - * Get data - * - * @return data - */ - @javax.annotation.Nonnull - public List getData() { - return data; - } + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } - public void setData(@javax.annotation.Nonnull List data) { - this.data = data; - } + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseSuccessfulEntities responseSuccessfulEntities = (ResponseSuccessfulEntities) o; - return Objects.equals(this.data, responseSuccessfulEntities.data); - } - @Override - public int hashCode() { - return Objects.hash(data); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseSuccessfulEntities {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); + ResponseSuccessfulEntities responseSuccessfulEntities = (ResponseSuccessfulEntities) o; + return Objects.equals(this.data, responseSuccessfulEntities.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseSuccessfulEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseSuccessfulEntities - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseSuccessfulEntities.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseSuccessfulEntities is not" - + " found in the empty JSON string", - ResponseSuccessfulEntities.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseSuccessfulEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseSuccessfulEntities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseSuccessfulEntities is not found in the empty JSON string", ResponseSuccessfulEntities.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseSuccessfulEntities.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseSuccessfulEntities` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseSuccessfulEntities.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseSuccessfulEntities` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseSuccessfulEntities.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseSuccessfulEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ResponseSuccessfulEntity.validateJsonElement(jsonArraydata.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseSuccessfulEntities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseSuccessfulEntities' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseSuccessfulEntities.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseSuccessfulEntities value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseSuccessfulEntities read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseSuccessfulEntities given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseSuccessfulEntities - * @throws IOException if the JSON string is invalid with respect to ResponseSuccessfulEntities - */ - public static ResponseSuccessfulEntities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseSuccessfulEntities.class); - } - - /** - * Convert an instance of ResponseSuccessfulEntities to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponseSuccessfulEntity.validateJsonElement(jsonArraydata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseSuccessfulEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseSuccessfulEntities' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseSuccessfulEntities.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseSuccessfulEntities value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseSuccessfulEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseSuccessfulEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseSuccessfulEntities + * @throws IOException if the JSON string is invalid with respect to ResponseSuccessfulEntities + */ + public static ResponseSuccessfulEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseSuccessfulEntities.class); + } + + /** + * Convert an instance of ResponseSuccessfulEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java index d9ccfacff..8ba84438b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java @@ -4,240 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Unique ID of the worksheet. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseSuccessfulEntity implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public ResponseSuccessfulEntity() {} - - public ResponseSuccessfulEntity id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public ResponseSuccessfulEntity name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the worksheet. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseSuccessfulEntity responseSuccessfulEntity = (ResponseSuccessfulEntity) o; - return Objects.equals(this.id, responseSuccessfulEntity.id) - && Objects.equals(this.name, responseSuccessfulEntity.name); +/** + * Unique ID of the worksheet. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseSuccessfulEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ResponseSuccessfulEntity() { + } + + public ResponseSuccessfulEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ResponseSuccessfulEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the worksheet. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(id, name); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseSuccessfulEntity {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); + ResponseSuccessfulEntity responseSuccessfulEntity = (ResponseSuccessfulEntity) o; + return Objects.equals(this.id, responseSuccessfulEntity.id) && + Objects.equals(this.name, responseSuccessfulEntity.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseSuccessfulEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseSuccessfulEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseSuccessfulEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseSuccessfulEntity is not found in the empty JSON string", ResponseSuccessfulEntity.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseSuccessfulEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseSuccessfulEntity.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseSuccessfulEntity is not found" - + " in the empty JSON string", - ResponseSuccessfulEntity.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseSuccessfulEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseSuccessfulEntity` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseSuccessfulEntity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseSuccessfulEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseSuccessfulEntity.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseSuccessfulEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseSuccessfulEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseSuccessfulEntity' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ResponseSuccessfulEntity.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseSuccessfulEntity value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseSuccessfulEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseSuccessfulEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseSuccessfulEntity - * @throws IOException if the JSON string is invalid with respect to ResponseSuccessfulEntity - */ - public static ResponseSuccessfulEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseSuccessfulEntity.class); - } - - /** - * Convert an instance of ResponseSuccessfulEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseSuccessfulEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseSuccessfulEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseSuccessfulEntity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseSuccessfulEntity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseSuccessfulEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ResponseSuccessfulEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseSuccessfulEntity + * @throws IOException if the JSON string is invalid with respect to ResponseSuccessfulEntity + */ + public static ResponseSuccessfulEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseSuccessfulEntity.class); + } + + /** + * Convert an instance of ResponseSuccessfulEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java index aceadaac2..342980116 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java @@ -4,530 +4,469 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseFailedEntities; +import com.thoughtspot.client.model.ResponseIncompleteEntities; +import com.thoughtspot.client.model.ResponsePostUpgradeFailedEntities; +import com.thoughtspot.client.model.ResponseSuccessfulEntities; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Name of the conversion process, which involves converting worksheets to models. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ResponseWorksheetToModelConversion implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_SUCCESS_COUNT = "success_count"; - - @SerializedName(SERIALIZED_NAME_SUCCESS_COUNT) - @javax.annotation.Nonnull - private Integer successCount; - - public static final String SERIALIZED_NAME_FAILURE_COUNT = "failure_count"; - - @SerializedName(SERIALIZED_NAME_FAILURE_COUNT) - @javax.annotation.Nonnull - private Integer failureCount; - - public static final String SERIALIZED_NAME_INCOMPLETE_COUNT = "incomplete_count"; - - @SerializedName(SERIALIZED_NAME_INCOMPLETE_COUNT) - @javax.annotation.Nonnull - private Integer incompleteCount; - - public static final String SERIALIZED_NAME_POST_UPGRADE_FAILED_COUNT = - "post_upgrade_failed_count"; - - @SerializedName(SERIALIZED_NAME_POST_UPGRADE_FAILED_COUNT) - @javax.annotation.Nonnull - private Integer postUpgradeFailedCount; - - public static final String SERIALIZED_NAME_TOTAL_TIME_IN_MILLIS = "total_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_TOTAL_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Integer totalTimeInMillis; - - public static final String SERIALIZED_NAME_SUCCESSFUL_ENTITIES = "successful_entities"; - - @SerializedName(SERIALIZED_NAME_SUCCESSFUL_ENTITIES) - @javax.annotation.Nonnull - private ResponseSuccessfulEntities successfulEntities; - - public static final String SERIALIZED_NAME_FAILED_ENTITIES = "failed_entities"; - - @SerializedName(SERIALIZED_NAME_FAILED_ENTITIES) - @javax.annotation.Nonnull - private ResponseFailedEntities failedEntities; - - public static final String SERIALIZED_NAME_INCOMPLETE_ENTITIES = "incomplete_entities"; - - @SerializedName(SERIALIZED_NAME_INCOMPLETE_ENTITIES) - @javax.annotation.Nonnull - private ResponseIncompleteEntities incompleteEntities; - - public static final String SERIALIZED_NAME_POST_UPGRADE_FAILED_ENTITIES = - "post_upgrade_failed_entities"; - - @SerializedName(SERIALIZED_NAME_POST_UPGRADE_FAILED_ENTITIES) - @javax.annotation.Nonnull - private ResponsePostUpgradeFailedEntities postUpgradeFailedEntities; - - public ResponseWorksheetToModelConversion() {} - - public ResponseWorksheetToModelConversion name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ResponseWorksheetToModelConversion successCount( - @javax.annotation.Nonnull Integer successCount) { - this.successCount = successCount; - return this; - } - - /** - * The number of worksheets successfully converted to models. - * - * @return successCount - */ - @javax.annotation.Nonnull - public Integer getSuccessCount() { - return successCount; - } - - public void setSuccessCount(@javax.annotation.Nonnull Integer successCount) { - this.successCount = successCount; - } - - public ResponseWorksheetToModelConversion failureCount( - @javax.annotation.Nonnull Integer failureCount) { - this.failureCount = failureCount; - return this; - } - - /** - * The number of worksheets that failed to convert. - * - * @return failureCount - */ - @javax.annotation.Nonnull - public Integer getFailureCount() { - return failureCount; - } - - public void setFailureCount(@javax.annotation.Nonnull Integer failureCount) { - this.failureCount = failureCount; - } - - public ResponseWorksheetToModelConversion incompleteCount( - @javax.annotation.Nonnull Integer incompleteCount) { - this.incompleteCount = incompleteCount; - return this; - } - - /** - * The number of worksheets that were incomplete during the conversion process. - * - * @return incompleteCount - */ - @javax.annotation.Nonnull - public Integer getIncompleteCount() { - return incompleteCount; - } - - public void setIncompleteCount(@javax.annotation.Nonnull Integer incompleteCount) { - this.incompleteCount = incompleteCount; - } - - public ResponseWorksheetToModelConversion postUpgradeFailedCount( - @javax.annotation.Nonnull Integer postUpgradeFailedCount) { - this.postUpgradeFailedCount = postUpgradeFailedCount; - return this; - } - - /** - * The number of worksheets that failed after an upgrade during the conversion process. - * - * @return postUpgradeFailedCount - */ - @javax.annotation.Nonnull - public Integer getPostUpgradeFailedCount() { - return postUpgradeFailedCount; - } - - public void setPostUpgradeFailedCount( - @javax.annotation.Nonnull Integer postUpgradeFailedCount) { - this.postUpgradeFailedCount = postUpgradeFailedCount; - } - - public ResponseWorksheetToModelConversion totalTimeInMillis( - @javax.annotation.Nonnull Integer totalTimeInMillis) { - this.totalTimeInMillis = totalTimeInMillis; - return this; - } - - /** - * The total time taken to complete the conversion process in milliseconds. - * - * @return totalTimeInMillis - */ - @javax.annotation.Nonnull - public Integer getTotalTimeInMillis() { - return totalTimeInMillis; - } - - public void setTotalTimeInMillis(@javax.annotation.Nonnull Integer totalTimeInMillis) { - this.totalTimeInMillis = totalTimeInMillis; - } - - public ResponseWorksheetToModelConversion successfulEntities( - @javax.annotation.Nonnull ResponseSuccessfulEntities successfulEntities) { - this.successfulEntities = successfulEntities; - return this; - } - - /** - * Get successfulEntities - * - * @return successfulEntities - */ - @javax.annotation.Nonnull - public ResponseSuccessfulEntities getSuccessfulEntities() { - return successfulEntities; - } - - public void setSuccessfulEntities( - @javax.annotation.Nonnull ResponseSuccessfulEntities successfulEntities) { - this.successfulEntities = successfulEntities; - } - - public ResponseWorksheetToModelConversion failedEntities( - @javax.annotation.Nonnull ResponseFailedEntities failedEntities) { - this.failedEntities = failedEntities; - return this; - } - - /** - * Get failedEntities - * - * @return failedEntities - */ - @javax.annotation.Nonnull - public ResponseFailedEntities getFailedEntities() { - return failedEntities; - } - - public void setFailedEntities(@javax.annotation.Nonnull ResponseFailedEntities failedEntities) { - this.failedEntities = failedEntities; - } - - public ResponseWorksheetToModelConversion incompleteEntities( - @javax.annotation.Nonnull ResponseIncompleteEntities incompleteEntities) { - this.incompleteEntities = incompleteEntities; - return this; - } - - /** - * Get incompleteEntities - * - * @return incompleteEntities - */ - @javax.annotation.Nonnull - public ResponseIncompleteEntities getIncompleteEntities() { - return incompleteEntities; - } - - public void setIncompleteEntities( - @javax.annotation.Nonnull ResponseIncompleteEntities incompleteEntities) { - this.incompleteEntities = incompleteEntities; - } - - public ResponseWorksheetToModelConversion postUpgradeFailedEntities( - @javax.annotation.Nonnull ResponsePostUpgradeFailedEntities postUpgradeFailedEntities) { - this.postUpgradeFailedEntities = postUpgradeFailedEntities; - return this; - } - - /** - * Get postUpgradeFailedEntities - * - * @return postUpgradeFailedEntities - */ - @javax.annotation.Nonnull - public ResponsePostUpgradeFailedEntities getPostUpgradeFailedEntities() { - return postUpgradeFailedEntities; - } - - public void setPostUpgradeFailedEntities( - @javax.annotation.Nonnull ResponsePostUpgradeFailedEntities postUpgradeFailedEntities) { - this.postUpgradeFailedEntities = postUpgradeFailedEntities; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseWorksheetToModelConversion responseWorksheetToModelConversion = - (ResponseWorksheetToModelConversion) o; - return Objects.equals(this.name, responseWorksheetToModelConversion.name) - && Objects.equals( - this.successCount, responseWorksheetToModelConversion.successCount) - && Objects.equals( - this.failureCount, responseWorksheetToModelConversion.failureCount) - && Objects.equals( - this.incompleteCount, responseWorksheetToModelConversion.incompleteCount) - && Objects.equals( - this.postUpgradeFailedCount, - responseWorksheetToModelConversion.postUpgradeFailedCount) - && Objects.equals( - this.totalTimeInMillis, - responseWorksheetToModelConversion.totalTimeInMillis) - && Objects.equals( - this.successfulEntities, - responseWorksheetToModelConversion.successfulEntities) - && Objects.equals( - this.failedEntities, responseWorksheetToModelConversion.failedEntities) - && Objects.equals( - this.incompleteEntities, - responseWorksheetToModelConversion.incompleteEntities) - && Objects.equals( - this.postUpgradeFailedEntities, - responseWorksheetToModelConversion.postUpgradeFailedEntities); - } - - @Override - public int hashCode() { - return Objects.hash( - name, - successCount, - failureCount, - incompleteCount, - postUpgradeFailedCount, - totalTimeInMillis, - successfulEntities, - failedEntities, - incompleteEntities, - postUpgradeFailedEntities); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseWorksheetToModelConversion {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); - sb.append(" failureCount: ").append(toIndentedString(failureCount)).append("\n"); - sb.append(" incompleteCount: ").append(toIndentedString(incompleteCount)).append("\n"); - sb.append(" postUpgradeFailedCount: ") - .append(toIndentedString(postUpgradeFailedCount)) - .append("\n"); - sb.append(" totalTimeInMillis: ") - .append(toIndentedString(totalTimeInMillis)) - .append("\n"); - sb.append(" successfulEntities: ") - .append(toIndentedString(successfulEntities)) - .append("\n"); - sb.append(" failedEntities: ").append(toIndentedString(failedEntities)).append("\n"); - sb.append(" incompleteEntities: ") - .append(toIndentedString(incompleteEntities)) - .append("\n"); - sb.append(" postUpgradeFailedEntities: ") - .append(toIndentedString(postUpgradeFailedEntities)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("success_count"); - openapiFields.add("failure_count"); - openapiFields.add("incomplete_count"); - openapiFields.add("post_upgrade_failed_count"); - openapiFields.add("total_time_in_millis"); - openapiFields.add("successful_entities"); - openapiFields.add("failed_entities"); - openapiFields.add("incomplete_entities"); - openapiFields.add("post_upgrade_failed_entities"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("success_count"); - openapiRequiredFields.add("failure_count"); - openapiRequiredFields.add("incomplete_count"); - openapiRequiredFields.add("post_upgrade_failed_count"); - openapiRequiredFields.add("total_time_in_millis"); - openapiRequiredFields.add("successful_entities"); - openapiRequiredFields.add("failed_entities"); - openapiRequiredFields.add("incomplete_entities"); - openapiRequiredFields.add("post_upgrade_failed_entities"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ResponseWorksheetToModelConversion - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseWorksheetToModelConversion.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ResponseWorksheetToModelConversion is" - + " not found in the empty JSON string", - ResponseWorksheetToModelConversion.openapiRequiredFields - .toString())); - } +/** + * Name of the conversion process, which involves converting worksheets to models. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ResponseWorksheetToModelConversion implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_SUCCESS_COUNT = "success_count"; + @SerializedName(SERIALIZED_NAME_SUCCESS_COUNT) + @javax.annotation.Nonnull + private Integer successCount; + + public static final String SERIALIZED_NAME_FAILURE_COUNT = "failure_count"; + @SerializedName(SERIALIZED_NAME_FAILURE_COUNT) + @javax.annotation.Nonnull + private Integer failureCount; + + public static final String SERIALIZED_NAME_INCOMPLETE_COUNT = "incomplete_count"; + @SerializedName(SERIALIZED_NAME_INCOMPLETE_COUNT) + @javax.annotation.Nonnull + private Integer incompleteCount; + + public static final String SERIALIZED_NAME_POST_UPGRADE_FAILED_COUNT = "post_upgrade_failed_count"; + @SerializedName(SERIALIZED_NAME_POST_UPGRADE_FAILED_COUNT) + @javax.annotation.Nonnull + private Integer postUpgradeFailedCount; + + public static final String SERIALIZED_NAME_TOTAL_TIME_IN_MILLIS = "total_time_in_millis"; + @SerializedName(SERIALIZED_NAME_TOTAL_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Integer totalTimeInMillis; + + public static final String SERIALIZED_NAME_SUCCESSFUL_ENTITIES = "successful_entities"; + @SerializedName(SERIALIZED_NAME_SUCCESSFUL_ENTITIES) + @javax.annotation.Nonnull + private ResponseSuccessfulEntities successfulEntities; + + public static final String SERIALIZED_NAME_FAILED_ENTITIES = "failed_entities"; + @SerializedName(SERIALIZED_NAME_FAILED_ENTITIES) + @javax.annotation.Nonnull + private ResponseFailedEntities failedEntities; + + public static final String SERIALIZED_NAME_INCOMPLETE_ENTITIES = "incomplete_entities"; + @SerializedName(SERIALIZED_NAME_INCOMPLETE_ENTITIES) + @javax.annotation.Nonnull + private ResponseIncompleteEntities incompleteEntities; + + public static final String SERIALIZED_NAME_POST_UPGRADE_FAILED_ENTITIES = "post_upgrade_failed_entities"; + @SerializedName(SERIALIZED_NAME_POST_UPGRADE_FAILED_ENTITIES) + @javax.annotation.Nonnull + private ResponsePostUpgradeFailedEntities postUpgradeFailedEntities; + + public ResponseWorksheetToModelConversion() { + } + + public ResponseWorksheetToModelConversion name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ResponseWorksheetToModelConversion successCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + return this; + } + + /** + * The number of worksheets successfully converted to models. + * @return successCount + */ + @javax.annotation.Nonnull + public Integer getSuccessCount() { + return successCount; + } + + public void setSuccessCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + } + + + public ResponseWorksheetToModelConversion failureCount(@javax.annotation.Nonnull Integer failureCount) { + this.failureCount = failureCount; + return this; + } + + /** + * The number of worksheets that failed to convert. + * @return failureCount + */ + @javax.annotation.Nonnull + public Integer getFailureCount() { + return failureCount; + } + + public void setFailureCount(@javax.annotation.Nonnull Integer failureCount) { + this.failureCount = failureCount; + } + + + public ResponseWorksheetToModelConversion incompleteCount(@javax.annotation.Nonnull Integer incompleteCount) { + this.incompleteCount = incompleteCount; + return this; + } + + /** + * The number of worksheets that were incomplete during the conversion process. + * @return incompleteCount + */ + @javax.annotation.Nonnull + public Integer getIncompleteCount() { + return incompleteCount; + } + + public void setIncompleteCount(@javax.annotation.Nonnull Integer incompleteCount) { + this.incompleteCount = incompleteCount; + } + + + public ResponseWorksheetToModelConversion postUpgradeFailedCount(@javax.annotation.Nonnull Integer postUpgradeFailedCount) { + this.postUpgradeFailedCount = postUpgradeFailedCount; + return this; + } + + /** + * The number of worksheets that failed after an upgrade during the conversion process. + * @return postUpgradeFailedCount + */ + @javax.annotation.Nonnull + public Integer getPostUpgradeFailedCount() { + return postUpgradeFailedCount; + } + + public void setPostUpgradeFailedCount(@javax.annotation.Nonnull Integer postUpgradeFailedCount) { + this.postUpgradeFailedCount = postUpgradeFailedCount; + } + + + public ResponseWorksheetToModelConversion totalTimeInMillis(@javax.annotation.Nonnull Integer totalTimeInMillis) { + this.totalTimeInMillis = totalTimeInMillis; + return this; + } + + /** + * The total time taken to complete the conversion process in milliseconds. + * @return totalTimeInMillis + */ + @javax.annotation.Nonnull + public Integer getTotalTimeInMillis() { + return totalTimeInMillis; + } + + public void setTotalTimeInMillis(@javax.annotation.Nonnull Integer totalTimeInMillis) { + this.totalTimeInMillis = totalTimeInMillis; + } + + + public ResponseWorksheetToModelConversion successfulEntities(@javax.annotation.Nonnull ResponseSuccessfulEntities successfulEntities) { + this.successfulEntities = successfulEntities; + return this; + } + + /** + * Get successfulEntities + * @return successfulEntities + */ + @javax.annotation.Nonnull + public ResponseSuccessfulEntities getSuccessfulEntities() { + return successfulEntities; + } + + public void setSuccessfulEntities(@javax.annotation.Nonnull ResponseSuccessfulEntities successfulEntities) { + this.successfulEntities = successfulEntities; + } + + + public ResponseWorksheetToModelConversion failedEntities(@javax.annotation.Nonnull ResponseFailedEntities failedEntities) { + this.failedEntities = failedEntities; + return this; + } + + /** + * Get failedEntities + * @return failedEntities + */ + @javax.annotation.Nonnull + public ResponseFailedEntities getFailedEntities() { + return failedEntities; + } + + public void setFailedEntities(@javax.annotation.Nonnull ResponseFailedEntities failedEntities) { + this.failedEntities = failedEntities; + } + + + public ResponseWorksheetToModelConversion incompleteEntities(@javax.annotation.Nonnull ResponseIncompleteEntities incompleteEntities) { + this.incompleteEntities = incompleteEntities; + return this; + } + + /** + * Get incompleteEntities + * @return incompleteEntities + */ + @javax.annotation.Nonnull + public ResponseIncompleteEntities getIncompleteEntities() { + return incompleteEntities; + } + + public void setIncompleteEntities(@javax.annotation.Nonnull ResponseIncompleteEntities incompleteEntities) { + this.incompleteEntities = incompleteEntities; + } + + + public ResponseWorksheetToModelConversion postUpgradeFailedEntities(@javax.annotation.Nonnull ResponsePostUpgradeFailedEntities postUpgradeFailedEntities) { + this.postUpgradeFailedEntities = postUpgradeFailedEntities; + return this; + } + + /** + * Get postUpgradeFailedEntities + * @return postUpgradeFailedEntities + */ + @javax.annotation.Nonnull + public ResponsePostUpgradeFailedEntities getPostUpgradeFailedEntities() { + return postUpgradeFailedEntities; + } + + public void setPostUpgradeFailedEntities(@javax.annotation.Nonnull ResponsePostUpgradeFailedEntities postUpgradeFailedEntities) { + this.postUpgradeFailedEntities = postUpgradeFailedEntities; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseWorksheetToModelConversion responseWorksheetToModelConversion = (ResponseWorksheetToModelConversion) o; + return Objects.equals(this.name, responseWorksheetToModelConversion.name) && + Objects.equals(this.successCount, responseWorksheetToModelConversion.successCount) && + Objects.equals(this.failureCount, responseWorksheetToModelConversion.failureCount) && + Objects.equals(this.incompleteCount, responseWorksheetToModelConversion.incompleteCount) && + Objects.equals(this.postUpgradeFailedCount, responseWorksheetToModelConversion.postUpgradeFailedCount) && + Objects.equals(this.totalTimeInMillis, responseWorksheetToModelConversion.totalTimeInMillis) && + Objects.equals(this.successfulEntities, responseWorksheetToModelConversion.successfulEntities) && + Objects.equals(this.failedEntities, responseWorksheetToModelConversion.failedEntities) && + Objects.equals(this.incompleteEntities, responseWorksheetToModelConversion.incompleteEntities) && + Objects.equals(this.postUpgradeFailedEntities, responseWorksheetToModelConversion.postUpgradeFailedEntities); + } + + @Override + public int hashCode() { + return Objects.hash(name, successCount, failureCount, incompleteCount, postUpgradeFailedCount, totalTimeInMillis, successfulEntities, failedEntities, incompleteEntities, postUpgradeFailedEntities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseWorksheetToModelConversion {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); + sb.append(" failureCount: ").append(toIndentedString(failureCount)).append("\n"); + sb.append(" incompleteCount: ").append(toIndentedString(incompleteCount)).append("\n"); + sb.append(" postUpgradeFailedCount: ").append(toIndentedString(postUpgradeFailedCount)).append("\n"); + sb.append(" totalTimeInMillis: ").append(toIndentedString(totalTimeInMillis)).append("\n"); + sb.append(" successfulEntities: ").append(toIndentedString(successfulEntities)).append("\n"); + sb.append(" failedEntities: ").append(toIndentedString(failedEntities)).append("\n"); + sb.append(" incompleteEntities: ").append(toIndentedString(incompleteEntities)).append("\n"); + sb.append(" postUpgradeFailedEntities: ").append(toIndentedString(postUpgradeFailedEntities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("success_count"); + openapiFields.add("failure_count"); + openapiFields.add("incomplete_count"); + openapiFields.add("post_upgrade_failed_count"); + openapiFields.add("total_time_in_millis"); + openapiFields.add("successful_entities"); + openapiFields.add("failed_entities"); + openapiFields.add("incomplete_entities"); + openapiFields.add("post_upgrade_failed_entities"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("success_count"); + openapiRequiredFields.add("failure_count"); + openapiRequiredFields.add("incomplete_count"); + openapiRequiredFields.add("post_upgrade_failed_count"); + openapiRequiredFields.add("total_time_in_millis"); + openapiRequiredFields.add("successful_entities"); + openapiRequiredFields.add("failed_entities"); + openapiRequiredFields.add("incomplete_entities"); + openapiRequiredFields.add("post_upgrade_failed_entities"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseWorksheetToModelConversion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseWorksheetToModelConversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseWorksheetToModelConversion is not found in the empty JSON string", ResponseWorksheetToModelConversion.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseWorksheetToModelConversion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ResponseWorksheetToModelConversion` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResponseWorksheetToModelConversion.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseWorksheetToModelConversion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseWorksheetToModelConversion.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseWorksheetToModelConversion.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - // validate the required field `successful_entities` - ResponseSuccessfulEntities.validateJsonElement(jsonObj.get("successful_entities")); - // validate the required field `failed_entities` - ResponseFailedEntities.validateJsonElement(jsonObj.get("failed_entities")); - // validate the required field `incomplete_entities` - ResponseIncompleteEntities.validateJsonElement(jsonObj.get("incomplete_entities")); - // validate the required field `post_upgrade_failed_entities` - ResponsePostUpgradeFailedEntities.validateJsonElement( - jsonObj.get("post_upgrade_failed_entities")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseWorksheetToModelConversion.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseWorksheetToModelConversion' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ResponseWorksheetToModelConversion.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseWorksheetToModelConversion value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseWorksheetToModelConversion read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseWorksheetToModelConversion given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseWorksheetToModelConversion - * @throws IOException if the JSON string is invalid with respect to - * ResponseWorksheetToModelConversion - */ - public static ResponseWorksheetToModelConversion fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseWorksheetToModelConversion.class); - } - - /** - * Convert an instance of ResponseWorksheetToModelConversion to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the required field `successful_entities` + ResponseSuccessfulEntities.validateJsonElement(jsonObj.get("successful_entities")); + // validate the required field `failed_entities` + ResponseFailedEntities.validateJsonElement(jsonObj.get("failed_entities")); + // validate the required field `incomplete_entities` + ResponseIncompleteEntities.validateJsonElement(jsonObj.get("incomplete_entities")); + // validate the required field `post_upgrade_failed_entities` + ResponsePostUpgradeFailedEntities.validateJsonElement(jsonObj.get("post_upgrade_failed_entities")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseWorksheetToModelConversion.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseWorksheetToModelConversion' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseWorksheetToModelConversion.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseWorksheetToModelConversion value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResponseWorksheetToModelConversion read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseWorksheetToModelConversion given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseWorksheetToModelConversion + * @throws IOException if the JSON string is invalid with respect to ResponseWorksheetToModelConversion + */ + public static ResponseWorksheetToModelConversion fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseWorksheetToModelConversion.class); + } + + /** + * Convert an instance of ResponseWorksheetToModelConversion to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java index 941b17d2f..f7df5d1d9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java @@ -4,345 +4,335 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.MetadataObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** RevertCommitRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RevertCommitRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; - - @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - @javax.annotation.Nullable - private String branchName; - - /** Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] */ - @JsonAdapter(RevertPolicyEnum.Adapter.class) - public enum RevertPolicyEnum { - ALL_OR_NONE("ALL_OR_NONE"), - - PARTIAL("PARTIAL"); - - private String value; - - RevertPolicyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RevertPolicyEnum fromValue(String value) { - for (RevertPolicyEnum b : RevertPolicyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RevertPolicyEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RevertPolicyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RevertPolicyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RevertPolicyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_REVERT_POLICY = "revert_policy"; - - @SerializedName(SERIALIZED_NAME_REVERT_POLICY) - @javax.annotation.Nullable - private RevertPolicyEnum revertPolicy = RevertPolicyEnum.ALL_OR_NONE; - - public RevertCommitRequest() {} - - public RevertCommitRequest metadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; - } - - public RevertCommitRequest addMetadataItem(MetadataObject metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * Metadata objects. - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; +/** + * RevertCommitRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RevertCommitRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nullable + private String branchName; + + /** + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + */ + @JsonAdapter(RevertPolicyEnum.Adapter.class) + public enum RevertPolicyEnum { + ALL_OR_NONE("ALL_OR_NONE"), + + PARTIAL("PARTIAL"); + + private String value; + + RevertPolicyEnum(String value) { + this.value = value; } - public void setMetadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; + public String getValue() { + return value; } - public RevertCommitRequest branchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Name of the branch where the reverted version should be committed Note: If no branch_name is - * specified, then the commit_branch_name will be considered. - * - * @return branchName - */ - @javax.annotation.Nullable - public String getBranchName() { - return branchName; + public static RevertPolicyEnum fromValue(String value) { + for (RevertPolicyEnum b : RevertPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setBranchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RevertPolicyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RevertPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RevertPolicyEnum.fromValue(value); + } } - public RevertCommitRequest revertPolicy( - @javax.annotation.Nullable RevertPolicyEnum revertPolicy) { - this.revertPolicy = revertPolicy; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RevertPolicyEnum.fromValue(value); } + } - /** - * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] - * - * @return revertPolicy - */ - @javax.annotation.Nullable - public RevertPolicyEnum getRevertPolicy() { - return revertPolicy; - } + public static final String SERIALIZED_NAME_REVERT_POLICY = "revert_policy"; + @SerializedName(SERIALIZED_NAME_REVERT_POLICY) + @javax.annotation.Nullable + private RevertPolicyEnum revertPolicy = RevertPolicyEnum.ALL_OR_NONE; - public void setRevertPolicy(@javax.annotation.Nullable RevertPolicyEnum revertPolicy) { - this.revertPolicy = revertPolicy; - } + public RevertCommitRequest() { + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RevertCommitRequest revertCommitRequest = (RevertCommitRequest) o; - return Objects.equals(this.metadata, revertCommitRequest.metadata) - && Objects.equals(this.branchName, revertCommitRequest.branchName) - && Objects.equals(this.revertPolicy, revertCommitRequest.revertPolicy); - } + public RevertCommitRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } - @Override - public int hashCode() { - return Objects.hash(metadata, branchName, revertPolicy); + public RevertCommitRequest addMetadataItem(MetadataObject metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RevertCommitRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" revertPolicy: ").append(toIndentedString(revertPolicy)).append("\n"); - sb.append("}"); - return sb.toString(); + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + + public RevertCommitRequest branchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. + * @return branchName + */ + @javax.annotation.Nullable + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + } + + + public RevertCommitRequest revertPolicy(@javax.annotation.Nullable RevertPolicyEnum revertPolicy) { + this.revertPolicy = revertPolicy; + return this; + } + + /** + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + * @return revertPolicy + */ + @javax.annotation.Nullable + public RevertPolicyEnum getRevertPolicy() { + return revertPolicy; + } + + public void setRevertPolicy(@javax.annotation.Nullable RevertPolicyEnum revertPolicy) { + this.revertPolicy = revertPolicy; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("branch_name"); - openapiFields.add("revert_policy"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + RevertCommitRequest revertCommitRequest = (RevertCommitRequest) o; + return Objects.equals(this.metadata, revertCommitRequest.metadata) && + Objects.equals(this.branchName, revertCommitRequest.branchName) && + Objects.equals(this.revertPolicy, revertCommitRequest.revertPolicy); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, branchName, revertPolicy); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevertCommitRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" revertPolicy: ").append(toIndentedString(revertPolicy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RevertCommitRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RevertCommitRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RevertCommitRequest is not found in" - + " the empty JSON string", - RevertCommitRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("branch_name"); + openapiFields.add("revert_policy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevertCommitRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevertCommitRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RevertCommitRequest is not found in the empty JSON string", RevertCommitRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RevertCommitRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RevertCommitRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RevertCommitRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RevertCommitRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - MetadataObject.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - } - if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) - && !jsonObj.get("branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("branch_name").toString())); - } - if ((jsonObj.get("revert_policy") != null && !jsonObj.get("revert_policy").isJsonNull()) - && !jsonObj.get("revert_policy").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `revert_policy` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("revert_policy").toString())); + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataObject.validateJsonElement(jsonArraymetadata.get(i)); + }; } - // validate the optional field `revert_policy` - if (jsonObj.get("revert_policy") != null && !jsonObj.get("revert_policy").isJsonNull()) { - RevertPolicyEnum.validateJsonElement(jsonObj.get("revert_policy")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RevertCommitRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RevertCommitRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RevertCommitRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RevertCommitRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RevertCommitRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RevertCommitRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RevertCommitRequest - * @throws IOException if the JSON string is invalid with respect to RevertCommitRequest - */ - public static RevertCommitRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RevertCommitRequest.class); - } - - /** - * Convert an instance of RevertCommitRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) && !jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch_name").toString())); + } + if ((jsonObj.get("revert_policy") != null && !jsonObj.get("revert_policy").isJsonNull()) && !jsonObj.get("revert_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `revert_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revert_policy").toString())); + } + // validate the optional field `revert_policy` + if (jsonObj.get("revert_policy") != null && !jsonObj.get("revert_policy").isJsonNull()) { + RevertPolicyEnum.validateJsonElement(jsonObj.get("revert_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevertCommitRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevertCommitRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RevertCommitRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RevertCommitRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RevertCommitRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RevertCommitRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevertCommitRequest + * @throws IOException if the JSON string is invalid with respect to RevertCommitRequest + */ + public static RevertCommitRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevertCommitRequest.class); + } + + /** + * Convert an instance of RevertCommitRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java index 7c68a0df3..37ff0a1b5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java @@ -4,508 +4,465 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorType; +import com.thoughtspot.client.model.CommitFileType; +import com.thoughtspot.client.model.CommiterType; +import com.thoughtspot.client.model.RevertedMetadata; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** RevertResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RevertResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COMMITTER = "committer"; - - @SerializedName(SERIALIZED_NAME_COMMITTER) - @javax.annotation.Nullable - private CommiterType committer; - - public static final String SERIALIZED_NAME_AUTHOR = "author"; - - @SerializedName(SERIALIZED_NAME_AUTHOR) - @javax.annotation.Nullable - private AuthorType author; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; - - @SerializedName(SERIALIZED_NAME_COMMIT_TIME) - @javax.annotation.Nullable - private String commitTime; - - public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; - - @SerializedName(SERIALIZED_NAME_COMMIT_ID) - @javax.annotation.Nullable - private String commitId; - - public static final String SERIALIZED_NAME_BRANCH = "branch"; - - @SerializedName(SERIALIZED_NAME_BRANCH) - @javax.annotation.Nullable - private String branch; - - public static final String SERIALIZED_NAME_COMMITTED_FILES = "committed_files"; - - @SerializedName(SERIALIZED_NAME_COMMITTED_FILES) - @javax.annotation.Nullable - private List committedFiles; - - public static final String SERIALIZED_NAME_REVERTED_METADATA = "reverted_metadata"; - - @SerializedName(SERIALIZED_NAME_REVERTED_METADATA) - @javax.annotation.Nullable - private List revertedMetadata; - - public RevertResponse() {} - - public RevertResponse committer(@javax.annotation.Nullable CommiterType committer) { - this.committer = committer; - return this; - } - - /** - * Get committer - * - * @return committer - */ - @javax.annotation.Nullable - public CommiterType getCommitter() { - return committer; - } - - public void setCommitter(@javax.annotation.Nullable CommiterType committer) { - this.committer = committer; - } - - public RevertResponse author(@javax.annotation.Nullable AuthorType author) { - this.author = author; - return this; - } - - /** - * Get author - * - * @return author - */ - @javax.annotation.Nullable - public AuthorType getAuthor() { - return author; - } - - public void setAuthor(@javax.annotation.Nullable AuthorType author) { - this.author = author; - } - - public RevertResponse comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * Comments associated with the commit - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - public RevertResponse commitTime(@javax.annotation.Nullable String commitTime) { - this.commitTime = commitTime; - return this; - } - - /** - * Time at which the changes were committed. - * - * @return commitTime - */ - @javax.annotation.Nullable - public String getCommitTime() { - return commitTime; - } - - public void setCommitTime(@javax.annotation.Nullable String commitTime) { - this.commitTime = commitTime; - } - - public RevertResponse commitId(@javax.annotation.Nullable String commitId) { - this.commitId = commitId; - return this; - } - /** - * SHA id associated with the commit - * - * @return commitId - */ - @javax.annotation.Nullable - public String getCommitId() { - return commitId; - } - - public void setCommitId(@javax.annotation.Nullable String commitId) { - this.commitId = commitId; - } - - public RevertResponse branch(@javax.annotation.Nullable String branch) { - this.branch = branch; - return this; - } - - /** - * Branch where changes were committed - * - * @return branch - */ - @javax.annotation.Nullable - public String getBranch() { - return branch; - } - - public void setBranch(@javax.annotation.Nullable String branch) { - this.branch = branch; - } - - public RevertResponse committedFiles( - @javax.annotation.Nullable List committedFiles) { - this.committedFiles = committedFiles; - return this; - } - - public RevertResponse addCommittedFilesItem(CommitFileType committedFilesItem) { - if (this.committedFiles == null) { - this.committedFiles = new ArrayList<>(); - } - this.committedFiles.add(committedFilesItem); - return this; - } - - /** - * Files that were pushed as part of this commit - * - * @return committedFiles - */ - @javax.annotation.Nullable - public List getCommittedFiles() { - return committedFiles; - } - - public void setCommittedFiles(@javax.annotation.Nullable List committedFiles) { - this.committedFiles = committedFiles; - } - - public RevertResponse revertedMetadata( - @javax.annotation.Nullable List revertedMetadata) { - this.revertedMetadata = revertedMetadata; - return this; - } - - public RevertResponse addRevertedMetadataItem(RevertedMetadata revertedMetadataItem) { - if (this.revertedMetadata == null) { - this.revertedMetadata = new ArrayList<>(); - } - this.revertedMetadata.add(revertedMetadataItem); - return this; - } - - /** - * Metadata of reverted file of this commit - * - * @return revertedMetadata - */ - @javax.annotation.Nullable - public List getRevertedMetadata() { - return revertedMetadata; - } - - public void setRevertedMetadata( - @javax.annotation.Nullable List revertedMetadata) { - this.revertedMetadata = revertedMetadata; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RevertResponse revertResponse = (RevertResponse) o; - return Objects.equals(this.committer, revertResponse.committer) - && Objects.equals(this.author, revertResponse.author) - && Objects.equals(this.comment, revertResponse.comment) - && Objects.equals(this.commitTime, revertResponse.commitTime) - && Objects.equals(this.commitId, revertResponse.commitId) - && Objects.equals(this.branch, revertResponse.branch) - && Objects.equals(this.committedFiles, revertResponse.committedFiles) - && Objects.equals(this.revertedMetadata, revertResponse.revertedMetadata); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - committer, - author, - comment, - commitTime, - commitId, - branch, - committedFiles, - revertedMetadata); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RevertResponse {\n"); - sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); - sb.append(" author: ").append(toIndentedString(author)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); - sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); - sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); - sb.append(" committedFiles: ").append(toIndentedString(committedFiles)).append("\n"); - sb.append(" revertedMetadata: ").append(toIndentedString(revertedMetadata)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("committer"); - openapiFields.add("author"); - openapiFields.add("comment"); - openapiFields.add("commit_time"); - openapiFields.add("commit_id"); - openapiFields.add("branch"); - openapiFields.add("committed_files"); - openapiFields.add("reverted_metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RevertResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RevertResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RevertResponse is not found in the" - + " empty JSON string", - RevertResponse.openapiRequiredFields.toString())); - } +/** + * RevertResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RevertResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMITTER = "committer"; + @SerializedName(SERIALIZED_NAME_COMMITTER) + @javax.annotation.Nullable + private CommiterType committer; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nullable + private AuthorType author; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nullable + private String comment; + + public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; + @SerializedName(SERIALIZED_NAME_COMMIT_TIME) + @javax.annotation.Nullable + private String commitTime; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nullable + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH = "branch"; + @SerializedName(SERIALIZED_NAME_BRANCH) + @javax.annotation.Nullable + private String branch; + + public static final String SERIALIZED_NAME_COMMITTED_FILES = "committed_files"; + @SerializedName(SERIALIZED_NAME_COMMITTED_FILES) + @javax.annotation.Nullable + private List committedFiles; + + public static final String SERIALIZED_NAME_REVERTED_METADATA = "reverted_metadata"; + @SerializedName(SERIALIZED_NAME_REVERTED_METADATA) + @javax.annotation.Nullable + private List revertedMetadata; + + public RevertResponse() { + } + + public RevertResponse committer(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + */ + @javax.annotation.Nullable + public CommiterType getCommitter() { + return committer; + } + + public void setCommitter(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + } + + + public RevertResponse author(@javax.annotation.Nullable AuthorType author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + */ + @javax.annotation.Nullable + public AuthorType getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nullable AuthorType author) { + this.author = author; + } + + + public RevertResponse comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Comments associated with the commit + * @return comment + */ + @javax.annotation.Nullable + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + + public RevertResponse commitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + return this; + } + + /** + * Time at which the changes were committed. + * @return commitTime + */ + @javax.annotation.Nullable + public String getCommitTime() { + return commitTime; + } + + public void setCommitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + } + + + public RevertResponse commitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + return this; + } + + /** + * SHA id associated with the commit + * @return commitId + */ + @javax.annotation.Nullable + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + } + + + public RevertResponse branch(@javax.annotation.Nullable String branch) { + this.branch = branch; + return this; + } + + /** + * Branch where changes were committed + * @return branch + */ + @javax.annotation.Nullable + public String getBranch() { + return branch; + } + + public void setBranch(@javax.annotation.Nullable String branch) { + this.branch = branch; + } + + + public RevertResponse committedFiles(@javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + return this; + } + + public RevertResponse addCommittedFilesItem(CommitFileType committedFilesItem) { + if (this.committedFiles == null) { + this.committedFiles = new ArrayList<>(); + } + this.committedFiles.add(committedFilesItem); + return this; + } + + /** + * Files that were pushed as part of this commit + * @return committedFiles + */ + @javax.annotation.Nullable + public List getCommittedFiles() { + return committedFiles; + } + + public void setCommittedFiles(@javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + } + + + public RevertResponse revertedMetadata(@javax.annotation.Nullable List revertedMetadata) { + this.revertedMetadata = revertedMetadata; + return this; + } + + public RevertResponse addRevertedMetadataItem(RevertedMetadata revertedMetadataItem) { + if (this.revertedMetadata == null) { + this.revertedMetadata = new ArrayList<>(); + } + this.revertedMetadata.add(revertedMetadataItem); + return this; + } + + /** + * Metadata of reverted file of this commit + * @return revertedMetadata + */ + @javax.annotation.Nullable + public List getRevertedMetadata() { + return revertedMetadata; + } + + public void setRevertedMetadata(@javax.annotation.Nullable List revertedMetadata) { + this.revertedMetadata = revertedMetadata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevertResponse revertResponse = (RevertResponse) o; + return Objects.equals(this.committer, revertResponse.committer) && + Objects.equals(this.author, revertResponse.author) && + Objects.equals(this.comment, revertResponse.comment) && + Objects.equals(this.commitTime, revertResponse.commitTime) && + Objects.equals(this.commitId, revertResponse.commitId) && + Objects.equals(this.branch, revertResponse.branch) && + Objects.equals(this.committedFiles, revertResponse.committedFiles) && + Objects.equals(this.revertedMetadata, revertResponse.revertedMetadata); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(committer, author, comment, commitTime, commitId, branch, committedFiles, revertedMetadata); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevertResponse {\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append(" committedFiles: ").append(toIndentedString(committedFiles)).append("\n"); + sb.append(" revertedMetadata: ").append(toIndentedString(revertedMetadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("committer"); + openapiFields.add("author"); + openapiFields.add("comment"); + openapiFields.add("commit_time"); + openapiFields.add("commit_id"); + openapiFields.add("branch"); + openapiFields.add("committed_files"); + openapiFields.add("reverted_metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevertResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevertResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RevertResponse is not found in the empty JSON string", RevertResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RevertResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RevertResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RevertResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RevertResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `committer` - if (jsonObj.get("committer") != null && !jsonObj.get("committer").isJsonNull()) { - CommiterType.validateJsonElement(jsonObj.get("committer")); - } - // validate the optional field `author` - if (jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) { - AuthorType.validateJsonElement(jsonObj.get("author")); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) - && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `comment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("comment").toString())); - } - if ((jsonObj.get("commit_time") != null && !jsonObj.get("commit_time").isJsonNull()) - && !jsonObj.get("commit_time").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_time` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_time").toString())); - } - if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) - && !jsonObj.get("commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("commit_id").toString())); - } - if ((jsonObj.get("branch") != null && !jsonObj.get("branch").isJsonNull()) - && !jsonObj.get("branch").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("branch").toString())); - } - if (jsonObj.get("committed_files") != null - && !jsonObj.get("committed_files").isJsonNull()) { - JsonArray jsonArraycommittedFiles = jsonObj.getAsJsonArray("committed_files"); - if (jsonArraycommittedFiles != null) { - // ensure the json data is an array - if (!jsonObj.get("committed_files").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `committed_files` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("committed_files").toString())); - } - - // validate the optional field `committed_files` (array) - for (int i = 0; i < jsonArraycommittedFiles.size(); i++) { - CommitFileType.validateJsonElement(jsonArraycommittedFiles.get(i)); - } - ; - } - } - if (jsonObj.get("reverted_metadata") != null - && !jsonObj.get("reverted_metadata").isJsonNull()) { - JsonArray jsonArrayrevertedMetadata = jsonObj.getAsJsonArray("reverted_metadata"); - if (jsonArrayrevertedMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("reverted_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reverted_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("reverted_metadata").toString())); - } - - // validate the optional field `reverted_metadata` (array) - for (int i = 0; i < jsonArrayrevertedMetadata.size(); i++) { - RevertedMetadata.validateJsonElement(jsonArrayrevertedMetadata.get(i)); - } - ; - } + // validate the optional field `committer` + if (jsonObj.get("committer") != null && !jsonObj.get("committer").isJsonNull()) { + CommiterType.validateJsonElement(jsonObj.get("committer")); + } + // validate the optional field `author` + if (jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) { + AuthorType.validateJsonElement(jsonObj.get("author")); + } + if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + if ((jsonObj.get("commit_time") != null && !jsonObj.get("commit_time").isJsonNull()) && !jsonObj.get("commit_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_time").toString())); + } + if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) && !jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_id").toString())); + } + if ((jsonObj.get("branch") != null && !jsonObj.get("branch").isJsonNull()) && !jsonObj.get("branch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch").toString())); + } + if (jsonObj.get("committed_files") != null && !jsonObj.get("committed_files").isJsonNull()) { + JsonArray jsonArraycommittedFiles = jsonObj.getAsJsonArray("committed_files"); + if (jsonArraycommittedFiles != null) { + // ensure the json data is an array + if (!jsonObj.get("committed_files").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `committed_files` to be an array in the JSON string but got `%s`", jsonObj.get("committed_files").toString())); + } + + // validate the optional field `committed_files` (array) + for (int i = 0; i < jsonArraycommittedFiles.size(); i++) { + CommitFileType.validateJsonElement(jsonArraycommittedFiles.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RevertResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RevertResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RevertResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RevertResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RevertResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + } + if (jsonObj.get("reverted_metadata") != null && !jsonObj.get("reverted_metadata").isJsonNull()) { + JsonArray jsonArrayrevertedMetadata = jsonObj.getAsJsonArray("reverted_metadata"); + if (jsonArrayrevertedMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("reverted_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `reverted_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("reverted_metadata").toString())); + } + + // validate the optional field `reverted_metadata` (array) + for (int i = 0; i < jsonArrayrevertedMetadata.size(); i++) { + RevertedMetadata.validateJsonElement(jsonArrayrevertedMetadata.get(i)); + }; } - } - - /** - * Create an instance of RevertResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RevertResponse - * @throws IOException if the JSON string is invalid with respect to RevertResponse - */ - public static RevertResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RevertResponse.class); - } + } + } - /** - * Convert an instance of RevertResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevertResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevertResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RevertResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RevertResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RevertResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RevertResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevertResponse + * @throws IOException if the JSON string is invalid with respect to RevertResponse + */ + public static RevertResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevertResponse.class); + } + + /** + * Convert an instance of RevertResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java index 77016a838..d28bf0702 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java @@ -4,347 +4,329 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** RevertedMetadata */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RevertedMetadata implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; - - @SerializedName(SERIALIZED_NAME_FILE_NAME) - @javax.annotation.Nonnull - private String fileName; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nonnull - private String metadataName; - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nonnull - private String metadataType; - - public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; - - @SerializedName(SERIALIZED_NAME_STATUS_CODE) - @javax.annotation.Nonnull - private String statusCode; - - public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; - - @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) - @javax.annotation.Nonnull - private String statusMessage; - - public RevertedMetadata() {} - - public RevertedMetadata fileName(@javax.annotation.Nonnull String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Name of the file deployed - * - * @return fileName - */ - @javax.annotation.Nonnull - public String getFileName() { - return fileName; - } - - public void setFileName(@javax.annotation.Nonnull String fileName) { - this.fileName = fileName; - } - - public RevertedMetadata metadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - return this; - } - - /** - * Name of the metadata object - * - * @return metadataName - */ - @javax.annotation.Nonnull - public String getMetadataName() { - return metadataName; - } - - public void setMetadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - } - - public RevertedMetadata metadataType(@javax.annotation.Nonnull String metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of the metadata object - * - * @return metadataType - */ - @javax.annotation.Nonnull - public String getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nonnull String metadataType) { - this.metadataType = metadataType; - } - - public RevertedMetadata statusCode(@javax.annotation.Nonnull String statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Indicates the status of deployment for the file - * - * @return statusCode - */ - @javax.annotation.Nonnull - public String getStatusCode() { - return statusCode; - } - - public void setStatusCode(@javax.annotation.Nonnull String statusCode) { - this.statusCode = statusCode; - } - - public RevertedMetadata statusMessage(@javax.annotation.Nonnull String statusMessage) { - this.statusMessage = statusMessage; - return this; - } - - /** - * Any error or warning with the deployment - * - * @return statusMessage - */ - @javax.annotation.Nonnull - public String getStatusMessage() { - return statusMessage; - } - - public void setStatusMessage(@javax.annotation.Nonnull String statusMessage) { - this.statusMessage = statusMessage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RevertedMetadata revertedMetadata = (RevertedMetadata) o; - return Objects.equals(this.fileName, revertedMetadata.fileName) - && Objects.equals(this.metadataName, revertedMetadata.metadataName) - && Objects.equals(this.metadataType, revertedMetadata.metadataType) - && Objects.equals(this.statusCode, revertedMetadata.statusCode) - && Objects.equals(this.statusMessage, revertedMetadata.statusMessage); - } - - @Override - public int hashCode() { - return Objects.hash(fileName, metadataName, metadataType, statusCode, statusMessage); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RevertedMetadata {\n"); - sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * RevertedMetadata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RevertedMetadata implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull + private String fileName; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private String metadataType; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull + private String statusCode; + + public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; + @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nonnull + private String statusMessage; + + public RevertedMetadata() { + } + + public RevertedMetadata fileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the file deployed + * @return fileName + */ + @javax.annotation.Nonnull + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + } + + + public RevertedMetadata metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + + public RevertedMetadata metadataType(@javax.annotation.Nonnull String metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata object + * @return metadataType + */ + @javax.annotation.Nonnull + public String getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull String metadataType) { + this.metadataType = metadataType; + } + + + public RevertedMetadata statusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Indicates the status of deployment for the file + * @return statusCode + */ + @javax.annotation.Nonnull + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + } + + + public RevertedMetadata statusMessage(@javax.annotation.Nonnull String statusMessage) { + this.statusMessage = statusMessage; + return this; + } + + /** + * Any error or warning with the deployment + * @return statusMessage + */ + @javax.annotation.Nonnull + public String getStatusMessage() { + return statusMessage; + } + + public void setStatusMessage(@javax.annotation.Nonnull String statusMessage) { + this.statusMessage = statusMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("file_name"); - openapiFields.add("metadata_name"); - openapiFields.add("metadata_type"); - openapiFields.add("status_code"); - openapiFields.add("status_message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("file_name"); - openapiRequiredFields.add("metadata_name"); - openapiRequiredFields.add("metadata_type"); - openapiRequiredFields.add("status_code"); - openapiRequiredFields.add("status_message"); + RevertedMetadata revertedMetadata = (RevertedMetadata) o; + return Objects.equals(this.fileName, revertedMetadata.fileName) && + Objects.equals(this.metadataName, revertedMetadata.metadataName) && + Objects.equals(this.metadataType, revertedMetadata.metadataType) && + Objects.equals(this.statusCode, revertedMetadata.statusCode) && + Objects.equals(this.statusMessage, revertedMetadata.statusMessage); + } + + @Override + public int hashCode() { + return Objects.hash(fileName, metadataName, metadataType, statusCode, statusMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevertedMetadata {\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RevertedMetadata - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RevertedMetadata.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RevertedMetadata is not found in the" - + " empty JSON string", - RevertedMetadata.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("file_name"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("status_code"); + openapiFields.add("status_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("file_name"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("status_code"); + openapiRequiredFields.add("status_message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevertedMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevertedMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RevertedMetadata is not found in the empty JSON string", RevertedMetadata.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RevertedMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RevertedMetadata` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RevertedMetadata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RevertedMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RevertedMetadata.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RevertedMetadata.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("file_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_name").toString())); - } - if (!jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - if (!jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - if (!jsonObj.get("status_code").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_code` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("status_code").toString())); - } - if (!jsonObj.get("status_message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status_message` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("status_message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RevertedMetadata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RevertedMetadata' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RevertedMetadata.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RevertedMetadata value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RevertedMetadata read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RevertedMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of RevertedMetadata - * @throws IOException if the JSON string is invalid with respect to RevertedMetadata - */ - public static RevertedMetadata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RevertedMetadata.class); - } - - /** - * Convert an instance of RevertedMetadata to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_name").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + if (!jsonObj.get("status_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_code").toString())); + } + if (!jsonObj.get("status_message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevertedMetadata.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevertedMetadata' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RevertedMetadata.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RevertedMetadata value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RevertedMetadata read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RevertedMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevertedMetadata + * @throws IOException if the JSON string is invalid with respect to RevertedMetadata + */ + public static RevertedMetadata fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevertedMetadata.class); + } + + /** + * Convert an instance of RevertedMetadata to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java index 0c8b4e5f1..c9e56bb63 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java @@ -4,229 +4,227 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** RevokeTokenRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RevokeTokenRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nullable - private String userIdentifier; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - - @SerializedName(SERIALIZED_NAME_TOKEN) - @javax.annotation.Nullable - private String token; - - public RevokeTokenRequest() {} - - public RevokeTokenRequest userIdentifier(@javax.annotation.Nullable String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * Get userIdentifier - * - * @return userIdentifier - */ - @javax.annotation.Nullable - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nullable String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - public RevokeTokenRequest token(@javax.annotation.Nullable String token) { - this.token = token; - return this; - } - - /** - * Get token - * - * @return token - */ - @javax.annotation.Nullable - public String getToken() { - return token; - } - - public void setToken(@javax.annotation.Nullable String token) { - this.token = token; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RevokeTokenRequest revokeTokenRequest = (RevokeTokenRequest) o; - return Objects.equals(this.userIdentifier, revokeTokenRequest.userIdentifier) - && Objects.equals(this.token, revokeTokenRequest.token); +/** + * RevokeTokenRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RevokeTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nullable + private String userIdentifier; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nullable + private String token; + + public RevokeTokenRequest() { + } + + public RevokeTokenRequest userIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Get userIdentifier + * @return userIdentifier + */ + @javax.annotation.Nullable + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + public RevokeTokenRequest token(@javax.annotation.Nullable String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + */ + @javax.annotation.Nullable + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nullable String token) { + this.token = token; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(userIdentifier, token); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RevokeTokenRequest {\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append("}"); - return sb.toString(); + RevokeTokenRequest revokeTokenRequest = (RevokeTokenRequest) o; + return Objects.equals(this.userIdentifier, revokeTokenRequest.userIdentifier) && + Objects.equals(this.token, revokeTokenRequest.token); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevokeTokenRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("token"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevokeTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevokeTokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RevokeTokenRequest is not found in the empty JSON string", RevokeTokenRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_identifier"); - openapiFields.add("token"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RevokeTokenRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RevokeTokenRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RevokeTokenRequest is not found in" - + " the empty JSON string", - RevokeTokenRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RevokeTokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RevokeTokenRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RevokeTokenRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RevokeTokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("user_identifier") != null && !jsonObj.get("user_identifier").isJsonNull()) - && !jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) - && !jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `token` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("token").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RevokeTokenRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RevokeTokenRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RevokeTokenRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RevokeTokenRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RevokeTokenRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RevokeTokenRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RevokeTokenRequest - * @throws IOException if the JSON string is invalid with respect to RevokeTokenRequest - */ - public static RevokeTokenRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RevokeTokenRequest.class); - } - - /** - * Convert an instance of RevokeTokenRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("user_identifier") != null && !jsonObj.get("user_identifier").isJsonNull()) && !jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevokeTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevokeTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RevokeTokenRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RevokeTokenRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RevokeTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RevokeTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevokeTokenRequest + * @throws IOException if the JSON string is invalid with respect to RevokeTokenRequest + */ + public static RevokeTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevokeTokenRequest.class); + } + + /** + * Convert an instance of RevokeTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java index e1abb313e..1b8071f6c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java @@ -4,239 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** RiseGQLArgWrapper */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RiseGQLArgWrapper implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private String type; - - public RiseGQLArgWrapper() {} - - public RiseGQLArgWrapper name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public RiseGQLArgWrapper type(@javax.annotation.Nonnull String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RiseGQLArgWrapper riseGQLArgWrapper = (RiseGQLArgWrapper) o; - return Objects.equals(this.name, riseGQLArgWrapper.name) - && Objects.equals(this.type, riseGQLArgWrapper.type); +/** + * RiseGQLArgWrapper + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RiseGQLArgWrapper implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public RiseGQLArgWrapper() { + } + + public RiseGQLArgWrapper name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public RiseGQLArgWrapper type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(name, type); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RiseGQLArgWrapper {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + RiseGQLArgWrapper riseGQLArgWrapper = (RiseGQLArgWrapper) o; + return Objects.equals(this.name, riseGQLArgWrapper.name) && + Objects.equals(this.type, riseGQLArgWrapper.type); + } + + @Override + public int hashCode() { + return Objects.hash(name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RiseGQLArgWrapper {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RiseGQLArgWrapper + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RiseGQLArgWrapper.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RiseGQLArgWrapper is not found in the empty JSON string", RiseGQLArgWrapper.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("type"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RiseGQLArgWrapper - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RiseGQLArgWrapper.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RiseGQLArgWrapper is not found in the" - + " empty JSON string", - RiseGQLArgWrapper.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RiseGQLArgWrapper.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RiseGQLArgWrapper` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RiseGQLArgWrapper.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RiseGQLArgWrapper` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RiseGQLArgWrapper.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RiseGQLArgWrapper.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RiseGQLArgWrapper.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RiseGQLArgWrapper' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RiseGQLArgWrapper.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RiseGQLArgWrapper value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RiseGQLArgWrapper read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RiseGQLArgWrapper given an JSON string - * - * @param jsonString JSON string - * @return An instance of RiseGQLArgWrapper - * @throws IOException if the JSON string is invalid with respect to RiseGQLArgWrapper - */ - public static RiseGQLArgWrapper fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RiseGQLArgWrapper.class); - } - - /** - * Convert an instance of RiseGQLArgWrapper to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RiseGQLArgWrapper.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RiseGQLArgWrapper' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RiseGQLArgWrapper.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RiseGQLArgWrapper value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RiseGQLArgWrapper read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RiseGQLArgWrapper given an JSON string + * + * @param jsonString JSON string + * @return An instance of RiseGQLArgWrapper + * @throws IOException if the JSON string is invalid with respect to RiseGQLArgWrapper + */ + public static RiseGQLArgWrapper fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RiseGQLArgWrapper.class); + } + + /** + * Convert an instance of RiseGQLArgWrapper to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java index 5fde39d8d..08e0aa420 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java @@ -4,238 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** RiseSetter */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RiseSetter implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_FIELD = "field"; - - @SerializedName(SERIALIZED_NAME_FIELD) - @javax.annotation.Nonnull - private String field; - - public static final String SERIALIZED_NAME_PATH = "path"; - - @SerializedName(SERIALIZED_NAME_PATH) - @javax.annotation.Nonnull - private String path; - - public RiseSetter() {} - - public RiseSetter field(@javax.annotation.Nonnull String field) { - this.field = field; - return this; - } - - /** - * Get field - * - * @return field - */ - @javax.annotation.Nonnull - public String getField() { - return field; - } - - public void setField(@javax.annotation.Nonnull String field) { - this.field = field; - } - - public RiseSetter path(@javax.annotation.Nonnull String path) { - this.path = path; - return this; - } - - /** - * Get path - * - * @return path - */ - @javax.annotation.Nonnull - public String getPath() { - return path; - } - - public void setPath(@javax.annotation.Nonnull String path) { - this.path = path; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RiseSetter riseSetter = (RiseSetter) o; - return Objects.equals(this.field, riseSetter.field) - && Objects.equals(this.path, riseSetter.path); +/** + * RiseSetter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RiseSetter implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + @javax.annotation.Nonnull + private String field; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private String path; + + public RiseSetter() { + } + + public RiseSetter field(@javax.annotation.Nonnull String field) { + this.field = field; + return this; + } + + /** + * Get field + * @return field + */ + @javax.annotation.Nonnull + public String getField() { + return field; + } + + public void setField(@javax.annotation.Nonnull String field) { + this.field = field; + } + + + public RiseSetter path(@javax.annotation.Nonnull String path) { + this.path = path; + return this; + } + + /** + * Get path + * @return path + */ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull String path) { + this.path = path; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(field, path); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RiseSetter {\n"); - sb.append(" field: ").append(toIndentedString(field)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append("}"); - return sb.toString(); + RiseSetter riseSetter = (RiseSetter) o; + return Objects.equals(this.field, riseSetter.field) && + Objects.equals(this.path, riseSetter.path); + } + + @Override + public int hashCode() { + return Objects.hash(field, path); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RiseSetter {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field"); + openapiFields.add("path"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("field"); + openapiRequiredFields.add("path"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RiseSetter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RiseSetter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RiseSetter is not found in the empty JSON string", RiseSetter.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("field"); - openapiFields.add("path"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("field"); - openapiRequiredFields.add("path"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RiseSetter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RiseSetter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RiseSetter is not found in the empty" - + " JSON string", - RiseSetter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RiseSetter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RiseSetter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RiseSetter.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RiseSetter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RiseSetter.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RiseSetter.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `field` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("field").toString())); - } - if (!jsonObj.get("path").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `path` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("path").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RiseSetter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RiseSetter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RiseSetter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RiseSetter value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RiseSetter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RiseSetter given an JSON string - * - * @param jsonString JSON string - * @return An instance of RiseSetter - * @throws IOException if the JSON string is invalid with respect to RiseSetter - */ - public static RiseSetter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RiseSetter.class); - } - - /** - * Convert an instance of RiseSetter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RiseSetter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RiseSetter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RiseSetter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RiseSetter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RiseSetter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RiseSetter given an JSON string + * + * @param jsonString JSON string + * @return An instance of RiseSetter + * @throws IOException if the JSON string is invalid with respect to RiseSetter + */ + public static RiseSetter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RiseSetter.class); + } + + /** + * Convert an instance of RiseSetter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java index 9a9e03113..5018b20b7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java @@ -4,245 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Role */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Role implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public Role() {} - - public Role id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * id of the role - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public Role name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * name of the role - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Role role = (Role) o; - return Objects.equals(this.id, role.id) && Objects.equals(this.name, role.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Role {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Role - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Role.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Role is not found in the empty JSON" - + " string", - Role.openapiRequiredFields.toString())); - } +/** + * Role + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Role implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public Role() { + } + + public Role id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * id of the role + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public Role name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * name of the role + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Role role = (Role) o; + return Objects.equals(this.id, role.id) && + Objects.equals(this.name, role.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Role {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Role + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Role.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Role is not found in the empty JSON string", Role.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Role.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Role`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Role.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Role` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Role.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Role' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Role.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Role value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Role read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Role given an JSON string - * - * @param jsonString JSON string - * @return An instance of Role - * @throws IOException if the JSON string is invalid with respect to Role - */ - public static Role fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Role.class); - } - - /** - * Convert an instance of Role to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Role.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Role' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Role.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Role value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Role read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Role given an JSON string + * + * @param jsonString JSON string + * @return An instance of Role + * @throws IOException if the JSON string is invalid with respect to Role + */ + public static Role fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Role.class); + } + + /** + * Convert an instance of Role to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java index bb57dcd7b..eae5cb6d6 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 @@ -4,995 +4,910 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.GenericInfo; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** RoleResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RoleResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nonnull - private String description; - - public static final String SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT = "groups_assigned_count"; - - @SerializedName(SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT) - @javax.annotation.Nullable - private Integer groupsAssignedCount; - - public static final String SERIALIZED_NAME_ORGS = "orgs"; - - @SerializedName(SERIALIZED_NAME_ORGS) - @javax.annotation.Nullable - private List orgs; - - public static final String SERIALIZED_NAME_GROUPS = "groups"; - - @SerializedName(SERIALIZED_NAME_GROUPS) - @javax.annotation.Nullable - private List groups; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - BYPASSRLS("BYPASSRLS"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - DEVELOPER("DEVELOPER"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), - - TAGMANAGEMENT("TAGMANAGEMENT"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nonnull - private List privileges; - - /** Permission details of the Role */ - @JsonAdapter(PermissionEnum.Adapter.class) - public enum PermissionEnum { - READ_ONLY("READ_ONLY"), - - MODIFY("MODIFY"), - - NO_ACCESS("NO_ACCESS"); - - private String value; - - PermissionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionEnum fromValue(String value) { - for (PermissionEnum b : PermissionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PermissionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PERMISSION = "permission"; - - @SerializedName(SERIALIZED_NAME_PERMISSION) - @javax.annotation.Nullable - private PermissionEnum permission; - - public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_ID) - @javax.annotation.Nullable - private String authorId; - - public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; - - @SerializedName(SERIALIZED_NAME_MODIFIER_ID) - @javax.annotation.Nullable - private String modifierId; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Object creationTimeInMillis; - - public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = - "modification_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Object modificationTimeInMillis; - - public static final String SERIALIZED_NAME_DELETED = "deleted"; - - @SerializedName(SERIALIZED_NAME_DELETED) - @javax.annotation.Nullable - private Boolean deleted; - - public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; - - @SerializedName(SERIALIZED_NAME_DEPRECATED) - @javax.annotation.Nullable - private Boolean deprecated; - - public static final String SERIALIZED_NAME_EXTERNAL = "external"; - - @SerializedName(SERIALIZED_NAME_EXTERNAL) - @javax.annotation.Nullable - private Boolean external; - - public static final String SERIALIZED_NAME_HIDDEN = "hidden"; - - @SerializedName(SERIALIZED_NAME_HIDDEN) - @javax.annotation.Nullable - private Boolean hidden; - - public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; - - @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) - @javax.annotation.Nullable - private Boolean sharedViaConnection; - - public RoleResponse() {} - - public RoleResponse id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Unique Id of the role. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public RoleResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the role - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public RoleResponse description(@javax.annotation.Nonnull String description) { - this.description = description; - return this; - } - - /** - * Description of the role - * - * @return description - */ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nonnull String description) { - this.description = description; - } - - public RoleResponse groupsAssignedCount( - @javax.annotation.Nullable Integer groupsAssignedCount) { - this.groupsAssignedCount = groupsAssignedCount; - return this; - } - - /** - * number of groups assigned with this role - * - * @return groupsAssignedCount - */ - @javax.annotation.Nullable - public Integer getGroupsAssignedCount() { - return groupsAssignedCount; - } - - public void setGroupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { - this.groupsAssignedCount = groupsAssignedCount; - } - - public RoleResponse orgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - return this; - } - - public RoleResponse addOrgsItem(GenericInfo orgsItem) { - if (this.orgs == null) { - this.orgs = new ArrayList<>(); - } - this.orgs.add(orgsItem); - return this; - } - - /** - * Orgs in which role exists. - * - * @return orgs - */ - @javax.annotation.Nullable - public List getOrgs() { - return orgs; - } - - public void setOrgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - } - - public RoleResponse groups(@javax.annotation.Nullable List groups) { - this.groups = groups; - return this; - } - - public RoleResponse addGroupsItem(GenericInfo groupsItem) { - if (this.groups == null) { - this.groups = new ArrayList<>(); - } - this.groups.add(groupsItem); - return this; - } - - /** - * Details of groups assigned with this role - * - * @return groups - */ - @javax.annotation.Nullable - public List getGroups() { - return groups; - } +import com.thoughtspot.client.JSON; - public void setGroups(@javax.annotation.Nullable List groups) { - this.groups = groups; +/** + * RoleResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RoleResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; + + public static final String SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT = "groups_assigned_count"; + @SerializedName(SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT) + @javax.annotation.Nullable + private Integer groupsAssignedCount; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + BYPASSRLS("BYPASSRLS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_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"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public RoleResponse privileges(@javax.annotation.Nonnull List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public RoleResponse addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; - } - - /** - * Privileges granted to the role. - * - * @return privileges - */ - @javax.annotation.Nonnull - public List getPrivileges() { - return privileges; - } - - public void setPrivileges(@javax.annotation.Nonnull List privileges) { - this.privileges = privileges; - } - - public RoleResponse permission(@javax.annotation.Nullable PermissionEnum permission) { - this.permission = permission; - return this; - } - - /** - * Permission details of the Role - * - * @return permission - */ - @javax.annotation.Nullable - public PermissionEnum getPermission() { - return permission; - } - - public void setPermission(@javax.annotation.Nullable PermissionEnum permission) { - this.permission = permission; - } - - public RoleResponse authorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - return this; - } - - /** - * Unique identifier of author of the role. - * - * @return authorId - */ - @javax.annotation.Nullable - public String getAuthorId() { - return authorId; - } - - public void setAuthorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - } - - public RoleResponse modifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - return this; - } - - /** - * Unique identifier of modifier of the role. - * - * @return modifierId - */ - @javax.annotation.Nullable - public String getModifierId() { - return modifierId; - } - - public void setModifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - } - - public RoleResponse creationTimeInMillis( - @javax.annotation.Nullable Object creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Creation time of the role in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nullable - public Object getCreationTimeInMillis() { - return creationTimeInMillis; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setCreationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public RoleResponse modificationTimeInMillis( - @javax.annotation.Nullable Object modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - return this; - } - - /** - * Last modified time of the role in milliseconds. - * - * @return modificationTimeInMillis - */ - @javax.annotation.Nullable - public Object getModificationTimeInMillis() { - return modificationTimeInMillis; - } - - public void setModificationTimeInMillis( - @javax.annotation.Nullable Object modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - } - - public RoleResponse deleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - return this; - } - - /** - * Indicates whether the role is deleted. - * - * @return deleted - */ - @javax.annotation.Nullable - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - } - - public RoleResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - return this; - } - - /** - * Indicates whether the role is deprecated. - * - * @return deprecated - */ - @javax.annotation.Nullable - public Boolean getDeprecated() { - return deprecated; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public RoleResponse external(@javax.annotation.Nullable Boolean external) { - this.external = external; - return this; - } - - /** - * Indicates whether the role is external. - * - * @return external - */ - @javax.annotation.Nullable - public Boolean getExternal() { - return external; - } - - public void setExternal(@javax.annotation.Nullable Boolean external) { - this.external = external; - } - - public RoleResponse hidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - return this; - } - - /** - * Indicates whether the role is hidden. - * - * @return hidden - */ - @javax.annotation.Nullable - public Boolean getHidden() { - return hidden; - } - - public void setHidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - } - - public RoleResponse sharedViaConnection( - @javax.annotation.Nullable Boolean sharedViaConnection) { - this.sharedViaConnection = sharedViaConnection; - return this; - } - - /** - * Indicates whether the role is shared via connection - * - * @return sharedViaConnection - */ - @javax.annotation.Nullable - public Boolean getSharedViaConnection() { - return sharedViaConnection; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { - this.sharedViaConnection = sharedViaConnection; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nonnull + private List privileges; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RoleResponse roleResponse = (RoleResponse) o; - return Objects.equals(this.id, roleResponse.id) - && Objects.equals(this.name, roleResponse.name) - && Objects.equals(this.description, roleResponse.description) - && Objects.equals(this.groupsAssignedCount, roleResponse.groupsAssignedCount) - && Objects.equals(this.orgs, roleResponse.orgs) - && Objects.equals(this.groups, roleResponse.groups) - && Objects.equals(this.privileges, roleResponse.privileges) - && Objects.equals(this.permission, roleResponse.permission) - && Objects.equals(this.authorId, roleResponse.authorId) - && Objects.equals(this.modifierId, roleResponse.modifierId) - && Objects.equals(this.creationTimeInMillis, roleResponse.creationTimeInMillis) - && Objects.equals( - this.modificationTimeInMillis, roleResponse.modificationTimeInMillis) - && Objects.equals(this.deleted, roleResponse.deleted) - && Objects.equals(this.deprecated, roleResponse.deprecated) - && Objects.equals(this.external, roleResponse.external) - && Objects.equals(this.hidden, roleResponse.hidden) - && Objects.equals(this.sharedViaConnection, roleResponse.sharedViaConnection); - } + /** + * Permission details of the Role + */ + @JsonAdapter(PermissionEnum.Adapter.class) + public enum PermissionEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - id, - name, - description, - groupsAssignedCount, - orgs, - groups, - privileges, - permission, - authorId, - modifierId, - creationTimeInMillis, - modificationTimeInMillis, - deleted, - deprecated, - external, - hidden, - sharedViaConnection); + PermissionEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RoleResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" groupsAssignedCount: ") - .append(toIndentedString(groupsAssignedCount)) - .append("\n"); - sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); - sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); - sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); - sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" modificationTimeInMillis: ") - .append(toIndentedString(modificationTimeInMillis)) - .append("\n"); - sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); - sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); - sb.append(" external: ").append(toIndentedString(external)).append("\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" sharedViaConnection: ") - .append(toIndentedString(sharedViaConnection)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PermissionEnum fromValue(String value) { + for (PermissionEnum b : PermissionEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("groups_assigned_count"); - openapiFields.add("orgs"); - openapiFields.add("groups"); - openapiFields.add("privileges"); - openapiFields.add("permission"); - openapiFields.add("author_id"); - openapiFields.add("modifier_id"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("modification_time_in_millis"); - openapiFields.add("deleted"); - openapiFields.add("deprecated"); - openapiFields.add("external"); - openapiFields.add("hidden"); - openapiFields.add("shared_via_connection"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("privileges"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RoleResponse - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RoleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RoleResponse is not found in the" - + " empty JSON string", - RoleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RoleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RoleResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RoleResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + PermissionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERMISSION = "permission"; + @SerializedName(SERIALIZED_NAME_PERMISSION) + @javax.annotation.Nullable + private PermissionEnum permission; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = "modification_time_in_millis"; + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object modificationTimeInMillis; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; + @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) + @javax.annotation.Nullable + private Boolean sharedViaConnection; + + public RoleResponse() { + } + + public RoleResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique Id of the role. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public RoleResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the role + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public RoleResponse description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description of the role + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public RoleResponse groupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + return this; + } + + /** + * number of groups assigned with this role + * @return groupsAssignedCount + */ + @javax.annotation.Nullable + public Integer getGroupsAssignedCount() { + return groupsAssignedCount; + } + + public void setGroupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + } + + + public RoleResponse orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public RoleResponse addOrgsItem(GenericInfo orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs in which role exists. + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + + public RoleResponse groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public RoleResponse addGroupsItem(GenericInfo groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Details of groups assigned with this role + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + + public RoleResponse privileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + return this; + } + + public RoleResponse addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the role. + * @return privileges + */ + @javax.annotation.Nonnull + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + } + + + public RoleResponse permission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + return this; + } + + /** + * Permission details of the Role + * @return permission + */ + @javax.annotation.Nullable + public PermissionEnum getPermission() { + return permission; + } + + public void setPermission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + } + + + public RoleResponse authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of author of the role. + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public RoleResponse modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Unique identifier of modifier of the role. + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + + public RoleResponse creationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the role in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Object getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public RoleResponse modificationTimeInMillis(@javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the role in milliseconds. + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Object getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis(@javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + + public RoleResponse deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the role is deleted. + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + + public RoleResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the role is deprecated. + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + + public RoleResponse external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the role is external. + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + + public RoleResponse hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the role is hidden. + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + public RoleResponse sharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + return this; + } + + /** + * Indicates whether the role is shared via connection + * @return sharedViaConnection + */ + @javax.annotation.Nullable + public Boolean getSharedViaConnection() { + return sharedViaConnection; + } + + public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoleResponse roleResponse = (RoleResponse) o; + return Objects.equals(this.id, roleResponse.id) && + Objects.equals(this.name, roleResponse.name) && + Objects.equals(this.description, roleResponse.description) && + Objects.equals(this.groupsAssignedCount, roleResponse.groupsAssignedCount) && + Objects.equals(this.orgs, roleResponse.orgs) && + Objects.equals(this.groups, roleResponse.groups) && + Objects.equals(this.privileges, roleResponse.privileges) && + Objects.equals(this.permission, roleResponse.permission) && + Objects.equals(this.authorId, roleResponse.authorId) && + Objects.equals(this.modifierId, roleResponse.modifierId) && + Objects.equals(this.creationTimeInMillis, roleResponse.creationTimeInMillis) && + Objects.equals(this.modificationTimeInMillis, roleResponse.modificationTimeInMillis) && + Objects.equals(this.deleted, roleResponse.deleted) && + Objects.equals(this.deprecated, roleResponse.deprecated) && + Objects.equals(this.external, roleResponse.external) && + Objects.equals(this.hidden, roleResponse.hidden) && + Objects.equals(this.sharedViaConnection, roleResponse.sharedViaConnection); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, groupsAssignedCount, orgs, groups, privileges, permission, authorId, modifierId, creationTimeInMillis, modificationTimeInMillis, deleted, deprecated, external, hidden, sharedViaConnection); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoleResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" groupsAssignedCount: ").append(toIndentedString(groupsAssignedCount)).append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" modificationTimeInMillis: ").append(toIndentedString(modificationTimeInMillis)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" sharedViaConnection: ").append(toIndentedString(sharedViaConnection)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("groups_assigned_count"); + openapiFields.add("orgs"); + openapiFields.add("groups"); + openapiFields.add("privileges"); + openapiFields.add("permission"); + openapiFields.add("author_id"); + openapiFields.add("modifier_id"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("external"); + openapiFields.add("hidden"); + openapiFields.add("shared_via_connection"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("privileges"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RoleResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RoleResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RoleResponse is not found in the empty JSON string", RoleResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RoleResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RoleResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RoleResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { - JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); - if (jsonArrayorgs != null) { - // ensure the json data is an array - if (!jsonObj.get("orgs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orgs` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("orgs").toString())); - } - - // validate the optional field `orgs` (array) - for (int i = 0; i < jsonArrayorgs.size(); i++) { - GenericInfo.validateJsonElement(jsonArrayorgs.get(i)); - } - ; - } - } - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { - JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); - if (jsonArraygroups != null) { - // ensure the json data is an array - if (!jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups").toString())); - } - - // validate the optional field `groups` (array) - for (int i = 0; i < jsonArraygroups.size(); i++) { - GenericInfo.validateJsonElement(jsonArraygroups.get(i)); - } - ; - } - } - // ensure the required json array is present - if (jsonObj.get("privileges") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - if ((jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) - && !jsonObj.get("permission").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permission` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("permission").toString())); - } - // validate the optional field `permission` - if (jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) { - PermissionEnum.validateJsonElement(jsonObj.get("permission")); - } - if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) - && !jsonObj.get("author_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_id").toString())); - } - if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) - && !jsonObj.get("modifier_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modifier_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("modifier_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RoleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RoleResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RoleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RoleResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RoleResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RoleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of RoleResponse - * @throws IOException if the JSON string is invalid with respect to RoleResponse - */ - public static RoleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RoleResponse.class); - } - - /** - * Convert an instance of RoleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `orgs` to be an array in the JSON string but got `%s`", jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + GenericInfo.validateJsonElement(jsonArrayorgs.get(i)); + }; + } + } + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GenericInfo.validateJsonElement(jsonArraygroups.get(i)); + }; + } + } + // ensure the required json array is present + if (jsonObj.get("privileges") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + if ((jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) && !jsonObj.get("permission").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `permission` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permission").toString())); + } + // validate the optional field `permission` + if (jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) { + PermissionEnum.validateJsonElement(jsonObj.get("permission")); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifier_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifier_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RoleResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RoleResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RoleResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RoleResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RoleResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RoleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RoleResponse + * @throws IOException if the JSON string is invalid with respect to RoleResponse + */ + public static RoleResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RoleResponse.class); + } + + /** + * Convert an instance of RoleResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java index 79eedeb37..5c411ed4b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java @@ -4,184 +4,194 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** List of runtime parameters need to set during the session. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * List of runtime parameters need to set during the session. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class RuntimeFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; + public RuntimeFilter() { + } - public RuntimeFilter() {} + public RuntimeFilter runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } - public RuntimeFilter runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } + /** + * Runtime filter parameter type in JWT. + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } - /** - * Runtime filter parameter type in JWT. - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuntimeFilter runtimeFilter = (RuntimeFilter) o; - return Objects.equals(this.runtimeFilter, runtimeFilter.runtimeFilter); - } - @Override - public int hashCode() { - return Objects.hash(runtimeFilter); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuntimeFilter {\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + RuntimeFilter runtimeFilter = (RuntimeFilter) o; + return Objects.equals(this.runtimeFilter, runtimeFilter.runtimeFilter); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeFilter); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeFilter {\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("runtime_filter"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RuntimeFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RuntimeFilter.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RuntimeFilter is not found in the" - + " empty JSON string", - RuntimeFilter.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_filter"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RuntimeFilter is not found in the empty JSON string", RuntimeFilter.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RuntimeFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RuntimeFilter` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RuntimeFilter.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RuntimeFilter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RuntimeFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RuntimeFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RuntimeFilter.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RuntimeFilter value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RuntimeFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RuntimeFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of RuntimeFilter - * @throws IOException if the JSON string is invalid with respect to RuntimeFilter - */ - public static RuntimeFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RuntimeFilter.class); - } + } - /** - * Convert an instance of RuntimeFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RuntimeFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RuntimeFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RuntimeFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeFilter + * @throws IOException if the JSON string is invalid with respect to RuntimeFilter + */ + public static RuntimeFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeFilter.class); + } + + /** + * Convert an instance of RuntimeFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java index c68e0fde8..b2d799a5e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java @@ -4,473 +4,451 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Objects to apply the Runtime_Filters. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RuntimeFilters implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; - - @SerializedName(SERIALIZED_NAME_COLUMN_NAME) - @javax.annotation.Nonnull - private String columnName; - - public static final String SERIALIZED_NAME_VALUES = "values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nonnull - private List values; - - /** Operator value. Example: EQ */ - @JsonAdapter(OperatorEnum.Adapter.class) - public enum OperatorEnum { - EQ("EQ"), - - NE("NE"), - - LT("LT"), - - LE("LE"), - - GT("GT"), - - GE("GE"), - - IN("IN"), - - BW("BW"), - - CONTAINS("CONTAINS"), - - BEGINS_WITH("BEGINS_WITH"), - - ENDS_WITH("ENDS_WITH"), - - BW_INC("BW_INC"), - - BW_INC_MIN("BW_INC_MIN"), - - BW_INC_MAX("BW_INC_MAX"), - - LIKE("LIKE"), - - NOT_IN("NOT_IN"); - - private String value; - - OperatorEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperatorEnum fromValue(String value) { - for (OperatorEnum b : OperatorEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperatorEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperatorEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperatorEnum.fromValue(value); - } - } - public static final String SERIALIZED_NAME_OPERATOR = "operator"; - - @SerializedName(SERIALIZED_NAME_OPERATOR) - @javax.annotation.Nonnull - private OperatorEnum operator; - - public static final String SERIALIZED_NAME_PERSIST = "persist"; - - @SerializedName(SERIALIZED_NAME_PERSIST) - @javax.annotation.Nullable - private Boolean persist = false; - - public static final String SERIALIZED_NAME_OBJECTS = "objects"; - - @SerializedName(SERIALIZED_NAME_OBJECTS) - @javax.annotation.Nullable - private List objects; - - public RuntimeFilters() {} - - public RuntimeFilters columnName(@javax.annotation.Nonnull String columnName) { - this.columnName = columnName; - return this; - } +import com.thoughtspot.client.JSON; - /** - * The column name to apply filter. - * - * @return columnName - */ - @javax.annotation.Nonnull - public String getColumnName() { - return columnName; +/** + * Objects to apply the Runtime_Filters. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RuntimeFilters implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; + @SerializedName(SERIALIZED_NAME_COLUMN_NAME) + @javax.annotation.Nonnull + private String columnName; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + /** + * Operator value. Example: EQ + */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQ("EQ"), + + NE("NE"), + + LT("LT"), + + LE("LE"), + + GT("GT"), + + GE("GE"), + + IN("IN"), + + BW("BW"), + + CONTAINS("CONTAINS"), + + BEGINS_WITH("BEGINS_WITH"), + + ENDS_WITH("ENDS_WITH"), + + BW_INC("BW_INC"), + + BW_INC_MIN("BW_INC_MIN"), + + BW_INC_MAX("BW_INC_MAX"), + + LIKE("LIKE"), + + NOT_IN("NOT_IN"); + + private String value; + + OperatorEnum(String value) { + this.value = value; } - public void setColumnName(@javax.annotation.Nonnull String columnName) { - this.columnName = columnName; + public String getValue() { + return value; } - public RuntimeFilters values(@javax.annotation.Nonnull List values) { - this.values = values; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public RuntimeFilters addValuesItem(String valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.values.add(valuesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Value of the filters. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } } - public void setValues(@javax.annotation.Nonnull List values) { - this.values = values; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); } - - public RuntimeFilters operator(@javax.annotation.Nonnull OperatorEnum operator) { - this.operator = operator; - return this; + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_PERSIST = "persist"; + @SerializedName(SERIALIZED_NAME_PERSIST) + @javax.annotation.Nullable + private Boolean persist = false; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public RuntimeFilters() { + } + + public RuntimeFilters columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * The column name to apply filter. + * @return columnName + */ + @javax.annotation.Nonnull + public String getColumnName() { + return columnName; + } + + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + + public RuntimeFilters values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public RuntimeFilters addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); } - - /** - * Operator value. Example: EQ - * - * @return operator - */ - @javax.annotation.Nonnull - public OperatorEnum getOperator() { - return operator; + this.values.add(valuesItem); + return this; + } + + /** + * Value of the filters. + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + + public RuntimeFilters operator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Operator value. Example: EQ + * @return operator + */ + @javax.annotation.Nonnull + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + } + + + public RuntimeFilters persist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + return this; + } + + /** + * Flag to persist the runtime filters. Version: 9.12.0.cl or later + * @return persist + */ + @javax.annotation.Nullable + public Boolean getPersist() { + return persist; + } + + public void setPersist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + } + + + public RuntimeFilters objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public RuntimeFilters addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); } + this.objects.add(objectsItem); + return this; + } - public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { - this.operator = operator; - } + /** + * Object to apply the runtime filter. + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } - public RuntimeFilters persist(@javax.annotation.Nullable Boolean persist) { - this.persist = persist; - return this; - } + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } - /** - * Flag to persist the runtime filters. Version: 9.12.0.cl or later - * - * @return persist - */ - @javax.annotation.Nullable - public Boolean getPersist() { - return persist; - } - public void setPersist(@javax.annotation.Nullable Boolean persist) { - this.persist = persist; - } - public RuntimeFilters objects(@javax.annotation.Nullable List objects) { - this.objects = objects; - return this; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public RuntimeFilters addObjectsItem(UserObject objectsItem) { - if (this.objects == null) { - this.objects = new ArrayList<>(); - } - this.objects.add(objectsItem); - return this; + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Object to apply the runtime filter. - * - * @return objects - */ - @javax.annotation.Nullable - public List getObjects() { - return objects; + RuntimeFilters runtimeFilters = (RuntimeFilters) o; + return Objects.equals(this.columnName, runtimeFilters.columnName) && + Objects.equals(this.values, runtimeFilters.values) && + Objects.equals(this.operator, runtimeFilters.operator) && + Objects.equals(this.persist, runtimeFilters.persist) && + Objects.equals(this.objects, runtimeFilters.objects); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, values, operator, persist, objects); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public void setObjects(@javax.annotation.Nullable List objects) { - this.objects = objects; + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeFilters {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_name"); + openapiFields.add("values"); + openapiFields.add("operator"); + openapiFields.add("persist"); + openapiFields.add("objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_name"); + openapiRequiredFields.add("values"); + openapiRequiredFields.add("operator"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RuntimeFilters is not found in the empty JSON string", RuntimeFilters.openapiRequiredFields.toString())); } - RuntimeFilters runtimeFilters = (RuntimeFilters) o; - return Objects.equals(this.columnName, runtimeFilters.columnName) - && Objects.equals(this.values, runtimeFilters.values) - && Objects.equals(this.operator, runtimeFilters.operator) - && Objects.equals(this.persist, runtimeFilters.persist) - && Objects.equals(this.objects, runtimeFilters.objects); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } + } - @Override - public int hashCode() { - return Objects.hash(columnName, values, operator, persist, objects); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RuntimeFilters.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RuntimeFilters` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuntimeFilters {\n"); - sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); - sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); - sb.append("}"); - return sb.toString(); - } + } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("column_name"); - openapiFields.add("values"); - openapiFields.add("operator"); - openapiFields.add("persist"); - openapiFields.add("objects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("column_name"); - openapiRequiredFields.add("values"); - openapiRequiredFields.add("operator"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RuntimeFilters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RuntimeFilters.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RuntimeFilters is not found in the" - + " empty JSON string", - RuntimeFilters.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RuntimeFilters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RuntimeFilters` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RuntimeFilters.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RuntimeFilters.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("column_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("column_name").toString())); - } - // ensure the required json array is present - if (jsonObj.get("values") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `values` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("values").toString())); - } - if (!jsonObj.get("operator").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operator` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operator").toString())); - } - // validate the required field `operator` - OperatorEnum.validateJsonElement(jsonObj.get("operator")); - if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { - JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); - if (jsonArrayobjects != null) { - // ensure the json data is an array - if (!jsonObj.get("objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `objects` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("objects").toString())); - } - - // validate the optional field `objects` (array) - for (int i = 0; i < jsonArrayobjects.size(); i++) { - UserObject.validateJsonElement(jsonArrayobjects.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RuntimeFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RuntimeFilters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RuntimeFilters.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RuntimeFilters value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RuntimeFilters read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (!jsonObj.get("column_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `column_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("column_name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + if (!jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // validate the required field `operator` + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `objects` to be an array in the JSON string but got `%s`", jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + }; } - } + } + } - /** - * Create an instance of RuntimeFilters given an JSON string - * - * @param jsonString JSON string - * @return An instance of RuntimeFilters - * @throws IOException if the JSON string is invalid with respect to RuntimeFilters - */ - public static RuntimeFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RuntimeFilters.class); - } - - /** - * Convert an instance of RuntimeFilters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RuntimeFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RuntimeFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RuntimeFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeFilters + * @throws IOException if the JSON string is invalid with respect to RuntimeFilters + */ + public static RuntimeFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeFilters.class); + } + + /** + * Convert an instance of RuntimeFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java index 9bada0fea..d8b37b69e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java @@ -4,188 +4,194 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** List of runtime parameters need to set during the session. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * List of runtime parameters need to set during the session. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class RuntimeParamOverride implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; + public RuntimeParamOverride() { + } - public RuntimeParamOverride() {} + public RuntimeParamOverride runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } - public RuntimeParamOverride runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } + /** + * Runtime param override type in JWT. + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } - /** - * Runtime param override type in JWT. - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuntimeParamOverride runtimeParamOverride = (RuntimeParamOverride) o; - return Objects.equals(this.runtimeParamOverride, runtimeParamOverride.runtimeParamOverride); - } - @Override - public int hashCode() { - return Objects.hash(runtimeParamOverride); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuntimeParamOverride {\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + RuntimeParamOverride runtimeParamOverride = (RuntimeParamOverride) o; + return Objects.equals(this.runtimeParamOverride, runtimeParamOverride.runtimeParamOverride); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeParamOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeParamOverride {\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("runtime_param_override"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RuntimeParamOverride - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RuntimeParamOverride.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RuntimeParamOverride is not found in" - + " the empty JSON string", - RuntimeParamOverride.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeParamOverride + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeParamOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RuntimeParamOverride is not found in the empty JSON string", RuntimeParamOverride.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RuntimeParamOverride.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RuntimeParamOverride` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RuntimeParamOverride.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RuntimeParamOverride` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RuntimeParamOverride.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RuntimeParamOverride' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RuntimeParamOverride.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RuntimeParamOverride value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RuntimeParamOverride read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RuntimeParamOverride given an JSON string - * - * @param jsonString JSON string - * @return An instance of RuntimeParamOverride - * @throws IOException if the JSON string is invalid with respect to RuntimeParamOverride - */ - public static RuntimeParamOverride fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RuntimeParamOverride.class); - } + } - /** - * Convert an instance of RuntimeParamOverride to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeParamOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeParamOverride' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RuntimeParamOverride.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeParamOverride value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RuntimeParamOverride read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RuntimeParamOverride given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeParamOverride + * @throws IOException if the JSON string is invalid with respect to RuntimeParamOverride + */ + public static RuntimeParamOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeParamOverride.class); + } + + /** + * Convert an instance of RuntimeParamOverride to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java index ae777182f..057d093f4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java @@ -4,356 +4,338 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** Objects to apply the Runtime_Parameters. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RuntimeParameters implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_VALUES = "values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nonnull - private List values; - - public static final String SERIALIZED_NAME_PERSIST = "persist"; - - @SerializedName(SERIALIZED_NAME_PERSIST) - @javax.annotation.Nullable - private Boolean persist = false; - - public static final String SERIALIZED_NAME_OBJECTS = "objects"; - - @SerializedName(SERIALIZED_NAME_OBJECTS) - @javax.annotation.Nullable - private List objects; - - public RuntimeParameters() {} - - public RuntimeParameters name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * The name of the parameter. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public RuntimeParameters values(@javax.annotation.Nonnull List values) { - this.values = values; - return this; - } - - public RuntimeParameters addValuesItem(String valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; - } - - /** - * The array of values. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; - } - - public void setValues(@javax.annotation.Nonnull List values) { - this.values = values; - } - - public RuntimeParameters persist(@javax.annotation.Nullable Boolean persist) { - this.persist = persist; - return this; - } - - /** - * Flag to persist the parameters. Version: 9.12.0.cl or later - * - * @return persist - */ - @javax.annotation.Nullable - public Boolean getPersist() { - return persist; - } - - public void setPersist(@javax.annotation.Nullable Boolean persist) { - this.persist = persist; - } - - public RuntimeParameters objects(@javax.annotation.Nullable List objects) { - this.objects = objects; - return this; - } +import com.thoughtspot.client.JSON; - public RuntimeParameters addObjectsItem(UserObject objectsItem) { - if (this.objects == null) { - this.objects = new ArrayList<>(); - } - this.objects.add(objectsItem); - return this; +/** + * Objects to apply the Runtime_Parameters. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RuntimeParameters implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public static final String SERIALIZED_NAME_PERSIST = "persist"; + @SerializedName(SERIALIZED_NAME_PERSIST) + @javax.annotation.Nullable + private Boolean persist = false; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public RuntimeParameters() { + } + + public RuntimeParameters name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the parameter. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public RuntimeParameters values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public RuntimeParameters addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); } - - /** - * Object to apply the runtime parameter. - * - * @return objects - */ - @javax.annotation.Nullable - public List getObjects() { - return objects; + this.values.add(valuesItem); + return this; + } + + /** + * The array of values. + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + + public RuntimeParameters persist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + return this; + } + + /** + * Flag to persist the parameters. Version: 9.12.0.cl or later + * @return persist + */ + @javax.annotation.Nullable + public Boolean getPersist() { + return persist; + } + + public void setPersist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + } + + + public RuntimeParameters objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public RuntimeParameters addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); } + this.objects.add(objectsItem); + return this; + } - public void setObjects(@javax.annotation.Nullable List objects) { - this.objects = objects; - } + /** + * Object to apply the runtime parameter. + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuntimeParameters runtimeParameters = (RuntimeParameters) o; - return Objects.equals(this.name, runtimeParameters.name) - && Objects.equals(this.values, runtimeParameters.values) - && Objects.equals(this.persist, runtimeParameters.persist) - && Objects.equals(this.objects, runtimeParameters.objects); - } + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(name, values, persist, objects); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuntimeParameters {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); - sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + RuntimeParameters runtimeParameters = (RuntimeParameters) o; + return Objects.equals(this.name, runtimeParameters.name) && + Objects.equals(this.values, runtimeParameters.values) && + Objects.equals(this.persist, runtimeParameters.persist) && + Objects.equals(this.objects, runtimeParameters.objects); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, values, persist, objects); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("values"); - openapiFields.add("persist"); - openapiFields.add("objects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("values"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeParameters {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RuntimeParameters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RuntimeParameters.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RuntimeParameters is not found in the" - + " empty JSON string", - RuntimeParameters.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("values"); + openapiFields.add("persist"); + openapiFields.add("objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeParameters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RuntimeParameters is not found in the empty JSON string", RuntimeParameters.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RuntimeParameters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RuntimeParameters` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RuntimeParameters.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RuntimeParameters` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RuntimeParameters.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RuntimeParameters.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `objects` to be an array in the JSON string but got `%s`", jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + }; } - // ensure the required json array is present - if (jsonObj.get("values") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `values` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("values").toString())); - } - if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { - JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); - if (jsonArrayobjects != null) { - // ensure the json data is an array - if (!jsonObj.get("objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `objects` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("objects").toString())); - } - - // validate the optional field `objects` (array) - for (int i = 0; i < jsonArrayobjects.size(); i++) { - UserObject.validateJsonElement(jsonArrayobjects.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RuntimeParameters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RuntimeParameters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RuntimeParameters.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RuntimeParameters value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RuntimeParameters read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RuntimeParameters given an JSON string - * - * @param jsonString JSON string - * @return An instance of RuntimeParameters - * @throws IOException if the JSON string is invalid with respect to RuntimeParameters - */ - public static RuntimeParameters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RuntimeParameters.class); - } + } + } - /** - * Convert an instance of RuntimeParameters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeParameters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeParameters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RuntimeParameters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeParameters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RuntimeParameters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RuntimeParameters given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeParameters + * @throws IOException if the JSON string is invalid with respect to RuntimeParameters + */ + public static RuntimeParameters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeParameters.class); + } + + /** + * Convert an instance of RuntimeParameters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java index 14ca11053..47ed52bbc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java @@ -4,184 +4,194 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** List of runtime parameters need to set during the session. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * List of runtime parameters need to set during the session. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class RuntimeSort implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; + public RuntimeSort() { + } - public RuntimeSort() {} + public RuntimeSort runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } - public RuntimeSort runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } + /** + * Runtime sort parameter type in JWT. + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } - /** - * Runtime sort parameter type in JWT. - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuntimeSort runtimeSort = (RuntimeSort) o; - return Objects.equals(this.runtimeSort, runtimeSort.runtimeSort); - } - @Override - public int hashCode() { - return Objects.hash(runtimeSort); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuntimeSort {\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + RuntimeSort runtimeSort = (RuntimeSort) o; + return Objects.equals(this.runtimeSort, runtimeSort.runtimeSort); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeSort); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeSort {\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("runtime_sort"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RuntimeSort - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RuntimeSort.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RuntimeSort is not found in the empty" - + " JSON string", - RuntimeSort.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_sort"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeSort + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeSort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RuntimeSort is not found in the empty JSON string", RuntimeSort.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RuntimeSort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RuntimeSort` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RuntimeSort.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RuntimeSort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RuntimeSort.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RuntimeSort' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RuntimeSort.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RuntimeSort value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RuntimeSort read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of RuntimeSort given an JSON string - * - * @param jsonString JSON string - * @return An instance of RuntimeSort - * @throws IOException if the JSON string is invalid with respect to RuntimeSort - */ - public static RuntimeSort fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RuntimeSort.class); - } + } - /** - * Convert an instance of RuntimeSort to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeSort.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeSort' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RuntimeSort.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeSort value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RuntimeSort read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RuntimeSort given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeSort + * @throws IOException if the JSON string is invalid with respect to RuntimeSort + */ + public static RuntimeSort fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeSort.class); + } + + /** + * Convert an instance of RuntimeSort to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java index fdc125146..f33e1dae3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java @@ -4,388 +4,374 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Objects to apply the Runtime_Sorts. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class RuntimeSorts implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; - - @SerializedName(SERIALIZED_NAME_COLUMN_NAME) - @javax.annotation.Nullable - private String columnName; - - /** Order for the sort. */ - @JsonAdapter(OrderEnum.Adapter.class) - public enum OrderEnum { - ASC("ASC"), - - DESC("DESC"); - - private String value; - - OrderEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OrderEnum fromValue(String value) { - for (OrderEnum b : OrderEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OrderEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OrderEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OrderEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ORDER = "order"; - - @SerializedName(SERIALIZED_NAME_ORDER) - @javax.annotation.Nullable - private OrderEnum order; - - public static final String SERIALIZED_NAME_PERSIST = "persist"; - - @SerializedName(SERIALIZED_NAME_PERSIST) - @javax.annotation.Nullable - private Boolean persist = false; - - public static final String SERIALIZED_NAME_OBJECTS = "objects"; - - @SerializedName(SERIALIZED_NAME_OBJECTS) - @javax.annotation.Nullable - private List objects; - public RuntimeSorts() {} +import com.thoughtspot.client.JSON; - public RuntimeSorts columnName(@javax.annotation.Nullable String columnName) { - this.columnName = columnName; - return this; +/** + * Objects to apply the Runtime_Sorts. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RuntimeSorts implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; + @SerializedName(SERIALIZED_NAME_COLUMN_NAME) + @javax.annotation.Nullable + private String columnName; + + /** + * Order for the sort. + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; } - /** - * The column name to apply filter. - * - * @return columnName - */ - @javax.annotation.Nullable - public String getColumnName() { - return columnName; + public String getValue() { + return value; } - public void setColumnName(@javax.annotation.Nullable String columnName) { - this.columnName = columnName; + @Override + public String toString() { + return String.valueOf(value); } - public RuntimeSorts order(@javax.annotation.Nullable OrderEnum order) { - this.order = order; - return this; + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - /** - * Order for the sort. - * - * @return order - */ - @javax.annotation.Nullable - public OrderEnum getOrder() { - return order; + 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 void setOrder(@javax.annotation.Nullable OrderEnum order) { - this.order = order; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); } - - public RuntimeSorts persist(@javax.annotation.Nullable Boolean persist) { - this.persist = persist; - return this; + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public static final String SERIALIZED_NAME_PERSIST = "persist"; + @SerializedName(SERIALIZED_NAME_PERSIST) + @javax.annotation.Nullable + private Boolean persist = false; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public RuntimeSorts() { + } + + public RuntimeSorts columnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + return this; + } + + /** + * The column name to apply filter. + * @return columnName + */ + @javax.annotation.Nullable + public String getColumnName() { + return columnName; + } + + public void setColumnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + } + + + public RuntimeSorts order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Order for the sort. + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + + public RuntimeSorts persist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + return this; + } + + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + * @return persist + */ + @javax.annotation.Nullable + public Boolean getPersist() { + return persist; + } + + public void setPersist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + } + + + public RuntimeSorts objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public RuntimeSorts addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); } + this.objects.add(objectsItem); + return this; + } - /** - * Flag to persist the runtime sorts. Version: 9.12.0.cl or later - * - * @return persist - */ - @javax.annotation.Nullable - public Boolean getPersist() { - return persist; - } + /** + * Object to apply the runtime sort. + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } - public void setPersist(@javax.annotation.Nullable Boolean persist) { - this.persist = persist; - } + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } - public RuntimeSorts objects(@javax.annotation.Nullable List objects) { - this.objects = objects; - return this; - } - public RuntimeSorts addObjectsItem(UserObject objectsItem) { - if (this.objects == null) { - this.objects = new ArrayList<>(); - } - this.objects.add(objectsItem); - return this; - } - /** - * Object to apply the runtime sort. - * - * @return objects - */ - @javax.annotation.Nullable - public List getObjects() { - return objects; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setObjects(@javax.annotation.Nullable List objects) { - this.objects = objects; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuntimeSorts runtimeSorts = (RuntimeSorts) o; - return Objects.equals(this.columnName, runtimeSorts.columnName) - && Objects.equals(this.order, runtimeSorts.order) - && Objects.equals(this.persist, runtimeSorts.persist) - && Objects.equals(this.objects, runtimeSorts.objects); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + RuntimeSorts runtimeSorts = (RuntimeSorts) o; + return Objects.equals(this.columnName, runtimeSorts.columnName) && + Objects.equals(this.order, runtimeSorts.order) && + Objects.equals(this.persist, runtimeSorts.persist) && + Objects.equals(this.objects, runtimeSorts.objects); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, order, persist, objects); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(columnName, order, persist, objects); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeSorts {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_name"); + openapiFields.add("order"); + openapiFields.add("persist"); + openapiFields.add("objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeSorts + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeSorts.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RuntimeSorts is not found in the empty JSON string", RuntimeSorts.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuntimeSorts {\n"); - sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); - sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("column_name"); - openapiFields.add("order"); - openapiFields.add("persist"); - openapiFields.add("objects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RuntimeSorts - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RuntimeSorts.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in RuntimeSorts is not found in the" - + " empty JSON string", - RuntimeSorts.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RuntimeSorts.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `RuntimeSorts` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RuntimeSorts.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RuntimeSorts` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("column_name") != null && !jsonObj.get("column_name").isJsonNull()) - && !jsonObj.get("column_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("column_name").toString())); - } - if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) - && !jsonObj.get("order").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `order` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("order").toString())); - } - // validate the optional field `order` - if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { - OrderEnum.validateJsonElement(jsonObj.get("order")); - } - if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { - JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); - if (jsonArrayobjects != null) { - // ensure the json data is an array - if (!jsonObj.get("objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `objects` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("objects").toString())); - } - - // validate the optional field `objects` (array) - for (int i = 0; i < jsonArrayobjects.size(); i++) { - UserObject.validateJsonElement(jsonArrayobjects.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RuntimeSorts.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RuntimeSorts' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(RuntimeSorts.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, RuntimeSorts value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RuntimeSorts read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if ((jsonObj.get("column_name") != null && !jsonObj.get("column_name").isJsonNull()) && !jsonObj.get("column_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `column_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("column_name").toString())); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `objects` to be an array in the JSON string but got `%s`", jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + }; } - } - - /** - * Create an instance of RuntimeSorts given an JSON string - * - * @param jsonString JSON string - * @return An instance of RuntimeSorts - * @throws IOException if the JSON string is invalid with respect to RuntimeSorts - */ - public static RuntimeSorts fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RuntimeSorts.class); - } + } + } - /** - * Convert an instance of RuntimeSorts to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeSorts.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeSorts' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RuntimeSorts.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeSorts value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RuntimeSorts read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of RuntimeSorts given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeSorts + * @throws IOException if the JSON string is invalid with respect to RuntimeSorts + */ + public static RuntimeSorts fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeSorts.class); + } + + /** + * Convert an instance of RuntimeSorts to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java index 8e501a6c0..116376964 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java @@ -4,271 +4,260 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ScheduleHistoryRunsOptionsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ScheduleHistoryRunsOptionsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_INCLUDE_HISTORY_RUNS = "include_history_runs"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_HISTORY_RUNS) - @javax.annotation.Nullable - private Boolean includeHistoryRuns = false; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public ScheduleHistoryRunsOptionsInput() {} - - public ScheduleHistoryRunsOptionsInput includeHistoryRuns( - @javax.annotation.Nullable Boolean includeHistoryRuns) { - this.includeHistoryRuns = includeHistoryRuns; - return this; - } - - /** - * Indicates whether to fetch history runs for the scheduled notification. - * - * @return includeHistoryRuns - */ - @javax.annotation.Nullable - public Boolean getIncludeHistoryRuns() { - return includeHistoryRuns; - } - - public void setIncludeHistoryRuns(@javax.annotation.Nullable Boolean includeHistoryRuns) { - this.includeHistoryRuns = includeHistoryRuns; - } - - public ScheduleHistoryRunsOptionsInput recordSize( - @javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public ScheduleHistoryRunsOptionsInput recordOffset( - @javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * Indicates the starting record number from where history runs records should be fetched. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ScheduleHistoryRunsOptionsInput scheduleHistoryRunsOptionsInput = - (ScheduleHistoryRunsOptionsInput) o; - return Objects.equals( - this.includeHistoryRuns, scheduleHistoryRunsOptionsInput.includeHistoryRuns) - && Objects.equals(this.recordSize, scheduleHistoryRunsOptionsInput.recordSize) - && Objects.equals(this.recordOffset, scheduleHistoryRunsOptionsInput.recordOffset); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(includeHistoryRuns, recordSize, recordOffset); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * ScheduleHistoryRunsOptionsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScheduleHistoryRunsOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE_HISTORY_RUNS = "include_history_runs"; + @SerializedName(SERIALIZED_NAME_INCLUDE_HISTORY_RUNS) + @javax.annotation.Nullable + private Boolean includeHistoryRuns = false; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public ScheduleHistoryRunsOptionsInput() { + } + + public ScheduleHistoryRunsOptionsInput includeHistoryRuns(@javax.annotation.Nullable Boolean includeHistoryRuns) { + this.includeHistoryRuns = includeHistoryRuns; + return this; + } + + /** + * Indicates whether to fetch history runs for the scheduled notification. + * @return includeHistoryRuns + */ + @javax.annotation.Nullable + public Boolean getIncludeHistoryRuns() { + return includeHistoryRuns; + } + + public void setIncludeHistoryRuns(@javax.annotation.Nullable Boolean includeHistoryRuns) { + this.includeHistoryRuns = includeHistoryRuns; + } + + + public ScheduleHistoryRunsOptionsInput recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public ScheduleHistoryRunsOptionsInput recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * Indicates the starting record number from where history runs records should be fetched. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScheduleHistoryRunsOptionsInput {\n"); - sb.append(" includeHistoryRuns: ") - .append(toIndentedString(includeHistoryRuns)) - .append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ScheduleHistoryRunsOptionsInput scheduleHistoryRunsOptionsInput = (ScheduleHistoryRunsOptionsInput) o; + return Objects.equals(this.includeHistoryRuns, scheduleHistoryRunsOptionsInput.includeHistoryRuns) && + Objects.equals(this.recordSize, scheduleHistoryRunsOptionsInput.recordSize) && + Objects.equals(this.recordOffset, scheduleHistoryRunsOptionsInput.recordOffset); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(includeHistoryRuns, recordSize, recordOffset); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("include_history_runs"); - openapiFields.add("record_size"); - openapiFields.add("record_offset"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduleHistoryRunsOptionsInput {\n"); + sb.append(" includeHistoryRuns: ").append(toIndentedString(includeHistoryRuns)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * ScheduleHistoryRunsOptionsInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ScheduleHistoryRunsOptionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ScheduleHistoryRunsOptionsInput is" - + " not found in the empty JSON string", - ScheduleHistoryRunsOptionsInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_history_runs"); + openapiFields.add("record_size"); + openapiFields.add("record_offset"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ScheduleHistoryRunsOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ScheduleHistoryRunsOptionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ScheduleHistoryRunsOptionsInput is not found in the empty JSON string", ScheduleHistoryRunsOptionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ScheduleHistoryRunsOptionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ScheduleHistoryRunsOptionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ScheduleHistoryRunsOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduleHistoryRunsOptionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ScheduleHistoryRunsOptionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ScheduleHistoryRunsOptionsInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ScheduleHistoryRunsOptionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ScheduleHistoryRunsOptionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ScheduleHistoryRunsOptionsInput read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } - /** - * Create an instance of ScheduleHistoryRunsOptionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ScheduleHistoryRunsOptionsInput - * @throws IOException if the JSON string is invalid with respect to - * ScheduleHistoryRunsOptionsInput - */ - public static ScheduleHistoryRunsOptionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ScheduleHistoryRunsOptionsInput.class); - } - - /** - * Convert an instance of ScheduleHistoryRunsOptionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ScheduleHistoryRunsOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ScheduleHistoryRunsOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ScheduleHistoryRunsOptionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ScheduleHistoryRunsOptionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ScheduleHistoryRunsOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ScheduleHistoryRunsOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScheduleHistoryRunsOptionsInput + * @throws IOException if the JSON string is invalid with respect to ScheduleHistoryRunsOptionsInput + */ + public static ScheduleHistoryRunsOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ScheduleHistoryRunsOptionsInput.class); + } + + /** + * Convert an instance of ScheduleHistoryRunsOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java index b98dd4bd2..49c9e785b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java @@ -4,536 +4,485 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Options for PDF export. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SchedulesPdfOptionsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COMPLETE_LIVEBOARD = "complete_liveboard"; - - @SerializedName(SERIALIZED_NAME_COMPLETE_LIVEBOARD) - @javax.annotation.Nullable - private Boolean completeLiveboard; - - public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) - @javax.annotation.Nullable - private Boolean includeCoverPage; - - public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) - @javax.annotation.Nullable - private Boolean includeCustomLogo; - - public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) - @javax.annotation.Nullable - private Boolean includeFilterPage; - - public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; - @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) - @javax.annotation.Nullable - private Boolean includePageNumber; - - public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; - - @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) - @javax.annotation.Nullable - private String pageFooterText; - - public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; - - @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) - @javax.annotation.Nullable - private String pageOrientation; - - /** Page size. */ - @JsonAdapter(PageSizeEnum.Adapter.class) - public enum PageSizeEnum { - A4("A4"); - - private String value; - - PageSizeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PageSizeEnum fromValue(String value) { - for (PageSizeEnum b : PageSizeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PageSizeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PageSizeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PageSizeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; - - @SerializedName(SERIALIZED_NAME_PAGE_SIZE) - @javax.annotation.Nullable - private PageSizeEnum pageSize; - - public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; - - @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) - @javax.annotation.Nullable - private Boolean truncateTable; - - public SchedulesPdfOptionsInput() {} - - public SchedulesPdfOptionsInput completeLiveboard( - @javax.annotation.Nullable Boolean completeLiveboard) { - this.completeLiveboard = completeLiveboard; - return this; - } - - /** - * Indicates whether to include complete Liveboard. - * - * @return completeLiveboard - */ - @javax.annotation.Nullable - public Boolean getCompleteLiveboard() { - return completeLiveboard; - } - - public void setCompleteLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { - this.completeLiveboard = completeLiveboard; - } - - public SchedulesPdfOptionsInput includeCoverPage( - @javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - return this; - } - - /** - * Indicates whether to include cover page with the Liveboard title. - * - * @return includeCoverPage - */ - @javax.annotation.Nullable - public Boolean getIncludeCoverPage() { - return includeCoverPage; - } - - public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - } - - public SchedulesPdfOptionsInput includeCustomLogo( - @javax.annotation.Nullable Boolean includeCustomLogo) { - this.includeCustomLogo = includeCustomLogo; - return this; - } - - /** - * Indicates whether to include customized wide logo in the footer if available. - * - * @return includeCustomLogo - */ - @javax.annotation.Nullable - public Boolean getIncludeCustomLogo() { - return includeCustomLogo; - } - - public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { - this.includeCustomLogo = includeCustomLogo; - } - - public SchedulesPdfOptionsInput includeFilterPage( - @javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - return this; - } - - /** - * Indicates whether to include a page with all applied filters. - * - * @return includeFilterPage - */ - @javax.annotation.Nullable - public Boolean getIncludeFilterPage() { - return includeFilterPage; - } - - public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - } - - public SchedulesPdfOptionsInput includePageNumber( - @javax.annotation.Nullable Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - return this; - } - - /** - * Indicates whether to include page number in the footer of each page - * - * @return includePageNumber - */ - @javax.annotation.Nullable - public Boolean getIncludePageNumber() { - return includePageNumber; - } - - public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - } - - public SchedulesPdfOptionsInput pageFooterText( - @javax.annotation.Nullable String pageFooterText) { - this.pageFooterText = pageFooterText; - return this; - } - - /** - * Text to include in the footer of each page. - * - * @return pageFooterText - */ - @javax.annotation.Nullable - public String getPageFooterText() { - return pageFooterText; - } - - public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { - this.pageFooterText = pageFooterText; - } - - public SchedulesPdfOptionsInput pageOrientation( - @javax.annotation.Nullable String pageOrientation) { - this.pageOrientation = pageOrientation; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Page orientation of the PDF. - * - * @return pageOrientation - */ - @javax.annotation.Nullable - public String getPageOrientation() { - return pageOrientation; - } +/** + * Options for PDF export. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SchedulesPdfOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; - public void setPageOrientation(@javax.annotation.Nullable String pageOrientation) { - this.pageOrientation = pageOrientation; - } + public static final String SERIALIZED_NAME_COMPLETE_LIVEBOARD = "complete_liveboard"; + @SerializedName(SERIALIZED_NAME_COMPLETE_LIVEBOARD) + @javax.annotation.Nullable + private Boolean completeLiveboard; - public SchedulesPdfOptionsInput pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { - this.pageSize = pageSize; - return this; - } + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage; - /** - * Page size. - * - * @return pageSize - */ - @javax.annotation.Nullable - public PageSizeEnum getPageSize() { - return pageSize; - } + public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; + @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) + @javax.annotation.Nullable + private Boolean includeCustomLogo; - public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { - this.pageSize = pageSize; - } + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage; - public SchedulesPdfOptionsInput truncateTable( - @javax.annotation.Nullable Boolean truncateTable) { - this.truncateTable = truncateTable; - return this; - } + public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; + @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) + @javax.annotation.Nullable + private Boolean includePageNumber; - /** - * Indicates whether to include only first page of the tables. - * - * @return truncateTable - */ - @javax.annotation.Nullable - public Boolean getTruncateTable() { - return truncateTable; - } + public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; + @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) + @javax.annotation.Nullable + private String pageFooterText; - public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { - this.truncateTable = truncateTable; - } + public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; + @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) + @javax.annotation.Nullable + private String pageOrientation; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SchedulesPdfOptionsInput schedulesPdfOptionsInput = (SchedulesPdfOptionsInput) o; - return Objects.equals(this.completeLiveboard, schedulesPdfOptionsInput.completeLiveboard) - && Objects.equals(this.includeCoverPage, schedulesPdfOptionsInput.includeCoverPage) - && Objects.equals( - this.includeCustomLogo, schedulesPdfOptionsInput.includeCustomLogo) - && Objects.equals( - this.includeFilterPage, schedulesPdfOptionsInput.includeFilterPage) - && Objects.equals( - this.includePageNumber, schedulesPdfOptionsInput.includePageNumber) - && Objects.equals(this.pageFooterText, schedulesPdfOptionsInput.pageFooterText) - && Objects.equals(this.pageOrientation, schedulesPdfOptionsInput.pageOrientation) - && Objects.equals(this.pageSize, schedulesPdfOptionsInput.pageSize) - && Objects.equals(this.truncateTable, schedulesPdfOptionsInput.truncateTable); - } + /** + * Page size. + */ + @JsonAdapter(PageSizeEnum.Adapter.class) + public enum PageSizeEnum { + A4("A4"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - completeLiveboard, - includeCoverPage, - includeCustomLogo, - includeFilterPage, - includePageNumber, - pageFooterText, - pageOrientation, - pageSize, - truncateTable); + PageSizeEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SchedulesPdfOptionsInput {\n"); - sb.append(" completeLiveboard: ") - .append(toIndentedString(completeLiveboard)) - .append("\n"); - sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); - sb.append(" includeCustomLogo: ") - .append(toIndentedString(includeCustomLogo)) - .append("\n"); - sb.append(" includeFilterPage: ") - .append(toIndentedString(includeFilterPage)) - .append("\n"); - sb.append(" includePageNumber: ") - .append(toIndentedString(includePageNumber)) - .append("\n"); - sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); - sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PageSizeEnum fromValue(String value) { + for (PageSizeEnum b : PageSizeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("complete_liveboard"); - openapiFields.add("include_cover_page"); - openapiFields.add("include_custom_logo"); - openapiFields.add("include_filter_page"); - openapiFields.add("include_page_number"); - openapiFields.add("page_footer_text"); - openapiFields.add("page_orientation"); - openapiFields.add("page_size"); - openapiFields.add("truncate_table"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageSizeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageSizeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SchedulesPdfOptionsInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SchedulesPdfOptionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SchedulesPdfOptionsInput is not found" - + " in the empty JSON string", - SchedulesPdfOptionsInput.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PageSizeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + @javax.annotation.Nullable + private PageSizeEnum pageSize; + + public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; + @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) + @javax.annotation.Nullable + private Boolean truncateTable; + + public SchedulesPdfOptionsInput() { + } + + public SchedulesPdfOptionsInput completeLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + return this; + } + + /** + * Indicates whether to include complete Liveboard. + * @return completeLiveboard + */ + @javax.annotation.Nullable + public Boolean getCompleteLiveboard() { + return completeLiveboard; + } + + public void setCompleteLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + } + + + public SchedulesPdfOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include cover page with the Liveboard title. + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + + public SchedulesPdfOptionsInput includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + return this; + } + + /** + * Indicates whether to include customized wide logo in the footer if available. + * @return includeCustomLogo + */ + @javax.annotation.Nullable + public Boolean getIncludeCustomLogo() { + return includeCustomLogo; + } + + public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + } + + + public SchedulesPdfOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + + public SchedulesPdfOptionsInput includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + return this; + } + + /** + * Indicates whether to include page number in the footer of each page + * @return includePageNumber + */ + @javax.annotation.Nullable + public Boolean getIncludePageNumber() { + return includePageNumber; + } + + public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + } + + + public SchedulesPdfOptionsInput pageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + return this; + } + + /** + * Text to include in the footer of each page. + * @return pageFooterText + */ + @javax.annotation.Nullable + public String getPageFooterText() { + return pageFooterText; + } + + public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + } + + + public SchedulesPdfOptionsInput pageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + return this; + } + + /** + * Page orientation of the PDF. + * @return pageOrientation + */ + @javax.annotation.Nullable + public String getPageOrientation() { + return pageOrientation; + } + + public void setPageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + } + + + public SchedulesPdfOptionsInput pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Page size. + * @return pageSize + */ + @javax.annotation.Nullable + public PageSizeEnum getPageSize() { + return pageSize; + } + + public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + } + + + public SchedulesPdfOptionsInput truncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + return this; + } + + /** + * Indicates whether to include only first page of the tables. + * @return truncateTable + */ + @javax.annotation.Nullable + public Boolean getTruncateTable() { + return truncateTable; + } + + public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchedulesPdfOptionsInput schedulesPdfOptionsInput = (SchedulesPdfOptionsInput) o; + return Objects.equals(this.completeLiveboard, schedulesPdfOptionsInput.completeLiveboard) && + Objects.equals(this.includeCoverPage, schedulesPdfOptionsInput.includeCoverPage) && + Objects.equals(this.includeCustomLogo, schedulesPdfOptionsInput.includeCustomLogo) && + Objects.equals(this.includeFilterPage, schedulesPdfOptionsInput.includeFilterPage) && + Objects.equals(this.includePageNumber, schedulesPdfOptionsInput.includePageNumber) && + Objects.equals(this.pageFooterText, schedulesPdfOptionsInput.pageFooterText) && + Objects.equals(this.pageOrientation, schedulesPdfOptionsInput.pageOrientation) && + Objects.equals(this.pageSize, schedulesPdfOptionsInput.pageSize) && + Objects.equals(this.truncateTable, schedulesPdfOptionsInput.truncateTable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(completeLiveboard, includeCoverPage, includeCustomLogo, includeFilterPage, includePageNumber, pageFooterText, pageOrientation, pageSize, truncateTable); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchedulesPdfOptionsInput {\n"); + sb.append(" completeLiveboard: ").append(toIndentedString(completeLiveboard)).append("\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeCustomLogo: ").append(toIndentedString(includeCustomLogo)).append("\n"); + sb.append(" includeFilterPage: ").append(toIndentedString(includeFilterPage)).append("\n"); + sb.append(" includePageNumber: ").append(toIndentedString(includePageNumber)).append("\n"); + sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("complete_liveboard"); + openapiFields.add("include_cover_page"); + openapiFields.add("include_custom_logo"); + openapiFields.add("include_filter_page"); + openapiFields.add("include_page_number"); + openapiFields.add("page_footer_text"); + openapiFields.add("page_orientation"); + openapiFields.add("page_size"); + openapiFields.add("truncate_table"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SchedulesPdfOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SchedulesPdfOptionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SchedulesPdfOptionsInput is not found in the empty JSON string", SchedulesPdfOptionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SchedulesPdfOptionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SchedulesPdfOptionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SchedulesPdfOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SchedulesPdfOptionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("page_footer_text") != null - && !jsonObj.get("page_footer_text").isJsonNull()) - && !jsonObj.get("page_footer_text").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_footer_text` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("page_footer_text").toString())); - } - if ((jsonObj.get("page_orientation") != null - && !jsonObj.get("page_orientation").isJsonNull()) - && !jsonObj.get("page_orientation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_orientation` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("page_orientation").toString())); - } - if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) - && !jsonObj.get("page_size").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `page_size` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("page_size").toString())); - } - // validate the optional field `page_size` - if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { - PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SchedulesPdfOptionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SchedulesPdfOptionsInput' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SchedulesPdfOptionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SchedulesPdfOptionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SchedulesPdfOptionsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SchedulesPdfOptionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SchedulesPdfOptionsInput - * @throws IOException if the JSON string is invalid with respect to SchedulesPdfOptionsInput - */ - public static SchedulesPdfOptionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SchedulesPdfOptionsInput.class); - } - - /** - * Convert an instance of SchedulesPdfOptionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("page_footer_text") != null && !jsonObj.get("page_footer_text").isJsonNull()) && !jsonObj.get("page_footer_text").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_footer_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_footer_text").toString())); + } + if ((jsonObj.get("page_orientation") != null && !jsonObj.get("page_orientation").isJsonNull()) && !jsonObj.get("page_orientation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_orientation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_orientation").toString())); + } + if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) && !jsonObj.get("page_size").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `page_size` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_size").toString())); + } + // validate the optional field `page_size` + if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { + PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SchedulesPdfOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SchedulesPdfOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SchedulesPdfOptionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SchedulesPdfOptionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SchedulesPdfOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SchedulesPdfOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SchedulesPdfOptionsInput + * @throws IOException if the JSON string is invalid with respect to SchedulesPdfOptionsInput + */ + public static SchedulesPdfOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SchedulesPdfOptionsInput.class); + } + + /** + * Convert an instance of SchedulesPdfOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java index bb009a41a..195578226 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java @@ -4,278 +4,269 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Table; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SchemaObject */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SchemaObject implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_TABLES = "tables"; - - @SerializedName(SERIALIZED_NAME_TABLES) - @javax.annotation.Nullable - private List tables; - - public SchemaObject() {} - - public SchemaObject name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the schema. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - public SchemaObject tables(@javax.annotation.Nullable List
tables) { - this.tables = tables; - return this; - } +import com.thoughtspot.client.JSON; - public SchemaObject addTablesItem(Table tablesItem) { - if (this.tables == null) { - this.tables = new ArrayList<>(); - } - this.tables.add(tablesItem); - return this; +/** + * SchemaObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SchemaObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TABLES = "tables"; + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nullable + private List
tables; + + public SchemaObject() { + } + + public SchemaObject name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the schema. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public SchemaObject tables(@javax.annotation.Nullable List
tables) { + this.tables = tables; + return this; + } + + public SchemaObject addTablesItem(Table tablesItem) { + if (this.tables == null) { + this.tables = new ArrayList<>(); } + this.tables.add(tablesItem); + return this; + } - /** - * Tables in the schema. - * - * @return tables - */ - @javax.annotation.Nullable - public List
getTables() { - return tables; - } + /** + * Tables in the schema. + * @return tables + */ + @javax.annotation.Nullable + public List
getTables() { + return tables; + } - public void setTables(@javax.annotation.Nullable List
tables) { - this.tables = tables; - } + public void setTables(@javax.annotation.Nullable List
tables) { + this.tables = tables; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SchemaObject schemaObject = (SchemaObject) o; - return Objects.equals(this.name, schemaObject.name) - && Objects.equals(this.tables, schemaObject.tables); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(name, tables); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SchemaObject {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + SchemaObject schemaObject = (SchemaObject) o; + return Objects.equals(this.name, schemaObject.name) && + Objects.equals(this.tables, schemaObject.tables); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, tables); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("tables"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchemaObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SchemaObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SchemaObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SchemaObject is not found in the" - + " empty JSON string", - SchemaObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("tables"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SchemaObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SchemaObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SchemaObject is not found in the empty JSON string", SchemaObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SchemaObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SchemaObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SchemaObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SchemaObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SchemaObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SchemaObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (jsonObj.get("tables") != null && !jsonObj.get("tables").isJsonNull()) { - JsonArray jsonArraytables = jsonObj.getAsJsonArray("tables"); - if (jsonArraytables != null) { - // ensure the json data is an array - if (!jsonObj.get("tables").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tables` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("tables").toString())); - } - - // validate the optional field `tables` (array) - for (int i = 0; i < jsonArraytables.size(); i++) { - Table.validateJsonElement(jsonArraytables.get(i)); - } - ; - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("tables") != null && !jsonObj.get("tables").isJsonNull()) { + JsonArray jsonArraytables = jsonObj.getAsJsonArray("tables"); + if (jsonArraytables != null) { + // ensure the json data is an array + if (!jsonObj.get("tables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tables` to be an array in the JSON string but got `%s`", jsonObj.get("tables").toString())); + } + + // validate the optional field `tables` (array) + for (int i = 0; i < jsonArraytables.size(); i++) { + Table.validateJsonElement(jsonArraytables.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SchemaObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SchemaObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SchemaObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SchemaObject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SchemaObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of SchemaObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of SchemaObject - * @throws IOException if the JSON string is invalid with respect to SchemaObject - */ - public static SchemaObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SchemaObject.class); - } - - /** - * Convert an instance of SchemaObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SchemaObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SchemaObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SchemaObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SchemaObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SchemaObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SchemaObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of SchemaObject + * @throws IOException if the JSON string is invalid with respect to SchemaObject + */ + public static SchemaObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SchemaObject.class); + } + + /** + * Convert an instance of SchemaObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java index 1074edb75..43653ae6e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java @@ -4,284 +4,274 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Scope */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Scope implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACCESS_TYPE = "access_type"; - - @SerializedName(SERIALIZED_NAME_ACCESS_TYPE) - @javax.annotation.Nonnull - private String accessType; - - public static final String SERIALIZED_NAME_ORG_ID = "org_id"; - - @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable - private Integer orgId; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nullable - private String metadataId; - - public Scope() {} - - public Scope accessType(@javax.annotation.Nonnull String accessType) { - this.accessType = accessType; - return this; - } - - /** - * Object access scope type. - * - * @return accessType - */ - @javax.annotation.Nonnull - public String getAccessType() { - return accessType; - } - - public void setAccessType(@javax.annotation.Nonnull String accessType) { - this.accessType = accessType; - } - - public Scope orgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * Unique identifier of the metadata. - * - * @return orgId - */ - @javax.annotation.Nullable - public Integer getOrgId() { - return orgId; - } - - public void setOrgId(@javax.annotation.Nullable Integer orgId) { - this.orgId = orgId; - } - - public Scope metadataId(@javax.annotation.Nullable String metadataId) { - this.metadataId = metadataId; - return this; - } - /** - * Unique identifier of the Org. - * - * @return metadataId - */ - @javax.annotation.Nullable - public String getMetadataId() { - return metadataId; - } +import com.thoughtspot.client.JSON; - public void setMetadataId(@javax.annotation.Nullable String metadataId) { - this.metadataId = metadataId; +/** + * Scope + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Scope implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACCESS_TYPE = "access_type"; + @SerializedName(SERIALIZED_NAME_ACCESS_TYPE) + @javax.annotation.Nonnull + private String accessType; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nullable + private String metadataId; + + public Scope() { + } + + public Scope accessType(@javax.annotation.Nonnull String accessType) { + this.accessType = accessType; + return this; + } + + /** + * Object access scope type. + * @return accessType + */ + @javax.annotation.Nonnull + public String getAccessType() { + return accessType; + } + + public void setAccessType(@javax.annotation.Nonnull String accessType) { + this.accessType = accessType; + } + + + public Scope orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Unique identifier of the metadata. + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public Scope metadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the Org. + * @return metadataId + */ + @javax.annotation.Nullable + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Scope scope = (Scope) o; - return Objects.equals(this.accessType, scope.accessType) - && Objects.equals(this.orgId, scope.orgId) - && Objects.equals(this.metadataId, scope.metadataId); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + Scope scope = (Scope) o; + return Objects.equals(this.accessType, scope.accessType) && + Objects.equals(this.orgId, scope.orgId) && + Objects.equals(this.metadataId, scope.metadataId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(accessType, orgId, metadataId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(accessType, orgId, metadataId); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Scope {\n"); + sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("access_type"); + openapiFields.add("org_id"); + openapiFields.add("metadata_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("access_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Scope + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Scope.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Scope is not found in the empty JSON string", Scope.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Scope {\n"); - sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Scope.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Scope` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } - return o.toString().replace("\n", "\n "); - } + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("access_type"); - openapiFields.add("org_id"); - openapiFields.add("metadata_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("access_type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Scope - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Scope.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Scope is not found in the empty JSON" - + " string", - Scope.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Scope.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Scope`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Scope.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Scope.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("access_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `access_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("access_type").toString())); - } - if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) - && !jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Scope.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Scope' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Scope.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Scope value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Scope read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Scope given an JSON string - * - * @param jsonString JSON string - * @return An instance of Scope - * @throws IOException if the JSON string is invalid with respect to Scope - */ - public static Scope fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Scope.class); - } - - /** - * Convert an instance of Scope to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("access_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_type").toString())); + } + if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) && !jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Scope.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Scope' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Scope.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Scope value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Scope read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Scope given an JSON string + * + * @param jsonString JSON string + * @return An instance of Scope + * @throws IOException if the JSON string is invalid with respect to Scope + */ + public static Scope fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Scope.class); + } + + /** + * Convert an instance of Scope to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java index 9bc719369..2b4c1967c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java @@ -4,323 +4,313 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SortOption; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchCalendarsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchCalendarsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nullable - private String connectionIdentifier; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; - - @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) - @javax.annotation.Nullable - private SortOption sortOptions; - - public SearchCalendarsRequest() {} - - public SearchCalendarsRequest connectionIdentifier( - @javax.annotation.Nullable String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nullable - public String getConnectionIdentifier() { - return connectionIdentifier; - } - - public void setConnectionIdentifier(@javax.annotation.Nullable String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } - - public SearchCalendarsRequest namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * Pattern to match for calendar names (use '%' for wildcard match). - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; - } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public SearchCalendarsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchCalendarsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public SearchCalendarsRequest sortOptions(@javax.annotation.Nullable SortOption sortOptions) { - this.sortOptions = sortOptions; - return this; - } - - /** - * Sort options. - * - * @return sortOptions - */ - @javax.annotation.Nullable - public SortOption getSortOptions() { - return sortOptions; - } - - public void setSortOptions(@javax.annotation.Nullable SortOption sortOptions) { - this.sortOptions = sortOptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchCalendarsRequest searchCalendarsRequest = (SearchCalendarsRequest) o; - return Objects.equals( - this.connectionIdentifier, searchCalendarsRequest.connectionIdentifier) - && Objects.equals(this.namePattern, searchCalendarsRequest.namePattern) - && Objects.equals(this.recordOffset, searchCalendarsRequest.recordOffset) - && Objects.equals(this.recordSize, searchCalendarsRequest.recordSize) - && Objects.equals(this.sortOptions, searchCalendarsRequest.sortOptions); - } - - @Override - public int hashCode() { - return Objects.hash( - connectionIdentifier, namePattern, recordOffset, recordSize, sortOptions); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchCalendarsRequest {\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * SearchCalendarsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchCalendarsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nullable + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOption sortOptions; + + public SearchCalendarsRequest() { + } + + public SearchCalendarsRequest connectionIdentifier(@javax.annotation.Nullable String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nullable + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nullable String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + public SearchCalendarsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * Pattern to match for calendar names (use '%' for wildcard match). + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public SearchCalendarsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchCalendarsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchCalendarsRequest sortOptions(@javax.annotation.Nullable SortOption sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOption getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOption sortOptions) { + this.sortOptions = sortOptions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_identifier"); - openapiFields.add("name_pattern"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("sort_options"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + SearchCalendarsRequest searchCalendarsRequest = (SearchCalendarsRequest) o; + return Objects.equals(this.connectionIdentifier, searchCalendarsRequest.connectionIdentifier) && + Objects.equals(this.namePattern, searchCalendarsRequest.namePattern) && + Objects.equals(this.recordOffset, searchCalendarsRequest.recordOffset) && + Objects.equals(this.recordSize, searchCalendarsRequest.recordSize) && + Objects.equals(this.sortOptions, searchCalendarsRequest.sortOptions); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier, namePattern, recordOffset, recordSize, sortOptions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCalendarsRequest {\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchCalendarsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchCalendarsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchCalendarsRequest is not found" - + " in the empty JSON string", - SearchCalendarsRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCalendarsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCalendarsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchCalendarsRequest is not found in the empty JSON string", SearchCalendarsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchCalendarsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchCalendarsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchCalendarsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchCalendarsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("connection_identifier") != null - && !jsonObj.get("connection_identifier").isJsonNull()) - && !jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - // validate the optional field `sort_options` - if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { - SortOption.validateJsonElement(jsonObj.get("sort_options")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchCalendarsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchCalendarsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchCalendarsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchCalendarsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchCalendarsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchCalendarsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchCalendarsRequest - * @throws IOException if the JSON string is invalid with respect to SearchCalendarsRequest - */ - public static SearchCalendarsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchCalendarsRequest.class); - } - - /** - * Convert an instance of SearchCalendarsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("connection_identifier") != null && !jsonObj.get("connection_identifier").isJsonNull()) && !jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOption.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCalendarsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCalendarsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchCalendarsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCalendarsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchCalendarsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchCalendarsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCalendarsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCalendarsRequest + */ + public static SearchCalendarsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCalendarsRequest.class); + } + + /** + * Convert an instance of SearchCalendarsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java index b3b8dddbe..f5f2f899b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java @@ -4,398 +4,379 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchCommitsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchCommitsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - /** Type of metadata. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - CUSTOM_ACTION("CUSTOM_ACTION"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nullable - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; - - @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - @javax.annotation.Nullable - private String branchName; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize; - - public SearchCommitsRequest() {} - - public SearchCommitsRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * Unique ID or name of the metadata. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public SearchCommitsRequest metadataType( - @javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of metadata. - * - * @return metadataType - */ - @javax.annotation.Nullable - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public SearchCommitsRequest branchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - return this; - } - - /** - * Name of the branch from which commit history needs to be displayed. Note: If no branch_name - * is specified, then commits will be returned for the default branch for this configuration. - * - * @return branchName - */ - @javax.annotation.Nullable - public String getBranchName() { - return branchName; - } - - public void setBranchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - } - - public SearchCommitsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * Record offset point in the commit history to display the response. Note: If no record offset - * is specified, the beginning of the record will be considered. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchCommitsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * Number of history records from record offset point to be displayed in the response. Note: If - * no record size is specified, then all the records will be considered. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchCommitsRequest searchCommitsRequest = (SearchCommitsRequest) o; - return Objects.equals(this.metadataIdentifier, searchCommitsRequest.metadataIdentifier) - && Objects.equals(this.metadataType, searchCommitsRequest.metadataType) - && Objects.equals(this.branchName, searchCommitsRequest.branchName) - && Objects.equals(this.recordOffset, searchCommitsRequest.recordOffset) - && Objects.equals(this.recordSize, searchCommitsRequest.recordSize); +/** + * SearchCommitsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchCommitsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** + * Type of metadata. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CUSTOM_ACTION("CUSTOM_ACTION"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(metadataIdentifier, metadataType, branchName, recordOffset, recordSize); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchCommitsRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("metadata_type"); - openapiFields.add("branch_name"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchCommitsRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchCommitsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchCommitsRequest is not found in" - + " the empty JSON string", - SearchCommitsRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nullable + private String branchName; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize; + + public SearchCommitsRequest() { + } + + public SearchCommitsRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public SearchCommitsRequest metadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata. + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public SearchCommitsRequest branchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. + * @return branchName + */ + @javax.annotation.Nullable + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + } + + + public SearchCommitsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchCommitsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCommitsRequest searchCommitsRequest = (SearchCommitsRequest) o; + return Objects.equals(this.metadataIdentifier, searchCommitsRequest.metadataIdentifier) && + Objects.equals(this.metadataType, searchCommitsRequest.metadataType) && + Objects.equals(this.branchName, searchCommitsRequest.branchName) && + Objects.equals(this.recordOffset, searchCommitsRequest.recordOffset) && + Objects.equals(this.recordSize, searchCommitsRequest.recordSize); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, metadataType, branchName, recordOffset, recordSize); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCommitsRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("metadata_type"); + openapiFields.add("branch_name"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCommitsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCommitsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchCommitsRequest is not found in the empty JSON string", SearchCommitsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchCommitsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchCommitsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchCommitsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchCommitsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SearchCommitsRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchCommitsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) - && !jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the optional field `metadata_type` - if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - } - if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) - && !jsonObj.get("branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("branch_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchCommitsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchCommitsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchCommitsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchCommitsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchCommitsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchCommitsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchCommitsRequest - * @throws IOException if the JSON string is invalid with respect to SearchCommitsRequest - */ - public static SearchCommitsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchCommitsRequest.class); - } - - /** - * Convert an instance of SearchCommitsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) && !jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCommitsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCommitsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchCommitsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCommitsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchCommitsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchCommitsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCommitsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCommitsRequest + */ + public static SearchCommitsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCommitsRequest.class); + } + + /** + * Convert an instance of SearchCommitsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java new file mode 100644 index 000000000..f8f8bbcec --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java @@ -0,0 +1,311 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.OrgPreferenceSearchCriteriaInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/SearchConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java index a26fa71db..14b0d8c58 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java @@ -4,209 +4,208 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchConfigRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * SearchConfigRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SearchConfigRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; + public SearchConfigRequest() { + } - public SearchConfigRequest() {} + public SearchConfigRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } - public SearchConfigRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; + public SearchConfigRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } - public SearchConfigRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for - * cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: - * If no value is specified, then the configurations will be returned for all orgs the user has - * access to Version: 9.5.0.cl or later - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; - } + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchConfigRequest searchConfigRequest = (SearchConfigRequest) o; - return Objects.equals(this.orgIdentifiers, searchConfigRequest.orgIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(orgIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchConfigRequest {\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + SearchConfigRequest searchConfigRequest = (SearchConfigRequest) o; + return Objects.equals(this.orgIdentifiers, searchConfigRequest.orgIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchConfigRequest {\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchConfigRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchConfigRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchConfigRequest is not found in" - + " the empty JSON string", - SearchConfigRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchConfigRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchConfigRequest is not found in the empty JSON string", SearchConfigRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchConfigRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchConfigRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchConfigRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchConfigRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchConfigRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchConfigRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchConfigRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchConfigRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchConfigRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchConfigRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchConfigRequest - * @throws IOException if the JSON string is invalid with respect to SearchConfigRequest - */ - public static SearchConfigRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchConfigRequest.class); - } - - /** - * Convert an instance of SearchConfigRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchConfigRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchConfigRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchConfigRequest + * @throws IOException if the JSON string is invalid with respect to SearchConfigRequest + */ + public static SearchConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchConfigRequest.class); + } + + /** + * Convert an instance of SearchConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java index d622663f7..ab10b6ddd 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java @@ -4,873 +4,784 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ConnectionInput; +import com.thoughtspot.client.model.SortOptionInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SearchConnectionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchConnectionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTIONS = "connections"; - - @SerializedName(SERIALIZED_NAME_CONNECTIONS) - @javax.annotation.Nullable - private List connections; - - /** Gets or Sets dataWarehouseTypes */ - @JsonAdapter(DataWarehouseTypesEnum.Adapter.class) - public enum DataWarehouseTypesEnum { - SNOWFLAKE("SNOWFLAKE"), - - AMAZON_REDSHIFT("AMAZON_REDSHIFT"), - - GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), - - AZURE_SYNAPSE("AZURE_SYNAPSE"), - - TERADATA("TERADATA"), - - SAP_HANA("SAP_HANA"), - - STARBURST("STARBURST"), - - ORACLE_ADW("ORACLE_ADW"), - - DATABRICKS("DATABRICKS"), - - DENODO("DENODO"), - - DREMIO("DREMIO"), - - TRINO("TRINO"), - - PRESTO("PRESTO"), - - POSTGRES("POSTGRES"), - - SQLSERVER("SQLSERVER"), - - MYSQL("MYSQL"), - - GENERIC_JDBC("GENERIC_JDBC"), - - AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), - - AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), - - AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), - - AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), - - LOOKER("LOOKER"), - - AMAZON_ATHENA("AMAZON_ATHENA"), - - SINGLESTORE("SINGLESTORE"), - - GCP_SQLSERVER("GCP_SQLSERVER"), - - GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), - - GCP_POSTGRESQL("GCP_POSTGRESQL"), - - GCP_MYSQL("GCP_MYSQL"), - - MODE("MODE"), - - GOOGLE_SHEETS("GOOGLE_SHEETS"), - - FALCON("FALCON"), - - FALCON_ONPREM("FALCON_ONPREM"), - - CLICKHOUSE("CLICKHOUSE"); - - private String value; - - DataWarehouseTypesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataWarehouseTypesEnum fromValue(String value) { - for (DataWarehouseTypesEnum b : DataWarehouseTypesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataWarehouseTypesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataWarehouseTypesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataWarehouseTypesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataWarehouseTypesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPES = "data_warehouse_types"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPES) - @javax.annotation.Nullable - private List dataWarehouseTypes; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; - - @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) - @javax.annotation.Nullable - private List tagIdentifiers; - - /** Data warehouse object type. */ - @JsonAdapter(DataWarehouseObjectTypeEnum.Adapter.class) - public enum DataWarehouseObjectTypeEnum { - DATABASE("DATABASE"), - - SCHEMA("SCHEMA"), - - TABLE("TABLE"), - - COLUMN("COLUMN"); - - private String value; - - DataWarehouseObjectTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataWarehouseObjectTypeEnum fromValue(String value) { - for (DataWarehouseObjectTypeEnum b : DataWarehouseObjectTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final DataWarehouseObjectTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataWarehouseObjectTypeEnum read(final JsonReader jsonReader) - throws IOException { - String value = jsonReader.nextString(); - return DataWarehouseObjectTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataWarehouseObjectTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECT_TYPE = - "data_warehouse_object_type"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECT_TYPE) - @javax.annotation.Nullable - private DataWarehouseObjectTypeEnum dataWarehouseObjectType; - - public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; - - @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) - @javax.annotation.Nullable - private SortOptionInput sortOptions; - - public static final String SERIALIZED_NAME_INCLUDE_DETAILS = "include_details"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_DETAILS) - @javax.annotation.Nullable - private Boolean includeDetails; - - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - @javax.annotation.Nullable - private Object _configuration; - - /** - * List of authentication types to fetch data_ware_house_objects from external Data warehouse. - * This is only applicable when data_warehouse_object_type is selected. - */ - @JsonAdapter(AuthenticationTypeEnum.Adapter.class) - public enum AuthenticationTypeEnum { - SERVICE_ACCOUNT("SERVICE_ACCOUNT"), - - OAUTH("OAUTH"), - - IAM("IAM"), - - EXTOAUTH("EXTOAUTH"), - OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), - - PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), - - KEY_PAIR("KEY_PAIR"), - - OAUTH_WITH_PKCE("OAUTH_WITH_PKCE"), - - EXTOAUTH_WITH_PKCE("EXTOAUTH_WITH_PKCE"), - - OAUTH_WITH_PEZ("OAUTH_WITH_PEZ"), - - OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); - - private String value; - - AuthenticationTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AuthenticationTypeEnum fromValue(String value) { - for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AuthenticationTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AuthenticationTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; - - @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) - @javax.annotation.Nullable - private AuthenticationTypeEnum authenticationType = AuthenticationTypeEnum.SERVICE_ACCOUNT; - - public static final String SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS = - "show_resolved_parameters"; - - @SerializedName(SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS) - @javax.annotation.Nullable - private Boolean showResolvedParameters = false; - - public SearchConnectionRequest() {} - - public SearchConnectionRequest connections( - @javax.annotation.Nullable List connections) { - this.connections = connections; - return this; - } - - public SearchConnectionRequest addConnectionsItem(ConnectionInput connectionsItem) { - if (this.connections == null) { - this.connections = new ArrayList<>(); - } - this.connections.add(connectionsItem); - return this; - } - - /** - * List of connections and name pattern - * - * @return connections - */ - @javax.annotation.Nullable - public List getConnections() { - return connections; - } - - public void setConnections(@javax.annotation.Nullable List connections) { - this.connections = connections; - } - - public SearchConnectionRequest dataWarehouseTypes( - @javax.annotation.Nullable List dataWarehouseTypes) { - this.dataWarehouseTypes = dataWarehouseTypes; - return this; - } - - public SearchConnectionRequest addDataWarehouseTypesItem( - DataWarehouseTypesEnum dataWarehouseTypesItem) { - if (this.dataWarehouseTypes == null) { - this.dataWarehouseTypes = new ArrayList<>(); - } - this.dataWarehouseTypes.add(dataWarehouseTypesItem); - return this; - } - - /** - * Array of types of data warehouse defined for the connection. - * - * @return dataWarehouseTypes - */ - @javax.annotation.Nullable - public List getDataWarehouseTypes() { - return dataWarehouseTypes; - } - - public void setDataWarehouseTypes( - @javax.annotation.Nullable List dataWarehouseTypes) { - this.dataWarehouseTypes = dataWarehouseTypes; - } - - public SearchConnectionRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchConnectionRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } +import com.thoughtspot.client.JSON; - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; +/** + * SearchConnectionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTIONS = "connections"; + @SerializedName(SERIALIZED_NAME_CONNECTIONS) + @javax.annotation.Nullable + private List connections; + + /** + * Gets or Sets dataWarehouseTypes + */ + @JsonAdapter(DataWarehouseTypesEnum.Adapter.class) + public enum DataWarehouseTypesEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"); + + private String value; + + DataWarehouseTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public SearchConnectionRequest tagIdentifiers( - @javax.annotation.Nullable List tagIdentifiers) { - this.tagIdentifiers = tagIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchConnectionRequest addTagIdentifiersItem(String tagIdentifiersItem) { - if (this.tagIdentifiers == null) { - this.tagIdentifiers = new ArrayList<>(); + public static DataWarehouseTypesEnum fromValue(String value) { + for (DataWarehouseTypesEnum b : DataWarehouseTypesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.tagIdentifiers.add(tagIdentifiersItem); - return this; - } - - /** - * Unique ID or name of tags. - * - * @return tagIdentifiers - */ - @javax.annotation.Nullable - public List getTagIdentifiers() { - return tagIdentifiers; - } - - public void setTagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { - this.tagIdentifiers = tagIdentifiers; - } - - public SearchConnectionRequest dataWarehouseObjectType( - @javax.annotation.Nullable DataWarehouseObjectTypeEnum dataWarehouseObjectType) { - this.dataWarehouseObjectType = dataWarehouseObjectType; - return this; - } - - /** - * Data warehouse object type. - * - * @return dataWarehouseObjectType - */ - @javax.annotation.Nullable - public DataWarehouseObjectTypeEnum getDataWarehouseObjectType() { - return dataWarehouseObjectType; - } - - public void setDataWarehouseObjectType( - @javax.annotation.Nullable DataWarehouseObjectTypeEnum dataWarehouseObjectType) { - this.dataWarehouseObjectType = dataWarehouseObjectType; - } - - public SearchConnectionRequest sortOptions( - @javax.annotation.Nullable SortOptionInput sortOptions) { - this.sortOptions = sortOptions; - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Sort options. - * - * @return sortOptions - */ - @javax.annotation.Nullable - public SortOptionInput getSortOptions() { - return sortOptions; - } - - public void setSortOptions(@javax.annotation.Nullable SortOptionInput sortOptions) { - this.sortOptions = sortOptions; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public SearchConnectionRequest includeDetails( - @javax.annotation.Nullable Boolean includeDetails) { - this.includeDetails = includeDetails; - return this; + @Override + public DataWarehouseTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypesEnum.fromValue(value); + } } - /** - * Indicates whether to include complete details of the connection objects. - * - * @return includeDetails - */ - @javax.annotation.Nullable - public Boolean getIncludeDetails() { - return includeDetails; - } - - public void setIncludeDetails(@javax.annotation.Nullable Boolean includeDetails) { - this.includeDetails = includeDetails; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypesEnum.fromValue(value); } + } - public SearchConnectionRequest _configuration( - @javax.annotation.Nullable Object _configuration) { - this._configuration = _configuration; - return this; - } + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPES = "data_warehouse_types"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPES) + @javax.annotation.Nullable + private List dataWarehouseTypes; - /** - * Configuration values. If empty we are fetching configuration from datasource based on given - * connection id. If required you can provide config details to fetch specific details. Example - * input: {}, - * {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. - * This is only applicable when data_warehouse_object_type is selected. - * - * @return _configuration - */ - @javax.annotation.Nullable - public Object getConfiguration() { - return _configuration; - } + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; - public void setConfiguration(@javax.annotation.Nullable Object _configuration) { - this._configuration = _configuration; - } + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; - public SearchConnectionRequest authenticationType( - @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { - this.authenticationType = authenticationType; - return this; - } + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nullable + private List tagIdentifiers; - /** - * List of authentication types to fetch data_ware_house_objects from external Data warehouse. - * This is only applicable when data_warehouse_object_type is selected. - * - * @return authenticationType - */ - @javax.annotation.Nullable - public AuthenticationTypeEnum getAuthenticationType() { - return authenticationType; - } + /** + * Data warehouse object type. + */ + @JsonAdapter(DataWarehouseObjectTypeEnum.Adapter.class) + public enum DataWarehouseObjectTypeEnum { + DATABASE("DATABASE"), + + SCHEMA("SCHEMA"), + + TABLE("TABLE"), + + COLUMN("COLUMN"); - public void setAuthenticationType( - @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { - this.authenticationType = authenticationType; - } + private String value; - public SearchConnectionRequest showResolvedParameters( - @javax.annotation.Nullable Boolean showResolvedParameters) { - this.showResolvedParameters = showResolvedParameters; - return this; + DataWarehouseObjectTypeEnum(String value) { + this.value = value; } - /** - * <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved - * parameterised values. - * - * @return showResolvedParameters - */ - @javax.annotation.Nullable - public Boolean getShowResolvedParameters() { - return showResolvedParameters; + public String getValue() { + return value; } - public void setShowResolvedParameters( - @javax.annotation.Nullable Boolean showResolvedParameters) { - this.showResolvedParameters = showResolvedParameters; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static DataWarehouseObjectTypeEnum fromValue(String value) { + for (DataWarehouseObjectTypeEnum b : DataWarehouseObjectTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - SearchConnectionRequest searchConnectionRequest = (SearchConnectionRequest) o; - return Objects.equals(this.connections, searchConnectionRequest.connections) - && Objects.equals( - this.dataWarehouseTypes, searchConnectionRequest.dataWarehouseTypes) - && Objects.equals(this.recordOffset, searchConnectionRequest.recordOffset) - && Objects.equals(this.recordSize, searchConnectionRequest.recordSize) - && Objects.equals(this.tagIdentifiers, searchConnectionRequest.tagIdentifiers) - && Objects.equals( - this.dataWarehouseObjectType, - searchConnectionRequest.dataWarehouseObjectType) - && Objects.equals(this.sortOptions, searchConnectionRequest.sortOptions) - && Objects.equals(this.includeDetails, searchConnectionRequest.includeDetails) - && Objects.equals(this._configuration, searchConnectionRequest._configuration) - && Objects.equals( - this.authenticationType, searchConnectionRequest.authenticationType) - && Objects.equals( - this.showResolvedParameters, - searchConnectionRequest.showResolvedParameters); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseObjectTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - @Override - public int hashCode() { - return Objects.hash( - connections, - dataWarehouseTypes, - recordOffset, - recordSize, - tagIdentifiers, - dataWarehouseObjectType, - sortOptions, - includeDetails, - _configuration, - authenticationType, - showResolvedParameters); + @Override + public DataWarehouseObjectTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseObjectTypeEnum.fromValue(value); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseObjectTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECT_TYPE = "data_warehouse_object_type"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECT_TYPE) + @javax.annotation.Nullable + private DataWarehouseObjectTypeEnum dataWarehouseObjectType; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptionInput sortOptions; + + public static final String SERIALIZED_NAME_INCLUDE_DETAILS = "include_details"; + @SerializedName(SERIALIZED_NAME_INCLUDE_DETAILS) + @javax.annotation.Nullable + private Boolean includeDetails; + + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nullable + private Object _configuration; + + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + */ + @JsonAdapter(AuthenticationTypeEnum.Adapter.class) + public enum AuthenticationTypeEnum { + SERVICE_ACCOUNT("SERVICE_ACCOUNT"), + + OAUTH("OAUTH"), + + IAM("IAM"), + + EXTOAUTH("EXTOAUTH"), + + OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), + + PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), + + KEY_PAIR("KEY_PAIR"), + + OAUTH_WITH_PKCE("OAUTH_WITH_PKCE"), + + EXTOAUTH_WITH_PKCE("EXTOAUTH_WITH_PKCE"), + + OAUTH_WITH_PEZ("OAUTH_WITH_PEZ"), + + OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); + + private String value; + + AuthenticationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchConnectionRequest {\n"); - sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); - sb.append(" dataWarehouseTypes: ") - .append(toIndentedString(dataWarehouseTypes)) - .append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); - sb.append(" dataWarehouseObjectType: ") - .append(toIndentedString(dataWarehouseObjectType)) - .append("\n"); - sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); - sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" authenticationType: ") - .append(toIndentedString(authenticationType)) - .append("\n"); - sb.append(" showResolvedParameters: ") - .append(toIndentedString(showResolvedParameters)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static AuthenticationTypeEnum fromValue(String value) { + for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connections"); - openapiFields.add("data_warehouse_types"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("tag_identifiers"); - openapiFields.add("data_warehouse_object_type"); - openapiFields.add("sort_options"); - openapiFields.add("include_details"); - openapiFields.add("configuration"); - openapiFields.add("authentication_type"); - openapiFields.add("show_resolved_parameters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchConnectionRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchConnectionRequest is not found" - + " in the empty JSON string", - SearchConnectionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + AuthenticationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) + @javax.annotation.Nullable + private AuthenticationTypeEnum authenticationType = AuthenticationTypeEnum.SERVICE_ACCOUNT; + + public static final String SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS = "show_resolved_parameters"; + @SerializedName(SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS) + @javax.annotation.Nullable + private Boolean showResolvedParameters = false; + + public SearchConnectionRequest() { + } + + public SearchConnectionRequest connections(@javax.annotation.Nullable List connections) { + this.connections = connections; + return this; + } + + public SearchConnectionRequest addConnectionsItem(ConnectionInput connectionsItem) { + if (this.connections == null) { + this.connections = new ArrayList<>(); + } + this.connections.add(connectionsItem); + return this; + } + + /** + * List of connections and name pattern + * @return connections + */ + @javax.annotation.Nullable + public List getConnections() { + return connections; + } + + public void setConnections(@javax.annotation.Nullable List connections) { + this.connections = connections; + } + + + public SearchConnectionRequest dataWarehouseTypes(@javax.annotation.Nullable List dataWarehouseTypes) { + this.dataWarehouseTypes = dataWarehouseTypes; + return this; + } + + public SearchConnectionRequest addDataWarehouseTypesItem(DataWarehouseTypesEnum dataWarehouseTypesItem) { + if (this.dataWarehouseTypes == null) { + this.dataWarehouseTypes = new ArrayList<>(); + } + this.dataWarehouseTypes.add(dataWarehouseTypesItem); + return this; + } + + /** + * Array of types of data warehouse defined for the connection. + * @return dataWarehouseTypes + */ + @javax.annotation.Nullable + public List getDataWarehouseTypes() { + return dataWarehouseTypes; + } + + public void setDataWarehouseTypes(@javax.annotation.Nullable List dataWarehouseTypes) { + this.dataWarehouseTypes = dataWarehouseTypes; + } + + + public SearchConnectionRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchConnectionRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchConnectionRequest tagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public SearchConnectionRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); + } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } + + /** + * Unique ID or name of tags. + * @return tagIdentifiers + */ + @javax.annotation.Nullable + public List getTagIdentifiers() { + return tagIdentifiers; + } + + public void setTagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } + + + public SearchConnectionRequest dataWarehouseObjectType(@javax.annotation.Nullable DataWarehouseObjectTypeEnum dataWarehouseObjectType) { + this.dataWarehouseObjectType = dataWarehouseObjectType; + return this; + } + + /** + * Data warehouse object type. + * @return dataWarehouseObjectType + */ + @javax.annotation.Nullable + public DataWarehouseObjectTypeEnum getDataWarehouseObjectType() { + return dataWarehouseObjectType; + } + + public void setDataWarehouseObjectType(@javax.annotation.Nullable DataWarehouseObjectTypeEnum dataWarehouseObjectType) { + this.dataWarehouseObjectType = dataWarehouseObjectType; + } + + + public SearchConnectionRequest sortOptions(@javax.annotation.Nullable SortOptionInput sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptionInput getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptionInput sortOptions) { + this.sortOptions = sortOptions; + } + + + public SearchConnectionRequest includeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + return this; + } + + /** + * Indicates whether to include complete details of the connection objects. + * @return includeDetails + */ + @javax.annotation.Nullable + public Boolean getIncludeDetails() { + return includeDetails; + } + + public void setIncludeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + } + + + public SearchConnectionRequest _configuration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. + * @return _configuration + */ + @javax.annotation.Nullable + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + } + + + public SearchConnectionRequest authenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + * @return authenticationType + */ + @javax.annotation.Nullable + public AuthenticationTypeEnum getAuthenticationType() { + return authenticationType; + } + + public void setAuthenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + } + + + public SearchConnectionRequest showResolvedParameters(@javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + return this; + } + + /** + * <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved parameterised values. + * @return showResolvedParameters + */ + @javax.annotation.Nullable + public Boolean getShowResolvedParameters() { + return showResolvedParameters; + } + + public void setShowResolvedParameters(@javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchConnectionRequest searchConnectionRequest = (SearchConnectionRequest) o; + return Objects.equals(this.connections, searchConnectionRequest.connections) && + Objects.equals(this.dataWarehouseTypes, searchConnectionRequest.dataWarehouseTypes) && + Objects.equals(this.recordOffset, searchConnectionRequest.recordOffset) && + Objects.equals(this.recordSize, searchConnectionRequest.recordSize) && + Objects.equals(this.tagIdentifiers, searchConnectionRequest.tagIdentifiers) && + Objects.equals(this.dataWarehouseObjectType, searchConnectionRequest.dataWarehouseObjectType) && + Objects.equals(this.sortOptions, searchConnectionRequest.sortOptions) && + Objects.equals(this.includeDetails, searchConnectionRequest.includeDetails) && + Objects.equals(this._configuration, searchConnectionRequest._configuration) && + Objects.equals(this.authenticationType, searchConnectionRequest.authenticationType) && + Objects.equals(this.showResolvedParameters, searchConnectionRequest.showResolvedParameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(connections, dataWarehouseTypes, recordOffset, recordSize, tagIdentifiers, dataWarehouseObjectType, sortOptions, includeDetails, _configuration, authenticationType, showResolvedParameters); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchConnectionRequest {\n"); + sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); + sb.append(" dataWarehouseTypes: ").append(toIndentedString(dataWarehouseTypes)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append(" dataWarehouseObjectType: ").append(toIndentedString(dataWarehouseObjectType)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" authenticationType: ").append(toIndentedString(authenticationType)).append("\n"); + sb.append(" showResolvedParameters: ").append(toIndentedString(showResolvedParameters)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connections"); + openapiFields.add("data_warehouse_types"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("tag_identifiers"); + openapiFields.add("data_warehouse_object_type"); + openapiFields.add("sort_options"); + openapiFields.add("include_details"); + openapiFields.add("configuration"); + openapiFields.add("authentication_type"); + openapiFields.add("show_resolved_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchConnectionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchConnectionRequest is not found in the empty JSON string", SearchConnectionRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchConnectionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchConnectionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("connections") != null && !jsonObj.get("connections").isJsonNull()) { - JsonArray jsonArrayconnections = jsonObj.getAsJsonArray("connections"); - if (jsonArrayconnections != null) { - // ensure the json data is an array - if (!jsonObj.get("connections").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connections` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("connections").toString())); - } - - // validate the optional field `connections` (array) - for (int i = 0; i < jsonArrayconnections.size(); i++) { - ConnectionInput.validateJsonElement(jsonArrayconnections.get(i)); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("data_warehouse_types") != null - && !jsonObj.get("data_warehouse_types").isJsonNull() - && !jsonObj.get("data_warehouse_types").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_types` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("data_warehouse_types").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tag_identifiers") != null - && !jsonObj.get("tag_identifiers").isJsonNull() - && !jsonObj.get("tag_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tag_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("tag_identifiers").toString())); - } - if ((jsonObj.get("data_warehouse_object_type") != null - && !jsonObj.get("data_warehouse_object_type").isJsonNull()) - && !jsonObj.get("data_warehouse_object_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_object_type` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("data_warehouse_object_type").toString())); - } - // validate the optional field `data_warehouse_object_type` - if (jsonObj.get("data_warehouse_object_type") != null - && !jsonObj.get("data_warehouse_object_type").isJsonNull()) { - DataWarehouseObjectTypeEnum.validateJsonElement( - jsonObj.get("data_warehouse_object_type")); - } - // validate the optional field `sort_options` - if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { - SortOptionInput.validateJsonElement(jsonObj.get("sort_options")); - } - if ((jsonObj.get("authentication_type") != null - && !jsonObj.get("authentication_type").isJsonNull()) - && !jsonObj.get("authentication_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `authentication_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("authentication_type").toString())); - } - // validate the optional field `authentication_type` - if (jsonObj.get("authentication_type") != null - && !jsonObj.get("authentication_type").isJsonNull()) { - AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchConnectionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchConnectionRequest - * @throws IOException if the JSON string is invalid with respect to SearchConnectionRequest - */ - public static SearchConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchConnectionRequest.class); - } - - /** - * Convert an instance of SearchConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (jsonObj.get("connections") != null && !jsonObj.get("connections").isJsonNull()) { + JsonArray jsonArrayconnections = jsonObj.getAsJsonArray("connections"); + if (jsonArrayconnections != null) { + // ensure the json data is an array + if (!jsonObj.get("connections").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `connections` to be an array in the JSON string but got `%s`", jsonObj.get("connections").toString())); + } + + // validate the optional field `connections` (array) + for (int i = 0; i < jsonArrayconnections.size(); i++) { + ConnectionInput.validateJsonElement(jsonArrayconnections.get(i)); + }; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("data_warehouse_types") != null && !jsonObj.get("data_warehouse_types").isJsonNull() && !jsonObj.get("data_warehouse_types").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_types` to be an array in the JSON string but got `%s`", jsonObj.get("data_warehouse_types").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("tag_identifiers") != null && !jsonObj.get("tag_identifiers").isJsonNull() && !jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tag_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("tag_identifiers").toString())); + } + if ((jsonObj.get("data_warehouse_object_type") != null && !jsonObj.get("data_warehouse_object_type").isJsonNull()) && !jsonObj.get("data_warehouse_object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_warehouse_object_type").toString())); + } + // validate the optional field `data_warehouse_object_type` + if (jsonObj.get("data_warehouse_object_type") != null && !jsonObj.get("data_warehouse_object_type").isJsonNull()) { + DataWarehouseObjectTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_object_type")); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptionInput.validateJsonElement(jsonObj.get("sort_options")); + } + if ((jsonObj.get("authentication_type") != null && !jsonObj.get("authentication_type").isJsonNull()) && !jsonObj.get("authentication_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authentication_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authentication_type").toString())); + } + // validate the optional field `authentication_type` + if (jsonObj.get("authentication_type") != null && !jsonObj.get("authentication_type").isJsonNull()) { + AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchConnectionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchConnectionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchConnectionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchConnectionRequest + * @throws IOException if the JSON string is invalid with respect to SearchConnectionRequest + */ + public static SearchConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchConnectionRequest.class); + } + + /** + * Convert an instance of SearchConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java index b2c57da7e..e567432b1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java @@ -4,518 +4,484 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DataWarehouseObjects; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SearchConnectionResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchConnectionResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Type of data warehouse. */ - @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) - public enum DataWarehouseTypeEnum { - SNOWFLAKE("SNOWFLAKE"), - - AMAZON_REDSHIFT("AMAZON_REDSHIFT"), - - GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), - - AZURE_SYNAPSE("AZURE_SYNAPSE"), - - TERADATA("TERADATA"), - - SAP_HANA("SAP_HANA"), - - STARBURST("STARBURST"), - - ORACLE_ADW("ORACLE_ADW"), - - DATABRICKS("DATABRICKS"), - - DENODO("DENODO"), - - DREMIO("DREMIO"), - - TRINO("TRINO"), - - PRESTO("PRESTO"), - - POSTGRES("POSTGRES"), - - SQLSERVER("SQLSERVER"), - - MYSQL("MYSQL"), - - GENERIC_JDBC("GENERIC_JDBC"), - - AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), - - AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), - - AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), - - AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), - - LOOKER("LOOKER"), - - AMAZON_ATHENA("AMAZON_ATHENA"), - - SINGLESTORE("SINGLESTORE"), - - GCP_SQLSERVER("GCP_SQLSERVER"), - - GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), - - GCP_POSTGRESQL("GCP_POSTGRESQL"), - - GCP_MYSQL("GCP_MYSQL"), - - MODE("MODE"), - - GOOGLE_SHEETS("GOOGLE_SHEETS"), - - FALCON("FALCON"), - - FALCON_ONPREM("FALCON_ONPREM"), - - CLICKHOUSE("CLICKHOUSE"); - - private String value; - - DataWarehouseTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataWarehouseTypeEnum fromValue(String value) { - for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataWarehouseTypeEnum.fromValue(value); - } - } - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataWarehouseTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) - @javax.annotation.Nonnull - private DataWarehouseTypeEnum dataWarehouseType; - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS = "data_warehouse_objects"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS) - @javax.annotation.Nullable - private DataWarehouseObjects dataWarehouseObjects; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - - @SerializedName(SERIALIZED_NAME_DETAILS) - @javax.annotation.Nullable - private Object details; - - public SearchConnectionResponse() {} - - public SearchConnectionResponse id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Unique ID of the connection. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public SearchConnectionResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the connection. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public SearchConnectionResponse description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the connection. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public SearchConnectionResponse dataWarehouseType( - @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - return this; - } - - /** - * Type of data warehouse. - * - * @return dataWarehouseType - */ - @javax.annotation.Nonnull - public DataWarehouseTypeEnum getDataWarehouseType() { - return dataWarehouseType; - } - - public void setDataWarehouseType( - @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { - this.dataWarehouseType = dataWarehouseType; - } - - public SearchConnectionResponse dataWarehouseObjects( - @javax.annotation.Nullable DataWarehouseObjects dataWarehouseObjects) { - this.dataWarehouseObjects = dataWarehouseObjects; - return this; - } - - /** - * Get dataWarehouseObjects - * - * @return dataWarehouseObjects - */ - @javax.annotation.Nullable - public DataWarehouseObjects getDataWarehouseObjects() { - return dataWarehouseObjects; - } - - public void setDataWarehouseObjects( - @javax.annotation.Nullable DataWarehouseObjects dataWarehouseObjects) { - this.dataWarehouseObjects = dataWarehouseObjects; - } +import com.thoughtspot.client.JSON; - public SearchConnectionResponse details(@javax.annotation.Nullable Object details) { - this.details = details; - return this; +/** + * SearchConnectionResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchConnectionResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Type of data warehouse. + */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; } - /** - * Details of the connection. - * - * @return details - */ - @javax.annotation.Nullable - public Object getDetails() { - return details; + public String getValue() { + return value; } - public void setDetails(@javax.annotation.Nullable Object details) { - this.details = details; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchConnectionResponse searchConnectionResponse = (SearchConnectionResponse) o; - return Objects.equals(this.id, searchConnectionResponse.id) - && Objects.equals(this.name, searchConnectionResponse.name) - && Objects.equals(this.description, searchConnectionResponse.description) - && Objects.equals( - this.dataWarehouseType, searchConnectionResponse.dataWarehouseType) - && Objects.equals( - this.dataWarehouseObjects, searchConnectionResponse.dataWarehouseObjects) - && Objects.equals(this.details, searchConnectionResponse.details); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } } - @Override - public int hashCode() { - return Objects.hash( - id, name, description, dataWarehouseType, dataWarehouseObjects, details); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nonnull + private DataWarehouseTypeEnum dataWarehouseType; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS = "data_warehouse_objects"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS) + @javax.annotation.Nullable + private DataWarehouseObjects dataWarehouseObjects; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private Object details; + + public SearchConnectionResponse() { + } + + public SearchConnectionResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the connection. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public SearchConnectionResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the connection. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public SearchConnectionResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the connection. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public SearchConnectionResponse dataWarehouseType(@javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of data warehouse. + * @return dataWarehouseType + */ + @javax.annotation.Nonnull + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType(@javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + + public SearchConnectionResponse dataWarehouseObjects(@javax.annotation.Nullable DataWarehouseObjects dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + return this; + } + + /** + * Get dataWarehouseObjects + * @return dataWarehouseObjects + */ + @javax.annotation.Nullable + public DataWarehouseObjects getDataWarehouseObjects() { + return dataWarehouseObjects; + } + + public void setDataWarehouseObjects(@javax.annotation.Nullable DataWarehouseObjects dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + } + + + public SearchConnectionResponse details(@javax.annotation.Nullable Object details) { + this.details = details; + return this; + } + + /** + * Details of the connection. + * @return details + */ + @javax.annotation.Nullable + public Object getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable Object details) { + this.details = details; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchConnectionResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dataWarehouseType: ") - .append(toIndentedString(dataWarehouseType)) - .append("\n"); - sb.append(" dataWarehouseObjects: ") - .append(toIndentedString(dataWarehouseObjects)) - .append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + SearchConnectionResponse searchConnectionResponse = (SearchConnectionResponse) o; + return Objects.equals(this.id, searchConnectionResponse.id) && + Objects.equals(this.name, searchConnectionResponse.name) && + Objects.equals(this.description, searchConnectionResponse.description) && + Objects.equals(this.dataWarehouseType, searchConnectionResponse.dataWarehouseType) && + Objects.equals(this.dataWarehouseObjects, searchConnectionResponse.dataWarehouseObjects) && + Objects.equals(this.details, searchConnectionResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, dataWarehouseType, dataWarehouseObjects, details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("data_warehouse_type"); - openapiFields.add("data_warehouse_objects"); - openapiFields.add("details"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("data_warehouse_type"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchConnectionResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseType: ").append(toIndentedString(dataWarehouseType)).append("\n"); + sb.append(" dataWarehouseObjects: ").append(toIndentedString(dataWarehouseObjects)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchConnectionResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchConnectionResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchConnectionResponse is not found" - + " in the empty JSON string", - SearchConnectionResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("data_warehouse_objects"); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_warehouse_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchConnectionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchConnectionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchConnectionResponse is not found in the empty JSON string", SearchConnectionResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchConnectionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchConnectionResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchConnectionResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchConnectionResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SearchConnectionResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchConnectionResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_warehouse_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("data_warehouse_type").toString())); - } - // validate the required field `data_warehouse_type` - DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); - // validate the optional field `data_warehouse_objects` - if (jsonObj.get("data_warehouse_objects") != null - && !jsonObj.get("data_warehouse_objects").isJsonNull()) { - DataWarehouseObjects.validateJsonElement(jsonObj.get("data_warehouse_objects")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchConnectionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchConnectionResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchConnectionResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchConnectionResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchConnectionResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchConnectionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchConnectionResponse - * @throws IOException if the JSON string is invalid with respect to SearchConnectionResponse - */ - public static SearchConnectionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchConnectionResponse.class); - } - - /** - * Convert an instance of SearchConnectionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_warehouse_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_warehouse_type").toString())); + } + // validate the required field `data_warehouse_type` + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + // validate the optional field `data_warehouse_objects` + if (jsonObj.get("data_warehouse_objects") != null && !jsonObj.get("data_warehouse_objects").isJsonNull()) { + DataWarehouseObjects.validateJsonElement(jsonObj.get("data_warehouse_objects")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchConnectionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchConnectionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchConnectionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchConnectionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchConnectionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchConnectionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchConnectionResponse + * @throws IOException if the JSON string is invalid with respect to SearchConnectionResponse + */ + public static SearchConnectionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchConnectionResponse.class); + } + + /** + * Convert an instance of SearchConnectionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java index 436c78610..a5ecbabc5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java @@ -4,525 +4,463 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CustomActionMetadataTypeInput; +import com.thoughtspot.client.model.DefaultActionConfigSearchInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SearchCustomActionsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchCustomActionsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CUSTOM_ACTION_IDENTIFIER = - "custom_action_identifier"; - - @SerializedName(SERIALIZED_NAME_CUSTOM_ACTION_IDENTIFIER) - @javax.annotation.Nullable - private String customActionIdentifier; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) - @javax.annotation.Nullable - private DefaultActionConfigSearchInput defaultActionConfig; - - public static final String SERIALIZED_NAME_INCLUDE_GROUP_ASSOCIATIONS = - "include_group_associations"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_GROUP_ASSOCIATIONS) - @javax.annotation.Nullable - private Boolean includeGroupAssociations = false; - - public static final String SERIALIZED_NAME_INCLUDE_METADATA_ASSOCIATIONS = - "include_metadata_associations"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_METADATA_ASSOCIATIONS) - @javax.annotation.Nullable - private Boolean includeMetadataAssociations = false; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - /** Filter the action objects based on type */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CALLBACK("CALLBACK"), - - URL("URL"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public SearchCustomActionsRequest() {} - - public SearchCustomActionsRequest customActionIdentifier( - @javax.annotation.Nullable String customActionIdentifier) { - this.customActionIdentifier = customActionIdentifier; - return this; - } - - /** - * Name or ID of the custom action. - * - * @return customActionIdentifier - */ - @javax.annotation.Nullable - public String getCustomActionIdentifier() { - return customActionIdentifier; - } - - public void setCustomActionIdentifier( - @javax.annotation.Nullable String customActionIdentifier) { - this.customActionIdentifier = customActionIdentifier; - } - - public SearchCustomActionsRequest namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * A pattern to match case-insensitive name of the custom-action object. - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; - } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public SearchCustomActionsRequest defaultActionConfig( - @javax.annotation.Nullable DefaultActionConfigSearchInput defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - return this; - } - - /** - * Default Custom action configuration. This includes if the custom action is available on all - * visualizations. By default, a custom action is added to all visualizations and Answers. - * - * @return defaultActionConfig - */ - @javax.annotation.Nullable - public DefaultActionConfigSearchInput getDefaultActionConfig() { - return defaultActionConfig; - } - - public void setDefaultActionConfig( - @javax.annotation.Nullable DefaultActionConfigSearchInput defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - } - public SearchCustomActionsRequest includeGroupAssociations( - @javax.annotation.Nullable Boolean includeGroupAssociations) { - this.includeGroupAssociations = includeGroupAssociations; - return this; - } - - /** - * When set to true, returns the associated groups for a custom action. - * - * @return includeGroupAssociations - */ - @javax.annotation.Nullable - public Boolean getIncludeGroupAssociations() { - return includeGroupAssociations; - } - - public void setIncludeGroupAssociations( - @javax.annotation.Nullable Boolean includeGroupAssociations) { - this.includeGroupAssociations = includeGroupAssociations; - } - - public SearchCustomActionsRequest includeMetadataAssociations( - @javax.annotation.Nullable Boolean includeMetadataAssociations) { - this.includeMetadataAssociations = includeMetadataAssociations; - return this; - } - - /** - * When set to true, returns the associated metadata for a custom action. - * - * @return includeMetadataAssociations - */ - @javax.annotation.Nullable - public Boolean getIncludeMetadataAssociations() { - return includeMetadataAssociations; - } - - public void setIncludeMetadataAssociations( - @javax.annotation.Nullable Boolean includeMetadataAssociations) { - this.includeMetadataAssociations = includeMetadataAssociations; - } +import com.thoughtspot.client.JSON; - public SearchCustomActionsRequest metadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; - } +/** + * SearchCustomActionsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchCustomActionsRequest implements Serializable { + private static final long serialVersionUID = 1L; - public SearchCustomActionsRequest addMetadataItem(CustomActionMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } + public static final String SERIALIZED_NAME_CUSTOM_ACTION_IDENTIFIER = "custom_action_identifier"; + @SerializedName(SERIALIZED_NAME_CUSTOM_ACTION_IDENTIFIER) + @javax.annotation.Nullable + private String customActionIdentifier; - /** - * Search with a given metadata identifier. - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; - } + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; - public void setMetadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; - } + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nullable + private DefaultActionConfigSearchInput defaultActionConfig; - public SearchCustomActionsRequest type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } + public static final String SERIALIZED_NAME_INCLUDE_GROUP_ASSOCIATIONS = "include_group_associations"; + @SerializedName(SERIALIZED_NAME_INCLUDE_GROUP_ASSOCIATIONS) + @javax.annotation.Nullable + private Boolean includeGroupAssociations = false; - /** - * Filter the action objects based on type - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } + public static final String SERIALIZED_NAME_INCLUDE_METADATA_ASSOCIATIONS = "include_metadata_associations"; + @SerializedName(SERIALIZED_NAME_INCLUDE_METADATA_ASSOCIATIONS) + @javax.annotation.Nullable + private Boolean includeMetadataAssociations = false; - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchCustomActionsRequest searchCustomActionsRequest = (SearchCustomActionsRequest) o; - return Objects.equals( - this.customActionIdentifier, - searchCustomActionsRequest.customActionIdentifier) - && Objects.equals(this.namePattern, searchCustomActionsRequest.namePattern) - && Objects.equals( - this.defaultActionConfig, searchCustomActionsRequest.defaultActionConfig) - && Objects.equals( - this.includeGroupAssociations, - searchCustomActionsRequest.includeGroupAssociations) - && Objects.equals( - this.includeMetadataAssociations, - searchCustomActionsRequest.includeMetadataAssociations) - && Objects.equals(this.metadata, searchCustomActionsRequest.metadata) - && Objects.equals(this.type, searchCustomActionsRequest.type); - } + /** + * Filter the action objects based on type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CALLBACK("CALLBACK"), + + URL("URL"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - customActionIdentifier, - namePattern, - defaultActionConfig, - includeGroupAssociations, - includeMetadataAssociations, - metadata, - type); + TypeEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchCustomActionsRequest {\n"); - sb.append(" customActionIdentifier: ") - .append(toIndentedString(customActionIdentifier)) - .append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" defaultActionConfig: ") - .append(toIndentedString(defaultActionConfig)) - .append("\n"); - sb.append(" includeGroupAssociations: ") - .append(toIndentedString(includeGroupAssociations)) - .append("\n"); - sb.append(" includeMetadataAssociations: ") - .append(toIndentedString(includeMetadataAssociations)) - .append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("custom_action_identifier"); - openapiFields.add("name_pattern"); - openapiFields.add("default_action_config"); - openapiFields.add("include_group_associations"); - openapiFields.add("include_metadata_associations"); - openapiFields.add("metadata"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + 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); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchCustomActionsRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchCustomActionsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchCustomActionsRequest is not" - + " found in the empty JSON string", - SearchCustomActionsRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public SearchCustomActionsRequest() { + } + + public SearchCustomActionsRequest customActionIdentifier(@javax.annotation.Nullable String customActionIdentifier) { + this.customActionIdentifier = customActionIdentifier; + return this; + } + + /** + * Name or ID of the custom action. + * @return customActionIdentifier + */ + @javax.annotation.Nullable + public String getCustomActionIdentifier() { + return customActionIdentifier; + } + + public void setCustomActionIdentifier(@javax.annotation.Nullable String customActionIdentifier) { + this.customActionIdentifier = customActionIdentifier; + } + + + public SearchCustomActionsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the custom-action object. + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public SearchCustomActionsRequest defaultActionConfig(@javax.annotation.Nullable DefaultActionConfigSearchInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. + * @return defaultActionConfig + */ + @javax.annotation.Nullable + public DefaultActionConfigSearchInput getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig(@javax.annotation.Nullable DefaultActionConfigSearchInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + + public SearchCustomActionsRequest includeGroupAssociations(@javax.annotation.Nullable Boolean includeGroupAssociations) { + this.includeGroupAssociations = includeGroupAssociations; + return this; + } + + /** + * When set to true, returns the associated groups for a custom action. + * @return includeGroupAssociations + */ + @javax.annotation.Nullable + public Boolean getIncludeGroupAssociations() { + return includeGroupAssociations; + } + + public void setIncludeGroupAssociations(@javax.annotation.Nullable Boolean includeGroupAssociations) { + this.includeGroupAssociations = includeGroupAssociations; + } + + + public SearchCustomActionsRequest includeMetadataAssociations(@javax.annotation.Nullable Boolean includeMetadataAssociations) { + this.includeMetadataAssociations = includeMetadataAssociations; + return this; + } + + /** + * When set to true, returns the associated metadata for a custom action. + * @return includeMetadataAssociations + */ + @javax.annotation.Nullable + public Boolean getIncludeMetadataAssociations() { + return includeMetadataAssociations; + } + + public void setIncludeMetadataAssociations(@javax.annotation.Nullable Boolean includeMetadataAssociations) { + this.includeMetadataAssociations = includeMetadataAssociations; + } + + + public SearchCustomActionsRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SearchCustomActionsRequest addMetadataItem(CustomActionMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Search with a given metadata identifier. + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + + public SearchCustomActionsRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Filter the action objects based on type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCustomActionsRequest searchCustomActionsRequest = (SearchCustomActionsRequest) o; + return Objects.equals(this.customActionIdentifier, searchCustomActionsRequest.customActionIdentifier) && + Objects.equals(this.namePattern, searchCustomActionsRequest.namePattern) && + Objects.equals(this.defaultActionConfig, searchCustomActionsRequest.defaultActionConfig) && + Objects.equals(this.includeGroupAssociations, searchCustomActionsRequest.includeGroupAssociations) && + Objects.equals(this.includeMetadataAssociations, searchCustomActionsRequest.includeMetadataAssociations) && + Objects.equals(this.metadata, searchCustomActionsRequest.metadata) && + Objects.equals(this.type, searchCustomActionsRequest.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(customActionIdentifier, namePattern, defaultActionConfig, includeGroupAssociations, includeMetadataAssociations, metadata, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCustomActionsRequest {\n"); + sb.append(" customActionIdentifier: ").append(toIndentedString(customActionIdentifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" defaultActionConfig: ").append(toIndentedString(defaultActionConfig)).append("\n"); + sb.append(" includeGroupAssociations: ").append(toIndentedString(includeGroupAssociations)).append("\n"); + sb.append(" includeMetadataAssociations: ").append(toIndentedString(includeMetadataAssociations)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("custom_action_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("default_action_config"); + openapiFields.add("include_group_associations"); + openapiFields.add("include_metadata_associations"); + openapiFields.add("metadata"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCustomActionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCustomActionsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchCustomActionsRequest is not found in the empty JSON string", SearchCustomActionsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchCustomActionsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchCustomActionsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchCustomActionsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchCustomActionsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("custom_action_identifier") != null - && !jsonObj.get("custom_action_identifier").isJsonNull()) - && !jsonObj.get("custom_action_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `custom_action_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("custom_action_identifier").toString())); + if ((jsonObj.get("custom_action_identifier") != null && !jsonObj.get("custom_action_identifier").isJsonNull()) && !jsonObj.get("custom_action_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `custom_action_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("custom_action_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + // validate the optional field `default_action_config` + if (jsonObj.get("default_action_config") != null && !jsonObj.get("default_action_config").isJsonNull()) { + DefaultActionConfigSearchInput.validateJsonElement(jsonObj.get("default_action_config")); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CustomActionMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - // validate the optional field `default_action_config` - if (jsonObj.get("default_action_config") != null - && !jsonObj.get("default_action_config").isJsonNull()) { - DefaultActionConfigSearchInput.validateJsonElement( - jsonObj.get("default_action_config")); - } - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - CustomActionMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchCustomActionsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchCustomActionsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchCustomActionsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchCustomActionsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchCustomActionsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchCustomActionsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchCustomActionsRequest - * @throws IOException if the JSON string is invalid with respect to SearchCustomActionsRequest - */ - public static SearchCustomActionsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchCustomActionsRequest.class); - } - - /** - * Convert an instance of SearchCustomActionsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCustomActionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCustomActionsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchCustomActionsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCustomActionsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchCustomActionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCustomActionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCustomActionsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCustomActionsRequest + */ + public static SearchCustomActionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCustomActionsRequest.class); + } + + /** + * Convert an instance of SearchCustomActionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java index d52bb1f8e..05a52253c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java @@ -4,508 +4,457 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchDataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchDataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_QUERY_STRING = "query_string"; - - @SerializedName(SERIALIZED_NAME_QUERY_STRING) - @javax.annotation.Nonnull - private String queryString; - - public static final String SERIALIZED_NAME_LOGICAL_TABLE_IDENTIFIER = - "logical_table_identifier"; - - @SerializedName(SERIALIZED_NAME_LOGICAL_TABLE_IDENTIFIER) - @javax.annotation.Nonnull - private String logicalTableIdentifier; - - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - @JsonAdapter(DataFormatEnum.Adapter.class) - public enum DataFormatEnum { - FULL("FULL"), - - COMPACT("COMPACT"); - - private String value; - - DataFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DataFormatEnum fromValue(String value) { - for (DataFormatEnum b : DataFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DataFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DataFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DataFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; - - @SerializedName(SERIALIZED_NAME_DATA_FORMAT) - @javax.annotation.Nullable - private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) - @javax.annotation.Nullable - private Object runtimeFilter; - - public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) - @javax.annotation.Nullable - private Object runtimeSort; - - public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) - @javax.annotation.Nullable - private Object runtimeParamOverride; - - public SearchDataRequest() {} - - public SearchDataRequest queryString(@javax.annotation.Nonnull String queryString) { - this.queryString = queryString; - return this; - } - - /** - * Query string with search tokens. For example, <code>[Sales][Region]</code>. See - * [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) - * - * @return queryString - */ - @javax.annotation.Nonnull - public String getQueryString() { - return queryString; - } - - public void setQueryString(@javax.annotation.Nonnull String queryString) { - this.queryString = queryString; - } - - public SearchDataRequest logicalTableIdentifier( - @javax.annotation.Nonnull String logicalTableIdentifier) { - this.logicalTableIdentifier = logicalTableIdentifier; - return this; - } - - /** - * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of - * a data object from the UI or via API. See [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) - * for more details. - * - * @return logicalTableIdentifier - */ - @javax.annotation.Nonnull - public String getLogicalTableIdentifier() { - return logicalTableIdentifier; - } - - public void setLogicalTableIdentifier(@javax.annotation.Nonnull String logicalTableIdentifier) { - this.logicalTableIdentifier = logicalTableIdentifier; - } - - public SearchDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { - this.dataFormat = dataFormat; - return this; - } - - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - * - * @return dataFormat - */ - @javax.annotation.Nullable - public DataFormatEnum getDataFormat() { - return dataFormat; - } - - public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { - this.dataFormat = dataFormat; - } - - public SearchDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records to include in a batch. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public SearchDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * JSON object with representing filter condition to apply filters at runtime. For example, - * <code> {\"col1\": \"item type\", \"op1\": - * \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple - * keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, - * val3. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - * - * @return runtimeFilter - */ - @javax.annotation.Nullable - public Object getRuntimeFilter() { - return runtimeFilter; - } - - public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } +import com.thoughtspot.client.JSON; - public SearchDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } +/** + * SearchDataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchDataRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * JSON object representing columns to sort data at runtime. For example, <code> - * {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You - * can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For - * more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - * - * @return runtimeSort - */ - @javax.annotation.Nullable - public Object getRuntimeSort() { - return runtimeSort; - } + public static final String SERIALIZED_NAME_QUERY_STRING = "query_string"; + @SerializedName(SERIALIZED_NAME_QUERY_STRING) + @javax.annotation.Nonnull + private String queryString; - public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { - this.runtimeSort = runtimeSort; - } + public static final String SERIALIZED_NAME_LOGICAL_TABLE_IDENTIFIER = "logical_table_identifier"; + @SerializedName(SERIALIZED_NAME_LOGICAL_TABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String logicalTableIdentifier; - public SearchDataRequest runtimeParamOverride( - @javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; - return this; - } + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + @JsonAdapter(DataFormatEnum.Adapter.class) + public enum DataFormatEnum { + FULL("FULL"), + + COMPACT("COMPACT"); - /** - * JSON object for setting values of parameters at runtime. For example, <code> - * {\"param1\": \"Double List Param\", \"paramVal1\": - * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for - * example, param2, paramVal2. For more information, see [API - * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). - * - * @return runtimeParamOverride - */ - @javax.annotation.Nullable - public Object getRuntimeParamOverride() { - return runtimeParamOverride; - } + private String value; - public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { - this.runtimeParamOverride = runtimeParamOverride; + DataFormatEnum(String value) { + this.value = value; } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchDataRequest searchDataRequest = (SearchDataRequest) o; - return Objects.equals(this.queryString, searchDataRequest.queryString) - && Objects.equals( - this.logicalTableIdentifier, searchDataRequest.logicalTableIdentifier) - && Objects.equals(this.dataFormat, searchDataRequest.dataFormat) - && Objects.equals(this.recordOffset, searchDataRequest.recordOffset) - && Objects.equals(this.recordSize, searchDataRequest.recordSize) - && Objects.equals(this.runtimeFilter, searchDataRequest.runtimeFilter) - && Objects.equals(this.runtimeSort, searchDataRequest.runtimeSort) - && Objects.equals( - this.runtimeParamOverride, searchDataRequest.runtimeParamOverride); - } - - @Override - public int hashCode() { - return Objects.hash( - queryString, - logicalTableIdentifier, - dataFormat, - recordOffset, - recordSize, - runtimeFilter, - runtimeSort, - runtimeParamOverride); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchDataRequest {\n"); - sb.append(" queryString: ").append(toIndentedString(queryString)).append("\n"); - sb.append(" logicalTableIdentifier: ") - .append(toIndentedString(logicalTableIdentifier)) - .append("\n"); - sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); - sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); - sb.append(" runtimeParamOverride: ") - .append(toIndentedString(runtimeParamOverride)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static DataFormatEnum fromValue(String value) { + for (DataFormatEnum b : DataFormatEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query_string"); - openapiFields.add("logical_table_identifier"); - openapiFields.add("data_format"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("runtime_filter"); - openapiFields.add("runtime_sort"); - openapiFields.add("runtime_param_override"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("query_string"); - openapiRequiredFields.add("logical_table_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataFormatEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchDataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchDataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchDataRequest is not found in the" - + " empty JSON string", - SearchDataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + DataFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; + @SerializedName(SERIALIZED_NAME_DATA_FORMAT) + @javax.annotation.Nullable + private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public SearchDataRequest() { + } + + public SearchDataRequest queryString(@javax.annotation.Nonnull String queryString) { + this.queryString = queryString; + return this; + } + + /** + * Query string with search tokens. For example, <code>[Sales][Region]</code>. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + * @return queryString + */ + @javax.annotation.Nonnull + public String getQueryString() { + return queryString; + } + + public void setQueryString(@javax.annotation.Nonnull String queryString) { + this.queryString = queryString; + } + + + public SearchDataRequest logicalTableIdentifier(@javax.annotation.Nonnull String logicalTableIdentifier) { + this.logicalTableIdentifier = logicalTableIdentifier; + return this; + } + + /** + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. + * @return logicalTableIdentifier + */ + @javax.annotation.Nonnull + public String getLogicalTableIdentifier() { + return logicalTableIdentifier; + } + + public void setLogicalTableIdentifier(@javax.annotation.Nonnull String logicalTableIdentifier) { + this.logicalTableIdentifier = logicalTableIdentifier; + } + + + public SearchDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * @return dataFormat + */ + @javax.annotation.Nullable + public DataFormatEnum getDataFormat() { + return dataFormat; + } + + public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + } + + + public SearchDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records to include in a batch. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, <code> {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + + public SearchDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON object representing columns to sort data at runtime. For example, <code> {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + + public SearchDataRequest runtimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchDataRequest searchDataRequest = (SearchDataRequest) o; + return Objects.equals(this.queryString, searchDataRequest.queryString) && + Objects.equals(this.logicalTableIdentifier, searchDataRequest.logicalTableIdentifier) && + Objects.equals(this.dataFormat, searchDataRequest.dataFormat) && + Objects.equals(this.recordOffset, searchDataRequest.recordOffset) && + Objects.equals(this.recordSize, searchDataRequest.recordSize) && + Objects.equals(this.runtimeFilter, searchDataRequest.runtimeFilter) && + Objects.equals(this.runtimeSort, searchDataRequest.runtimeSort) && + Objects.equals(this.runtimeParamOverride, searchDataRequest.runtimeParamOverride); + } + + @Override + public int hashCode() { + return Objects.hash(queryString, logicalTableIdentifier, dataFormat, recordOffset, recordSize, runtimeFilter, runtimeSort, runtimeParamOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchDataRequest {\n"); + sb.append(" queryString: ").append(toIndentedString(queryString)).append("\n"); + sb.append(" logicalTableIdentifier: ").append(toIndentedString(logicalTableIdentifier)).append("\n"); + sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ").append(toIndentedString(runtimeParamOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query_string"); + openapiFields.add("logical_table_identifier"); + openapiFields.add("data_format"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query_string"); + openapiRequiredFields.add("logical_table_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchDataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchDataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchDataRequest is not found in the empty JSON string", SearchDataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchDataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchDataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchDataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchDataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SearchDataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchDataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("query_string").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query_string` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("query_string").toString())); - } - if (!jsonObj.get("logical_table_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `logical_table_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("logical_table_identifier").toString())); - } - if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) - && !jsonObj.get("data_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `data_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("data_format").toString())); - } - // validate the optional field `data_format` - if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { - DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchDataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchDataRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchDataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchDataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchDataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchDataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchDataRequest - * @throws IOException if the JSON string is invalid with respect to SearchDataRequest - */ - public static SearchDataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchDataRequest.class); - } - - /** - * Convert an instance of SearchDataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("query_string").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query_string` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query_string").toString())); + } + if (!jsonObj.get("logical_table_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logical_table_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logical_table_identifier").toString())); + } + if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) && !jsonObj.get("data_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_format").toString())); + } + // validate the optional field `data_format` + if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { + DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchDataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchDataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchDataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchDataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchDataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchDataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchDataRequest + * @throws IOException if the JSON string is invalid with respect to SearchDataRequest + */ + public static SearchDataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchDataRequest.class); + } + + /** + * Convert an instance of SearchDataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java index 44b248aa7..29f8061b2 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java @@ -4,222 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AnswerContent; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Response format associated with the search data API. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * Response format associated with the search data API. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SearchDataResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_CONTENTS = "contents"; + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + @SerializedName(SERIALIZED_NAME_CONTENTS) + @javax.annotation.Nonnull + private List contents; - @SerializedName(SERIALIZED_NAME_CONTENTS) - @javax.annotation.Nonnull - private List contents; + public SearchDataResponse() { + } - public SearchDataResponse() {} + public SearchDataResponse contents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + return this; + } - public SearchDataResponse contents(@javax.annotation.Nonnull List contents) { - this.contents = contents; - return this; + public SearchDataResponse addContentsItem(AnswerContent contentsItem) { + if (this.contents == null) { + this.contents = new ArrayList<>(); } + this.contents.add(contentsItem); + return this; + } - public SearchDataResponse addContentsItem(AnswerContent contentsItem) { - if (this.contents == null) { - this.contents = new ArrayList<>(); - } - this.contents.add(contentsItem); - return this; - } + /** + * Data content of metadata objects + * @return contents + */ + @javax.annotation.Nonnull + public List getContents() { + return contents; + } - /** - * Data content of metadata objects - * - * @return contents - */ - @javax.annotation.Nonnull - public List getContents() { - return contents; - } + public void setContents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + } - public void setContents(@javax.annotation.Nonnull List contents) { - this.contents = contents; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchDataResponse searchDataResponse = (SearchDataResponse) o; - return Objects.equals(this.contents, searchDataResponse.contents); - } - @Override - public int hashCode() { - return Objects.hash(contents); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchDataResponse {\n"); - sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contents"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("contents"); + SearchDataResponse searchDataResponse = (SearchDataResponse) o; + return Objects.equals(this.contents, searchDataResponse.contents); + } + + @Override + public int hashCode() { + return Objects.hash(contents); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchDataResponse {\n"); + sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchDataResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchDataResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchDataResponse is not found in" - + " the empty JSON string", - SearchDataResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contents"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("contents"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchDataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchDataResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchDataResponse is not found in the empty JSON string", SearchDataResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchDataResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchDataResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchDataResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchDataResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SearchDataResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchDataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("contents").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contents` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("contents").toString())); - } - - JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); - // validate the required field `contents` (array) - for (int i = 0; i < jsonArraycontents.size(); i++) { - AnswerContent.validateJsonElement(jsonArraycontents.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchDataResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchDataResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchDataResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchDataResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchDataResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchDataResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchDataResponse - * @throws IOException if the JSON string is invalid with respect to SearchDataResponse - */ - public static SearchDataResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchDataResponse.class); - } - - /** - * Convert an instance of SearchDataResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("contents").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `contents` to be an array in the JSON string but got `%s`", jsonObj.get("contents").toString())); + } + + JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); + // validate the required field `contents` (array) + for (int i = 0; i < jsonArraycontents.size(); i++) { + AnswerContent.validateJsonElement(jsonArraycontents.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchDataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchDataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchDataResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchDataResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchDataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchDataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchDataResponse + * @throws IOException if the JSON string is invalid with respect to SearchDataResponse + */ + public static SearchDataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchDataResponse.class); + } + + /** + * Convert an instance of SearchDataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java index 04b89600d..ed85ef2ff 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java @@ -4,212 +4,208 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchEmailCustomizationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * SearchEmailCustomizationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SearchEmailCustomizationRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; + public SearchEmailCustomizationRequest() { + } - public SearchEmailCustomizationRequest() {} + public SearchEmailCustomizationRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } - public SearchEmailCustomizationRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; + public SearchEmailCustomizationRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } - public SearchEmailCustomizationRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } + /** + * Unique ID or name of org Version: 10.12.0.cl or later + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } - /** - * Unique ID or name of org Version: 10.12.0.cl or later - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; - } + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchEmailCustomizationRequest searchEmailCustomizationRequest = - (SearchEmailCustomizationRequest) o; - return Objects.equals(this.orgIdentifiers, searchEmailCustomizationRequest.orgIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash(orgIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchEmailCustomizationRequest {\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + SearchEmailCustomizationRequest searchEmailCustomizationRequest = (SearchEmailCustomizationRequest) o; + return Objects.equals(this.orgIdentifiers, searchEmailCustomizationRequest.orgIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchEmailCustomizationRequest {\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * SearchEmailCustomizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchEmailCustomizationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchEmailCustomizationRequest is" - + " not found in the empty JSON string", - SearchEmailCustomizationRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchEmailCustomizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchEmailCustomizationRequest is not found in the empty JSON string", SearchEmailCustomizationRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchEmailCustomizationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchEmailCustomizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchEmailCustomizationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(SearchEmailCustomizationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchEmailCustomizationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchEmailCustomizationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchEmailCustomizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchEmailCustomizationRequest - * @throws IOException if the JSON string is invalid with respect to - * SearchEmailCustomizationRequest - */ - public static SearchEmailCustomizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchEmailCustomizationRequest.class); - } - - /** - * Convert an instance of SearchEmailCustomizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchEmailCustomizationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchEmailCustomizationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchEmailCustomizationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchEmailCustomizationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to SearchEmailCustomizationRequest + */ + public static SearchEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchEmailCustomizationRequest.class); + } + + /** + * Convert an instance of SearchEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java index ee174ef68..4c795da34 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java @@ -4,1298 +4,1089 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExcludeMetadataListItemInput; +import com.thoughtspot.client.model.FavoriteObjectOptionsInput; +import com.thoughtspot.client.model.MetadataListItemInput; +import com.thoughtspot.client.model.MetadataSearchSortOptions; +import com.thoughtspot.client.model.PermissionInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SearchMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - @javax.annotation.Nullable - private List permissions; - - public static final String SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS = - "created_by_user_identifiers"; - - @SerializedName(SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List createdByUserIdentifiers; - - /** Version of the dependent table of the metadata objects like Worksheets. */ - @JsonAdapter(DependentObjectVersionEnum.Adapter.class) - public enum DependentObjectVersionEnum { - V1("V1"), - - V2("V2"); - - private String value; - - DependentObjectVersionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DependentObjectVersionEnum fromValue(String value) { - for (DependentObjectVersionEnum b : DependentObjectVersionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final DependentObjectVersionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DependentObjectVersionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DependentObjectVersionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DependentObjectVersionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEPENDENT_OBJECT_VERSION = - "dependent_object_version"; - - @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECT_VERSION) - @javax.annotation.Nullable - private DependentObjectVersionEnum dependentObjectVersion = DependentObjectVersionEnum.V1; - - public static final String SERIALIZED_NAME_EXCLUDE_OBJECTS = "exclude_objects"; - - @SerializedName(SERIALIZED_NAME_EXCLUDE_OBJECTS) - @javax.annotation.Nullable - private List excludeObjects; - - public static final String SERIALIZED_NAME_FAVORITE_OBJECT_OPTIONS = "favorite_object_options"; - - @SerializedName(SERIALIZED_NAME_FAVORITE_OBJECT_OPTIONS) - @javax.annotation.Nullable - private FavoriteObjectOptionsInput favoriteObjectOptions; - - public static final String SERIALIZED_NAME_INCLUDE_AUTO_CREATED_OBJECTS = - "include_auto_created_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_AUTO_CREATED_OBJECTS) - @javax.annotation.Nullable - private Boolean includeAutoCreatedObjects = false; - - public static final String SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS = - "include_dependent_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS) - @javax.annotation.Nullable - private Boolean includeDependentObjects = false; - - public static final String SERIALIZED_NAME_DEPENDENT_OBJECTS_RECORD_SIZE = - "dependent_objects_record_size"; - - @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECTS_RECORD_SIZE) - @javax.annotation.Nullable - private Integer dependentObjectsRecordSize = 50; - - public static final String SERIALIZED_NAME_INCLUDE_DETAILS = "include_details"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_DETAILS) - @javax.annotation.Nullable - private Boolean includeDetails = false; - - public static final String SERIALIZED_NAME_INCLUDE_HEADERS = "include_headers"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_HEADERS) - @javax.annotation.Nullable - private Boolean includeHeaders = true; - - public static final String SERIALIZED_NAME_INCLUDE_HIDDEN_OBJECTS = "include_hidden_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_HIDDEN_OBJECTS) - @javax.annotation.Nullable - private Boolean includeHiddenObjects = false; - - public static final String SERIALIZED_NAME_INCLUDE_INCOMPLETE_OBJECTS = - "include_incomplete_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_INCOMPLETE_OBJECTS) - @javax.annotation.Nullable - private Boolean includeIncompleteObjects = false; - - public static final String SERIALIZED_NAME_INCLUDE_VISUALIZATION_HEADERS = - "include_visualization_headers"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_VISUALIZATION_HEADERS) - @javax.annotation.Nullable - private Boolean includeVisualizationHeaders = false; - - public static final String SERIALIZED_NAME_INCLUDE_WORKSHEET_SEARCH_ASSIST_DATA = - "include_worksheet_search_assist_data"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_WORKSHEET_SEARCH_ASSIST_DATA) - @javax.annotation.Nullable - private Boolean includeWorksheetSearchAssistData; - - public static final String SERIALIZED_NAME_MODIFIED_BY_USER_IDENTIFIERS = - "modified_by_user_identifiers"; - - @SerializedName(SERIALIZED_NAME_MODIFIED_BY_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List modifiedByUserIdentifiers; - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; - - @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) - @javax.annotation.Nullable - private MetadataSearchSortOptions sortOptions; - - public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; - - @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) - @javax.annotation.Nullable - private List tagIdentifiers; - - public static final String SERIALIZED_NAME_INCLUDE_STATS = "include_stats"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_STATS) - @javax.annotation.Nullable - private Boolean includeStats = false; - - public static final String SERIALIZED_NAME_INCLUDE_DISCOVERABLE_OBJECTS = - "include_discoverable_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_DISCOVERABLE_OBJECTS) - @javax.annotation.Nullable - private Boolean includeDiscoverableObjects = true; - - public static final String SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS = - "show_resolved_parameters"; - - @SerializedName(SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS) - @javax.annotation.Nullable - private Boolean showResolvedParameters = false; - - /** Indicates the model version of Liveboard to be attached in metadata detail. */ - @JsonAdapter(LiveboardResponseVersionEnum.Adapter.class) - public enum LiveboardResponseVersionEnum { - V1("V1"), - - V2("V2"); - - private String value; - - LiveboardResponseVersionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static LiveboardResponseVersionEnum fromValue(String value) { - for (LiveboardResponseVersionEnum b : LiveboardResponseVersionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write( - final JsonWriter jsonWriter, final LiveboardResponseVersionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public LiveboardResponseVersionEnum read(final JsonReader jsonReader) - throws IOException { - String value = jsonReader.nextString(); - return LiveboardResponseVersionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - LiveboardResponseVersionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_LIVEBOARD_RESPONSE_VERSION = - "liveboard_response_version"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_RESPONSE_VERSION) - @javax.annotation.Nullable - private LiveboardResponseVersionEnum liveboardResponseVersion = LiveboardResponseVersionEnum.V1; - - public static final String SERIALIZED_NAME_INCLUDE_ONLY_PUBLISHED_OBJECTS = - "include_only_published_objects"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_ONLY_PUBLISHED_OBJECTS) - @javax.annotation.Nullable - private Boolean includeOnlyPublishedObjects = false; - - public SearchMetadataRequest() {} - - public SearchMetadataRequest metadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; - } - - public SearchMetadataRequest addMetadataItem(MetadataListItemInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata objects such as Liveboards, Answers, and Worksheets. - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; - } - - public SearchMetadataRequest permissions( - @javax.annotation.Nullable List permissions) { - this.permissions = permissions; - return this; - } - - public SearchMetadataRequest addPermissionsItem(PermissionInput permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } - - /** - * Object permission details to search by. - * - * @return permissions - */ - @javax.annotation.Nullable - public List getPermissions() { - return permissions; - } - - public void setPermissions(@javax.annotation.Nullable List permissions) { - this.permissions = permissions; - } - - public SearchMetadataRequest createdByUserIdentifiers( - @javax.annotation.Nullable List createdByUserIdentifiers) { - this.createdByUserIdentifiers = createdByUserIdentifiers; - return this; - } - - public SearchMetadataRequest addCreatedByUserIdentifiersItem( - String createdByUserIdentifiersItem) { - if (this.createdByUserIdentifiers == null) { - this.createdByUserIdentifiers = new ArrayList<>(); - } - this.createdByUserIdentifiers.add(createdByUserIdentifiersItem); - return this; - } - - /** - * GUID or name of user who created the metadata object. - * - * @return createdByUserIdentifiers - */ - @javax.annotation.Nullable - public List getCreatedByUserIdentifiers() { - return createdByUserIdentifiers; - } - - public void setCreatedByUserIdentifiers( - @javax.annotation.Nullable List createdByUserIdentifiers) { - this.createdByUserIdentifiers = createdByUserIdentifiers; - } - - public SearchMetadataRequest dependentObjectVersion( - @javax.annotation.Nullable DependentObjectVersionEnum dependentObjectVersion) { - this.dependentObjectVersion = dependentObjectVersion; - return this; - } - - /** - * Version of the dependent table of the metadata objects like Worksheets. - * - * @return dependentObjectVersion - */ - @javax.annotation.Nullable - public DependentObjectVersionEnum getDependentObjectVersion() { - return dependentObjectVersion; - } - - public void setDependentObjectVersion( - @javax.annotation.Nullable DependentObjectVersionEnum dependentObjectVersion) { - this.dependentObjectVersion = dependentObjectVersion; - } - - public SearchMetadataRequest excludeObjects( - @javax.annotation.Nullable List excludeObjects) { - this.excludeObjects = excludeObjects; - return this; - } - - public SearchMetadataRequest addExcludeObjectsItem( - ExcludeMetadataListItemInput excludeObjectsItem) { - if (this.excludeObjects == null) { - this.excludeObjects = new ArrayList<>(); - } - this.excludeObjects.add(excludeObjectsItem); - return this; - } - - /** - * List of metadata objects to exclude from search. - * - * @return excludeObjects - */ - @javax.annotation.Nullable - public List getExcludeObjects() { - return excludeObjects; - } - - public void setExcludeObjects( - @javax.annotation.Nullable List excludeObjects) { - this.excludeObjects = excludeObjects; - } - - public SearchMetadataRequest favoriteObjectOptions( - @javax.annotation.Nullable FavoriteObjectOptionsInput favoriteObjectOptions) { - this.favoriteObjectOptions = favoriteObjectOptions; - return this; - } - - /** - * Options to sort the API response by objects set as favorites for the logged-in user or the - * users specified in the API request. - * - * @return favoriteObjectOptions - */ - @javax.annotation.Nullable - public FavoriteObjectOptionsInput getFavoriteObjectOptions() { - return favoriteObjectOptions; - } - - public void setFavoriteObjectOptions( - @javax.annotation.Nullable FavoriteObjectOptionsInput favoriteObjectOptions) { - this.favoriteObjectOptions = favoriteObjectOptions; - } - - public SearchMetadataRequest includeAutoCreatedObjects( - @javax.annotation.Nullable Boolean includeAutoCreatedObjects) { - this.includeAutoCreatedObjects = includeAutoCreatedObjects; - return this; - } - - /** - * Includes system-generated metadata objects. - * - * @return includeAutoCreatedObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeAutoCreatedObjects() { - return includeAutoCreatedObjects; - } - - public void setIncludeAutoCreatedObjects( - @javax.annotation.Nullable Boolean includeAutoCreatedObjects) { - this.includeAutoCreatedObjects = includeAutoCreatedObjects; - } - - public SearchMetadataRequest includeDependentObjects( - @javax.annotation.Nullable Boolean includeDependentObjects) { - this.includeDependentObjects = includeDependentObjects; - return this; - } - - /** - * Includes dependents of the metadata object specified in the API request. For example, a - * worksheet can consist of dependent objects such as Liveboards or Answers. - * - * @return includeDependentObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeDependentObjects() { - return includeDependentObjects; - } - - public void setIncludeDependentObjects( - @javax.annotation.Nullable Boolean includeDependentObjects) { - this.includeDependentObjects = includeDependentObjects; - } - - public SearchMetadataRequest dependentObjectsRecordSize( - @javax.annotation.Nullable Integer dependentObjectsRecordSize) { - this.dependentObjectsRecordSize = dependentObjectsRecordSize; - return this; - } - - /** - * The maximum number of dependents to include per metadata object. - * - * @return dependentObjectsRecordSize - */ - @javax.annotation.Nullable - public Integer getDependentObjectsRecordSize() { - return dependentObjectsRecordSize; - } - - public void setDependentObjectsRecordSize( - @javax.annotation.Nullable Integer dependentObjectsRecordSize) { - this.dependentObjectsRecordSize = dependentObjectsRecordSize; - } - - public SearchMetadataRequest includeDetails(@javax.annotation.Nullable Boolean includeDetails) { - this.includeDetails = includeDetails; - return this; - } - - /** - * Includes complete details of the metadata objects. - * - * @return includeDetails - */ - @javax.annotation.Nullable - public Boolean getIncludeDetails() { - return includeDetails; - } - - public void setIncludeDetails(@javax.annotation.Nullable Boolean includeDetails) { - this.includeDetails = includeDetails; - } - - public SearchMetadataRequest includeHeaders(@javax.annotation.Nullable Boolean includeHeaders) { - this.includeHeaders = includeHeaders; - return this; - } - - /** - * Includes headers of the metadata objects. - * - * @return includeHeaders - */ - @javax.annotation.Nullable - public Boolean getIncludeHeaders() { - return includeHeaders; - } - - public void setIncludeHeaders(@javax.annotation.Nullable Boolean includeHeaders) { - this.includeHeaders = includeHeaders; - } - - public SearchMetadataRequest includeHiddenObjects( - @javax.annotation.Nullable Boolean includeHiddenObjects) { - this.includeHiddenObjects = includeHiddenObjects; - return this; - } - - /** - * Includes details of the hidden objects, such as a column in a worksheet or a table. - * - * @return includeHiddenObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeHiddenObjects() { - return includeHiddenObjects; - } - - public void setIncludeHiddenObjects(@javax.annotation.Nullable Boolean includeHiddenObjects) { - this.includeHiddenObjects = includeHiddenObjects; - } - - public SearchMetadataRequest includeIncompleteObjects( - @javax.annotation.Nullable Boolean includeIncompleteObjects) { - this.includeIncompleteObjects = includeIncompleteObjects; - return this; - } - - /** - * Includes objects with incomplete metadata. - * - * @return includeIncompleteObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeIncompleteObjects() { - return includeIncompleteObjects; - } - - public void setIncludeIncompleteObjects( - @javax.annotation.Nullable Boolean includeIncompleteObjects) { - this.includeIncompleteObjects = includeIncompleteObjects; - } - - public SearchMetadataRequest includeVisualizationHeaders( - @javax.annotation.Nullable Boolean includeVisualizationHeaders) { - this.includeVisualizationHeaders = includeVisualizationHeaders; - return this; - } - - /** - * Includes visualization headers of the specified Liveboard object. - * - * @return includeVisualizationHeaders - */ - @javax.annotation.Nullable - public Boolean getIncludeVisualizationHeaders() { - return includeVisualizationHeaders; - } - - public void setIncludeVisualizationHeaders( - @javax.annotation.Nullable Boolean includeVisualizationHeaders) { - this.includeVisualizationHeaders = includeVisualizationHeaders; - } - - public SearchMetadataRequest includeWorksheetSearchAssistData( - @javax.annotation.Nullable Boolean includeWorksheetSearchAssistData) { - this.includeWorksheetSearchAssistData = includeWorksheetSearchAssistData; - return this; - } - - /** - * If search assistance lessons are configured on a worksheet, the API returns the search assist - * data for Worksheet objects. - * - * @return includeWorksheetSearchAssistData - */ - @javax.annotation.Nullable - public Boolean getIncludeWorksheetSearchAssistData() { - return includeWorksheetSearchAssistData; - } - - public void setIncludeWorksheetSearchAssistData( - @javax.annotation.Nullable Boolean includeWorksheetSearchAssistData) { - this.includeWorksheetSearchAssistData = includeWorksheetSearchAssistData; - } - - public SearchMetadataRequest modifiedByUserIdentifiers( - @javax.annotation.Nullable List modifiedByUserIdentifiers) { - this.modifiedByUserIdentifiers = modifiedByUserIdentifiers; - return this; - } - - public SearchMetadataRequest addModifiedByUserIdentifiersItem( - String modifiedByUserIdentifiersItem) { - if (this.modifiedByUserIdentifiers == null) { - this.modifiedByUserIdentifiers = new ArrayList<>(); - } - this.modifiedByUserIdentifiers.add(modifiedByUserIdentifiersItem); - return this; - } - - /** - * Includes ID or names of the users who modified the metadata object. - * - * @return modifiedByUserIdentifiers - */ - @javax.annotation.Nullable - public List getModifiedByUserIdentifiers() { - return modifiedByUserIdentifiers; - } - - public void setModifiedByUserIdentifiers( - @javax.annotation.Nullable List modifiedByUserIdentifiers) { - this.modifiedByUserIdentifiers = modifiedByUserIdentifiers; - } - - public SearchMetadataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchMetadataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included. It is recommended to use a smaller - * `record_size` when fetching dependent objects or any of the additional metadata - * detail options. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public SearchMetadataRequest sortOptions( - @javax.annotation.Nullable MetadataSearchSortOptions sortOptions) { - this.sortOptions = sortOptions; - return this; - } - - /** - * Sort options to filter metadata details. - * - * @return sortOptions - */ - @javax.annotation.Nullable - public MetadataSearchSortOptions getSortOptions() { - return sortOptions; - } - - public void setSortOptions(@javax.annotation.Nullable MetadataSearchSortOptions sortOptions) { - this.sortOptions = sortOptions; - } - - public SearchMetadataRequest tagIdentifiers( - @javax.annotation.Nullable List tagIdentifiers) { - this.tagIdentifiers = tagIdentifiers; - return this; - } - - public SearchMetadataRequest addTagIdentifiersItem(String tagIdentifiersItem) { - if (this.tagIdentifiers == null) { - this.tagIdentifiers = new ArrayList<>(); - } - this.tagIdentifiers.add(tagIdentifiersItem); - return this; - } - - /** - * Tags to filter metadata objects by - * - * @return tagIdentifiers - */ - @javax.annotation.Nullable - public List getTagIdentifiers() { - return tagIdentifiers; - } - - public void setTagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { - this.tagIdentifiers = tagIdentifiers; - } - - public SearchMetadataRequest includeStats(@javax.annotation.Nullable Boolean includeStats) { - this.includeStats = includeStats; - return this; - } - - /** - * Indicates whether to include stats of the metadata objects. - * - * @return includeStats - */ - @javax.annotation.Nullable - public Boolean getIncludeStats() { - return includeStats; - } - - public void setIncludeStats(@javax.annotation.Nullable Boolean includeStats) { - this.includeStats = includeStats; - } - - public SearchMetadataRequest includeDiscoverableObjects( - @javax.annotation.Nullable Boolean includeDiscoverableObjects) { - this.includeDiscoverableObjects = includeDiscoverableObjects; - return this; - } - - /** - * <div>Version: 10.7.0.cl or later </div> Boolean to indicate whether to include - * discoverable metadata objects. - * - * @return includeDiscoverableObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeDiscoverableObjects() { - return includeDiscoverableObjects; - } - - public void setIncludeDiscoverableObjects( - @javax.annotation.Nullable Boolean includeDiscoverableObjects) { - this.includeDiscoverableObjects = includeDiscoverableObjects; - } +import com.thoughtspot.client.JSON; - public SearchMetadataRequest showResolvedParameters( - @javax.annotation.Nullable Boolean showResolvedParameters) { - this.showResolvedParameters = showResolvedParameters; - return this; - } +/** + * SearchMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; - /** - * <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved - * parameterised values. - * - * @return showResolvedParameters - */ - @javax.annotation.Nullable - public Boolean getShowResolvedParameters() { - return showResolvedParameters; - } + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; - public void setShowResolvedParameters( - @javax.annotation.Nullable Boolean showResolvedParameters) { - this.showResolvedParameters = showResolvedParameters; - } + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @javax.annotation.Nullable + private List permissions; - public SearchMetadataRequest liveboardResponseVersion( - @javax.annotation.Nullable LiveboardResponseVersionEnum liveboardResponseVersion) { - this.liveboardResponseVersion = liveboardResponseVersion; - return this; - } + public static final String SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS = "created_by_user_identifiers"; + @SerializedName(SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List createdByUserIdentifiers; - /** - * Indicates the model version of Liveboard to be attached in metadata detail. - * - * @return liveboardResponseVersion - */ - @javax.annotation.Nullable - public LiveboardResponseVersionEnum getLiveboardResponseVersion() { - return liveboardResponseVersion; - } + /** + * Version of the dependent table of the metadata objects like Worksheets. + */ + @JsonAdapter(DependentObjectVersionEnum.Adapter.class) + public enum DependentObjectVersionEnum { + V1("V1"), + + V2("V2"); - public void setLiveboardResponseVersion( - @javax.annotation.Nullable LiveboardResponseVersionEnum liveboardResponseVersion) { - this.liveboardResponseVersion = liveboardResponseVersion; - } + private String value; - public SearchMetadataRequest includeOnlyPublishedObjects( - @javax.annotation.Nullable Boolean includeOnlyPublishedObjects) { - this.includeOnlyPublishedObjects = includeOnlyPublishedObjects; - return this; + DependentObjectVersionEnum(String value) { + this.value = value; } - /** - * <div>Version: 10.11.0.cl or later </div> If only published objects should be - * returned - * - * @return includeOnlyPublishedObjects - */ - @javax.annotation.Nullable - public Boolean getIncludeOnlyPublishedObjects() { - return includeOnlyPublishedObjects; + public String getValue() { + return value; } - public void setIncludeOnlyPublishedObjects( - @javax.annotation.Nullable Boolean includeOnlyPublishedObjects) { - this.includeOnlyPublishedObjects = includeOnlyPublishedObjects; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static DependentObjectVersionEnum fromValue(String value) { + for (DependentObjectVersionEnum b : DependentObjectVersionEnum.values()) { + if (b.value.equals(value)) { + return b; } - SearchMetadataRequest searchMetadataRequest = (SearchMetadataRequest) o; - return Objects.equals(this.metadata, searchMetadataRequest.metadata) - && Objects.equals(this.permissions, searchMetadataRequest.permissions) - && Objects.equals( - this.createdByUserIdentifiers, - searchMetadataRequest.createdByUserIdentifiers) - && Objects.equals( - this.dependentObjectVersion, searchMetadataRequest.dependentObjectVersion) - && Objects.equals(this.excludeObjects, searchMetadataRequest.excludeObjects) - && Objects.equals( - this.favoriteObjectOptions, searchMetadataRequest.favoriteObjectOptions) - && Objects.equals( - this.includeAutoCreatedObjects, - searchMetadataRequest.includeAutoCreatedObjects) - && Objects.equals( - this.includeDependentObjects, searchMetadataRequest.includeDependentObjects) - && Objects.equals( - this.dependentObjectsRecordSize, - searchMetadataRequest.dependentObjectsRecordSize) - && Objects.equals(this.includeDetails, searchMetadataRequest.includeDetails) - && Objects.equals(this.includeHeaders, searchMetadataRequest.includeHeaders) - && Objects.equals( - this.includeHiddenObjects, searchMetadataRequest.includeHiddenObjects) - && Objects.equals( - this.includeIncompleteObjects, - searchMetadataRequest.includeIncompleteObjects) - && Objects.equals( - this.includeVisualizationHeaders, - searchMetadataRequest.includeVisualizationHeaders) - && Objects.equals( - this.includeWorksheetSearchAssistData, - searchMetadataRequest.includeWorksheetSearchAssistData) - && Objects.equals( - this.modifiedByUserIdentifiers, - searchMetadataRequest.modifiedByUserIdentifiers) - && Objects.equals(this.recordOffset, searchMetadataRequest.recordOffset) - && Objects.equals(this.recordSize, searchMetadataRequest.recordSize) - && Objects.equals(this.sortOptions, searchMetadataRequest.sortOptions) - && Objects.equals(this.tagIdentifiers, searchMetadataRequest.tagIdentifiers) - && Objects.equals(this.includeStats, searchMetadataRequest.includeStats) - && Objects.equals( - this.includeDiscoverableObjects, - searchMetadataRequest.includeDiscoverableObjects) - && Objects.equals( - this.showResolvedParameters, searchMetadataRequest.showResolvedParameters) - && Objects.equals( - this.liveboardResponseVersion, - searchMetadataRequest.liveboardResponseVersion) - && Objects.equals( - this.includeOnlyPublishedObjects, - searchMetadataRequest.includeOnlyPublishedObjects); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DependentObjectVersionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - @Override - public int hashCode() { - return Objects.hash( - metadata, - permissions, - createdByUserIdentifiers, - dependentObjectVersion, - excludeObjects, - favoriteObjectOptions, - includeAutoCreatedObjects, - includeDependentObjects, - dependentObjectsRecordSize, - includeDetails, - includeHeaders, - includeHiddenObjects, - includeIncompleteObjects, - includeVisualizationHeaders, - includeWorksheetSearchAssistData, - modifiedByUserIdentifiers, - recordOffset, - recordSize, - sortOptions, - tagIdentifiers, - includeStats, - includeDiscoverableObjects, - showResolvedParameters, - liveboardResponseVersion, - includeOnlyPublishedObjects); + @Override + public DependentObjectVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DependentObjectVersionEnum.fromValue(value); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DependentObjectVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DEPENDENT_OBJECT_VERSION = "dependent_object_version"; + @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECT_VERSION) + @javax.annotation.Nullable + private DependentObjectVersionEnum dependentObjectVersion = DependentObjectVersionEnum.V1; + + public static final String SERIALIZED_NAME_EXCLUDE_OBJECTS = "exclude_objects"; + @SerializedName(SERIALIZED_NAME_EXCLUDE_OBJECTS) + @javax.annotation.Nullable + private List excludeObjects; + + public static final String SERIALIZED_NAME_FAVORITE_OBJECT_OPTIONS = "favorite_object_options"; + @SerializedName(SERIALIZED_NAME_FAVORITE_OBJECT_OPTIONS) + @javax.annotation.Nullable + private FavoriteObjectOptionsInput favoriteObjectOptions; + + public static final String SERIALIZED_NAME_INCLUDE_AUTO_CREATED_OBJECTS = "include_auto_created_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_AUTO_CREATED_OBJECTS) + @javax.annotation.Nullable + private Boolean includeAutoCreatedObjects = false; + + public static final String SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS = "include_dependent_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS) + @javax.annotation.Nullable + private Boolean includeDependentObjects = false; + + public static final String SERIALIZED_NAME_DEPENDENT_OBJECTS_RECORD_SIZE = "dependent_objects_record_size"; + @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECTS_RECORD_SIZE) + @javax.annotation.Nullable + private Integer dependentObjectsRecordSize = 50; + + public static final String SERIALIZED_NAME_INCLUDE_DETAILS = "include_details"; + @SerializedName(SERIALIZED_NAME_INCLUDE_DETAILS) + @javax.annotation.Nullable + private Boolean includeDetails = false; + + public static final String SERIALIZED_NAME_INCLUDE_HEADERS = "include_headers"; + @SerializedName(SERIALIZED_NAME_INCLUDE_HEADERS) + @javax.annotation.Nullable + private Boolean includeHeaders = true; + + public static final String SERIALIZED_NAME_INCLUDE_HIDDEN_OBJECTS = "include_hidden_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_HIDDEN_OBJECTS) + @javax.annotation.Nullable + private Boolean includeHiddenObjects = false; + + public static final String SERIALIZED_NAME_INCLUDE_INCOMPLETE_OBJECTS = "include_incomplete_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_INCOMPLETE_OBJECTS) + @javax.annotation.Nullable + private Boolean includeIncompleteObjects = false; + + public static final String SERIALIZED_NAME_INCLUDE_VISUALIZATION_HEADERS = "include_visualization_headers"; + @SerializedName(SERIALIZED_NAME_INCLUDE_VISUALIZATION_HEADERS) + @javax.annotation.Nullable + private Boolean includeVisualizationHeaders = false; + + public static final String SERIALIZED_NAME_INCLUDE_WORKSHEET_SEARCH_ASSIST_DATA = "include_worksheet_search_assist_data"; + @SerializedName(SERIALIZED_NAME_INCLUDE_WORKSHEET_SEARCH_ASSIST_DATA) + @javax.annotation.Nullable + private Boolean includeWorksheetSearchAssistData; + + public static final String SERIALIZED_NAME_MODIFIED_BY_USER_IDENTIFIERS = "modified_by_user_identifiers"; + @SerializedName(SERIALIZED_NAME_MODIFIED_BY_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List modifiedByUserIdentifiers; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private MetadataSearchSortOptions sortOptions; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nullable + private List tagIdentifiers; + + public static final String SERIALIZED_NAME_INCLUDE_STATS = "include_stats"; + @SerializedName(SERIALIZED_NAME_INCLUDE_STATS) + @javax.annotation.Nullable + private Boolean includeStats = false; + + public static final String SERIALIZED_NAME_INCLUDE_DISCOVERABLE_OBJECTS = "include_discoverable_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_DISCOVERABLE_OBJECTS) + @javax.annotation.Nullable + private Boolean includeDiscoverableObjects = true; + + public static final String SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS = "show_resolved_parameters"; + @SerializedName(SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS) + @javax.annotation.Nullable + private Boolean showResolvedParameters = false; + + /** + * Indicates the model version of Liveboard to be attached in metadata detail. + */ + @JsonAdapter(LiveboardResponseVersionEnum.Adapter.class) + public enum LiveboardResponseVersionEnum { + V1("V1"), + + V2("V2"); + + private String value; + + LiveboardResponseVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchMetadataRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" createdByUserIdentifiers: ") - .append(toIndentedString(createdByUserIdentifiers)) - .append("\n"); - sb.append(" dependentObjectVersion: ") - .append(toIndentedString(dependentObjectVersion)) - .append("\n"); - sb.append(" excludeObjects: ").append(toIndentedString(excludeObjects)).append("\n"); - sb.append(" favoriteObjectOptions: ") - .append(toIndentedString(favoriteObjectOptions)) - .append("\n"); - sb.append(" includeAutoCreatedObjects: ") - .append(toIndentedString(includeAutoCreatedObjects)) - .append("\n"); - sb.append(" includeDependentObjects: ") - .append(toIndentedString(includeDependentObjects)) - .append("\n"); - sb.append(" dependentObjectsRecordSize: ") - .append(toIndentedString(dependentObjectsRecordSize)) - .append("\n"); - sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).append("\n"); - sb.append(" includeHeaders: ").append(toIndentedString(includeHeaders)).append("\n"); - sb.append(" includeHiddenObjects: ") - .append(toIndentedString(includeHiddenObjects)) - .append("\n"); - sb.append(" includeIncompleteObjects: ") - .append(toIndentedString(includeIncompleteObjects)) - .append("\n"); - sb.append(" includeVisualizationHeaders: ") - .append(toIndentedString(includeVisualizationHeaders)) - .append("\n"); - sb.append(" includeWorksheetSearchAssistData: ") - .append(toIndentedString(includeWorksheetSearchAssistData)) - .append("\n"); - sb.append(" modifiedByUserIdentifiers: ") - .append(toIndentedString(modifiedByUserIdentifiers)) - .append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); - sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); - sb.append(" includeStats: ").append(toIndentedString(includeStats)).append("\n"); - sb.append(" includeDiscoverableObjects: ") - .append(toIndentedString(includeDiscoverableObjects)) - .append("\n"); - sb.append(" showResolvedParameters: ") - .append(toIndentedString(showResolvedParameters)) - .append("\n"); - sb.append(" liveboardResponseVersion: ") - .append(toIndentedString(liveboardResponseVersion)) - .append("\n"); - sb.append(" includeOnlyPublishedObjects: ") - .append(toIndentedString(includeOnlyPublishedObjects)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static LiveboardResponseVersionEnum fromValue(String value) { + for (LiveboardResponseVersionEnum b : LiveboardResponseVersionEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("permissions"); - openapiFields.add("created_by_user_identifiers"); - openapiFields.add("dependent_object_version"); - openapiFields.add("exclude_objects"); - openapiFields.add("favorite_object_options"); - openapiFields.add("include_auto_created_objects"); - openapiFields.add("include_dependent_objects"); - openapiFields.add("dependent_objects_record_size"); - openapiFields.add("include_details"); - openapiFields.add("include_headers"); - openapiFields.add("include_hidden_objects"); - openapiFields.add("include_incomplete_objects"); - openapiFields.add("include_visualization_headers"); - openapiFields.add("include_worksheet_search_assist_data"); - openapiFields.add("modified_by_user_identifiers"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("sort_options"); - openapiFields.add("tag_identifiers"); - openapiFields.add("include_stats"); - openapiFields.add("include_discoverable_objects"); - openapiFields.add("show_resolved_parameters"); - openapiFields.add("liveboard_response_version"); - openapiFields.add("include_only_published_objects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LiveboardResponseVersionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LiveboardResponseVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LiveboardResponseVersionEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchMetadataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchMetadataRequest is not found in" - + " the empty JSON string", - SearchMetadataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + LiveboardResponseVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LIVEBOARD_RESPONSE_VERSION = "liveboard_response_version"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_RESPONSE_VERSION) + @javax.annotation.Nullable + private LiveboardResponseVersionEnum liveboardResponseVersion = LiveboardResponseVersionEnum.V1; + + public static final String SERIALIZED_NAME_INCLUDE_ONLY_PUBLISHED_OBJECTS = "include_only_published_objects"; + @SerializedName(SERIALIZED_NAME_INCLUDE_ONLY_PUBLISHED_OBJECTS) + @javax.annotation.Nullable + private Boolean includeOnlyPublishedObjects = false; + + public SearchMetadataRequest() { + } + + public SearchMetadataRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SearchMetadataRequest addMetadataItem(MetadataListItemInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects such as Liveboards, Answers, and Worksheets. + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + + public SearchMetadataRequest permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public SearchMetadataRequest addPermissionsItem(PermissionInput permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Object permission details to search by. + * @return permissions + */ + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + + public SearchMetadataRequest createdByUserIdentifiers(@javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + return this; + } + + public SearchMetadataRequest addCreatedByUserIdentifiersItem(String createdByUserIdentifiersItem) { + if (this.createdByUserIdentifiers == null) { + this.createdByUserIdentifiers = new ArrayList<>(); + } + this.createdByUserIdentifiers.add(createdByUserIdentifiersItem); + return this; + } + + /** + * GUID or name of user who created the metadata object. + * @return createdByUserIdentifiers + */ + @javax.annotation.Nullable + public List getCreatedByUserIdentifiers() { + return createdByUserIdentifiers; + } + + public void setCreatedByUserIdentifiers(@javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + } + + + public SearchMetadataRequest dependentObjectVersion(@javax.annotation.Nullable DependentObjectVersionEnum dependentObjectVersion) { + this.dependentObjectVersion = dependentObjectVersion; + return this; + } + + /** + * Version of the dependent table of the metadata objects like Worksheets. + * @return dependentObjectVersion + */ + @javax.annotation.Nullable + public DependentObjectVersionEnum getDependentObjectVersion() { + return dependentObjectVersion; + } + + public void setDependentObjectVersion(@javax.annotation.Nullable DependentObjectVersionEnum dependentObjectVersion) { + this.dependentObjectVersion = dependentObjectVersion; + } + + + public SearchMetadataRequest excludeObjects(@javax.annotation.Nullable List excludeObjects) { + this.excludeObjects = excludeObjects; + return this; + } + + public SearchMetadataRequest addExcludeObjectsItem(ExcludeMetadataListItemInput excludeObjectsItem) { + if (this.excludeObjects == null) { + this.excludeObjects = new ArrayList<>(); + } + this.excludeObjects.add(excludeObjectsItem); + return this; + } + + /** + * List of metadata objects to exclude from search. + * @return excludeObjects + */ + @javax.annotation.Nullable + public List getExcludeObjects() { + return excludeObjects; + } + + public void setExcludeObjects(@javax.annotation.Nullable List excludeObjects) { + this.excludeObjects = excludeObjects; + } + + + public SearchMetadataRequest favoriteObjectOptions(@javax.annotation.Nullable FavoriteObjectOptionsInput favoriteObjectOptions) { + this.favoriteObjectOptions = favoriteObjectOptions; + return this; + } + + /** + * Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. + * @return favoriteObjectOptions + */ + @javax.annotation.Nullable + public FavoriteObjectOptionsInput getFavoriteObjectOptions() { + return favoriteObjectOptions; + } + + public void setFavoriteObjectOptions(@javax.annotation.Nullable FavoriteObjectOptionsInput favoriteObjectOptions) { + this.favoriteObjectOptions = favoriteObjectOptions; + } + + + public SearchMetadataRequest includeAutoCreatedObjects(@javax.annotation.Nullable Boolean includeAutoCreatedObjects) { + this.includeAutoCreatedObjects = includeAutoCreatedObjects; + return this; + } + + /** + * Includes system-generated metadata objects. + * @return includeAutoCreatedObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeAutoCreatedObjects() { + return includeAutoCreatedObjects; + } + + public void setIncludeAutoCreatedObjects(@javax.annotation.Nullable Boolean includeAutoCreatedObjects) { + this.includeAutoCreatedObjects = includeAutoCreatedObjects; + } + + + public SearchMetadataRequest includeDependentObjects(@javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + return this; + } + + /** + * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. + * @return includeDependentObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeDependentObjects() { + return includeDependentObjects; + } + + public void setIncludeDependentObjects(@javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + } + + + public SearchMetadataRequest dependentObjectsRecordSize(@javax.annotation.Nullable Integer dependentObjectsRecordSize) { + this.dependentObjectsRecordSize = dependentObjectsRecordSize; + return this; + } + + /** + * The maximum number of dependents to include per metadata object. + * @return dependentObjectsRecordSize + */ + @javax.annotation.Nullable + public Integer getDependentObjectsRecordSize() { + return dependentObjectsRecordSize; + } + + public void setDependentObjectsRecordSize(@javax.annotation.Nullable Integer dependentObjectsRecordSize) { + this.dependentObjectsRecordSize = dependentObjectsRecordSize; + } + + + public SearchMetadataRequest includeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + return this; + } + + /** + * Includes complete details of the metadata objects. + * @return includeDetails + */ + @javax.annotation.Nullable + public Boolean getIncludeDetails() { + return includeDetails; + } + + public void setIncludeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + } + + + public SearchMetadataRequest includeHeaders(@javax.annotation.Nullable Boolean includeHeaders) { + this.includeHeaders = includeHeaders; + return this; + } + + /** + * Includes headers of the metadata objects. + * @return includeHeaders + */ + @javax.annotation.Nullable + public Boolean getIncludeHeaders() { + return includeHeaders; + } + + public void setIncludeHeaders(@javax.annotation.Nullable Boolean includeHeaders) { + this.includeHeaders = includeHeaders; + } + + + public SearchMetadataRequest includeHiddenObjects(@javax.annotation.Nullable Boolean includeHiddenObjects) { + this.includeHiddenObjects = includeHiddenObjects; + return this; + } + + /** + * Includes details of the hidden objects, such as a column in a worksheet or a table. + * @return includeHiddenObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeHiddenObjects() { + return includeHiddenObjects; + } + + public void setIncludeHiddenObjects(@javax.annotation.Nullable Boolean includeHiddenObjects) { + this.includeHiddenObjects = includeHiddenObjects; + } + + + public SearchMetadataRequest includeIncompleteObjects(@javax.annotation.Nullable Boolean includeIncompleteObjects) { + this.includeIncompleteObjects = includeIncompleteObjects; + return this; + } + + /** + * Includes objects with incomplete metadata. + * @return includeIncompleteObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeIncompleteObjects() { + return includeIncompleteObjects; + } + + public void setIncludeIncompleteObjects(@javax.annotation.Nullable Boolean includeIncompleteObjects) { + this.includeIncompleteObjects = includeIncompleteObjects; + } + + + public SearchMetadataRequest includeVisualizationHeaders(@javax.annotation.Nullable Boolean includeVisualizationHeaders) { + this.includeVisualizationHeaders = includeVisualizationHeaders; + return this; + } + + /** + * Includes visualization headers of the specified Liveboard object. + * @return includeVisualizationHeaders + */ + @javax.annotation.Nullable + public Boolean getIncludeVisualizationHeaders() { + return includeVisualizationHeaders; + } + + public void setIncludeVisualizationHeaders(@javax.annotation.Nullable Boolean includeVisualizationHeaders) { + this.includeVisualizationHeaders = includeVisualizationHeaders; + } + + + public SearchMetadataRequest includeWorksheetSearchAssistData(@javax.annotation.Nullable Boolean includeWorksheetSearchAssistData) { + this.includeWorksheetSearchAssistData = includeWorksheetSearchAssistData; + return this; + } + + /** + * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. + * @return includeWorksheetSearchAssistData + */ + @javax.annotation.Nullable + public Boolean getIncludeWorksheetSearchAssistData() { + return includeWorksheetSearchAssistData; + } + + public void setIncludeWorksheetSearchAssistData(@javax.annotation.Nullable Boolean includeWorksheetSearchAssistData) { + this.includeWorksheetSearchAssistData = includeWorksheetSearchAssistData; + } + + + public SearchMetadataRequest modifiedByUserIdentifiers(@javax.annotation.Nullable List modifiedByUserIdentifiers) { + this.modifiedByUserIdentifiers = modifiedByUserIdentifiers; + return this; + } + + public SearchMetadataRequest addModifiedByUserIdentifiersItem(String modifiedByUserIdentifiersItem) { + if (this.modifiedByUserIdentifiers == null) { + this.modifiedByUserIdentifiers = new ArrayList<>(); + } + this.modifiedByUserIdentifiers.add(modifiedByUserIdentifiersItem); + return this; + } + + /** + * Includes ID or names of the users who modified the metadata object. + * @return modifiedByUserIdentifiers + */ + @javax.annotation.Nullable + public List getModifiedByUserIdentifiers() { + return modifiedByUserIdentifiers; + } + + public void setModifiedByUserIdentifiers(@javax.annotation.Nullable List modifiedByUserIdentifiers) { + this.modifiedByUserIdentifiers = modifiedByUserIdentifiers; + } + + + public SearchMetadataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchMetadataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchMetadataRequest sortOptions(@javax.annotation.Nullable MetadataSearchSortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options to filter metadata details. + * @return sortOptions + */ + @javax.annotation.Nullable + public MetadataSearchSortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable MetadataSearchSortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + + public SearchMetadataRequest tagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public SearchMetadataRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); + } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } + + /** + * Tags to filter metadata objects by + * @return tagIdentifiers + */ + @javax.annotation.Nullable + public List getTagIdentifiers() { + return tagIdentifiers; + } + + public void setTagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } + + + public SearchMetadataRequest includeStats(@javax.annotation.Nullable Boolean includeStats) { + this.includeStats = includeStats; + return this; + } + + /** + * Indicates whether to include stats of the metadata objects. + * @return includeStats + */ + @javax.annotation.Nullable + public Boolean getIncludeStats() { + return includeStats; + } + + public void setIncludeStats(@javax.annotation.Nullable Boolean includeStats) { + this.includeStats = includeStats; + } + + + public SearchMetadataRequest includeDiscoverableObjects(@javax.annotation.Nullable Boolean includeDiscoverableObjects) { + this.includeDiscoverableObjects = includeDiscoverableObjects; + return this; + } + + /** + * <div>Version: 10.7.0.cl or later </div> Boolean to indicate whether to include discoverable metadata objects. + * @return includeDiscoverableObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeDiscoverableObjects() { + return includeDiscoverableObjects; + } + + public void setIncludeDiscoverableObjects(@javax.annotation.Nullable Boolean includeDiscoverableObjects) { + this.includeDiscoverableObjects = includeDiscoverableObjects; + } + + + public SearchMetadataRequest showResolvedParameters(@javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + return this; + } + + /** + * <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved parameterised values. + * @return showResolvedParameters + */ + @javax.annotation.Nullable + public Boolean getShowResolvedParameters() { + return showResolvedParameters; + } + + public void setShowResolvedParameters(@javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + } + + + public SearchMetadataRequest liveboardResponseVersion(@javax.annotation.Nullable LiveboardResponseVersionEnum liveboardResponseVersion) { + this.liveboardResponseVersion = liveboardResponseVersion; + return this; + } + + /** + * Indicates the model version of Liveboard to be attached in metadata detail. + * @return liveboardResponseVersion + */ + @javax.annotation.Nullable + public LiveboardResponseVersionEnum getLiveboardResponseVersion() { + return liveboardResponseVersion; + } + + public void setLiveboardResponseVersion(@javax.annotation.Nullable LiveboardResponseVersionEnum liveboardResponseVersion) { + this.liveboardResponseVersion = liveboardResponseVersion; + } + + + public SearchMetadataRequest includeOnlyPublishedObjects(@javax.annotation.Nullable Boolean includeOnlyPublishedObjects) { + this.includeOnlyPublishedObjects = includeOnlyPublishedObjects; + return this; + } + + /** + * <div>Version: 10.11.0.cl or later </div> If only published objects should be returned + * @return includeOnlyPublishedObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeOnlyPublishedObjects() { + return includeOnlyPublishedObjects; + } + + public void setIncludeOnlyPublishedObjects(@javax.annotation.Nullable Boolean includeOnlyPublishedObjects) { + this.includeOnlyPublishedObjects = includeOnlyPublishedObjects; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchMetadataRequest searchMetadataRequest = (SearchMetadataRequest) o; + return Objects.equals(this.metadata, searchMetadataRequest.metadata) && + Objects.equals(this.permissions, searchMetadataRequest.permissions) && + Objects.equals(this.createdByUserIdentifiers, searchMetadataRequest.createdByUserIdentifiers) && + Objects.equals(this.dependentObjectVersion, searchMetadataRequest.dependentObjectVersion) && + Objects.equals(this.excludeObjects, searchMetadataRequest.excludeObjects) && + Objects.equals(this.favoriteObjectOptions, searchMetadataRequest.favoriteObjectOptions) && + Objects.equals(this.includeAutoCreatedObjects, searchMetadataRequest.includeAutoCreatedObjects) && + Objects.equals(this.includeDependentObjects, searchMetadataRequest.includeDependentObjects) && + Objects.equals(this.dependentObjectsRecordSize, searchMetadataRequest.dependentObjectsRecordSize) && + Objects.equals(this.includeDetails, searchMetadataRequest.includeDetails) && + Objects.equals(this.includeHeaders, searchMetadataRequest.includeHeaders) && + Objects.equals(this.includeHiddenObjects, searchMetadataRequest.includeHiddenObjects) && + Objects.equals(this.includeIncompleteObjects, searchMetadataRequest.includeIncompleteObjects) && + Objects.equals(this.includeVisualizationHeaders, searchMetadataRequest.includeVisualizationHeaders) && + Objects.equals(this.includeWorksheetSearchAssistData, searchMetadataRequest.includeWorksheetSearchAssistData) && + Objects.equals(this.modifiedByUserIdentifiers, searchMetadataRequest.modifiedByUserIdentifiers) && + Objects.equals(this.recordOffset, searchMetadataRequest.recordOffset) && + Objects.equals(this.recordSize, searchMetadataRequest.recordSize) && + Objects.equals(this.sortOptions, searchMetadataRequest.sortOptions) && + Objects.equals(this.tagIdentifiers, searchMetadataRequest.tagIdentifiers) && + Objects.equals(this.includeStats, searchMetadataRequest.includeStats) && + Objects.equals(this.includeDiscoverableObjects, searchMetadataRequest.includeDiscoverableObjects) && + Objects.equals(this.showResolvedParameters, searchMetadataRequest.showResolvedParameters) && + Objects.equals(this.liveboardResponseVersion, searchMetadataRequest.liveboardResponseVersion) && + Objects.equals(this.includeOnlyPublishedObjects, searchMetadataRequest.includeOnlyPublishedObjects); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, permissions, createdByUserIdentifiers, dependentObjectVersion, excludeObjects, favoriteObjectOptions, includeAutoCreatedObjects, includeDependentObjects, dependentObjectsRecordSize, includeDetails, includeHeaders, includeHiddenObjects, includeIncompleteObjects, includeVisualizationHeaders, includeWorksheetSearchAssistData, modifiedByUserIdentifiers, recordOffset, recordSize, sortOptions, tagIdentifiers, includeStats, includeDiscoverableObjects, showResolvedParameters, liveboardResponseVersion, includeOnlyPublishedObjects); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" createdByUserIdentifiers: ").append(toIndentedString(createdByUserIdentifiers)).append("\n"); + sb.append(" dependentObjectVersion: ").append(toIndentedString(dependentObjectVersion)).append("\n"); + sb.append(" excludeObjects: ").append(toIndentedString(excludeObjects)).append("\n"); + sb.append(" favoriteObjectOptions: ").append(toIndentedString(favoriteObjectOptions)).append("\n"); + sb.append(" includeAutoCreatedObjects: ").append(toIndentedString(includeAutoCreatedObjects)).append("\n"); + sb.append(" includeDependentObjects: ").append(toIndentedString(includeDependentObjects)).append("\n"); + sb.append(" dependentObjectsRecordSize: ").append(toIndentedString(dependentObjectsRecordSize)).append("\n"); + sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).append("\n"); + sb.append(" includeHeaders: ").append(toIndentedString(includeHeaders)).append("\n"); + sb.append(" includeHiddenObjects: ").append(toIndentedString(includeHiddenObjects)).append("\n"); + sb.append(" includeIncompleteObjects: ").append(toIndentedString(includeIncompleteObjects)).append("\n"); + sb.append(" includeVisualizationHeaders: ").append(toIndentedString(includeVisualizationHeaders)).append("\n"); + sb.append(" includeWorksheetSearchAssistData: ").append(toIndentedString(includeWorksheetSearchAssistData)).append("\n"); + sb.append(" modifiedByUserIdentifiers: ").append(toIndentedString(modifiedByUserIdentifiers)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append(" includeStats: ").append(toIndentedString(includeStats)).append("\n"); + sb.append(" includeDiscoverableObjects: ").append(toIndentedString(includeDiscoverableObjects)).append("\n"); + sb.append(" showResolvedParameters: ").append(toIndentedString(showResolvedParameters)).append("\n"); + sb.append(" liveboardResponseVersion: ").append(toIndentedString(liveboardResponseVersion)).append("\n"); + sb.append(" includeOnlyPublishedObjects: ").append(toIndentedString(includeOnlyPublishedObjects)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("permissions"); + openapiFields.add("created_by_user_identifiers"); + openapiFields.add("dependent_object_version"); + openapiFields.add("exclude_objects"); + openapiFields.add("favorite_object_options"); + openapiFields.add("include_auto_created_objects"); + openapiFields.add("include_dependent_objects"); + openapiFields.add("dependent_objects_record_size"); + openapiFields.add("include_details"); + openapiFields.add("include_headers"); + openapiFields.add("include_hidden_objects"); + openapiFields.add("include_incomplete_objects"); + openapiFields.add("include_visualization_headers"); + openapiFields.add("include_worksheet_search_assist_data"); + openapiFields.add("modified_by_user_identifiers"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("tag_identifiers"); + openapiFields.add("include_stats"); + openapiFields.add("include_discoverable_objects"); + openapiFields.add("show_resolved_parameters"); + openapiFields.add("liveboard_response_version"); + openapiFields.add("include_only_published_objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchMetadataRequest is not found in the empty JSON string", SearchMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - MetadataListItemInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - } - if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) { - JsonArray jsonArraypermissions = jsonObj.getAsJsonArray("permissions"); - if (jsonArraypermissions != null) { - // ensure the json data is an array - if (!jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permissions` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("permissions").toString())); - } - - // validate the optional field `permissions` (array) - for (int i = 0; i < jsonArraypermissions.size(); i++) { - PermissionInput.validateJsonElement(jsonArraypermissions.get(i)); - } - ; - } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataListItemInput.validateJsonElement(jsonArraymetadata.get(i)); + }; } - // ensure the optional json data is an array if present - if (jsonObj.get("created_by_user_identifiers") != null - && !jsonObj.get("created_by_user_identifiers").isJsonNull() - && !jsonObj.get("created_by_user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `created_by_user_identifiers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("created_by_user_identifiers").toString())); + } + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) { + JsonArray jsonArraypermissions = jsonObj.getAsJsonArray("permissions"); + if (jsonArraypermissions != null) { + // ensure the json data is an array + if (!jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + } + + // validate the optional field `permissions` (array) + for (int i = 0; i < jsonArraypermissions.size(); i++) { + PermissionInput.validateJsonElement(jsonArraypermissions.get(i)); + }; } - if ((jsonObj.get("dependent_object_version") != null - && !jsonObj.get("dependent_object_version").isJsonNull()) - && !jsonObj.get("dependent_object_version").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dependent_object_version` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("dependent_object_version").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("created_by_user_identifiers") != null && !jsonObj.get("created_by_user_identifiers").isJsonNull() && !jsonObj.get("created_by_user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `created_by_user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("created_by_user_identifiers").toString())); + } + if ((jsonObj.get("dependent_object_version") != null && !jsonObj.get("dependent_object_version").isJsonNull()) && !jsonObj.get("dependent_object_version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dependent_object_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dependent_object_version").toString())); + } + // validate the optional field `dependent_object_version` + if (jsonObj.get("dependent_object_version") != null && !jsonObj.get("dependent_object_version").isJsonNull()) { + DependentObjectVersionEnum.validateJsonElement(jsonObj.get("dependent_object_version")); + } + if (jsonObj.get("exclude_objects") != null && !jsonObj.get("exclude_objects").isJsonNull()) { + JsonArray jsonArrayexcludeObjects = jsonObj.getAsJsonArray("exclude_objects"); + if (jsonArrayexcludeObjects != null) { + // ensure the json data is an array + if (!jsonObj.get("exclude_objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `exclude_objects` to be an array in the JSON string but got `%s`", jsonObj.get("exclude_objects").toString())); + } + + // validate the optional field `exclude_objects` (array) + for (int i = 0; i < jsonArrayexcludeObjects.size(); i++) { + ExcludeMetadataListItemInput.validateJsonElement(jsonArrayexcludeObjects.get(i)); + }; } - // validate the optional field `dependent_object_version` - if (jsonObj.get("dependent_object_version") != null - && !jsonObj.get("dependent_object_version").isJsonNull()) { - DependentObjectVersionEnum.validateJsonElement(jsonObj.get("dependent_object_version")); - } - if (jsonObj.get("exclude_objects") != null - && !jsonObj.get("exclude_objects").isJsonNull()) { - JsonArray jsonArrayexcludeObjects = jsonObj.getAsJsonArray("exclude_objects"); - if (jsonArrayexcludeObjects != null) { - // ensure the json data is an array - if (!jsonObj.get("exclude_objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `exclude_objects` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("exclude_objects").toString())); - } - - // validate the optional field `exclude_objects` (array) - for (int i = 0; i < jsonArrayexcludeObjects.size(); i++) { - ExcludeMetadataListItemInput.validateJsonElement( - jsonArrayexcludeObjects.get(i)); - } - ; - } - } - // validate the optional field `favorite_object_options` - if (jsonObj.get("favorite_object_options") != null - && !jsonObj.get("favorite_object_options").isJsonNull()) { - FavoriteObjectOptionsInput.validateJsonElement(jsonObj.get("favorite_object_options")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("modified_by_user_identifiers") != null - && !jsonObj.get("modified_by_user_identifiers").isJsonNull() - && !jsonObj.get("modified_by_user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modified_by_user_identifiers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("modified_by_user_identifiers").toString())); - } - // validate the optional field `sort_options` - if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { - MetadataSearchSortOptions.validateJsonElement(jsonObj.get("sort_options")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tag_identifiers") != null - && !jsonObj.get("tag_identifiers").isJsonNull() - && !jsonObj.get("tag_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tag_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("tag_identifiers").toString())); - } - if ((jsonObj.get("liveboard_response_version") != null - && !jsonObj.get("liveboard_response_version").isJsonNull()) - && !jsonObj.get("liveboard_response_version").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `liveboard_response_version` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("liveboard_response_version").toString())); - } - // validate the optional field `liveboard_response_version` - if (jsonObj.get("liveboard_response_version") != null - && !jsonObj.get("liveboard_response_version").isJsonNull()) { - LiveboardResponseVersionEnum.validateJsonElement( - jsonObj.get("liveboard_response_version")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchMetadataRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchMetadataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchMetadataRequest - * @throws IOException if the JSON string is invalid with respect to SearchMetadataRequest - */ - public static SearchMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchMetadataRequest.class); - } - - /** - * Convert an instance of SearchMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + // validate the optional field `favorite_object_options` + if (jsonObj.get("favorite_object_options") != null && !jsonObj.get("favorite_object_options").isJsonNull()) { + FavoriteObjectOptionsInput.validateJsonElement(jsonObj.get("favorite_object_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("modified_by_user_identifiers") != null && !jsonObj.get("modified_by_user_identifiers").isJsonNull() && !jsonObj.get("modified_by_user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `modified_by_user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("modified_by_user_identifiers").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + MetadataSearchSortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("tag_identifiers") != null && !jsonObj.get("tag_identifiers").isJsonNull() && !jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tag_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("tag_identifiers").toString())); + } + if ((jsonObj.get("liveboard_response_version") != null && !jsonObj.get("liveboard_response_version").isJsonNull()) && !jsonObj.get("liveboard_response_version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `liveboard_response_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("liveboard_response_version").toString())); + } + // validate the optional field `liveboard_response_version` + if (jsonObj.get("liveboard_response_version") != null && !jsonObj.get("liveboard_response_version").isJsonNull()) { + LiveboardResponseVersionEnum.validateJsonElement(jsonObj.get("liveboard_response_version")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchMetadataRequest + * @throws IOException if the JSON string is invalid with respect to SearchMetadataRequest + */ + public static SearchMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchMetadataRequest.class); + } + + /** + * Convert an instance of SearchMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java index dc054393d..4fca93398 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java @@ -4,461 +4,440 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchOrgsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchOrgsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Visibility of the Org */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHOW("SHOW"), - - HIDDEN("HIDDEN"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - /** Status of the Org */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("ACTIVE"), - - IN_ACTIVE("IN_ACTIVE"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private StatusEnum status; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - public SearchOrgsRequest() {} - - public SearchOrgsRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } +import com.thoughtspot.client.JSON; - /** - * ID or name of the Org - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; +/** + * SearchOrgsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchOrgsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Visibility of the Org + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHOW("SHOW"), + + HIDDEN("HIDDEN"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; } - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; + public String getValue() { + return value; } - public SearchOrgsRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Description of the Org - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - public SearchOrgsRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); } - - /** - * Visibility of the Org - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + /** + * Status of the Org + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + IN_ACTIVE("IN_ACTIVE"); + + private String value; + + StatusEnum(String value) { + this.value = value; } - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; + public String getValue() { + return value; } - public SearchOrgsRequest status(@javax.annotation.Nullable StatusEnum status) { - this.status = status; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Status of the Org - * - * @return status - */ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setStatus(@javax.annotation.Nullable StatusEnum status) { - this.status = status; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } } - public SearchOrgsRequest userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); } - - public SearchOrgsRequest addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); - } - this.userIdentifiers.add(userIdentifiersItem); - return this; + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public SearchOrgsRequest() { + } + + public SearchOrgsRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * ID or name of the Org + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + public SearchOrgsRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public SearchOrgsRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the Org + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public SearchOrgsRequest status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the Org + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public SearchOrgsRequest userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public SearchOrgsRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } - /** - * GUIDs or names of the users for which you want to retrieve the Orgs data - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } + /** + * GUIDs or names of the users for which you want to retrieve the Orgs data + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - } + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchOrgsRequest searchOrgsRequest = (SearchOrgsRequest) o; - return Objects.equals(this.orgIdentifier, searchOrgsRequest.orgIdentifier) - && Objects.equals(this.description, searchOrgsRequest.description) - && Objects.equals(this.visibility, searchOrgsRequest.visibility) - && Objects.equals(this.status, searchOrgsRequest.status) - && Objects.equals(this.userIdentifiers, searchOrgsRequest.userIdentifiers); - } - @Override - public int hashCode() { - return Objects.hash(orgIdentifier, description, visibility, status, userIdentifiers); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchOrgsRequest {\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org_identifier"); - openapiFields.add("description"); - openapiFields.add("visibility"); - openapiFields.add("status"); - openapiFields.add("user_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + SearchOrgsRequest searchOrgsRequest = (SearchOrgsRequest) o; + return Objects.equals(this.orgIdentifier, searchOrgsRequest.orgIdentifier) && + Objects.equals(this.description, searchOrgsRequest.description) && + Objects.equals(this.visibility, searchOrgsRequest.visibility) && + Objects.equals(this.status, searchOrgsRequest.status) && + Objects.equals(this.userIdentifiers, searchOrgsRequest.userIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifier, description, visibility, status, userIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchOrgsRequest {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchOrgsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchOrgsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchOrgsRequest is not found in the" - + " empty JSON string", - SearchOrgsRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("description"); + openapiFields.add("visibility"); + openapiFields.add("status"); + openapiFields.add("user_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchOrgsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchOrgsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchOrgsRequest is not found in the empty JSON string", SearchOrgsRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchOrgsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchOrgsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchOrgsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchOrgsRequest` 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("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) - && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchOrgsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchOrgsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchOrgsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchOrgsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchOrgsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchOrgsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchOrgsRequest - * @throws IOException if the JSON string is invalid with respect to SearchOrgsRequest - */ - public static SearchOrgsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchOrgsRequest.class); - } - - /** - * Convert an instance of SearchOrgsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchOrgsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchOrgsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchOrgsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchOrgsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchOrgsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchOrgsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchOrgsRequest + * @throws IOException if the JSON string is invalid with respect to SearchOrgsRequest + */ + public static SearchOrgsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchOrgsRequest.class); + } + + /** + * Convert an instance of SearchOrgsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java index 6545da956..9da154ec0 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 @@ -4,1022 +4,934 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.GenericInfo; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Response for search role api should handle hidden privileges as well. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchRoleResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nonnull - private String description; - - public static final String SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT = "groups_assigned_count"; - - @SerializedName(SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT) - @javax.annotation.Nullable - private Integer groupsAssignedCount; - - public static final String SERIALIZED_NAME_ORGS = "orgs"; - - @SerializedName(SERIALIZED_NAME_ORGS) - @javax.annotation.Nullable - private List orgs; - - public static final String SERIALIZED_NAME_GROUPS = "groups"; - - @SerializedName(SERIALIZED_NAME_GROUPS) - @javax.annotation.Nullable - private List groups; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - UNKNOWN("UNKNOWN"), - - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - SECURITYMANAGEMENT("SECURITYMANAGEMENT"), - - LOGICALMODELING("LOGICALMODELING"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - TAGMANAGEMENT("TAGMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - SYSTEMMANAGEMENT("SYSTEMMANAGEMENT"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - DEVELOPER("DEVELOPER"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - BACKUP_ADMINISTRATION("BACKUP_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - ENABLESPOTAPPCREATION("ENABLESPOTAPPCREATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_CONFIGURE_CONNECTIONS("CAN_CONFIGURE_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nonnull - private List privileges; - - /** Permission details of the Role */ - @JsonAdapter(PermissionEnum.Adapter.class) - public enum PermissionEnum { - READ_ONLY("READ_ONLY"), - - MODIFY("MODIFY"), - - NO_ACCESS("NO_ACCESS"); - - private String value; - - PermissionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionEnum fromValue(String value) { - for (PermissionEnum b : PermissionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PermissionEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PERMISSION = "permission"; - - @SerializedName(SERIALIZED_NAME_PERMISSION) - @javax.annotation.Nullable - private PermissionEnum permission; - - public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_ID) - @javax.annotation.Nullable - private String authorId; - - public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; - - @SerializedName(SERIALIZED_NAME_MODIFIER_ID) - @javax.annotation.Nullable - private String modifierId; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Object creationTimeInMillis; - - public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = - "modification_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Object modificationTimeInMillis; - - public static final String SERIALIZED_NAME_DELETED = "deleted"; - - @SerializedName(SERIALIZED_NAME_DELETED) - @javax.annotation.Nullable - private Boolean deleted; - - public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; - - @SerializedName(SERIALIZED_NAME_DEPRECATED) - @javax.annotation.Nullable - private Boolean deprecated; - - public static final String SERIALIZED_NAME_EXTERNAL = "external"; - - @SerializedName(SERIALIZED_NAME_EXTERNAL) - @javax.annotation.Nullable - private Boolean external; - - public static final String SERIALIZED_NAME_HIDDEN = "hidden"; - - @SerializedName(SERIALIZED_NAME_HIDDEN) - @javax.annotation.Nullable - private Boolean hidden; - - public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; - @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) - @javax.annotation.Nullable - private Boolean sharedViaConnection; - - public SearchRoleResponse() {} - - public SearchRoleResponse id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Unique Id of the role. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public SearchRoleResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the role - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public SearchRoleResponse description(@javax.annotation.Nonnull String description) { - this.description = description; - return this; - } - - /** - * Description of the role - * - * @return description - */ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nonnull String description) { - this.description = description; - } - - public SearchRoleResponse groupsAssignedCount( - @javax.annotation.Nullable Integer groupsAssignedCount) { - this.groupsAssignedCount = groupsAssignedCount; - return this; - } - - /** - * number of groups assigned with this role - * - * @return groupsAssignedCount - */ - @javax.annotation.Nullable - public Integer getGroupsAssignedCount() { - return groupsAssignedCount; - } - - public void setGroupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { - this.groupsAssignedCount = groupsAssignedCount; - } - - public SearchRoleResponse orgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - return this; - } - - public SearchRoleResponse addOrgsItem(GenericInfo orgsItem) { - if (this.orgs == null) { - this.orgs = new ArrayList<>(); - } - this.orgs.add(orgsItem); - return this; - } - - /** - * Orgs in which role exists. - * - * @return orgs - */ - @javax.annotation.Nullable - public List getOrgs() { - return orgs; - } - - public void setOrgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - } - - public SearchRoleResponse groups(@javax.annotation.Nullable List groups) { - this.groups = groups; - return this; - } - - public SearchRoleResponse addGroupsItem(GenericInfo groupsItem) { - if (this.groups == null) { - this.groups = new ArrayList<>(); - } - this.groups.add(groupsItem); - return this; - } - - /** - * Details of groups assigned with this role - * - * @return groups - */ - @javax.annotation.Nullable - public List getGroups() { - return groups; - } +import com.thoughtspot.client.JSON; - public void setGroups(@javax.annotation.Nullable List groups) { - this.groups = groups; +/** + * Response for search role api should handle hidden privileges as well. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchRoleResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; + + public static final String SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT = "groups_assigned_count"; + @SerializedName(SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT) + @javax.annotation.Nullable + private Integer groupsAssignedCount; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + UNKNOWN("UNKNOWN"), + + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + SECURITYMANAGEMENT("SECURITYMANAGEMENT"), + + LOGICALMODELING("LOGICALMODELING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + SYSTEMMANAGEMENT("SYSTEMMANAGEMENT"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + BACKUP_ADMINISTRATION("BACKUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ENABLESPOTAPPCREATION("ENABLESPOTAPPCREATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_CONFIGURE_CONNECTIONS("CAN_CONFIGURE_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MODIDY_FOLDERS("CAN_MODIDY_FOLDERS"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public SearchRoleResponse privileges( - @javax.annotation.Nonnull List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchRoleResponse addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; - } - - /** - * Privileges granted to the role. - * - * @return privileges - */ - @javax.annotation.Nonnull - public List getPrivileges() { - return privileges; - } - - public void setPrivileges(@javax.annotation.Nonnull List privileges) { - this.privileges = privileges; - } - - public SearchRoleResponse permission(@javax.annotation.Nullable PermissionEnum permission) { - this.permission = permission; - return this; - } - - /** - * Permission details of the Role - * - * @return permission - */ - @javax.annotation.Nullable - public PermissionEnum getPermission() { - return permission; - } - - public void setPermission(@javax.annotation.Nullable PermissionEnum permission) { - this.permission = permission; - } - - public SearchRoleResponse authorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - return this; - } - - /** - * Unique identifier of author of the role. - * - * @return authorId - */ - @javax.annotation.Nullable - public String getAuthorId() { - return authorId; - } - - public void setAuthorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - } - - public SearchRoleResponse modifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - return this; - } - - /** - * Unique identifier of modifier of the role. - * - * @return modifierId - */ - @javax.annotation.Nullable - public String getModifierId() { - return modifierId; - } - - public void setModifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - } - - public SearchRoleResponse creationTimeInMillis( - @javax.annotation.Nullable Object creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Creation time of the role in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nullable - public Object getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public SearchRoleResponse modificationTimeInMillis( - @javax.annotation.Nullable Object modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - return this; - } - - /** - * Last modified time of the role in milliseconds. - * - * @return modificationTimeInMillis - */ - @javax.annotation.Nullable - public Object getModificationTimeInMillis() { - return modificationTimeInMillis; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setModificationTimeInMillis( - @javax.annotation.Nullable Object modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - } - - public SearchRoleResponse deleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - return this; - } - - /** - * Indicates whether the role is deleted. - * - * @return deleted - */ - @javax.annotation.Nullable - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - } - - public SearchRoleResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Indicates whether the role is deprecated. - * - * @return deprecated - */ - @javax.annotation.Nullable - public Boolean getDeprecated() { - return deprecated; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public SearchRoleResponse external(@javax.annotation.Nullable Boolean external) { - this.external = external; - return this; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nonnull + private List privileges; - /** - * Indicates whether the role is external. - * - * @return external - */ - @javax.annotation.Nullable - public Boolean getExternal() { - return external; - } + /** + * Permission details of the Role + */ + @JsonAdapter(PermissionEnum.Adapter.class) + public enum PermissionEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); - public void setExternal(@javax.annotation.Nullable Boolean external) { - this.external = external; - } + private String value; - public SearchRoleResponse hidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - return this; + PermissionEnum(String value) { + this.value = value; } - /** - * Indicates whether the role is hidden. - * - * @return hidden - */ - @javax.annotation.Nullable - public Boolean getHidden() { - return hidden; - } - - public void setHidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - } - - public SearchRoleResponse sharedViaConnection( - @javax.annotation.Nullable Boolean sharedViaConnection) { - this.sharedViaConnection = sharedViaConnection; - return this; - } - - /** - * Indicates whether the role is shared via connection - * - * @return sharedViaConnection - */ - @javax.annotation.Nullable - public Boolean getSharedViaConnection() { - return sharedViaConnection; - } - - public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { - this.sharedViaConnection = sharedViaConnection; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRoleResponse searchRoleResponse = (SearchRoleResponse) o; - return Objects.equals(this.id, searchRoleResponse.id) - && Objects.equals(this.name, searchRoleResponse.name) - && Objects.equals(this.description, searchRoleResponse.description) - && Objects.equals(this.groupsAssignedCount, searchRoleResponse.groupsAssignedCount) - && Objects.equals(this.orgs, searchRoleResponse.orgs) - && Objects.equals(this.groups, searchRoleResponse.groups) - && Objects.equals(this.privileges, searchRoleResponse.privileges) - && Objects.equals(this.permission, searchRoleResponse.permission) - && Objects.equals(this.authorId, searchRoleResponse.authorId) - && Objects.equals(this.modifierId, searchRoleResponse.modifierId) - && Objects.equals( - this.creationTimeInMillis, searchRoleResponse.creationTimeInMillis) - && Objects.equals( - this.modificationTimeInMillis, searchRoleResponse.modificationTimeInMillis) - && Objects.equals(this.deleted, searchRoleResponse.deleted) - && Objects.equals(this.deprecated, searchRoleResponse.deprecated) - && Objects.equals(this.external, searchRoleResponse.external) - && Objects.equals(this.hidden, searchRoleResponse.hidden) - && Objects.equals(this.sharedViaConnection, searchRoleResponse.sharedViaConnection); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - name, - description, - groupsAssignedCount, - orgs, - groups, - privileges, - permission, - authorId, - modifierId, - creationTimeInMillis, - modificationTimeInMillis, - deleted, - deprecated, - external, - hidden, - sharedViaConnection); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchRoleResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" groupsAssignedCount: ") - .append(toIndentedString(groupsAssignedCount)) - .append("\n"); - sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); - sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); - sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); - sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" modificationTimeInMillis: ") - .append(toIndentedString(modificationTimeInMillis)) - .append("\n"); - sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); - sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); - sb.append(" external: ").append(toIndentedString(external)).append("\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" sharedViaConnection: ") - .append(toIndentedString(sharedViaConnection)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PermissionEnum fromValue(String value) { + for (PermissionEnum b : PermissionEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("groups_assigned_count"); - openapiFields.add("orgs"); - openapiFields.add("groups"); - openapiFields.add("privileges"); - openapiFields.add("permission"); - openapiFields.add("author_id"); - openapiFields.add("modifier_id"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("modification_time_in_millis"); - openapiFields.add("deleted"); - openapiFields.add("deprecated"); - openapiFields.add("external"); - openapiFields.add("hidden"); - openapiFields.add("shared_via_connection"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("privileges"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchRoleResponse - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchRoleResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchRoleResponse is not found in" - + " the empty JSON string", - SearchRoleResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchRoleResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchRoleResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SearchRoleResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + PermissionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERMISSION = "permission"; + @SerializedName(SERIALIZED_NAME_PERMISSION) + @javax.annotation.Nullable + private PermissionEnum permission; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = "modification_time_in_millis"; + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object modificationTimeInMillis; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; + @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) + @javax.annotation.Nullable + private Boolean sharedViaConnection; + + public SearchRoleResponse() { + } + + public SearchRoleResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique Id of the role. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public SearchRoleResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the role + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public SearchRoleResponse description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description of the role + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public SearchRoleResponse groupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + return this; + } + + /** + * number of groups assigned with this role + * @return groupsAssignedCount + */ + @javax.annotation.Nullable + public Integer getGroupsAssignedCount() { + return groupsAssignedCount; + } + + public void setGroupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + } + + + public SearchRoleResponse orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public SearchRoleResponse addOrgsItem(GenericInfo orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs in which role exists. + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + + public SearchRoleResponse groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public SearchRoleResponse addGroupsItem(GenericInfo groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Details of groups assigned with this role + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + + public SearchRoleResponse privileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + return this; + } + + public SearchRoleResponse addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the role. + * @return privileges + */ + @javax.annotation.Nonnull + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + } + + + public SearchRoleResponse permission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + return this; + } + + /** + * Permission details of the Role + * @return permission + */ + @javax.annotation.Nullable + public PermissionEnum getPermission() { + return permission; + } + + public void setPermission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + } + + + public SearchRoleResponse authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of author of the role. + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public SearchRoleResponse modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Unique identifier of modifier of the role. + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + + public SearchRoleResponse creationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the role in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Object getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public SearchRoleResponse modificationTimeInMillis(@javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the role in milliseconds. + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Object getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis(@javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + + public SearchRoleResponse deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the role is deleted. + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + + public SearchRoleResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the role is deprecated. + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + + public SearchRoleResponse external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the role is external. + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + + public SearchRoleResponse hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the role is hidden. + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + public SearchRoleResponse sharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + return this; + } + + /** + * Indicates whether the role is shared via connection + * @return sharedViaConnection + */ + @javax.annotation.Nullable + public Boolean getSharedViaConnection() { + return sharedViaConnection; + } + + public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRoleResponse searchRoleResponse = (SearchRoleResponse) o; + return Objects.equals(this.id, searchRoleResponse.id) && + Objects.equals(this.name, searchRoleResponse.name) && + Objects.equals(this.description, searchRoleResponse.description) && + Objects.equals(this.groupsAssignedCount, searchRoleResponse.groupsAssignedCount) && + Objects.equals(this.orgs, searchRoleResponse.orgs) && + Objects.equals(this.groups, searchRoleResponse.groups) && + Objects.equals(this.privileges, searchRoleResponse.privileges) && + Objects.equals(this.permission, searchRoleResponse.permission) && + Objects.equals(this.authorId, searchRoleResponse.authorId) && + Objects.equals(this.modifierId, searchRoleResponse.modifierId) && + Objects.equals(this.creationTimeInMillis, searchRoleResponse.creationTimeInMillis) && + Objects.equals(this.modificationTimeInMillis, searchRoleResponse.modificationTimeInMillis) && + Objects.equals(this.deleted, searchRoleResponse.deleted) && + Objects.equals(this.deprecated, searchRoleResponse.deprecated) && + Objects.equals(this.external, searchRoleResponse.external) && + Objects.equals(this.hidden, searchRoleResponse.hidden) && + Objects.equals(this.sharedViaConnection, searchRoleResponse.sharedViaConnection); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, groupsAssignedCount, orgs, groups, privileges, permission, authorId, modifierId, creationTimeInMillis, modificationTimeInMillis, deleted, deprecated, external, hidden, sharedViaConnection); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRoleResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" groupsAssignedCount: ").append(toIndentedString(groupsAssignedCount)).append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" modificationTimeInMillis: ").append(toIndentedString(modificationTimeInMillis)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" sharedViaConnection: ").append(toIndentedString(sharedViaConnection)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("groups_assigned_count"); + openapiFields.add("orgs"); + openapiFields.add("groups"); + openapiFields.add("privileges"); + openapiFields.add("permission"); + openapiFields.add("author_id"); + openapiFields.add("modifier_id"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("external"); + openapiFields.add("hidden"); + openapiFields.add("shared_via_connection"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("privileges"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRoleResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRoleResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRoleResponse is not found in the empty JSON string", SearchRoleResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchRoleResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchRoleResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRoleResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { - JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); - if (jsonArrayorgs != null) { - // ensure the json data is an array - if (!jsonObj.get("orgs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orgs` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("orgs").toString())); - } - - // validate the optional field `orgs` (array) - for (int i = 0; i < jsonArrayorgs.size(); i++) { - GenericInfo.validateJsonElement(jsonArrayorgs.get(i)); - } - ; - } - } - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { - JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); - if (jsonArraygroups != null) { - // ensure the json data is an array - if (!jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `groups` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("groups").toString())); - } - - // validate the optional field `groups` (array) - for (int i = 0; i < jsonArraygroups.size(); i++) { - GenericInfo.validateJsonElement(jsonArraygroups.get(i)); - } - ; - } - } - // ensure the required json array is present - if (jsonObj.get("privileges") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - if ((jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) - && !jsonObj.get("permission").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permission` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("permission").toString())); - } - // validate the optional field `permission` - if (jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) { - PermissionEnum.validateJsonElement(jsonObj.get("permission")); - } - if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) - && !jsonObj.get("author_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_id").toString())); - } - if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) - && !jsonObj.get("modifier_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modifier_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("modifier_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchRoleResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchRoleResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchRoleResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchRoleResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchRoleResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchRoleResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchRoleResponse - * @throws IOException if the JSON string is invalid with respect to SearchRoleResponse - */ - public static SearchRoleResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchRoleResponse.class); - } - - /** - * Convert an instance of SearchRoleResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `orgs` to be an array in the JSON string but got `%s`", jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + GenericInfo.validateJsonElement(jsonArrayorgs.get(i)); + }; + } + } + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GenericInfo.validateJsonElement(jsonArraygroups.get(i)); + }; + } + } + // ensure the required json array is present + if (jsonObj.get("privileges") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + if ((jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) && !jsonObj.get("permission").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `permission` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permission").toString())); + } + // validate the optional field `permission` + if (jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) { + PermissionEnum.validateJsonElement(jsonObj.get("permission")); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifier_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifier_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRoleResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRoleResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRoleResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRoleResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchRoleResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRoleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRoleResponse + * @throws IOException if the JSON string is invalid with respect to SearchRoleResponse + */ + public static SearchRoleResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRoleResponse.class); + } + + /** + * Convert an instance of SearchRoleResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java index 55aed6ce0..d65a3258e 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 @@ -4,726 +4,679 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** SearchRolesRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchRolesRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; - - @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) - @javax.annotation.Nullable - private List roleIdentifiers; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - UNKNOWN("UNKNOWN"), - - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - SECURITYMANAGEMENT("SECURITYMANAGEMENT"), - - LOGICALMODELING("LOGICALMODELING"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - TAGMANAGEMENT("TAGMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - SYSTEMMANAGEMENT("SYSTEMMANAGEMENT"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - DEVELOPER("DEVELOPER"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - BACKUP_ADMINISTRATION("BACKUP_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - ENABLESPOTAPPCREATION("ENABLESPOTAPPCREATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_CONFIGURE_CONNECTIONS("CAN_CONFIGURE_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; - - @Deprecated - @SerializedName(SERIALIZED_NAME_DEPRECATED) - @javax.annotation.Nullable - private Boolean deprecated; - - public static final String SERIALIZED_NAME_EXTERNAL = "external"; - - @Deprecated - @SerializedName(SERIALIZED_NAME_EXTERNAL) - @javax.annotation.Nullable - private Boolean external; - - public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; - - @Deprecated - @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) - @javax.annotation.Nullable - private Boolean sharedViaConnection; - - /** Gets or Sets permissions */ - @JsonAdapter(PermissionsEnum.Adapter.class) - public enum PermissionsEnum { - READ_ONLY("READ_ONLY"), - - MODIFY("MODIFY"), - - NO_ACCESS("NO_ACCESS"); - - private String value; - - PermissionsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionsEnum fromValue(String value) { - for (PermissionsEnum b : PermissionsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionsEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PermissionsEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - - @Deprecated - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - @javax.annotation.Nullable - private List permissions; - - public SearchRolesRequest() {} - - public SearchRolesRequest roleIdentifiers( - @javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - return this; - } - - public SearchRolesRequest addRoleIdentifiersItem(String roleIdentifiersItem) { - if (this.roleIdentifiers == null) { - this.roleIdentifiers = new ArrayList<>(); - } - this.roleIdentifiers.add(roleIdentifiersItem); - return this; - } - - /** - * unique ID or name of the Roles - * - * @return roleIdentifiers - */ - @javax.annotation.Nullable - public List getRoleIdentifiers() { - return roleIdentifiers; - } - - public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - } - - public SearchRolesRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; - } - - public SearchRolesRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } - - /** - * Unique Id or name of the Organisation - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; - } - - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } - - public SearchRolesRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public SearchRolesRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); - } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - /** - * Unique Id or name of the User Group - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; - } +import com.thoughtspot.client.JSON; - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; +/** + * SearchRolesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchRolesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + UNKNOWN("UNKNOWN"), + + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + SECURITYMANAGEMENT("SECURITYMANAGEMENT"), + + LOGICALMODELING("LOGICALMODELING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + SYSTEMMANAGEMENT("SYSTEMMANAGEMENT"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + BACKUP_ADMINISTRATION("BACKUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ENABLESPOTAPPCREATION("ENABLESPOTAPPCREATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_CONFIGURE_CONNECTIONS("CAN_CONFIGURE_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MODIDY_FOLDERS("CAN_MODIDY_FOLDERS"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public SearchRolesRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchRolesRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Privileges assigned to the Role. See - * [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for - * supported roles privileges. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - @Deprecated - public SearchRolesRequest deprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - /** - * Indicates whether the Role is deprecated. - * - * @return deprecated - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable - public Boolean getDeprecated() { - return deprecated; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - @Deprecated - public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - } + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + @Deprecated + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; - @Deprecated - public SearchRolesRequest external(@javax.annotation.Nullable Boolean external) { - this.external = external; - return this; - } - - /** - * Indicates whether the Role is external - * - * @return external - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable - public Boolean getExternal() { - return external; - } + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + @Deprecated + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; - @Deprecated - public void setExternal(@javax.annotation.Nullable Boolean external) { - this.external = external; - } + public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; + @Deprecated + @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) + @javax.annotation.Nullable + private Boolean sharedViaConnection; - @Deprecated - public SearchRolesRequest sharedViaConnection( - @javax.annotation.Nullable Boolean sharedViaConnection) { - this.sharedViaConnection = sharedViaConnection; - return this; - } + /** + * Gets or Sets permissions + */ + @JsonAdapter(PermissionsEnum.Adapter.class) + public enum PermissionsEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); - /** - * Indicates whether the Role is shared via connection - * - * @return sharedViaConnection - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable - public Boolean getSharedViaConnection() { - return sharedViaConnection; - } + private String value; - @Deprecated - public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { - this.sharedViaConnection = sharedViaConnection; + PermissionsEnum(String value) { + this.value = value; } - @Deprecated - public SearchRolesRequest permissions( - @javax.annotation.Nullable List permissions) { - this.permissions = permissions; - return this; - } - - public SearchRolesRequest addPermissionsItem(PermissionsEnum permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } - - /** - * Permission details of the Role - * - * @return permissions - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable - public List getPermissions() { - return permissions; - } - - @Deprecated - public void setPermissions(@javax.annotation.Nullable List permissions) { - this.permissions = permissions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRolesRequest searchRolesRequest = (SearchRolesRequest) o; - return Objects.equals(this.roleIdentifiers, searchRolesRequest.roleIdentifiers) - && Objects.equals(this.orgIdentifiers, searchRolesRequest.orgIdentifiers) - && Objects.equals(this.groupIdentifiers, searchRolesRequest.groupIdentifiers) - && Objects.equals(this.privileges, searchRolesRequest.privileges) - && Objects.equals(this.deprecated, searchRolesRequest.deprecated) - && Objects.equals(this.external, searchRolesRequest.external) - && Objects.equals(this.sharedViaConnection, searchRolesRequest.sharedViaConnection) - && Objects.equals(this.permissions, searchRolesRequest.permissions); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - roleIdentifiers, - orgIdentifiers, - groupIdentifiers, - privileges, - deprecated, - external, - sharedViaConnection, - permissions); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchRolesRequest {\n"); - sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); - sb.append(" external: ").append(toIndentedString(external)).append("\n"); - sb.append(" sharedViaConnection: ") - .append(toIndentedString(sharedViaConnection)) - .append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("role_identifiers"); - openapiFields.add("org_identifiers"); - openapiFields.add("group_identifiers"); - openapiFields.add("privileges"); - openapiFields.add("deprecated"); - openapiFields.add("external"); - openapiFields.add("shared_via_connection"); - openapiFields.add("permissions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionsEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchRolesRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchRolesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchRolesRequest is not found in" - + " the empty JSON string", - SearchRolesRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PermissionsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + @Deprecated + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @javax.annotation.Nullable + private List permissions; + + public SearchRolesRequest() { + } + + public SearchRolesRequest roleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public SearchRolesRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * unique ID or name of the Roles + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + + public SearchRolesRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchRolesRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique Id or name of the Organisation + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public SearchRolesRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public SearchRolesRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique Id or name of the User Group + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public SearchRolesRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public SearchRolesRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + @Deprecated + public SearchRolesRequest deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the Role is deprecated. + * @return deprecated + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + @Deprecated + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + + @Deprecated + public SearchRolesRequest external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the Role is external + * @return external + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + @Deprecated + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + + @Deprecated + public SearchRolesRequest sharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + return this; + } + + /** + * Indicates whether the Role is shared via connection + * @return sharedViaConnection + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public Boolean getSharedViaConnection() { + return sharedViaConnection; + } + + @Deprecated + public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + } + + + @Deprecated + public SearchRolesRequest permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public SearchRolesRequest addPermissionsItem(PermissionsEnum permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Permission details of the Role + * @return permissions + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + @Deprecated + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRolesRequest searchRolesRequest = (SearchRolesRequest) o; + return Objects.equals(this.roleIdentifiers, searchRolesRequest.roleIdentifiers) && + Objects.equals(this.orgIdentifiers, searchRolesRequest.orgIdentifiers) && + Objects.equals(this.groupIdentifiers, searchRolesRequest.groupIdentifiers) && + Objects.equals(this.privileges, searchRolesRequest.privileges) && + Objects.equals(this.deprecated, searchRolesRequest.deprecated) && + Objects.equals(this.external, searchRolesRequest.external) && + Objects.equals(this.sharedViaConnection, searchRolesRequest.sharedViaConnection) && + Objects.equals(this.permissions, searchRolesRequest.permissions); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(roleIdentifiers, orgIdentifiers, groupIdentifiers, privileges, deprecated, external, sharedViaConnection, permissions); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRolesRequest {\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" sharedViaConnection: ").append(toIndentedString(sharedViaConnection)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("role_identifiers"); + openapiFields.add("org_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("privileges"); + openapiFields.add("deprecated"); + openapiFields.add("external"); + openapiFields.add("shared_via_connection"); + openapiFields.add("permissions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRolesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRolesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRolesRequest is not found in the empty JSON string", SearchRolesRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchRolesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchRolesRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchRolesRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchRolesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("role_identifiers") != null - && !jsonObj.get("role_identifiers").isJsonNull() - && !jsonObj.get("role_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `role_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("role_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null - && !jsonObj.get("permissions").isJsonNull() - && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permissions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("permissions").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchRolesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchRolesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchRolesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchRolesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchRolesRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchRolesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchRolesRequest - * @throws IOException if the JSON string is invalid with respect to SearchRolesRequest - */ - public static SearchRolesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchRolesRequest.class); - } - - /** - * Convert an instance of SearchRolesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null && !jsonObj.get("role_identifiers").isJsonNull() && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `role_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("role_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRolesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRolesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchRolesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRolesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchRolesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRolesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRolesRequest + * @throws IOException if the JSON string is invalid with respect to SearchRolesRequest + */ + public static SearchRolesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRolesRequest.class); + } + + /** + * Convert an instance of SearchRolesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java index 68c76eb68..b878bd2af 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java @@ -4,401 +4,376 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.MetadataInput; +import com.thoughtspot.client.model.ScheduleHistoryRunsOptionsInput; +import com.thoughtspot.client.model.SortingOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchSchedulesRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchSchedulesRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize; - - public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; - - @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) - @javax.annotation.Nullable - private SortingOptions sortOptions; - - public static final String SERIALIZED_NAME_HISTORY_RUNS_OPTIONS = "history_runs_options"; - - @SerializedName(SERIALIZED_NAME_HISTORY_RUNS_OPTIONS) - @javax.annotation.Nullable - private ScheduleHistoryRunsOptionsInput historyRunsOptions; - - public static final String SERIALIZED_NAME_SCHEDULE_IDENTIFIERS = "schedule_identifiers"; - - @SerializedName(SERIALIZED_NAME_SCHEDULE_IDENTIFIERS) - @javax.annotation.Nullable - private List scheduleIdentifiers; - - public SearchSchedulesRequest() {} - - public SearchSchedulesRequest metadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; - } - - public SearchSchedulesRequest addMetadataItem(MetadataInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata objects associated with the scheduled jobs. - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; - } - - public SearchSchedulesRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } - - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; - } - - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchSchedulesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } +import com.thoughtspot.client.JSON; - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; +/** + * SearchSchedulesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchSchedulesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortingOptions sortOptions; + + public static final String SERIALIZED_NAME_HISTORY_RUNS_OPTIONS = "history_runs_options"; + @SerializedName(SERIALIZED_NAME_HISTORY_RUNS_OPTIONS) + @javax.annotation.Nullable + private ScheduleHistoryRunsOptionsInput historyRunsOptions; + + public static final String SERIALIZED_NAME_SCHEDULE_IDENTIFIERS = "schedule_identifiers"; + @SerializedName(SERIALIZED_NAME_SCHEDULE_IDENTIFIERS) + @javax.annotation.Nullable + private List scheduleIdentifiers; + + public SearchSchedulesRequest() { + } + + public SearchSchedulesRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SearchSchedulesRequest addMetadataItem(MetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects associated with the scheduled jobs. + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + + public SearchSchedulesRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchSchedulesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchSchedulesRequest sortOptions(@javax.annotation.Nullable SortingOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * @return sortOptions + */ + @javax.annotation.Nullable + public SortingOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortingOptions sortOptions) { + this.sortOptions = sortOptions; + } + + + public SearchSchedulesRequest historyRunsOptions(@javax.annotation.Nullable ScheduleHistoryRunsOptionsInput historyRunsOptions) { + this.historyRunsOptions = historyRunsOptions; + return this; + } + + /** + * Options while fetching history runs for the schedule. + * @return historyRunsOptions + */ + @javax.annotation.Nullable + public ScheduleHistoryRunsOptionsInput getHistoryRunsOptions() { + return historyRunsOptions; + } + + public void setHistoryRunsOptions(@javax.annotation.Nullable ScheduleHistoryRunsOptionsInput historyRunsOptions) { + this.historyRunsOptions = historyRunsOptions; + } + + + public SearchSchedulesRequest scheduleIdentifiers(@javax.annotation.Nullable List scheduleIdentifiers) { + this.scheduleIdentifiers = scheduleIdentifiers; + return this; + } + + public SearchSchedulesRequest addScheduleIdentifiersItem(String scheduleIdentifiersItem) { + if (this.scheduleIdentifiers == null) { + this.scheduleIdentifiers = new ArrayList<>(); } + this.scheduleIdentifiers.add(scheduleIdentifiersItem); + return this; + } - public SearchSchedulesRequest sortOptions( - @javax.annotation.Nullable SortingOptions sortOptions) { - this.sortOptions = sortOptions; - return this; - } + /** + * unique ID or name of the Schedule + * @return scheduleIdentifiers + */ + @javax.annotation.Nullable + public List getScheduleIdentifiers() { + return scheduleIdentifiers; + } - /** - * Sort options. - * - * @return sortOptions - */ - @javax.annotation.Nullable - public SortingOptions getSortOptions() { - return sortOptions; - } + public void setScheduleIdentifiers(@javax.annotation.Nullable List scheduleIdentifiers) { + this.scheduleIdentifiers = scheduleIdentifiers; + } - public void setSortOptions(@javax.annotation.Nullable SortingOptions sortOptions) { - this.sortOptions = sortOptions; - } - public SearchSchedulesRequest historyRunsOptions( - @javax.annotation.Nullable ScheduleHistoryRunsOptionsInput historyRunsOptions) { - this.historyRunsOptions = historyRunsOptions; - return this; - } - /** - * Options while fetching history runs for the schedule. - * - * @return historyRunsOptions - */ - @javax.annotation.Nullable - public ScheduleHistoryRunsOptionsInput getHistoryRunsOptions() { - return historyRunsOptions; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setHistoryRunsOptions( - @javax.annotation.Nullable ScheduleHistoryRunsOptionsInput historyRunsOptions) { - this.historyRunsOptions = historyRunsOptions; + if (o == null || getClass() != o.getClass()) { + return false; } - - public SearchSchedulesRequest scheduleIdentifiers( - @javax.annotation.Nullable List scheduleIdentifiers) { - this.scheduleIdentifiers = scheduleIdentifiers; - return this; + SearchSchedulesRequest searchSchedulesRequest = (SearchSchedulesRequest) o; + return Objects.equals(this.metadata, searchSchedulesRequest.metadata) && + Objects.equals(this.recordOffset, searchSchedulesRequest.recordOffset) && + Objects.equals(this.recordSize, searchSchedulesRequest.recordSize) && + Objects.equals(this.sortOptions, searchSchedulesRequest.sortOptions) && + Objects.equals(this.historyRunsOptions, searchSchedulesRequest.historyRunsOptions) && + Objects.equals(this.scheduleIdentifiers, searchSchedulesRequest.scheduleIdentifiers); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, recordOffset, recordSize, sortOptions, historyRunsOptions, scheduleIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchSchedulesRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" historyRunsOptions: ").append(toIndentedString(historyRunsOptions)).append("\n"); + sb.append(" scheduleIdentifiers: ").append(toIndentedString(scheduleIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public SearchSchedulesRequest addScheduleIdentifiersItem(String scheduleIdentifiersItem) { - if (this.scheduleIdentifiers == null) { - this.scheduleIdentifiers = new ArrayList<>(); + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("history_runs_options"); + openapiFields.add("schedule_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchSchedulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchSchedulesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchSchedulesRequest is not found in the empty JSON string", SearchSchedulesRequest.openapiRequiredFields.toString())); } - this.scheduleIdentifiers.add(scheduleIdentifiersItem); - return this; - } - - /** - * unique ID or name of the Schedule - * - * @return scheduleIdentifiers - */ - @javax.annotation.Nullable - public List getScheduleIdentifiers() { - return scheduleIdentifiers; - } + } - public void setScheduleIdentifiers( - @javax.annotation.Nullable List scheduleIdentifiers) { - this.scheduleIdentifiers = scheduleIdentifiers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchSchedulesRequest searchSchedulesRequest = (SearchSchedulesRequest) o; - return Objects.equals(this.metadata, searchSchedulesRequest.metadata) - && Objects.equals(this.recordOffset, searchSchedulesRequest.recordOffset) - && Objects.equals(this.recordSize, searchSchedulesRequest.recordSize) - && Objects.equals(this.sortOptions, searchSchedulesRequest.sortOptions) - && Objects.equals( - this.historyRunsOptions, searchSchedulesRequest.historyRunsOptions) - && Objects.equals( - this.scheduleIdentifiers, searchSchedulesRequest.scheduleIdentifiers); - } - - @Override - public int hashCode() { - return Objects.hash( - metadata, - recordOffset, - recordSize, - sortOptions, - historyRunsOptions, - scheduleIdentifiers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchSchedulesRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); - sb.append(" historyRunsOptions: ") - .append(toIndentedString(historyRunsOptions)) - .append("\n"); - sb.append(" scheduleIdentifiers: ") - .append(toIndentedString(scheduleIdentifiers)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("sort_options"); - openapiFields.add("history_runs_options"); - openapiFields.add("schedule_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchSchedulesRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchSchedulesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchSchedulesRequest is not found" - + " in the empty JSON string", - SearchSchedulesRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchSchedulesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchSchedulesRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchSchedulesRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchSchedulesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - MetadataInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - } - // validate the optional field `sort_options` - if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { - SortingOptions.validateJsonElement(jsonObj.get("sort_options")); + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + }; } - // validate the optional field `history_runs_options` - if (jsonObj.get("history_runs_options") != null - && !jsonObj.get("history_runs_options").isJsonNull()) { - ScheduleHistoryRunsOptionsInput.validateJsonElement( - jsonObj.get("history_runs_options")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("schedule_identifiers") != null - && !jsonObj.get("schedule_identifiers").isJsonNull() - && !jsonObj.get("schedule_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `schedule_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("schedule_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchSchedulesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchSchedulesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchSchedulesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchSchedulesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchSchedulesRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchSchedulesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchSchedulesRequest - * @throws IOException if the JSON string is invalid with respect to SearchSchedulesRequest - */ - public static SearchSchedulesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchSchedulesRequest.class); - } - - /** - * Convert an instance of SearchSchedulesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortingOptions.validateJsonElement(jsonObj.get("sort_options")); + } + // validate the optional field `history_runs_options` + if (jsonObj.get("history_runs_options") != null && !jsonObj.get("history_runs_options").isJsonNull()) { + ScheduleHistoryRunsOptionsInput.validateJsonElement(jsonObj.get("history_runs_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("schedule_identifiers") != null && !jsonObj.get("schedule_identifiers").isJsonNull() && !jsonObj.get("schedule_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `schedule_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("schedule_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchSchedulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchSchedulesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchSchedulesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchSchedulesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchSchedulesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchSchedulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchSchedulesRequest + * @throws IOException if the JSON string is invalid with respect to SearchSchedulesRequest + */ + public static SearchSchedulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchSchedulesRequest.class); + } + + /** + * Convert an instance of SearchSchedulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java index 3b0f4755c..625623aa6 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java @@ -4,265 +4,257 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchTagsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchTagsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TAG_IDENTIFIER = "tag_identifier"; - - @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIER) - @javax.annotation.Nullable - private String tagIdentifier; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - public static final String SERIALIZED_NAME_COLOR = "color"; - - @SerializedName(SERIALIZED_NAME_COLOR) - @javax.annotation.Nullable - private String color; - - public SearchTagsRequest() {} - - public SearchTagsRequest tagIdentifier(@javax.annotation.Nullable String tagIdentifier) { - this.tagIdentifier = tagIdentifier; - return this; - } - - /** - * Name or Id of the tag. - * - * @return tagIdentifier - */ - @javax.annotation.Nullable - public String getTagIdentifier() { - return tagIdentifier; - } - - public void setTagIdentifier(@javax.annotation.Nullable String tagIdentifier) { - this.tagIdentifier = tagIdentifier; - } - - public SearchTagsRequest namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * A pattern to match case-insensitive name of the Tag object. - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; - } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public SearchTagsRequest color(@javax.annotation.Nullable String color) { - this.color = color; - return this; - } - - /** - * Color of the tag. - * - * @return color - */ - @javax.annotation.Nullable - public String getColor() { - return color; - } - - public void setColor(@javax.annotation.Nullable String color) { - this.color = color; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchTagsRequest searchTagsRequest = (SearchTagsRequest) o; - return Objects.equals(this.tagIdentifier, searchTagsRequest.tagIdentifier) - && Objects.equals(this.namePattern, searchTagsRequest.namePattern) - && Objects.equals(this.color, searchTagsRequest.color); +/** + * SearchTagsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchTagsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIER = "tag_identifier"; + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIER) + @javax.annotation.Nullable + private String tagIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_COLOR = "color"; + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public SearchTagsRequest() { + } + + public SearchTagsRequest tagIdentifier(@javax.annotation.Nullable String tagIdentifier) { + this.tagIdentifier = tagIdentifier; + return this; + } + + /** + * Name or Id of the tag. + * @return tagIdentifier + */ + @javax.annotation.Nullable + public String getTagIdentifier() { + return tagIdentifier; + } + + public void setTagIdentifier(@javax.annotation.Nullable String tagIdentifier) { + this.tagIdentifier = tagIdentifier; + } + + + public SearchTagsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the Tag object. + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public SearchTagsRequest color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Color of the tag. + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(tagIdentifier, namePattern, color); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchTagsRequest {\n"); - sb.append(" tagIdentifier: ").append(toIndentedString(tagIdentifier)).append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); + SearchTagsRequest searchTagsRequest = (SearchTagsRequest) o; + return Objects.equals(this.tagIdentifier, searchTagsRequest.tagIdentifier) && + Objects.equals(this.namePattern, searchTagsRequest.namePattern) && + Objects.equals(this.color, searchTagsRequest.color); + } + + @Override + public int hashCode() { + return Objects.hash(tagIdentifier, namePattern, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchTagsRequest {\n"); + sb.append(" tagIdentifier: ").append(toIndentedString(tagIdentifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tag_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchTagsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchTagsRequest is not found in the empty JSON string", SearchTagsRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tag_identifier"); - openapiFields.add("name_pattern"); - openapiFields.add("color"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchTagsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchTagsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchTagsRequest is not found in the" - + " empty JSON string", - SearchTagsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchTagsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchTagsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchTagsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("tag_identifier") != null && !jsonObj.get("tag_identifier").isJsonNull()) - && !jsonObj.get("tag_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tag_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("tag_identifier").toString())); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) - && !jsonObj.get("color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `color` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("color").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchTagsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchTagsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchTagsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchTagsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchTagsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchTagsRequest - * @throws IOException if the JSON string is invalid with respect to SearchTagsRequest - */ - public static SearchTagsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchTagsRequest.class); - } - - /** - * Convert an instance of SearchTagsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("tag_identifier") != null && !jsonObj.get("tag_identifier").isJsonNull()) && !jsonObj.get("tag_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tag_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchTagsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchTagsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchTagsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchTagsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchTagsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SearchTagsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchTagsRequest + * @throws IOException if the JSON string is invalid with respect to SearchTagsRequest + */ + public static SearchTagsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchTagsRequest.class); + } + + /** + * Convert an instance of SearchTagsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java index dd5d03157..9ce1a830f 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 @@ -4,1098 +4,981 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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 com.thoughtspot.client.model.SortOptions; 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; +import java.io.Serializable; -/** SearchUserGroupsRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchUserGroupsRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = - "default_liveboard_identifiers"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) - @javax.annotation.Nullable - private List defaultLiveboardIdentifiers; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIER = "group_identifier"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIER) - @javax.annotation.Nullable - private String groupIdentifier; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DEVELOPER("DEVELOPER"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; - - @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List subGroupIdentifiers; - - /** Group type. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOCAL_GROUP("LOCAL_GROUP"), - - LDAP_GROUP("LDAP_GROUP"), - - TEAM_GROUP("TEAM_GROUP"), - - TENANT_GROUP("TENANT_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - /** - * Visibility of the group. To make a group visible to other users and groups, set the - * visibility to SHAREABLE. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; - - @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) - @javax.annotation.Nullable - private List roleIdentifiers; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; - - @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) - @javax.annotation.Nullable - private SortOptions sortOptions; - - public static final String SERIALIZED_NAME_INCLUDE_USERS = "include_users"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_USERS) - @javax.annotation.Nullable - private Boolean includeUsers = true; - - public static final String SERIALIZED_NAME_INCLUDE_SUB_GROUPS = "include_sub_groups"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_SUB_GROUPS) - @javax.annotation.Nullable - private Boolean includeSubGroups = true; - - public SearchUserGroupsRequest() {} - - public SearchUserGroupsRequest defaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - return this; - } - - public SearchUserGroupsRequest addDefaultLiveboardIdentifiersItem( - String defaultLiveboardIdentifiersItem) { - if (this.defaultLiveboardIdentifiers == null) { - this.defaultLiveboardIdentifiers = new ArrayList<>(); - } - this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); - return this; - } - - /** - * GUID of Liveboards that are assigned as default Liveboards to the users in the group. - * - * @return defaultLiveboardIdentifiers - */ - @javax.annotation.Nullable - public List getDefaultLiveboardIdentifiers() { - return defaultLiveboardIdentifiers; - } - - public void setDefaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - } - - public SearchUserGroupsRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the group - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public SearchUserGroupsRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Display name of the group - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - } - - public SearchUserGroupsRequest namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * A pattern to match case-insensitive name of the Group object. - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; - } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public SearchUserGroupsRequest groupIdentifier( - @javax.annotation.Nullable String groupIdentifier) { - this.groupIdentifier = groupIdentifier; - return this; - } - - /** - * GUID or name of the group - * - * @return groupIdentifier - */ - @javax.annotation.Nullable - public String getGroupIdentifier() { - return groupIdentifier; - } - - public void setGroupIdentifier(@javax.annotation.Nullable String groupIdentifier) { - this.groupIdentifier = groupIdentifier; - } - - public SearchUserGroupsRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; - } - - public SearchUserGroupsRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } - - /** - * ID or name of the Org to which the group belongs - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; - } - - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } - - public SearchUserGroupsRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public SearchUserGroupsRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); - } - this.privileges.add(privilegesItem); - return this; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - /** - * Privileges assigned to the group. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } +import com.thoughtspot.client.JSON; - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; +/** + * SearchUserGroupsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchUserGroupsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = "default_liveboard_identifiers"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIER = "group_identifier"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIER) + @javax.annotation.Nullable + private String groupIdentifier; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_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"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public SearchUserGroupsRequest subGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchUserGroupsRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { - if (this.subGroupIdentifiers == null) { - this.subGroupIdentifiers = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.subGroupIdentifiers.add(subGroupIdentifiersItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - * - * @return subGroupIdentifiers - */ - @javax.annotation.Nullable - public List getSubGroupIdentifiers() { - return subGroupIdentifiers; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setSubGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public SearchUserGroupsRequest type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Group type. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - public SearchUserGroupsRequest userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public SearchUserGroupsRequest addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); - } - this.userIdentifiers.add(userIdentifiersItem); - return this; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - /** - * GUID or name of the users assigned to the group. - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - } + /** + * Group type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); - public SearchUserGroupsRequest visibility( - @javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } + private String value; - /** - * Visibility of the group. To make a group visible to other users and groups, set the - * visibility to SHAREABLE. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; + TypeEnum(String value) { + this.value = value; } - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; + public String getValue() { + return value; } - public SearchUserGroupsRequest roleIdentifiers( - @javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchUserGroupsRequest addRoleIdentifiersItem(String roleIdentifiersItem) { - if (this.roleIdentifiers == null) { - this.roleIdentifiers = new ArrayList<>(); + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.roleIdentifiers.add(roleIdentifiersItem); - return this; - } - - /** - * Filter groups with a list of Roles assigned to a group - * - * @return roleIdentifiers - */ - @javax.annotation.Nullable - public List getRoleIdentifiers() { - return roleIdentifiers; - } - - public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public SearchUserGroupsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } } - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } - - public SearchUserGroupsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } - - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } - - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } - - public SearchUserGroupsRequest sortOptions(@javax.annotation.Nullable SortOptions sortOptions) { - this.sortOptions = sortOptions; - return this; - } - - /** - * Sort options to filter group details. - * - * @return sortOptions - */ - @javax.annotation.Nullable - public SortOptions getSortOptions() { - return sortOptions; - } - - public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { - this.sortOptions = sortOptions; - } - - public SearchUserGroupsRequest includeUsers(@javax.annotation.Nullable Boolean includeUsers) { - this.includeUsers = includeUsers; - return this; - } - - /** - * <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the - * users should be included in group search response. - * - * @return includeUsers - */ - @javax.annotation.Nullable - public Boolean getIncludeUsers() { - return includeUsers; - } - - public void setIncludeUsers(@javax.annotation.Nullable Boolean includeUsers) { - this.includeUsers = includeUsers; - } - - public SearchUserGroupsRequest includeSubGroups( - @javax.annotation.Nullable Boolean includeSubGroups) { - this.includeSubGroups = includeSubGroups; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } + } - /** - * <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the sub - * groups should be included in group search response. - * - * @return includeSubGroups - */ - @javax.annotation.Nullable - public Boolean getIncludeSubGroups() { - return includeSubGroups; - } + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; - public void setIncludeSubGroups(@javax.annotation.Nullable Boolean includeSubGroups) { - this.includeSubGroups = includeSubGroups; - } + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchUserGroupsRequest searchUserGroupsRequest = (SearchUserGroupsRequest) o; - return Objects.equals( - this.defaultLiveboardIdentifiers, - searchUserGroupsRequest.defaultLiveboardIdentifiers) - && Objects.equals(this.description, searchUserGroupsRequest.description) - && Objects.equals(this.displayName, searchUserGroupsRequest.displayName) - && Objects.equals(this.namePattern, searchUserGroupsRequest.namePattern) - && Objects.equals(this.groupIdentifier, searchUserGroupsRequest.groupIdentifier) - && Objects.equals(this.orgIdentifiers, searchUserGroupsRequest.orgIdentifiers) - && Objects.equals(this.privileges, searchUserGroupsRequest.privileges) - && Objects.equals( - this.subGroupIdentifiers, searchUserGroupsRequest.subGroupIdentifiers) - && Objects.equals(this.type, searchUserGroupsRequest.type) - && Objects.equals(this.userIdentifiers, searchUserGroupsRequest.userIdentifiers) - && Objects.equals(this.visibility, searchUserGroupsRequest.visibility) - && Objects.equals(this.roleIdentifiers, searchUserGroupsRequest.roleIdentifiers) - && Objects.equals(this.recordOffset, searchUserGroupsRequest.recordOffset) - && Objects.equals(this.recordSize, searchUserGroupsRequest.recordSize) - && Objects.equals(this.sortOptions, searchUserGroupsRequest.sortOptions) - && Objects.equals(this.includeUsers, searchUserGroupsRequest.includeUsers) - && Objects.equals(this.includeSubGroups, searchUserGroupsRequest.includeSubGroups); - } + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - defaultLiveboardIdentifiers, - description, - displayName, - namePattern, - groupIdentifier, - orgIdentifiers, - privileges, - subGroupIdentifiers, - type, - userIdentifiers, - visibility, - roleIdentifiers, - recordOffset, - recordSize, - sortOptions, - includeUsers, - includeSubGroups); + VisibilityEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchUserGroupsRequest {\n"); - sb.append(" defaultLiveboardIdentifiers: ") - .append(toIndentedString(defaultLiveboardIdentifiers)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" groupIdentifier: ").append(toIndentedString(groupIdentifier)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" subGroupIdentifiers: ") - .append(toIndentedString(subGroupIdentifiers)) - .append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); - sb.append(" includeUsers: ").append(toIndentedString(includeUsers)).append("\n"); - sb.append(" includeSubGroups: ").append(toIndentedString(includeSubGroups)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("default_liveboard_identifiers"); - openapiFields.add("description"); - openapiFields.add("display_name"); - openapiFields.add("name_pattern"); - openapiFields.add("group_identifier"); - openapiFields.add("org_identifiers"); - openapiFields.add("privileges"); - openapiFields.add("sub_group_identifiers"); - openapiFields.add("type"); - openapiFields.add("user_identifiers"); - openapiFields.add("visibility"); - openapiFields.add("role_identifiers"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("sort_options"); - openapiFields.add("include_users"); - openapiFields.add("include_sub_groups"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchUserGroupsRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchUserGroupsRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchUserGroupsRequest is not found" - + " in the empty JSON string", - SearchUserGroupsRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchUserGroupsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchUserGroupsRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptions sortOptions; + + public static final String SERIALIZED_NAME_INCLUDE_USERS = "include_users"; + @SerializedName(SERIALIZED_NAME_INCLUDE_USERS) + @javax.annotation.Nullable + private Boolean includeUsers = true; + + public static final String SERIALIZED_NAME_INCLUDE_SUB_GROUPS = "include_sub_groups"; + @SerializedName(SERIALIZED_NAME_INCLUDE_SUB_GROUPS) + @javax.annotation.Nullable + private Boolean includeSubGroups = true; + + public SearchUserGroupsRequest() { + } + + public SearchUserGroupsRequest defaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public SearchUserGroupsRequest addDefaultLiveboardIdentifiersItem(String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + + public SearchUserGroupsRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public SearchUserGroupsRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the group + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public SearchUserGroupsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the Group object. + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public SearchUserGroupsRequest groupIdentifier(@javax.annotation.Nullable String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + return this; + } + + /** + * GUID or name of the group + * @return groupIdentifier + */ + @javax.annotation.Nullable + public String getGroupIdentifier() { + return groupIdentifier; + } + + public void setGroupIdentifier(@javax.annotation.Nullable String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + } + + + public SearchUserGroupsRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchUserGroupsRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * ID or name of the Org to which the group belongs + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public SearchUserGroupsRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public SearchUserGroupsRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges assigned to the group. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public SearchUserGroupsRequest subGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public SearchUserGroupsRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + + public SearchUserGroupsRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Group type. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public SearchUserGroupsRequest userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public SearchUserGroupsRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users assigned to the group. + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + + public SearchUserGroupsRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public SearchUserGroupsRequest roleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public SearchUserGroupsRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Filter groups with a list of Roles assigned to a group + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + + public SearchUserGroupsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchUserGroupsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchUserGroupsRequest sortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options to filter group details. + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + + public SearchUserGroupsRequest includeUsers(@javax.annotation.Nullable Boolean includeUsers) { + this.includeUsers = includeUsers; + return this; + } + + /** + * <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the users should be included in group search response. + * @return includeUsers + */ + @javax.annotation.Nullable + public Boolean getIncludeUsers() { + return includeUsers; + } + + public void setIncludeUsers(@javax.annotation.Nullable Boolean includeUsers) { + this.includeUsers = includeUsers; + } + + + public SearchUserGroupsRequest includeSubGroups(@javax.annotation.Nullable Boolean includeSubGroups) { + this.includeSubGroups = includeSubGroups; + return this; + } + + /** + * <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the sub groups should be included in group search response. + * @return includeSubGroups + */ + @javax.annotation.Nullable + public Boolean getIncludeSubGroups() { + return includeSubGroups; + } + + public void setIncludeSubGroups(@javax.annotation.Nullable Boolean includeSubGroups) { + this.includeSubGroups = includeSubGroups; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchUserGroupsRequest searchUserGroupsRequest = (SearchUserGroupsRequest) o; + return Objects.equals(this.defaultLiveboardIdentifiers, searchUserGroupsRequest.defaultLiveboardIdentifiers) && + Objects.equals(this.description, searchUserGroupsRequest.description) && + Objects.equals(this.displayName, searchUserGroupsRequest.displayName) && + Objects.equals(this.namePattern, searchUserGroupsRequest.namePattern) && + Objects.equals(this.groupIdentifier, searchUserGroupsRequest.groupIdentifier) && + Objects.equals(this.orgIdentifiers, searchUserGroupsRequest.orgIdentifiers) && + Objects.equals(this.privileges, searchUserGroupsRequest.privileges) && + Objects.equals(this.subGroupIdentifiers, searchUserGroupsRequest.subGroupIdentifiers) && + Objects.equals(this.type, searchUserGroupsRequest.type) && + Objects.equals(this.userIdentifiers, searchUserGroupsRequest.userIdentifiers) && + Objects.equals(this.visibility, searchUserGroupsRequest.visibility) && + Objects.equals(this.roleIdentifiers, searchUserGroupsRequest.roleIdentifiers) && + Objects.equals(this.recordOffset, searchUserGroupsRequest.recordOffset) && + Objects.equals(this.recordSize, searchUserGroupsRequest.recordSize) && + Objects.equals(this.sortOptions, searchUserGroupsRequest.sortOptions) && + Objects.equals(this.includeUsers, searchUserGroupsRequest.includeUsers) && + Objects.equals(this.includeSubGroups, searchUserGroupsRequest.includeSubGroups); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(defaultLiveboardIdentifiers, description, displayName, namePattern, groupIdentifier, orgIdentifiers, privileges, subGroupIdentifiers, type, userIdentifiers, visibility, roleIdentifiers, recordOffset, recordSize, sortOptions, includeUsers, includeSubGroups); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchUserGroupsRequest {\n"); + sb.append(" defaultLiveboardIdentifiers: ").append(toIndentedString(defaultLiveboardIdentifiers)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" groupIdentifier: ").append(toIndentedString(groupIdentifier)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ").append(toIndentedString(subGroupIdentifiers)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" includeUsers: ").append(toIndentedString(includeUsers)).append("\n"); + sb.append(" includeSubGroups: ").append(toIndentedString(includeSubGroups)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("display_name"); + openapiFields.add("name_pattern"); + openapiFields.add("group_identifier"); + openapiFields.add("org_identifiers"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("role_identifiers"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("include_users"); + openapiFields.add("include_sub_groups"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchUserGroupsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchUserGroupsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchUserGroupsRequest is not found in the empty JSON string", SearchUserGroupsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchUserGroupsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchUserGroupsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("default_liveboard_identifiers") != null - && !jsonObj.get("default_liveboard_identifiers").isJsonNull() - && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_liveboard_identifiers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("default_liveboard_identifiers").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - if ((jsonObj.get("group_identifier") != null - && !jsonObj.get("group_identifier").isJsonNull()) - && !jsonObj.get("group_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("group_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("sub_group_identifiers") != null - && !jsonObj.get("sub_group_identifiers").isJsonNull() - && !jsonObj.get("sub_group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sub_group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("sub_group_identifiers").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("role_identifiers") != null - && !jsonObj.get("role_identifiers").isJsonNull() - && !jsonObj.get("role_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `role_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("role_identifiers").toString())); - } - // validate the optional field `sort_options` - if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { - SortOptions.validateJsonElement(jsonObj.get("sort_options")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchUserGroupsRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchUserGroupsRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchUserGroupsRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchUserGroupsRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchUserGroupsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchUserGroupsRequest - * @throws IOException if the JSON string is invalid with respect to SearchUserGroupsRequest - */ - public static SearchUserGroupsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchUserGroupsRequest.class); - } - - /** - * Convert an instance of SearchUserGroupsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null && !jsonObj.get("default_liveboard_identifiers").isJsonNull() && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `default_liveboard_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("group_identifier") != null && !jsonObj.get("group_identifier").isJsonNull()) && !jsonObj.get("group_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null && !jsonObj.get("sub_group_identifiers").isJsonNull() && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null && !jsonObj.get("role_identifiers").isJsonNull() && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `role_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("role_identifiers").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchUserGroupsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchUserGroupsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchUserGroupsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchUserGroupsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchUserGroupsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchUserGroupsRequest + * @throws IOException if the JSON string is invalid with respect to SearchUserGroupsRequest + */ + public static SearchUserGroupsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchUserGroupsRequest.class); + } + + /** + * Convert an instance of SearchUserGroupsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java index ed533edef..8ffd9d95c 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 @@ -4,1265 +4,1133 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import com.thoughtspot.client.model.SortOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SearchUsersRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchUsersRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) - @javax.annotation.Nullable - private String userIdentifier; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - - /** Visibility of the user */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DEVELOPER("DEVELOPER"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - /** Type of the account */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - LOCAL_USER("LOCAL_USER"), - - LDAP_USER("LDAP_USER"), - - SAML_USER("SAML_USER"), - - OIDC_USER("OIDC_USER"), - - REMOTE_USER("REMOTE_USER"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - @javax.annotation.Nullable - private AccountTypeEnum accountType; - - /** Current status of the user account. */ - @JsonAdapter(AccountStatusEnum.Adapter.class) - public enum AccountStatusEnum { - ACTIVE("ACTIVE"), - - INACTIVE("INACTIVE"), - - EXPIRED("EXPIRED"), - - LOCKED("LOCKED"), - - PENDING("PENDING"), - - SUSPENDED("SUSPENDED"); - - private String value; - - AccountStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountStatusEnum fromValue(String value) { - for (AccountStatusEnum b : AccountStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) - @javax.annotation.Nullable - private AccountStatusEnum accountStatus; - - public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; - - @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) - @javax.annotation.Nullable - private Boolean notifyOnShare; - public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = - "show_onboarding_experience"; - - @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) - @javax.annotation.Nullable - private Boolean showOnboardingExperience; - - public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = - "onboarding_experience_completed"; - - @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) - @javax.annotation.Nullable - private Boolean onboardingExperienceCompleted; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; - - public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = - "home_liveboard_identifier"; - - @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) - @javax.annotation.Nullable - private String homeLiveboardIdentifier; - - public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; - - @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) - @javax.annotation.Nullable - private List favoriteMetadata; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; - - @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) - @javax.annotation.Nullable - private SortOptions sortOptions; - - public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; - - @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) - @javax.annotation.Nullable - private List roleIdentifiers; - - public static final String SERIALIZED_NAME_INCLUDE_FAVORITE_METADATA = - "include_favorite_metadata"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_FAVORITE_METADATA) - @javax.annotation.Nullable - private Boolean includeFavoriteMetadata = false; - - public SearchUsersRequest() {} - - public SearchUsersRequest userIdentifier(@javax.annotation.Nullable String userIdentifier) { - this.userIdentifier = userIdentifier; - return this; - } - - /** - * GUID / name of the user to search - * - * @return userIdentifier - */ - @javax.annotation.Nullable - public String getUserIdentifier() { - return userIdentifier; - } - - public void setUserIdentifier(@javax.annotation.Nullable String userIdentifier) { - this.userIdentifier = userIdentifier; - } - - public SearchUsersRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } - - /** - * A unique display name string for the user account, usually their first and last name - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - } - - public SearchUsersRequest namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * A pattern to match case-insensitive name of the User object. - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; - } - - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public SearchUsersRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the user - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } - - public SearchUsersRequest email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email of the user account - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public SearchUsersRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; - } - - public SearchUsersRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); - } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } - - /** - * GUID or name of the group to which the user belongs - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; - } - - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - } - - public SearchUsersRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; - } - - public SearchUsersRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); - } - this.privileges.add(privilegesItem); - return this; - } - - /** - * Privileges assigned to the user - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } - - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; - } - - public SearchUsersRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - return this; - } - - /** - * Type of the account - * - * @return accountType - */ - @javax.annotation.Nullable - public AccountTypeEnum getAccountType() { - return accountType; - } - - public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - } - - public SearchUsersRequest accountStatus( - @javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - return this; - } - - /** - * Current status of the user account. - * - * @return accountStatus - */ - @javax.annotation.Nullable - public AccountStatusEnum getAccountStatus() { - return accountStatus; - } +import com.thoughtspot.client.JSON; - public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - } +/** + * SearchUsersRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchUsersRequest implements Serializable { + private static final long serialVersionUID = 1L; - public SearchUsersRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nullable + private String userIdentifier; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a - * metadata object such as Answer, Liveboard, or Worksheet. - * - * @return notifyOnShare - */ - @javax.annotation.Nullable - public Boolean getNotifyOnShare() { - return notifyOnShare; - } + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; - public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; - public SearchUsersRequest showOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - return this; - } + /** + * Visibility of the user + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - /** - * The user preference for revisiting the onboarding experience - * - * @return showOnboardingExperience - */ - @javax.annotation.Nullable - public Boolean getShowOnboardingExperience() { - return showOnboardingExperience; - } + private String value; - public void setShowOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; + VisibilityEnum(String value) { + this.value = value; } - public SearchUsersRequest onboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - return this; + public String getValue() { + return value; } - /** - * Indicates if the user has completed the onboarding walkthrough - * - * @return onboardingExperienceCompleted - */ - @javax.annotation.Nullable - public Boolean getOnboardingExperienceCompleted() { - return onboardingExperienceCompleted; - } - - public void setOnboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - } - - public SearchUsersRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchUsersRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } - - /** - * IDs or names of the Orgs to which the user belongs - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; - } - - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public SearchUsersRequest homeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Unique ID or name of the user's home Liveboard. - * - * @return homeLiveboardIdentifier - */ - @javax.annotation.Nullable - public String getHomeLiveboardIdentifier() { - return homeLiveboardIdentifier; + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - public void setHomeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_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"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public SearchUsersRequest favoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchUsersRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { - if (this.favoriteMetadata == null) { - this.favoriteMetadata = new ArrayList<>(); + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.favoriteMetadata.add(favoriteMetadataItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Metadata objects which are assigned as favorites of the user. - * - * @return favoriteMetadata - */ - @javax.annotation.Nullable - public List getFavoriteMetadata() { - return favoriteMetadata; - } - - public void setFavoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - } - - public SearchUsersRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * The starting record number from where the records should be included. - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public SearchUsersRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - /** - * The number of records that should be included. - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } + /** + * Type of the account + */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - } + private String value; - public SearchUsersRequest sortOptions(@javax.annotation.Nullable SortOptions sortOptions) { - this.sortOptions = sortOptions; - return this; + AccountTypeEnum(String value) { + this.value = value; } - /** - * Sort options. - * - * @return sortOptions - */ - @javax.annotation.Nullable - public SortOptions getSortOptions() { - return sortOptions; + public String getValue() { + return value; } - public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { - this.sortOptions = sortOptions; - } - - public SearchUsersRequest roleIdentifiers( - @javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public SearchUsersRequest addRoleIdentifiersItem(String roleIdentifiersItem) { - if (this.roleIdentifiers == null) { - this.roleIdentifiers = new ArrayList<>(); + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.roleIdentifiers.add(roleIdentifiersItem); - return this; - } - - /** - * Filters by the role assigned to the user. - * - * @return roleIdentifiers - */ - @javax.annotation.Nullable - public List getRoleIdentifiers() { - return roleIdentifiers; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public SearchUsersRequest includeFavoriteMetadata( - @javax.annotation.Nullable Boolean includeFavoriteMetadata) { - this.includeFavoriteMetadata = includeFavoriteMetadata; - return this; + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } } - /** - * Indicates if the user's favorite objects should be displayed. - * - * @return includeFavoriteMetadata - */ - @javax.annotation.Nullable - public Boolean getIncludeFavoriteMetadata() { - return includeFavoriteMetadata; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); } + } - public void setIncludeFavoriteMetadata( - @javax.annotation.Nullable Boolean includeFavoriteMetadata) { - this.includeFavoriteMetadata = includeFavoriteMetadata; - } + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchUsersRequest searchUsersRequest = (SearchUsersRequest) o; - return Objects.equals(this.userIdentifier, searchUsersRequest.userIdentifier) - && Objects.equals(this.displayName, searchUsersRequest.displayName) - && Objects.equals(this.namePattern, searchUsersRequest.namePattern) - && Objects.equals(this.visibility, searchUsersRequest.visibility) - && Objects.equals(this.email, searchUsersRequest.email) - && Objects.equals(this.groupIdentifiers, searchUsersRequest.groupIdentifiers) - && Objects.equals(this.privileges, searchUsersRequest.privileges) - && Objects.equals(this.accountType, searchUsersRequest.accountType) - && Objects.equals(this.accountStatus, searchUsersRequest.accountStatus) - && Objects.equals(this.notifyOnShare, searchUsersRequest.notifyOnShare) - && Objects.equals( - this.showOnboardingExperience, searchUsersRequest.showOnboardingExperience) - && Objects.equals( - this.onboardingExperienceCompleted, - searchUsersRequest.onboardingExperienceCompleted) - && Objects.equals(this.orgIdentifiers, searchUsersRequest.orgIdentifiers) - && Objects.equals( - this.homeLiveboardIdentifier, searchUsersRequest.homeLiveboardIdentifier) - && Objects.equals(this.favoriteMetadata, searchUsersRequest.favoriteMetadata) - && Objects.equals(this.recordOffset, searchUsersRequest.recordOffset) - && Objects.equals(this.recordSize, searchUsersRequest.recordSize) - && Objects.equals(this.sortOptions, searchUsersRequest.sortOptions) - && Objects.equals(this.roleIdentifiers, searchUsersRequest.roleIdentifiers) - && Objects.equals( - this.includeFavoriteMetadata, searchUsersRequest.includeFavoriteMetadata); - } + /** + * Current status of the user account. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - userIdentifier, - displayName, - namePattern, - visibility, - email, - groupIdentifiers, - privileges, - accountType, - accountStatus, - notifyOnShare, - showOnboardingExperience, - onboardingExperienceCompleted, - orgIdentifiers, - homeLiveboardIdentifier, - favoriteMetadata, - recordOffset, - recordSize, - sortOptions, - roleIdentifiers, - includeFavoriteMetadata); + AccountStatusEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchUsersRequest {\n"); - sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); - sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); - sb.append(" showOnboardingExperience: ") - .append(toIndentedString(showOnboardingExperience)) - .append("\n"); - sb.append(" onboardingExperienceCompleted: ") - .append(toIndentedString(onboardingExperienceCompleted)) - .append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" homeLiveboardIdentifier: ") - .append(toIndentedString(homeLiveboardIdentifier)) - .append("\n"); - sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); - sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); - sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); - sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); - sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); - sb.append(" includeFavoriteMetadata: ") - .append(toIndentedString(includeFavoriteMetadata)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_identifier"); - openapiFields.add("display_name"); - openapiFields.add("name_pattern"); - openapiFields.add("visibility"); - openapiFields.add("email"); - openapiFields.add("group_identifiers"); - openapiFields.add("privileges"); - openapiFields.add("account_type"); - openapiFields.add("account_status"); - openapiFields.add("notify_on_share"); - openapiFields.add("show_onboarding_experience"); - openapiFields.add("onboarding_experience_completed"); - openapiFields.add("org_identifiers"); - openapiFields.add("home_liveboard_identifier"); - openapiFields.add("favorite_metadata"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("sort_options"); - openapiFields.add("role_identifiers"); - openapiFields.add("include_favorite_metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchUsersRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchUsersRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchUsersRequest is not found in" - + " the empty JSON string", - SearchUsersRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = "show_onboarding_experience"; + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = "onboarding_experience_completed"; + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = "home_liveboard_identifier"; + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptions sortOptions; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public static final String SERIALIZED_NAME_INCLUDE_FAVORITE_METADATA = "include_favorite_metadata"; + @SerializedName(SERIALIZED_NAME_INCLUDE_FAVORITE_METADATA) + @javax.annotation.Nullable + private Boolean includeFavoriteMetadata = false; + + public SearchUsersRequest() { + } + + public SearchUsersRequest userIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID / name of the user to search + * @return userIdentifier + */ + @javax.annotation.Nullable + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + + public SearchUsersRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A unique display name string for the user account, usually their first and last name + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public SearchUsersRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the User object. + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + public SearchUsersRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the user + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public SearchUsersRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the user account + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public SearchUsersRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public SearchUsersRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * GUID or name of the group to which the user belongs + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public SearchUsersRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public SearchUsersRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges assigned to the user + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public SearchUsersRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the account + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public SearchUsersRequest accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Current status of the user account. + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + + public SearchUsersRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + + public SearchUsersRequest showOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * The user preference for revisiting the onboarding experience + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + + public SearchUsersRequest onboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * Indicates if the user has completed the onboarding walkthrough + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + + public SearchUsersRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchUsersRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * IDs or names of the Orgs to which the user belongs + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public SearchUsersRequest homeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * Unique ID or name of the user's home Liveboard. + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + + public SearchUsersRequest favoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public SearchUsersRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects which are assigned as favorites of the user. + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + + public SearchUsersRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchUsersRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchUsersRequest sortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + + public SearchUsersRequest roleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public SearchUsersRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Filters by the role assigned to the user. + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + + public SearchUsersRequest includeFavoriteMetadata(@javax.annotation.Nullable Boolean includeFavoriteMetadata) { + this.includeFavoriteMetadata = includeFavoriteMetadata; + return this; + } + + /** + * Indicates if the user's favorite objects should be displayed. + * @return includeFavoriteMetadata + */ + @javax.annotation.Nullable + public Boolean getIncludeFavoriteMetadata() { + return includeFavoriteMetadata; + } + + public void setIncludeFavoriteMetadata(@javax.annotation.Nullable Boolean includeFavoriteMetadata) { + this.includeFavoriteMetadata = includeFavoriteMetadata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchUsersRequest searchUsersRequest = (SearchUsersRequest) o; + return Objects.equals(this.userIdentifier, searchUsersRequest.userIdentifier) && + Objects.equals(this.displayName, searchUsersRequest.displayName) && + Objects.equals(this.namePattern, searchUsersRequest.namePattern) && + Objects.equals(this.visibility, searchUsersRequest.visibility) && + Objects.equals(this.email, searchUsersRequest.email) && + Objects.equals(this.groupIdentifiers, searchUsersRequest.groupIdentifiers) && + Objects.equals(this.privileges, searchUsersRequest.privileges) && + Objects.equals(this.accountType, searchUsersRequest.accountType) && + Objects.equals(this.accountStatus, searchUsersRequest.accountStatus) && + Objects.equals(this.notifyOnShare, searchUsersRequest.notifyOnShare) && + Objects.equals(this.showOnboardingExperience, searchUsersRequest.showOnboardingExperience) && + Objects.equals(this.onboardingExperienceCompleted, searchUsersRequest.onboardingExperienceCompleted) && + Objects.equals(this.orgIdentifiers, searchUsersRequest.orgIdentifiers) && + Objects.equals(this.homeLiveboardIdentifier, searchUsersRequest.homeLiveboardIdentifier) && + Objects.equals(this.favoriteMetadata, searchUsersRequest.favoriteMetadata) && + Objects.equals(this.recordOffset, searchUsersRequest.recordOffset) && + Objects.equals(this.recordSize, searchUsersRequest.recordSize) && + Objects.equals(this.sortOptions, searchUsersRequest.sortOptions) && + Objects.equals(this.roleIdentifiers, searchUsersRequest.roleIdentifiers) && + Objects.equals(this.includeFavoriteMetadata, searchUsersRequest.includeFavoriteMetadata); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, displayName, namePattern, visibility, email, groupIdentifiers, privileges, accountType, accountStatus, notifyOnShare, showOnboardingExperience, onboardingExperienceCompleted, orgIdentifiers, homeLiveboardIdentifier, favoriteMetadata, recordOffset, recordSize, sortOptions, roleIdentifiers, includeFavoriteMetadata); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchUsersRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ").append(toIndentedString(showOnboardingExperience)).append("\n"); + sb.append(" onboardingExperienceCompleted: ").append(toIndentedString(onboardingExperienceCompleted)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" homeLiveboardIdentifier: ").append(toIndentedString(homeLiveboardIdentifier)).append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" includeFavoriteMetadata: ").append(toIndentedString(includeFavoriteMetadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("display_name"); + openapiFields.add("name_pattern"); + openapiFields.add("visibility"); + openapiFields.add("email"); + openapiFields.add("group_identifiers"); + openapiFields.add("privileges"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("org_identifiers"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("role_identifiers"); + openapiFields.add("include_favorite_metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchUsersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchUsersRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchUsersRequest is not found in the empty JSON string", SearchUsersRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchUsersRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchUsersRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchUsersRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchUsersRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("user_identifier") != null && !jsonObj.get("user_identifier").isJsonNull()) - && !jsonObj.get("user_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("user_identifier").toString())); - } - if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); + if ((jsonObj.get("user_identifier") != null && !jsonObj.get("user_identifier").isJsonNull()) && !jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_identifier").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + if ((jsonObj.get("home_liveboard_identifier") != null && !jsonObj.get("home_liveboard_identifier").isJsonNull()) && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `home_liveboard_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `favorite_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + }; } - if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) - && !jsonObj.get("account_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_type").toString())); - } - // validate the optional field `account_type` - if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { - AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); - } - if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) - && !jsonObj.get("account_status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_status` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("account_status").toString())); - } - // validate the optional field `account_status` - if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { - AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - if ((jsonObj.get("home_liveboard_identifier") != null - && !jsonObj.get("home_liveboard_identifier").isJsonNull()) - && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `home_liveboard_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("home_liveboard_identifier").toString())); - } - if (jsonObj.get("favorite_metadata") != null - && !jsonObj.get("favorite_metadata").isJsonNull()) { - JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); - if (jsonArrayfavoriteMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("favorite_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `favorite_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("favorite_metadata").toString())); - } - - // validate the optional field `favorite_metadata` (array) - for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { - FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); - } - ; - } - } - // validate the optional field `sort_options` - if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { - SortOptions.validateJsonElement(jsonObj.get("sort_options")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("role_identifiers") != null - && !jsonObj.get("role_identifiers").isJsonNull() - && !jsonObj.get("role_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `role_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("role_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchUsersRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchUsersRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchUsersRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchUsersRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchUsersRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SearchUsersRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchUsersRequest - * @throws IOException if the JSON string is invalid with respect to SearchUsersRequest - */ - public static SearchUsersRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchUsersRequest.class); - } - - /** - * Convert an instance of SearchUsersRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null && !jsonObj.get("role_identifiers").isJsonNull() && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `role_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("role_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchUsersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchUsersRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchUsersRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchUsersRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchUsersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchUsersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchUsersRequest + * @throws IOException if the JSON string is invalid with respect to SearchUsersRequest + */ + public static SearchUsersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchUsersRequest.class); + } + + /** + * Convert an instance of SearchUsersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java index 3842e771f..c4c33de72 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 @@ -4,369 +4,409 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ValueScopeInput; +import com.thoughtspot.client.model.VariableDetailInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SearchVariablesRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SearchVariablesRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VARIABLE_DETAILS = "variable_details"; - - @SerializedName(SERIALIZED_NAME_VARIABLE_DETAILS) - @javax.annotation.Nullable - private List variableDetails; - - public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; - - @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) - @javax.annotation.Nullable - private Integer recordOffset = 0; - - public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; - - @SerializedName(SERIALIZED_NAME_RECORD_SIZE) - @javax.annotation.Nullable - private Integer recordSize = 10; - - /** Format in which we want the output */ - @JsonAdapter(OutputFormatEnum.Adapter.class) - public enum OutputFormatEnum { - METADATA_ONLY("METADATA_ONLY"), - - METADATA_AND_VALUES("METADATA_AND_VALUES"), - - EDITABLE_METADATA_AND_VALUES("EDITABLE_METADATA_AND_VALUES"); - - private String value; - - OutputFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OutputFormatEnum fromValue(String value) { - for (OutputFormatEnum b : OutputFormatEnum.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 OutputFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OutputFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OutputFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OutputFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_OUTPUT_FORMAT = "output_format"; - - @SerializedName(SERIALIZED_NAME_OUTPUT_FORMAT) - @javax.annotation.Nullable - private OutputFormatEnum outputFormat = OutputFormatEnum.METADATA_ONLY; - - public SearchVariablesRequest() {} +import com.thoughtspot.client.JSON; - public SearchVariablesRequest variableDetails( - @javax.annotation.Nullable List variableDetails) { - this.variableDetails = variableDetails; - return this; +/** + * SearchVariablesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SearchVariablesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VARIABLE_DETAILS = "variable_details"; + @SerializedName(SERIALIZED_NAME_VARIABLE_DETAILS) + @javax.annotation.Nullable + private List variableDetails; + + public static final String SERIALIZED_NAME_VALUE_SCOPE = "value_scope"; + @SerializedName(SERIALIZED_NAME_VALUE_SCOPE) + @javax.annotation.Nullable + private List valueScope; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + /** + * Format in which we want the output + */ + @JsonAdapter(OutputFormatEnum.Adapter.class) + public enum OutputFormatEnum { + METADATA_ONLY("METADATA_ONLY"), + + METADATA_AND_VALUES("METADATA_AND_VALUES"); + + private String value; + + OutputFormatEnum(String value) { + this.value = value; } - public SearchVariablesRequest addVariableDetailsItem(VariableDetailInput variableDetailsItem) { - if (this.variableDetails == null) { - this.variableDetails = new ArrayList<>(); - } - this.variableDetails.add(variableDetailsItem); - return this; + public String getValue() { + return value; } - /** - * Variable details - * - * @return variableDetails - */ - @javax.annotation.Nullable - public List getVariableDetails() { - return variableDetails; + @Override + public String toString() { + return String.valueOf(value); } - public void setVariableDetails( - @javax.annotation.Nullable List variableDetails) { - this.variableDetails = variableDetails; + public static OutputFormatEnum fromValue(String value) { + for (OutputFormatEnum b : OutputFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public SearchVariablesRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - return this; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OutputFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OutputFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OutputFormatEnum.fromValue(value); + } } - /** - * The starting record number from where the records should be included - * - * @return recordOffset - */ - @javax.annotation.Nullable - public Integer getRecordOffset() { - return recordOffset; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OutputFormatEnum.fromValue(value); } + } - public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { - this.recordOffset = recordOffset; - } + public static final String SERIALIZED_NAME_OUTPUT_FORMAT = "output_format"; + @SerializedName(SERIALIZED_NAME_OUTPUT_FORMAT) + @javax.annotation.Nullable + private OutputFormatEnum outputFormat = OutputFormatEnum.METADATA_ONLY; - public SearchVariablesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; - return this; - } + public SearchVariablesRequest() { + } - /** - * The number of records that should be included - * - * @return recordSize - */ - @javax.annotation.Nullable - public Integer getRecordSize() { - return recordSize; - } + public SearchVariablesRequest variableDetails(@javax.annotation.Nullable List variableDetails) { + this.variableDetails = variableDetails; + return this; + } - public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { - this.recordSize = recordSize; + public SearchVariablesRequest addVariableDetailsItem(VariableDetailInput variableDetailsItem) { + if (this.variableDetails == null) { + this.variableDetails = new ArrayList<>(); } - - public SearchVariablesRequest outputFormat( - @javax.annotation.Nullable OutputFormatEnum outputFormat) { - this.outputFormat = outputFormat; - return this; + this.variableDetails.add(variableDetailsItem); + return this; + } + + /** + * Variable details + * @return variableDetails + */ + @javax.annotation.Nullable + public List getVariableDetails() { + return variableDetails; + } + + public void setVariableDetails(@javax.annotation.Nullable List variableDetails) { + this.variableDetails = variableDetails; + } + + + public SearchVariablesRequest valueScope(@javax.annotation.Nullable List valueScope) { + this.valueScope = valueScope; + return this; + } + + public SearchVariablesRequest addValueScopeItem(ValueScopeInput valueScopeItem) { + if (this.valueScope == null) { + this.valueScope = new ArrayList<>(); } - - /** - * Format in which we want the output - * - * @return outputFormat - */ - @javax.annotation.Nullable - public OutputFormatEnum getOutputFormat() { - return outputFormat; + this.valueScope.add(valueScopeItem); + return this; + } + + /** + * Array of scope filters + * @return valueScope + */ + @javax.annotation.Nullable + public List getValueScope() { + return valueScope; + } + + public void setValueScope(@javax.annotation.Nullable List valueScope) { + this.valueScope = valueScope; + } + + + public SearchVariablesRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + + public SearchVariablesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + + public SearchVariablesRequest outputFormat(@javax.annotation.Nullable OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Format in which we want the output + * @return outputFormat + */ + @javax.annotation.Nullable + public OutputFormatEnum getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(@javax.annotation.Nullable OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public void setOutputFormat(@javax.annotation.Nullable OutputFormatEnum outputFormat) { - this.outputFormat = outputFormat; + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchVariablesRequest searchVariablesRequest = (SearchVariablesRequest) o; - return Objects.equals(this.variableDetails, searchVariablesRequest.variableDetails) - && Objects.equals(this.recordOffset, searchVariablesRequest.recordOffset) - && Objects.equals(this.recordSize, searchVariablesRequest.recordSize) - && Objects.equals(this.outputFormat, searchVariablesRequest.outputFormat); + 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); + } + + @Override + public int hashCode() { + return Objects.hash(variableDetails, valueScope, recordOffset, recordSize, outputFormat); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchVariablesRequest {\n"); + sb.append(" variableDetails: ").append(toIndentedString(variableDetails)).append("\n"); + sb.append(" valueScope: ").append(toIndentedString(valueScope)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public int hashCode() { - return Objects.hash(variableDetails, recordOffset, recordSize, outputFormat); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchVariablesRequest {\n"); - sb.append(" variableDetails: ").append(toIndentedString(variableDetails)).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"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("variable_details"); - openapiFields.add("record_offset"); - openapiFields.add("record_size"); - openapiFields.add("output_format"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SearchVariablesRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SearchVariablesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SearchVariablesRequest is not found" - + " in the empty JSON string", - SearchVariablesRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("variable_details"); + openapiFields.add("value_scope"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("output_format"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchVariablesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchVariablesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchVariablesRequest is not found in the empty JSON string", SearchVariablesRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SearchVariablesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SearchVariablesRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchVariablesRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchVariablesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("variable_details") != null - && !jsonObj.get("variable_details").isJsonNull()) { - JsonArray jsonArrayvariableDetails = jsonObj.getAsJsonArray("variable_details"); - if (jsonArrayvariableDetails != null) { - // ensure the json data is an array - if (!jsonObj.get("variable_details").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `variable_details` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("variable_details").toString())); - } - - // validate the optional field `variable_details` (array) - for (int i = 0; i < jsonArrayvariableDetails.size(); i++) { - VariableDetailInput.validateJsonElement(jsonArrayvariableDetails.get(i)); - } - ; - } - } - if ((jsonObj.get("output_format") != null && !jsonObj.get("output_format").isJsonNull()) - && !jsonObj.get("output_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `output_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("output_format").toString())); - } - // validate the optional field `output_format` - if (jsonObj.get("output_format") != null && !jsonObj.get("output_format").isJsonNull()) { - OutputFormatEnum.validateJsonElement(jsonObj.get("output_format")); + if (jsonObj.get("variable_details") != null && !jsonObj.get("variable_details").isJsonNull()) { + JsonArray jsonArrayvariableDetails = jsonObj.getAsJsonArray("variable_details"); + if (jsonArrayvariableDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("variable_details").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `variable_details` to be an array in the JSON string but got `%s`", jsonObj.get("variable_details").toString())); + } + + // validate the optional field `variable_details` (array) + for (int i = 0; i < jsonArrayvariableDetails.size(); i++) { + VariableDetailInput.validateJsonElement(jsonArrayvariableDetails.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SearchVariablesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SearchVariablesRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SearchVariablesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SearchVariablesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SearchVariablesRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + } + 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(String.format("Expected the field `output_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_format").toString())); + } + // validate the optional field `output_format` + if (jsonObj.get("output_format") != null && !jsonObj.get("output_format").isJsonNull()) { + OutputFormatEnum.validateJsonElement(jsonObj.get("output_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchVariablesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchVariablesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchVariablesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchVariablesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchVariablesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - - /** - * Create an instance of SearchVariablesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchVariablesRequest - * @throws IOException if the JSON string is invalid with respect to SearchVariablesRequest - */ - public static SearchVariablesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SearchVariablesRequest.class); - } - - /** - * Convert an instance of SearchVariablesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + + /** + * Create an instance of SearchVariablesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchVariablesRequest + * @throws IOException if the JSON string is invalid with respect to SearchVariablesRequest + */ + public static SearchVariablesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchVariablesRequest.class); + } + + /** + * Convert an instance of SearchVariablesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java new file mode 100644 index 000000000..501b6f008 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java @@ -0,0 +1,400 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookSortOptionsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..6d1e8f53a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java @@ -0,0 +1,221 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/SendAgentMessageResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java index b8abd8f60..c9110bfb3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java @@ -4,251 +4,244 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** SendAgentMessageResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SendAgentMessageResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SUCCESS = "success"; - - @SerializedName(SERIALIZED_NAME_SUCCESS) - @javax.annotation.Nonnull - private Boolean success; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public SendAgentMessageResponse() {} - - public SendAgentMessageResponse success(@javax.annotation.Nonnull Boolean success) { - this.success = success; - return this; - } - - /** - * Get success - * - * @return success - */ - @javax.annotation.Nonnull - public Boolean getSuccess() { - return success; - } - - public void setSuccess(@javax.annotation.Nonnull Boolean success) { - this.success = success; - } - - public SendAgentMessageResponse message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendAgentMessageResponse sendAgentMessageResponse = (SendAgentMessageResponse) o; - return Objects.equals(this.success, sendAgentMessageResponse.success) - && Objects.equals(this.message, sendAgentMessageResponse.message); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(success, message); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendAgentMessageResponse {\n"); - sb.append(" success: ").append(toIndentedString(success)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("success"); - openapiFields.add("message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("success"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendAgentMessageResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendAgentMessageResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SendAgentMessageResponse is not found" - + " in the empty JSON string", - SendAgentMessageResponse.openapiRequiredFields.toString())); - } +/** + * SendAgentMessageResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SendAgentMessageResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SUCCESS = "success"; + @SerializedName(SERIALIZED_NAME_SUCCESS) + @javax.annotation.Nonnull + private Boolean success; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public SendAgentMessageResponse() { + } + + public SendAgentMessageResponse success(@javax.annotation.Nonnull Boolean success) { + this.success = success; + return this; + } + + /** + * Get success + * @return success + */ + @javax.annotation.Nonnull + public Boolean getSuccess() { + return success; + } + + public void setSuccess(@javax.annotation.Nonnull Boolean success) { + this.success = success; + } + + + public SendAgentMessageResponse message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentMessageResponse sendAgentMessageResponse = (SendAgentMessageResponse) o; + return Objects.equals(this.success, sendAgentMessageResponse.success) && + Objects.equals(this.message, sendAgentMessageResponse.message); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(success, message); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentMessageResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("success"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("success"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SendAgentMessageResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SendAgentMessageResponse is not found in the empty JSON string", SendAgentMessageResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendAgentMessageResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SendAgentMessageResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SendAgentMessageResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendAgentMessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendAgentMessageResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendAgentMessageResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) - && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `message` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("message").toString())); - } - } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendAgentMessageResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendAgentMessageResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SendAgentMessageResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SendAgentMessageResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendAgentMessageResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SendAgentMessageResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendAgentMessageResponse - * @throws IOException if the JSON string is invalid with respect to SendAgentMessageResponse - */ - public static SendAgentMessageResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendAgentMessageResponse.class); - } - - /** - * Convert an instance of SendAgentMessageResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentMessageResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendAgentMessageResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SendAgentMessageResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SendAgentMessageResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SendAgentMessageResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentMessageResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentMessageResponse + * @throws IOException if the JSON string is invalid with respect to SendAgentMessageResponse + */ + public static SendAgentMessageResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendAgentMessageResponse.class); + } + + /** + * Convert an instance of SendAgentMessageResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java index 098d1e5d9..8a52f338a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java @@ -4,266 +4,249 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SendAgentMessageStreamingRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SendAgentMessageStreamingRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; - - @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) - @javax.annotation.Nonnull - private String conversationIdentifier; - - public static final String SERIALIZED_NAME_MESSAGES = "messages"; - - @SerializedName(SERIALIZED_NAME_MESSAGES) - @javax.annotation.Nonnull - private List messages; - - public SendAgentMessageStreamingRequest() {} - - public SendAgentMessageStreamingRequest conversationIdentifier( - @javax.annotation.Nonnull String conversationIdentifier) { - this.conversationIdentifier = conversationIdentifier; - return this; - } - - /** - * Unique identifier for the conversation (used to track context) - * - * @return conversationIdentifier - */ - @javax.annotation.Nonnull - public String getConversationIdentifier() { - return conversationIdentifier; - } - - public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { - this.conversationIdentifier = conversationIdentifier; - } - - public SendAgentMessageStreamingRequest messages( - @javax.annotation.Nonnull List messages) { - this.messages = messages; - return this; - } - - public SendAgentMessageStreamingRequest addMessagesItem(String messagesItem) { - if (this.messages == null) { - this.messages = new ArrayList<>(); - } - this.messages.add(messagesItem); - return this; - } - - /** - * messages to be sent to the agent - * - * @return messages - */ - @javax.annotation.Nonnull - public List getMessages() { - return messages; - } - - public void setMessages(@javax.annotation.Nonnull List messages) { - this.messages = messages; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = - (SendAgentMessageStreamingRequest) o; - return Objects.equals( - this.conversationIdentifier, - sendAgentMessageStreamingRequest.conversationIdentifier) - && Objects.equals(this.messages, sendAgentMessageStreamingRequest.messages); - } - - @Override - public int hashCode() { - return Objects.hash(conversationIdentifier, messages); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendAgentMessageStreamingRequest {\n"); - sb.append(" conversationIdentifier: ") - .append(toIndentedString(conversationIdentifier)) - .append("\n"); - sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("conversation_identifier"); - openapiFields.add("messages"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("conversation_identifier"); - openapiRequiredFields.add("messages"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * SendAgentMessageStreamingRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendAgentMessageStreamingRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SendAgentMessageStreamingRequest is" - + " not found in the empty JSON string", - SendAgentMessageStreamingRequest.openapiRequiredFields.toString())); - } +/** + * SendAgentMessageStreamingRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SendAgentMessageStreamingRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nonnull + private String conversationIdentifier; + + public static final String SERIALIZED_NAME_MESSAGES = "messages"; + @SerializedName(SERIALIZED_NAME_MESSAGES) + @javax.annotation.Nonnull + private List messages; + + public SendAgentMessageStreamingRequest() { + } + + public SendAgentMessageStreamingRequest conversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } + + /** + * Unique identifier for the conversation (used to track context) + * @return conversationIdentifier + */ + @javax.annotation.Nonnull + public String getConversationIdentifier() { + return conversationIdentifier; + } + + public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } + + + public SendAgentMessageStreamingRequest messages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + return this; + } + + public SendAgentMessageStreamingRequest addMessagesItem(String messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * messages to be sent to the agent + * @return messages + */ + @javax.annotation.Nonnull + public List getMessages() { + return messages; + } + + public void setMessages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = (SendAgentMessageStreamingRequest) o; + return Objects.equals(this.conversationIdentifier, sendAgentMessageStreamingRequest.conversationIdentifier) && + Objects.equals(this.messages, sendAgentMessageStreamingRequest.messages); + } + + @Override + public int hashCode() { + return Objects.hash(conversationIdentifier, messages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentMessageStreamingRequest {\n"); + sb.append(" conversationIdentifier: ").append(toIndentedString(conversationIdentifier)).append("\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conversation_identifier"); + openapiFields.add("messages"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("conversation_identifier"); + openapiRequiredFields.add("messages"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SendAgentMessageStreamingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentMessageStreamingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SendAgentMessageStreamingRequest is not found in the empty JSON string", SendAgentMessageStreamingRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendAgentMessageStreamingRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SendAgentMessageStreamingRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SendAgentMessageStreamingRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendAgentMessageStreamingRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendAgentMessageStreamingRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendAgentMessageStreamingRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `conversation_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("conversation_identifier").toString())); - } - // ensure the required json array is present - if (jsonObj.get("messages") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("messages").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `messages` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("messages").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendAgentMessageStreamingRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendAgentMessageStreamingRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(SendAgentMessageStreamingRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SendAgentMessageStreamingRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendAgentMessageStreamingRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SendAgentMessageStreamingRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendAgentMessageStreamingRequest - * @throws IOException if the JSON string is invalid with respect to - * SendAgentMessageStreamingRequest - */ - public static SendAgentMessageStreamingRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendAgentMessageStreamingRequest.class); - } - - /** - * Convert an instance of SendAgentMessageStreamingRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conversation_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conversation_identifier").toString())); + } + // ensure the required json array is present + if (jsonObj.get("messages") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("messages").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentMessageStreamingRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendAgentMessageStreamingRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SendAgentMessageStreamingRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SendAgentMessageStreamingRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SendAgentMessageStreamingRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentMessageStreamingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentMessageStreamingRequest + * @throws IOException if the JSON string is invalid with respect to SendAgentMessageStreamingRequest + */ + public static SendAgentMessageStreamingRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendAgentMessageStreamingRequest.class); + } + + /** + * Convert an instance of SendAgentMessageStreamingRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java index 46e25e90e..9a0987a67 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java @@ -4,243 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SendMessageRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SendMessageRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nonnull - private String message; - - public SendMessageRequest() {} - - public SendMessageRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the - * conversation. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public SendMessageRequest message(@javax.annotation.Nonnull String message) { - this.message = message; - return this; - } - - /** - * A message string with the follow-up question to continue the conversation. - * - * @return message - */ - @javax.annotation.Nonnull - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nonnull String message) { - this.message = message; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SendMessageRequest sendMessageRequest = (SendMessageRequest) o; - return Objects.equals(this.metadataIdentifier, sendMessageRequest.metadataIdentifier) - && Objects.equals(this.message, sendMessageRequest.message); +/** + * SendMessageRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SendMessageRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull + private String message; + + public SendMessageRequest() { + } + + public SendMessageRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public SendMessageRequest message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * A message string with the follow-up question to continue the conversation. + * @return message + */ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(metadataIdentifier, message); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SendMessageRequest {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); + SendMessageRequest sendMessageRequest = (SendMessageRequest) o; + return Objects.equals(this.metadataIdentifier, sendMessageRequest.metadataIdentifier) && + Objects.equals(this.message, sendMessageRequest.message); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendMessageRequest {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SendMessageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SendMessageRequest is not found in the empty JSON string", SendMessageRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("message"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); - openapiRequiredFields.add("message"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SendMessageRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SendMessageRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SendMessageRequest is not found in" - + " the empty JSON string", - SendMessageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SendMessageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SendMessageRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SendMessageRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendMessageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SendMessageRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendMessageRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `message` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SendMessageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SendMessageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SendMessageRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SendMessageRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SendMessageRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SendMessageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SendMessageRequest - * @throws IOException if the JSON string is invalid with respect to SendMessageRequest - */ - public static SendMessageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SendMessageRequest.class); - } - - /** - * Convert an instance of SendMessageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendMessageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendMessageRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SendMessageRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SendMessageRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SendMessageRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SendMessageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendMessageRequest + * @throws IOException if the JSON string is invalid with respect to SendMessageRequest + */ + public static SendMessageRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendMessageRequest.class); + } + + /** + * Convert an instance of SendMessageRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java index 28c2ae289..583e32d10 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java @@ -4,693 +4,606 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ShareMetadataTypeInput; +import com.thoughtspot.client.model.SharePermissionsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ShareMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ShareMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. - * Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. - * LOGICAL_COLUMN 5. Connection - */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nullable - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIERS = "metadata_identifiers"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIERS) - @javax.annotation.Nullable - private List metadataIdentifiers; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private List metadata; - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - @javax.annotation.Nonnull - private List permissions; - - public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = - "visualization_identifiers"; - - @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) - @javax.annotation.Nullable - private List visualizationIdentifiers; - - public static final String SERIALIZED_NAME_EMAILS = "emails"; - - @SerializedName(SERIALIZED_NAME_EMAILS) - @javax.annotation.Nullable - private List emails = new ArrayList<>(); - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nonnull - private String message; - - public static final String SERIALIZED_NAME_ENABLE_CUSTOM_URL = "enable_custom_url"; - - @SerializedName(SERIALIZED_NAME_ENABLE_CUSTOM_URL) - @javax.annotation.Nullable - private Boolean enableCustomUrl = false; - - public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; - - @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) - @javax.annotation.Nullable - private Boolean notifyOnShare = true; - - public static final String SERIALIZED_NAME_HAS_LENIENT_DISCOVERABILITY = - "has_lenient_discoverability"; - - @SerializedName(SERIALIZED_NAME_HAS_LENIENT_DISCOVERABILITY) - @javax.annotation.Nullable - private Boolean hasLenientDiscoverability = false; - - public ShareMetadataRequest() {} - - public ShareMetadataRequest metadataType( - @javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. - * Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. - * LOGICAL_COLUMN 5. Connection - * - * @return metadataType - */ - @javax.annotation.Nullable - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public ShareMetadataRequest metadataIdentifiers( - @javax.annotation.Nullable List metadataIdentifiers) { - this.metadataIdentifiers = metadataIdentifiers; - return this; - } - - public ShareMetadataRequest addMetadataIdentifiersItem(String metadataIdentifiersItem) { - if (this.metadataIdentifiers == null) { - this.metadataIdentifiers = new ArrayList<>(); - } - this.metadataIdentifiers.add(metadataIdentifiersItem); - return this; - } - - /** - * Unique ID or name of metadata objects. Note: All the names should belong to same - * metadata_type - * - * @return metadataIdentifiers - */ - @javax.annotation.Nullable - public List getMetadataIdentifiers() { - return metadataIdentifiers; - } - - public void setMetadataIdentifiers( - @javax.annotation.Nullable List metadataIdentifiers) { - this.metadataIdentifiers = metadataIdentifiers; - } - - public ShareMetadataRequest metadata( - @javax.annotation.Nullable List metadata) { - this.metadata = metadata; - return this; - } - - public ShareMetadataRequest addMetadataItem(ShareMetadataTypeInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * Metadata details for sharing objects. - * - * @return metadata - */ - @javax.annotation.Nullable - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nullable List metadata) { - this.metadata = metadata; - } - - public ShareMetadataRequest permissions( - @javax.annotation.Nonnull List permissions) { - this.permissions = permissions; - return this; - } - - public ShareMetadataRequest addPermissionsItem(SharePermissionsInput permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } - - /** - * Permission details for sharing the objects. - * - * @return permissions - */ - @javax.annotation.Nonnull - public List getPermissions() { - return permissions; - } - - public void setPermissions(@javax.annotation.Nonnull List permissions) { - this.permissions = permissions; - } - - public ShareMetadataRequest visualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - return this; - } - - public ShareMetadataRequest addVisualizationIdentifiersItem( - String visualizationIdentifiersItem) { - if (this.visualizationIdentifiers == null) { - this.visualizationIdentifiers = new ArrayList<>(); - } - this.visualizationIdentifiers.add(visualizationIdentifiersItem); - return this; - } - - /** - * Options to specify details of Liveboard. First Liveboard encountered in payload is considered - * to be the corresponding Liveboard. - * - * @return visualizationIdentifiers - */ - @javax.annotation.Nullable - public List getVisualizationIdentifiers() { - return visualizationIdentifiers; - } - - public void setVisualizationIdentifiers( - @javax.annotation.Nullable List visualizationIdentifiers) { - this.visualizationIdentifiers = visualizationIdentifiers; - } - - public ShareMetadataRequest emails(@javax.annotation.Nullable List emails) { - this.emails = emails; - return this; - } - - public ShareMetadataRequest addEmailsItem(String emailsItem) { - if (this.emails == null) { - this.emails = new ArrayList<>(); - } - this.emails.add(emailsItem); - return this; - } - - /** - * Email IDs to which notifications will be sent. - * - * @return emails - */ - @javax.annotation.Nullable - public List getEmails() { - return emails; - } - - public void setEmails(@javax.annotation.Nullable List emails) { - this.emails = emails; - } - - public ShareMetadataRequest message(@javax.annotation.Nonnull String message) { - this.message = message; - return this; - } - - /** - * Message to be included in notification. - * - * @return message - */ - @javax.annotation.Nonnull - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nonnull String message) { - this.message = message; - } - - public ShareMetadataRequest enableCustomUrl( - @javax.annotation.Nullable Boolean enableCustomUrl) { - this.enableCustomUrl = enableCustomUrl; - return this; - } - - /** - * Sends object URLs in the customized format in email notifications. - * - * @return enableCustomUrl - */ - @javax.annotation.Nullable - public Boolean getEnableCustomUrl() { - return enableCustomUrl; - } - - public void setEnableCustomUrl(@javax.annotation.Nullable Boolean enableCustomUrl) { - this.enableCustomUrl = enableCustomUrl; - } - - public ShareMetadataRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * Flag to notify user when any object is shared. - * - * @return notifyOnShare - */ - @javax.annotation.Nullable - public Boolean getNotifyOnShare() { - return notifyOnShare; - } - - public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } - - public ShareMetadataRequest hasLenientDiscoverability( - @javax.annotation.Nullable Boolean hasLenientDiscoverability) { - this.hasLenientDiscoverability = hasLenientDiscoverability; - return this; - } - - /** - * Flag to make the object discoverable. - * - * @return hasLenientDiscoverability - */ - @javax.annotation.Nullable - public Boolean getHasLenientDiscoverability() { - return hasLenientDiscoverability; - } +import com.thoughtspot.client.JSON; - public void setHasLenientDiscoverability( - @javax.annotation.Nullable Boolean hasLenientDiscoverability) { - this.hasLenientDiscoverability = hasLenientDiscoverability; - } +/** + * ShareMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ShareMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ShareMetadataRequest shareMetadataRequest = (ShareMetadataRequest) o; - return Objects.equals(this.metadataType, shareMetadataRequest.metadataType) - && Objects.equals( - this.metadataIdentifiers, shareMetadataRequest.metadataIdentifiers) - && Objects.equals(this.metadata, shareMetadataRequest.metadata) - && Objects.equals(this.permissions, shareMetadataRequest.permissions) - && Objects.equals( - this.visualizationIdentifiers, - shareMetadataRequest.visualizationIdentifiers) - && Objects.equals(this.emails, shareMetadataRequest.emails) - && Objects.equals(this.message, shareMetadataRequest.message) - && Objects.equals(this.enableCustomUrl, shareMetadataRequest.enableCustomUrl) - && Objects.equals(this.notifyOnShare, shareMetadataRequest.notifyOnShare) - && Objects.equals( - this.hasLenientDiscoverability, - shareMetadataRequest.hasLenientDiscoverability); - } + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - metadataType, - metadataIdentifiers, - metadata, - permissions, - visualizationIdentifiers, - emails, - message, - enableCustomUrl, - notifyOnShare, - hasLenientDiscoverability); + MetadataTypeEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ShareMetadataRequest {\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" metadataIdentifiers: ") - .append(toIndentedString(metadataIdentifiers)) - .append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" visualizationIdentifiers: ") - .append(toIndentedString(visualizationIdentifiers)) - .append("\n"); - sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" enableCustomUrl: ").append(toIndentedString(enableCustomUrl)).append("\n"); - sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); - sb.append(" hasLenientDiscoverability: ") - .append(toIndentedString(hasLenientDiscoverability)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_type"); - openapiFields.add("metadata_identifiers"); - openapiFields.add("metadata"); - openapiFields.add("permissions"); - openapiFields.add("visualization_identifiers"); - openapiFields.add("emails"); - openapiFields.add("message"); - openapiFields.add("enable_custom_url"); - openapiFields.add("notify_on_share"); - openapiFields.add("has_lenient_discoverability"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("permissions"); - openapiRequiredFields.add("message"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ShareMetadataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ShareMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ShareMetadataRequest is not found in" - + " the empty JSON string", - ShareMetadataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIERS = "metadata_identifiers"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIERS) + @javax.annotation.Nullable + private List metadataIdentifiers; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @javax.annotation.Nonnull + private List permissions; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = "visualization_identifiers"; + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; + + public static final String SERIALIZED_NAME_EMAILS = "emails"; + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails = new ArrayList<>(); + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull + private String message; + + public static final String SERIALIZED_NAME_ENABLE_CUSTOM_URL = "enable_custom_url"; + @SerializedName(SERIALIZED_NAME_ENABLE_CUSTOM_URL) + @javax.annotation.Nullable + private Boolean enableCustomUrl = false; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare = true; + + public static final String SERIALIZED_NAME_HAS_LENIENT_DISCOVERABILITY = "has_lenient_discoverability"; + @SerializedName(SERIALIZED_NAME_HAS_LENIENT_DISCOVERABILITY) + @javax.annotation.Nullable + private Boolean hasLenientDiscoverability = false; + + public ShareMetadataRequest() { + } + + public ShareMetadataRequest metadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public ShareMetadataRequest metadataIdentifiers(@javax.annotation.Nullable List metadataIdentifiers) { + this.metadataIdentifiers = metadataIdentifiers; + return this; + } + + public ShareMetadataRequest addMetadataIdentifiersItem(String metadataIdentifiersItem) { + if (this.metadataIdentifiers == null) { + this.metadataIdentifiers = new ArrayList<>(); + } + this.metadataIdentifiers.add(metadataIdentifiersItem); + return this; + } + + /** + * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type + * @return metadataIdentifiers + */ + @javax.annotation.Nullable + public List getMetadataIdentifiers() { + return metadataIdentifiers; + } + + public void setMetadataIdentifiers(@javax.annotation.Nullable List metadataIdentifiers) { + this.metadataIdentifiers = metadataIdentifiers; + } + + + public ShareMetadataRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public ShareMetadataRequest addMetadataItem(ShareMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata details for sharing objects. + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + + public ShareMetadataRequest permissions(@javax.annotation.Nonnull List permissions) { + this.permissions = permissions; + return this; + } + + public ShareMetadataRequest addPermissionsItem(SharePermissionsInput permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Permission details for sharing the objects. + * @return permissions + */ + @javax.annotation.Nonnull + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nonnull List permissions) { + this.permissions = permissions; + } + + + public ShareMetadataRequest visualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public ShareMetadataRequest addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers(@javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + + public ShareMetadataRequest emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } + + public ShareMetadataRequest addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Email IDs to which notifications will be sent. + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + + public ShareMetadataRequest message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Message to be included in notification. + * @return message + */ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ShareMetadataRequest enableCustomUrl(@javax.annotation.Nullable Boolean enableCustomUrl) { + this.enableCustomUrl = enableCustomUrl; + return this; + } + + /** + * Sends object URLs in the customized format in email notifications. + * @return enableCustomUrl + */ + @javax.annotation.Nullable + public Boolean getEnableCustomUrl() { + return enableCustomUrl; + } + + public void setEnableCustomUrl(@javax.annotation.Nullable Boolean enableCustomUrl) { + this.enableCustomUrl = enableCustomUrl; + } + + + public ShareMetadataRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * Flag to notify user when any object is shared. + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + + public ShareMetadataRequest hasLenientDiscoverability(@javax.annotation.Nullable Boolean hasLenientDiscoverability) { + this.hasLenientDiscoverability = hasLenientDiscoverability; + return this; + } + + /** + * Flag to make the object discoverable. + * @return hasLenientDiscoverability + */ + @javax.annotation.Nullable + public Boolean getHasLenientDiscoverability() { + return hasLenientDiscoverability; + } + + public void setHasLenientDiscoverability(@javax.annotation.Nullable Boolean hasLenientDiscoverability) { + this.hasLenientDiscoverability = hasLenientDiscoverability; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShareMetadataRequest shareMetadataRequest = (ShareMetadataRequest) o; + return Objects.equals(this.metadataType, shareMetadataRequest.metadataType) && + Objects.equals(this.metadataIdentifiers, shareMetadataRequest.metadataIdentifiers) && + Objects.equals(this.metadata, shareMetadataRequest.metadata) && + Objects.equals(this.permissions, shareMetadataRequest.permissions) && + Objects.equals(this.visualizationIdentifiers, shareMetadataRequest.visualizationIdentifiers) && + Objects.equals(this.emails, shareMetadataRequest.emails) && + Objects.equals(this.message, shareMetadataRequest.message) && + Objects.equals(this.enableCustomUrl, shareMetadataRequest.enableCustomUrl) && + Objects.equals(this.notifyOnShare, shareMetadataRequest.notifyOnShare) && + Objects.equals(this.hasLenientDiscoverability, shareMetadataRequest.hasLenientDiscoverability); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataType, metadataIdentifiers, metadata, permissions, visualizationIdentifiers, emails, message, enableCustomUrl, notifyOnShare, hasLenientDiscoverability); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShareMetadataRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifiers: ").append(toIndentedString(metadataIdentifiers)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" visualizationIdentifiers: ").append(toIndentedString(visualizationIdentifiers)).append("\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" enableCustomUrl: ").append(toIndentedString(enableCustomUrl)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" hasLenientDiscoverability: ").append(toIndentedString(hasLenientDiscoverability)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifiers"); + openapiFields.add("metadata"); + openapiFields.add("permissions"); + openapiFields.add("visualization_identifiers"); + openapiFields.add("emails"); + openapiFields.add("message"); + openapiFields.add("enable_custom_url"); + openapiFields.add("notify_on_share"); + openapiFields.add("has_lenient_discoverability"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("permissions"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ShareMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ShareMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ShareMetadataRequest is not found in the empty JSON string", ShareMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ShareMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ShareMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ShareMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ShareMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ShareMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ShareMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) - && !jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the optional field `metadata_type` - if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("metadata_identifiers") != null - && !jsonObj.get("metadata_identifiers").isJsonNull() - && !jsonObj.get("metadata_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_identifiers").toString())); - } - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - if (jsonArraymetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("metadata").toString())); - } - - // validate the optional field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - ShareMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - } - // ensure the json data is an array - if (!jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `permissions` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("permissions").toString())); - } - - JsonArray jsonArraypermissions = jsonObj.getAsJsonArray("permissions"); - // validate the required field `permissions` (array) - for (int i = 0; i < jsonArraypermissions.size(); i++) { - SharePermissionsInput.validateJsonElement(jsonArraypermissions.get(i)); - } - ; - // ensure the optional json data is an array if present - if (jsonObj.get("visualization_identifiers") != null - && !jsonObj.get("visualization_identifiers").isJsonNull() - && !jsonObj.get("visualization_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visualization_identifiers` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("visualization_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("emails") != null - && !jsonObj.get("emails").isJsonNull() - && !jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `emails` to be an array in the JSON string but got" - + " `%s`", - jsonObj.get("emails").toString())); - } - if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `message` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("message").toString())); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("metadata_identifiers") != null && !jsonObj.get("metadata_identifiers").isJsonNull() && !jsonObj.get("metadata_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("metadata_identifiers").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + ShareMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + }; } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ShareMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ShareMetadataRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ShareMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ShareMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ShareMetadataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ShareMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ShareMetadataRequest - * @throws IOException if the JSON string is invalid with respect to ShareMetadataRequest - */ - public static ShareMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ShareMetadataRequest.class); - } - - /** - * Convert an instance of ShareMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + // ensure the json data is an array + if (!jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + } + + JsonArray jsonArraypermissions = jsonObj.getAsJsonArray("permissions"); + // validate the required field `permissions` (array) + for (int i = 0; i < jsonArraypermissions.size(); i++) { + SharePermissionsInput.validateJsonElement(jsonArraypermissions.get(i)); + }; + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null && !jsonObj.get("visualization_identifiers").isJsonNull() && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `visualization_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("visualization_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull() && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); + } + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ShareMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ShareMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ShareMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ShareMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ShareMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ShareMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShareMetadataRequest + * @throws IOException if the JSON string is invalid with respect to ShareMetadataRequest + */ + public static ShareMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ShareMetadataRequest.class); + } + + /** + * Convert an instance of ShareMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java index be30b4c74..816fd0c7a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java @@ -4,323 +4,309 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** ShareMetadataTypeInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ShareMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata. Type of metadata. Required if the name of the object is set as the - * identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public ShareMetadataTypeInput() {} - - public ShareMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Type of metadata. Required if the name of the object is set as the - * identifier. This attribute is optional when the object GUID is specified as the identifier. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public ShareMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; +/** + * ShareMetadataTypeInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ShareMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Unique ID or name of the metadata object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - ShareMetadataTypeInput shareMetadataTypeInput = (ShareMetadataTypeInput) o; - return Objects.equals(this.type, shareMetadataTypeInput.type) - && Objects.equals(this.identifier, shareMetadataTypeInput.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public ShareMetadataTypeInput() { + } + + public ShareMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public ShareMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ShareMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + ShareMetadataTypeInput shareMetadataTypeInput = (ShareMetadataTypeInput) o; + return Objects.equals(this.type, shareMetadataTypeInput.type) && + Objects.equals(this.identifier, shareMetadataTypeInput.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShareMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ShareMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ShareMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ShareMetadataTypeInput is not found" - + " in the empty JSON string", - ShareMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ShareMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ShareMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ShareMetadataTypeInput is not found in the empty JSON string", ShareMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ShareMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ShareMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ShareMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ShareMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ShareMetadataTypeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ShareMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ShareMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ShareMetadataTypeInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ShareMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ShareMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ShareMetadataTypeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ShareMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ShareMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to ShareMetadataTypeInput - */ - public static ShareMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ShareMetadataTypeInput.class); - } - - /** - * Convert an instance of ShareMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ShareMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ShareMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ShareMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ShareMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ShareMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ShareMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShareMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to ShareMetadataTypeInput + */ + public static ShareMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ShareMetadataTypeInput.class); + } + + /** + * Convert an instance of ShareMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java index 9170af9cd..f1fcacdf7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java @@ -4,290 +4,292 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SharePermissionsInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SharePermissionsInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_PRINCIPAL = "principal"; - - @SerializedName(SERIALIZED_NAME_PRINCIPAL) - @javax.annotation.Nonnull - private PrincipalsInput principal; - - /** Type of access to the shared object */ - @JsonAdapter(ShareModeEnum.Adapter.class) - public enum ShareModeEnum { - READ_ONLY("READ_ONLY"), - - MODIFY("MODIFY"), - - NO_ACCESS("NO_ACCESS"); - - private String value; - - ShareModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ShareModeEnum fromValue(String value) { - for (ShareModeEnum b : ShareModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ShareModeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ShareModeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ShareModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ShareModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SHARE_MODE = "share_mode"; - - @SerializedName(SERIALIZED_NAME_SHARE_MODE) - @javax.annotation.Nonnull - private ShareModeEnum shareMode; - - public SharePermissionsInput() {} - - public SharePermissionsInput principal(@javax.annotation.Nonnull PrincipalsInput principal) { - this.principal = principal; - return this; - } - - /** - * Get principal - * - * @return principal - */ - @javax.annotation.Nonnull - public PrincipalsInput getPrincipal() { - return principal; - } - - public void setPrincipal(@javax.annotation.Nonnull PrincipalsInput principal) { - this.principal = principal; - } - - public SharePermissionsInput shareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { - this.shareMode = shareMode; - return this; - } - - /** - * Type of access to the shared object - * - * @return shareMode - */ - @javax.annotation.Nonnull - public ShareModeEnum getShareMode() { - return shareMode; - } - - public void setShareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { - this.shareMode = shareMode; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SharePermissionsInput sharePermissionsInput = (SharePermissionsInput) o; - return Objects.equals(this.principal, sharePermissionsInput.principal) - && Objects.equals(this.shareMode, sharePermissionsInput.shareMode); +/** + * SharePermissionsInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SharePermissionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPAL = "principal"; + @SerializedName(SERIALIZED_NAME_PRINCIPAL) + @javax.annotation.Nonnull + private PrincipalsInput principal; + + /** + * Type of access to the shared object + */ + @JsonAdapter(ShareModeEnum.Adapter.class) + public enum ShareModeEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + ShareModeEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash(principal, shareMode); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SharePermissionsInput {\n"); - sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); - sb.append(" shareMode: ").append(toIndentedString(shareMode)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static ShareModeEnum fromValue(String value) { + for (ShareModeEnum b : ShareModeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("principal"); - openapiFields.add("share_mode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("principal"); - openapiRequiredFields.add("share_mode"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ShareModeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ShareModeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ShareModeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SharePermissionsInput - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SharePermissionsInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SharePermissionsInput is not found in" - + " the empty JSON string", - SharePermissionsInput.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + ShareModeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SHARE_MODE = "share_mode"; + @SerializedName(SERIALIZED_NAME_SHARE_MODE) + @javax.annotation.Nonnull + private ShareModeEnum shareMode; + + public SharePermissionsInput() { + } + + public SharePermissionsInput principal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + return this; + } + + /** + * Get principal + * @return principal + */ + @javax.annotation.Nonnull + public PrincipalsInput getPrincipal() { + return principal; + } + + public void setPrincipal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + } + + + public SharePermissionsInput shareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + return this; + } + + /** + * Type of access to the shared object + * @return shareMode + */ + @javax.annotation.Nonnull + public ShareModeEnum getShareMode() { + return shareMode; + } + + public void setShareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharePermissionsInput sharePermissionsInput = (SharePermissionsInput) o; + return Objects.equals(this.principal, sharePermissionsInput.principal) && + Objects.equals(this.shareMode, sharePermissionsInput.shareMode); + } + + @Override + public int hashCode() { + return Objects.hash(principal, shareMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharePermissionsInput {\n"); + sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); + sb.append(" shareMode: ").append(toIndentedString(shareMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principal"); + openapiFields.add("share_mode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("principal"); + openapiRequiredFields.add("share_mode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SharePermissionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SharePermissionsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SharePermissionsInput is not found in the empty JSON string", SharePermissionsInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SharePermissionsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SharePermissionsInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SharePermissionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SharePermissionsInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SharePermissionsInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SharePermissionsInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `principal` - PrincipalsInput.validateJsonElement(jsonObj.get("principal")); - if (!jsonObj.get("share_mode").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `share_mode` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("share_mode").toString())); - } - // validate the required field `share_mode` - ShareModeEnum.validateJsonElement(jsonObj.get("share_mode")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SharePermissionsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SharePermissionsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SharePermissionsInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SharePermissionsInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SharePermissionsInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SharePermissionsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SharePermissionsInput - * @throws IOException if the JSON string is invalid with respect to SharePermissionsInput - */ - public static SharePermissionsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SharePermissionsInput.class); - } - - /** - * Convert an instance of SharePermissionsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `principal` + PrincipalsInput.validateJsonElement(jsonObj.get("principal")); + if (!jsonObj.get("share_mode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `share_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("share_mode").toString())); + } + // validate the required field `share_mode` + ShareModeEnum.validateJsonElement(jsonObj.get("share_mode")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SharePermissionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SharePermissionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SharePermissionsInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SharePermissionsInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SharePermissionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SharePermissionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SharePermissionsInput + * @throws IOException if the JSON string is invalid with respect to SharePermissionsInput + */ + public static SharePermissionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SharePermissionsInput.class); + } + + /** + * Convert an instance of SharePermissionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java index fc9de5cba..57020a828 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java @@ -4,243 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SingleAnswerRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SingleAnswerRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_QUERY = "query"; - - @SerializedName(SERIALIZED_NAME_QUERY) - @javax.annotation.Nonnull - private String query; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - public SingleAnswerRequest() {} - - public SingleAnswerRequest query(@javax.annotation.Nonnull String query) { - this.query = query; - return this; - } - - /** - * A natural language query string to generate the Answer. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public void setQuery(@javax.annotation.Nonnull String query) { - this.query = query; - } - - public SingleAnswerRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the - * query. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SingleAnswerRequest singleAnswerRequest = (SingleAnswerRequest) o; - return Objects.equals(this.query, singleAnswerRequest.query) - && Objects.equals(this.metadataIdentifier, singleAnswerRequest.metadataIdentifier); +/** + * SingleAnswerRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SingleAnswerRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nonnull + private String query; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public SingleAnswerRequest() { + } + + public SingleAnswerRequest query(@javax.annotation.Nonnull String query) { + this.query = query; + return this; + } + + /** + * A natural language query string to generate the Answer. + * @return query + */ + @javax.annotation.Nonnull + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nonnull String query) { + this.query = query; + } + + + public SingleAnswerRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(query, metadataIdentifier); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SingleAnswerRequest {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append("}"); - return sb.toString(); + SingleAnswerRequest singleAnswerRequest = (SingleAnswerRequest) o; + return Objects.equals(this.query, singleAnswerRequest.query) && + Objects.equals(this.metadataIdentifier, singleAnswerRequest.metadataIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(query, metadataIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SingleAnswerRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("metadata_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query"); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SingleAnswerRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SingleAnswerRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SingleAnswerRequest is not found in the empty JSON string", SingleAnswerRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - openapiFields.add("metadata_identifier"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("query"); - openapiRequiredFields.add("metadata_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SingleAnswerRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SingleAnswerRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SingleAnswerRequest is not found in" - + " the empty JSON string", - SingleAnswerRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SingleAnswerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SingleAnswerRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SingleAnswerRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SingleAnswerRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SingleAnswerRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SingleAnswerRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `query` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("query").toString())); - } - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SingleAnswerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SingleAnswerRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SingleAnswerRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SingleAnswerRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SingleAnswerRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SingleAnswerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SingleAnswerRequest - * @throws IOException if the JSON string is invalid with respect to SingleAnswerRequest - */ - public static SingleAnswerRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SingleAnswerRequest.class); - } - - /** - * Convert an instance of SingleAnswerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SingleAnswerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SingleAnswerRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SingleAnswerRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SingleAnswerRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SingleAnswerRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SingleAnswerRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SingleAnswerRequest + * @throws IOException if the JSON string is invalid with respect to SingleAnswerRequest + */ + public static SingleAnswerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SingleAnswerRequest.class); + } + + /** + * Convert an instance of SingleAnswerRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java index 96e82cd88..9f7d623a4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java @@ -4,365 +4,359 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SortOption */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SortOption implements Serializable { - private static final long serialVersionUID = 1L; - - /** Name of the field to apply the sort on. */ - @JsonAdapter(FieldNameEnum.Adapter.class) - public enum FieldNameEnum { - DEFAULT("DEFAULT"), - - NAME("NAME"), - DISPLAY_NAME("DISPLAY_NAME"), - - AUTHOR("AUTHOR"), - - CREATED("CREATED"), - - MODIFIED("MODIFIED"); - - private String value; - - FieldNameEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FieldNameEnum fromValue(String value) { - for (FieldNameEnum b : FieldNameEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FieldNameEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FieldNameEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FieldNameEnum.fromValue(value); - } +/** + * SortOption + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SortOption implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Name of the field to apply the sort on. + */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + DEFAULT("DEFAULT"), + + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; - - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nullable - private FieldNameEnum fieldName = FieldNameEnum.DEFAULT; - - /** Sort order : ASC(Ascending) or DESC(Descending). */ - @JsonAdapter(OrderEnum.Adapter.class) - public enum OrderEnum { - ASC("ASC"), - - DESC("DESC"); - - private String value; - - OrderEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OrderEnum fromValue(String value) { - for (OrderEnum b : OrderEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OrderEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OrderEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OrderEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_ORDER = "order"; - - @SerializedName(SERIALIZED_NAME_ORDER) - @javax.annotation.Nullable - private OrderEnum order = OrderEnum.ASC; - - public SortOption() {} - - public SortOption fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Name of the field to apply the sort on. - * - * @return fieldName - */ - @javax.annotation.Nullable - public FieldNameEnum getFieldName() { - return fieldName; + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; + 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 SortOption order(@javax.annotation.Nullable OrderEnum order) { - this.order = order; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); } - - /** - * Sort order : ASC(Ascending) or DESC(Descending). - * - * @return order - */ - @javax.annotation.Nullable - public OrderEnum getOrder() { - return order; + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName = FieldNameEnum.DEFAULT; + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; } - public void setOrder(@javax.annotation.Nullable OrderEnum order) { - this.order = order; + public String getValue() { + return value; } @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SortOption sortOption = (SortOption) o; - return Objects.equals(this.fieldName, sortOption.fieldName) - && Objects.equals(this.order, sortOption.order); + public String toString() { + return String.valueOf(value); } - 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())); + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - @Override - public int hashCode() { - return Objects.hash(fieldName, order); + 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); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SortOption {\n"); - sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order = OrderEnum.ASC; + + public SortOption() { + } + + public SortOption fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public SortOption order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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(); + SortOption sortOption = (SortOption) o; + return Objects.equals(this.fieldName, sortOption.fieldName) && + Objects.equals(this.order, sortOption.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; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SortOption - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SortOption.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SortOption is not found in the empty" - + " JSON string", - SortOption.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortOption {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortOption + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortOption.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SortOption is not found in the empty JSON string", SortOption.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SortOption.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SortOption` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SortOption.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SortOption` 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 (!SortOption.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SortOption' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SortOption.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SortOption value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SortOption read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SortOption given an JSON string - * - * @param jsonString JSON string - * @return An instance of SortOption - * @throws IOException if the JSON string is invalid with respect to SortOption - */ - public static SortOption fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SortOption.class); - } - - /** - * Convert an instance of SortOption to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortOption.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortOption' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SortOption.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SortOption value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SortOption read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SortOption given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortOption + * @throws IOException if the JSON string is invalid with respect to SortOption + */ + public static SortOption fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortOption.class); + } + + /** + * Convert an instance of SortOption to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java index 0f75cd57b..04029c721 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java @@ -4,374 +4,367 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SortOptionInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SortOptionInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** Name of the field to apply the sort on. */ - @JsonAdapter(FieldNameEnum.Adapter.class) - public enum FieldNameEnum { - NAME("NAME"), - - DISPLAY_NAME("DISPLAY_NAME"), - - AUTHOR("AUTHOR"), - CREATED("CREATED"), - - MODIFIED("MODIFIED"), - - LAST_ACCESSED("LAST_ACCESSED"), - - SYNCED("SYNCED"), - - VIEWS("VIEWS"), - - USER_STATE("USER_STATE"), - - ROW_COUNT("ROW_COUNT"); - - private String value; - - FieldNameEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FieldNameEnum fromValue(String value) { - for (FieldNameEnum b : FieldNameEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FieldNameEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FieldNameEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FieldNameEnum.fromValue(value); - } +/** + * SortOptionInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SortOptionInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Name of the field to apply the sort on. + */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"), + + LAST_ACCESSED("LAST_ACCESSED"), + + SYNCED("SYNCED"), + + VIEWS("VIEWS"), + + USER_STATE("USER_STATE"), + + ROW_COUNT("ROW_COUNT"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; - - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nullable - private FieldNameEnum fieldName; - - /** Sort order : ASC(Ascending) or DESC(Descending). */ - @JsonAdapter(OrderEnum.Adapter.class) - public enum OrderEnum { - ASC("ASC"), - - DESC("DESC"); - - private String value; - - OrderEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OrderEnum fromValue(String value) { - for (OrderEnum b : OrderEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OrderEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OrderEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OrderEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_ORDER = "order"; - - @SerializedName(SERIALIZED_NAME_ORDER) - @javax.annotation.Nullable - private OrderEnum order; - - public SortOptionInput() {} - - public SortOptionInput fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Name of the field to apply the sort on. - * - * @return fieldName - */ - @javax.annotation.Nullable - public FieldNameEnum getFieldName() { - return fieldName; + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; + 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 SortOptionInput order(@javax.annotation.Nullable OrderEnum order) { - this.order = order; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); } - - /** - * Sort order : ASC(Ascending) or DESC(Descending). - * - * @return order - */ - @javax.annotation.Nullable - public OrderEnum getOrder() { - return order; + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName; + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; } - public void setOrder(@javax.annotation.Nullable OrderEnum order) { - this.order = order; + public String getValue() { + return value; } @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SortOptionInput sortOptionInput = (SortOptionInput) o; - return Objects.equals(this.fieldName, sortOptionInput.fieldName) - && Objects.equals(this.order, sortOptionInput.order); + public String toString() { + return String.valueOf(value); } - 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())); + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - @Override - public int hashCode() { - return Objects.hash(fieldName, order); + 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); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SortOptionInput {\n"); - sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public SortOptionInput() { + } + + public SortOptionInput fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public SortOptionInput order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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(); + SortOptionInput sortOptionInput = (SortOptionInput) o; + return Objects.equals(this.fieldName, sortOptionInput.fieldName) && + Objects.equals(this.order, sortOptionInput.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; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SortOptionInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SortOptionInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SortOptionInput is not found in the" - + " empty JSON string", - SortOptionInput.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortOptionInput {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortOptionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortOptionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SortOptionInput is not found in the empty JSON string", SortOptionInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SortOptionInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SortOptionInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SortOptionInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SortOptionInput` 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 (!SortOptionInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SortOptionInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SortOptionInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SortOptionInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SortOptionInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SortOptionInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SortOptionInput - * @throws IOException if the JSON string is invalid with respect to SortOptionInput - */ - public static SortOptionInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SortOptionInput.class); - } - - /** - * Convert an instance of SortOptionInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortOptionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortOptionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SortOptionInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SortOptionInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SortOptionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SortOptionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortOptionInput + * @throws IOException if the JSON string is invalid with respect to SortOptionInput + */ + public static SortOptionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortOptionInput.class); + } + + /** + * Convert an instance of SortOptionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java index 6630d6681..38d61eedd 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java @@ -4,363 +4,357 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Sort options. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SortOptions implements Serializable { - private static final long serialVersionUID = 1L; - - /** Name of the field to apply the sort on. */ - @JsonAdapter(FieldNameEnum.Adapter.class) - public enum FieldNameEnum { - NAME("NAME"), - - DISPLAY_NAME("DISPLAY_NAME"), - AUTHOR("AUTHOR"), - - CREATED("CREATED"), - - MODIFIED("MODIFIED"); - - private String value; - - FieldNameEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FieldNameEnum fromValue(String value) { - for (FieldNameEnum b : FieldNameEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FieldNameEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FieldNameEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FieldNameEnum.fromValue(value); - } +/** + * Sort options. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SortOptions implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Name of the field to apply the sort on. + */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; - - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nullable - private FieldNameEnum fieldName; - - /** Sort order : ASC(Ascending) or DESC(Descending). */ - @JsonAdapter(OrderEnum.Adapter.class) - public enum OrderEnum { - ASC("ASC"), - - DESC("DESC"); - - private String value; - - OrderEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OrderEnum fromValue(String value) { - for (OrderEnum b : OrderEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OrderEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OrderEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OrderEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_ORDER = "order"; - - @SerializedName(SERIALIZED_NAME_ORDER) - @javax.annotation.Nullable - private OrderEnum order; - - public SortOptions() {} - - public SortOptions fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Name of the field to apply the sort on. - * - * @return fieldName - */ - @javax.annotation.Nullable - public FieldNameEnum getFieldName() { - return fieldName; + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { - this.fieldName = fieldName; + 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 SortOptions order(@javax.annotation.Nullable OrderEnum order) { - this.order = order; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); } - - /** - * Sort order : ASC(Ascending) or DESC(Descending). - * - * @return order - */ - @javax.annotation.Nullable - public OrderEnum getOrder() { - return order; + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName; + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; } - public void setOrder(@javax.annotation.Nullable OrderEnum order) { - this.order = order; + public String getValue() { + return value; } @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SortOptions sortOptions = (SortOptions) o; - return Objects.equals(this.fieldName, sortOptions.fieldName) - && Objects.equals(this.order, sortOptions.order); + public String toString() { + return String.valueOf(value); } - 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())); + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - @Override - public int hashCode() { - return Objects.hash(fieldName, order); + 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); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SortOptions {\n"); - sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public SortOptions() { + } + + public SortOptions fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public SortOptions order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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(); + SortOptions sortOptions = (SortOptions) o; + return Objects.equals(this.fieldName, sortOptions.fieldName) && + Objects.equals(this.order, sortOptions.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; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SortOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SortOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SortOptions is not found in the empty" - + " JSON string", - SortOptions.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortOptions {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SortOptions is not found in the empty JSON string", SortOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SortOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SortOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SortOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SortOptions` 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 (!SortOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SortOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SortOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SortOptions value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SortOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SortOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of SortOptions - * @throws IOException if the JSON string is invalid with respect to SortOptions - */ - public static SortOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SortOptions.class); - } - - /** - * Convert an instance of SortOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SortOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SortOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SortOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SortOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortOptions + * @throws IOException if the JSON string is invalid with respect to SortOptions + */ + public static SortOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortOptions.class); + } + + /** + * Convert an instance of SortOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java index f9a65fbdf..6e62c3cf7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java @@ -4,246 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Sort options. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SortingOptions implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; - - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nullable - private String fieldName; - - public static final String SERIALIZED_NAME_ORDER = "order"; - - @SerializedName(SERIALIZED_NAME_ORDER) - @javax.annotation.Nullable - private String order; - - public SortingOptions() {} - - public SortingOptions fieldName(@javax.annotation.Nullable String fieldName) { - this.fieldName = fieldName; - return this; - } - - /** - * Name of the field to apply the sort on. - * - * @return fieldName - */ - @javax.annotation.Nullable - public String getFieldName() { - return fieldName; - } - - public void setFieldName(@javax.annotation.Nullable String fieldName) { - this.fieldName = fieldName; - } - - public SortingOptions order(@javax.annotation.Nullable String order) { - this.order = order; - return this; - } - - /** - * Sort order : ASC(Ascending) or DESC(Descending). - * - * @return order - */ - @javax.annotation.Nullable - public String getOrder() { - return order; - } - - public void setOrder(@javax.annotation.Nullable String order) { - this.order = order; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SortingOptions sortingOptions = (SortingOptions) o; - return Objects.equals(this.fieldName, sortingOptions.fieldName) - && Objects.equals(this.order, sortingOptions.order); - } - - 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 SortingOptions {\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SortingOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SortingOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SortingOptions is not found in the" - + " empty JSON string", - SortingOptions.openapiRequiredFields.toString())); - } +/** + * Sort options. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SortingOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private String fieldName; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private String order; + + public SortingOptions() { + } + + public SortingOptions fieldName(@javax.annotation.Nullable String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * @return fieldName + */ + @javax.annotation.Nullable + public String getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable String fieldName) { + this.fieldName = fieldName; + } + + + public SortingOptions order(@javax.annotation.Nullable String order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * @return order + */ + @javax.annotation.Nullable + public String getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable String order) { + this.order = order; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SortingOptions sortingOptions = (SortingOptions) o; + return Objects.equals(this.fieldName, sortingOptions.fieldName) && + Objects.equals(this.order, sortingOptions.order); + } + + 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 SortingOptions {\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 SortingOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortingOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SortingOptions is not found in the empty JSON string", SortingOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SortingOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SortingOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SortingOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SortingOptions` 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())); - } - if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) - && !jsonObj.get("order").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `order` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("order").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SortingOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SortingOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SortingOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SortingOptions value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SortingOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SortingOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of SortingOptions - * @throws IOException if the JSON string is invalid with respect to SortingOptions - */ - public static SortingOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SortingOptions.class); - } - - /** - * Convert an instance of SortingOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortingOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortingOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SortingOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SortingOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SortingOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SortingOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortingOptions + * @throws IOException if the JSON string is invalid with respect to SortingOptions + */ + public static SortingOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortingOptions.class); + } + + /** + * Convert an instance of SortingOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java index 8d4f87a7e..23ff60389 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java @@ -4,274 +4,267 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Response format associated with fetch SQL query api */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SqlQuery implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nonnull - private String metadataId; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nonnull - private String metadataName; - - public static final String SERIALIZED_NAME_SQL_QUERY = "sql_query"; - - @SerializedName(SERIALIZED_NAME_SQL_QUERY) - @javax.annotation.Nonnull - private String sqlQuery; - - public SqlQuery() {} - - public SqlQuery metadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - return this; - } - - /** - * Unique identifier of the metadata. - * - * @return metadataId - */ - @javax.annotation.Nonnull - public String getMetadataId() { - return metadataId; - } - - public void setMetadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - } - - public SqlQuery metadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - return this; - } - - /** - * Name of the metadata. - * - * @return metadataName - */ - @javax.annotation.Nonnull - public String getMetadataName() { - return metadataName; - } - - public void setMetadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - } - - public SqlQuery sqlQuery(@javax.annotation.Nonnull String sqlQuery) { - this.sqlQuery = sqlQuery; - return this; - } - - /** - * SQL query of a metadata object. - * - * @return sqlQuery - */ - @javax.annotation.Nonnull - public String getSqlQuery() { - return sqlQuery; - } - - public void setSqlQuery(@javax.annotation.Nonnull String sqlQuery) { - this.sqlQuery = sqlQuery; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SqlQuery sqlQuery = (SqlQuery) o; - return Objects.equals(this.metadataId, sqlQuery.metadataId) - && Objects.equals(this.metadataName, sqlQuery.metadataName) - && Objects.equals(this.sqlQuery, sqlQuery.sqlQuery); - } - - @Override - public int hashCode() { - return Objects.hash(metadataId, metadataName, sqlQuery); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SqlQuery {\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" sqlQuery: ").append(toIndentedString(sqlQuery)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Response format associated with fetch SQL query api + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SqlQuery implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_SQL_QUERY = "sql_query"; + @SerializedName(SERIALIZED_NAME_SQL_QUERY) + @javax.annotation.Nonnull + private String sqlQuery; + + public SqlQuery() { + } + + public SqlQuery metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the metadata. + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + + public SqlQuery metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata. + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + + public SqlQuery sqlQuery(@javax.annotation.Nonnull String sqlQuery) { + this.sqlQuery = sqlQuery; + return this; + } + + /** + * SQL query of a metadata object. + * @return sqlQuery + */ + @javax.annotation.Nonnull + public String getSqlQuery() { + return sqlQuery; + } + + public void setSqlQuery(@javax.annotation.Nonnull String sqlQuery) { + this.sqlQuery = sqlQuery; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_id"); - openapiFields.add("metadata_name"); - openapiFields.add("sql_query"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_id"); - openapiRequiredFields.add("metadata_name"); - openapiRequiredFields.add("sql_query"); + SqlQuery sqlQuery = (SqlQuery) o; + return Objects.equals(this.metadataId, sqlQuery.metadataId) && + Objects.equals(this.metadataName, sqlQuery.metadataName) && + Objects.equals(this.sqlQuery, sqlQuery.sqlQuery); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, sqlQuery); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SqlQuery {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" sqlQuery: ").append(toIndentedString(sqlQuery)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SqlQuery - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SqlQuery.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SqlQuery is not found in the empty" - + " JSON string", - SqlQuery.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("sql_query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("sql_query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SqlQuery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SqlQuery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SqlQuery is not found in the empty JSON string", SqlQuery.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SqlQuery.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SqlQuery` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SqlQuery.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SqlQuery` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SqlQuery.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SqlQuery.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - if (!jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - if (!jsonObj.get("sql_query").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sql_query` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("sql_query").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SqlQuery.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SqlQuery' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SqlQuery.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SqlQuery value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SqlQuery read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SqlQuery given an JSON string - * - * @param jsonString JSON string - * @return An instance of SqlQuery - * @throws IOException if the JSON string is invalid with respect to SqlQuery - */ - public static SqlQuery fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SqlQuery.class); - } - - /** - * Convert an instance of SqlQuery to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("sql_query").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sql_query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sql_query").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SqlQuery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SqlQuery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SqlQuery.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SqlQuery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SqlQuery read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SqlQuery given an JSON string + * + * @param jsonString JSON string + * @return An instance of SqlQuery + * @throws IOException if the JSON string is invalid with respect to SqlQuery + */ + public static SqlQuery fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SqlQuery.class); + } + + /** + * Convert an instance of SqlQuery to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java index 4ea88d81b..c46f410f5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java @@ -4,398 +4,384 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SqlQuery; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** SqlQueryResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SqlQueryResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; - - @SerializedName(SERIALIZED_NAME_METADATA_ID) - @javax.annotation.Nonnull - private String metadataId; - - public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; - - @SerializedName(SERIALIZED_NAME_METADATA_NAME) - @javax.annotation.Nonnull - private String metadataName; - - /** Type of the metadata. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"), - - TAG("TAG"), - - USER("USER"), - - USER_GROUP("USER_GROUP"), - - LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nonnull - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_SQL_QUERIES = "sql_queries"; - - @SerializedName(SERIALIZED_NAME_SQL_QUERIES) - @javax.annotation.Nonnull - private List sqlQueries; - - public SqlQueryResponse() {} - - public SqlQueryResponse metadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - return this; - } - - /** - * Unique identifier of the metadata. - * - * @return metadataId - */ - @javax.annotation.Nonnull - public String getMetadataId() { - return metadataId; - } - - public void setMetadataId(@javax.annotation.Nonnull String metadataId) { - this.metadataId = metadataId; - } - - public SqlQueryResponse metadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Name of the metadata. - * - * @return metadataName - */ - @javax.annotation.Nonnull - public String getMetadataName() { - return metadataName; +/** + * SqlQueryResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SqlQueryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + /** + * Type of the metadata. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; } - public void setMetadataName(@javax.annotation.Nonnull String metadataName) { - this.metadataName = metadataName; + public String getValue() { + return value; } - public SqlQueryResponse metadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Type of the metadata. - * - * @return metadataType - */ - @javax.annotation.Nonnull - public MetadataTypeEnum getMetadataType() { - return metadataType; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { - this.metadataType = metadataType; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - public SqlQueryResponse sqlQueries(@javax.annotation.Nonnull List sqlQueries) { - this.sqlQueries = sqlQueries; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); } - - public SqlQueryResponse addSqlQueriesItem(SqlQuery sqlQueriesItem) { - if (this.sqlQueries == null) { - this.sqlQueries = new ArrayList<>(); - } - this.sqlQueries.add(sqlQueriesItem); - return this; + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_SQL_QUERIES = "sql_queries"; + @SerializedName(SERIALIZED_NAME_SQL_QUERIES) + @javax.annotation.Nonnull + private List sqlQueries; + + public SqlQueryResponse() { + } + + public SqlQueryResponse metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the metadata. + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + + public SqlQueryResponse metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata. + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + + public SqlQueryResponse metadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata. + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public SqlQueryResponse sqlQueries(@javax.annotation.Nonnull List sqlQueries) { + this.sqlQueries = sqlQueries; + return this; + } + + public SqlQueryResponse addSqlQueriesItem(SqlQuery sqlQueriesItem) { + if (this.sqlQueries == null) { + this.sqlQueries = new ArrayList<>(); } + this.sqlQueries.add(sqlQueriesItem); + return this; + } - /** - * SQL query details of metadata objects. - * - * @return sqlQueries - */ - @javax.annotation.Nonnull - public List getSqlQueries() { - return sqlQueries; - } + /** + * SQL query details of metadata objects. + * @return sqlQueries + */ + @javax.annotation.Nonnull + public List getSqlQueries() { + return sqlQueries; + } - public void setSqlQueries(@javax.annotation.Nonnull List sqlQueries) { - this.sqlQueries = sqlQueries; - } + public void setSqlQueries(@javax.annotation.Nonnull List sqlQueries) { + this.sqlQueries = sqlQueries; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SqlQueryResponse sqlQueryResponse = (SqlQueryResponse) o; - return Objects.equals(this.metadataId, sqlQueryResponse.metadataId) - && Objects.equals(this.metadataName, sqlQueryResponse.metadataName) - && Objects.equals(this.metadataType, sqlQueryResponse.metadataType) - && Objects.equals(this.sqlQueries, sqlQueryResponse.sqlQueries); - } - @Override - public int hashCode() { - return Objects.hash(metadataId, metadataName, metadataType, sqlQueries); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SqlQueryResponse {\n"); - sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); - sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" sqlQueries: ").append(toIndentedString(sqlQueries)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_id"); - openapiFields.add("metadata_name"); - openapiFields.add("metadata_type"); - openapiFields.add("sql_queries"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_id"); - openapiRequiredFields.add("metadata_name"); - openapiRequiredFields.add("metadata_type"); - openapiRequiredFields.add("sql_queries"); + SqlQueryResponse sqlQueryResponse = (SqlQueryResponse) o; + return Objects.equals(this.metadataId, sqlQueryResponse.metadataId) && + Objects.equals(this.metadataName, sqlQueryResponse.metadataName) && + Objects.equals(this.metadataType, sqlQueryResponse.metadataType) && + Objects.equals(this.sqlQueries, sqlQueryResponse.sqlQueries); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, metadataType, sqlQueries); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SqlQueryResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" sqlQueries: ").append(toIndentedString(sqlQueries)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SqlQueryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SqlQueryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SqlQueryResponse is not found in the" - + " empty JSON string", - SqlQueryResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("sql_queries"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("sql_queries"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SqlQueryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SqlQueryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SqlQueryResponse is not found in the empty JSON string", SqlQueryResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SqlQueryResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SqlQueryResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SqlQueryResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SqlQueryResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SqlQueryResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SqlQueryResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metadata_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_id").toString())); - } - if (!jsonObj.get("metadata_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_name").toString())); - } - if (!jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the required field `metadata_type` - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - // ensure the json data is an array - if (!jsonObj.get("sql_queries").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sql_queries` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("sql_queries").toString())); - } - - JsonArray jsonArraysqlQueries = jsonObj.getAsJsonArray("sql_queries"); - // validate the required field `sql_queries` (array) - for (int i = 0; i < jsonArraysqlQueries.size(); i++) { - SqlQuery.validateJsonElement(jsonArraysqlQueries.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SqlQueryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SqlQueryResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SqlQueryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SqlQueryResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SqlQueryResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SqlQueryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SqlQueryResponse - * @throws IOException if the JSON string is invalid with respect to SqlQueryResponse - */ - public static SqlQueryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SqlQueryResponse.class); - } - - /** - * Convert an instance of SqlQueryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + // ensure the json data is an array + if (!jsonObj.get("sql_queries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sql_queries` to be an array in the JSON string but got `%s`", jsonObj.get("sql_queries").toString())); + } + + JsonArray jsonArraysqlQueries = jsonObj.getAsJsonArray("sql_queries"); + // validate the required field `sql_queries` (array) + for (int i = 0; i < jsonArraysqlQueries.size(); i++) { + SqlQuery.validateJsonElement(jsonArraysqlQueries.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SqlQueryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SqlQueryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SqlQueryResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SqlQueryResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SqlQueryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SqlQueryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SqlQueryResponse + * @throws IOException if the JSON string is invalid with respect to SqlQueryResponse + */ + public static SqlQueryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SqlQueryResponse.class); + } + + /** + * Convert an instance of SqlQueryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java index 5c2a36a4b..6e5be2ae7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java @@ -4,214 +4,209 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** SystemConfig */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SystemConfig implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ONBOARDING_CONTENT_URL = "onboarding_content_url"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_ONBOARDING_CONTENT_URL) - @javax.annotation.Nullable - private String onboardingContentUrl; +/** + * SystemConfig + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SystemConfig implements Serializable { + private static final long serialVersionUID = 1L; - public SystemConfig() {} + public static final String SERIALIZED_NAME_ONBOARDING_CONTENT_URL = "onboarding_content_url"; + @SerializedName(SERIALIZED_NAME_ONBOARDING_CONTENT_URL) + @javax.annotation.Nullable + private String onboardingContentUrl; - public SystemConfig onboardingContentUrl( - @javax.annotation.Nullable String onboardingContentUrl) { - this.onboardingContentUrl = onboardingContentUrl; - return this; - } + public SystemConfig() { + } - /** - * Get onboardingContentUrl - * - * @return onboardingContentUrl - */ - @javax.annotation.Nullable - public String getOnboardingContentUrl() { - return onboardingContentUrl; - } + public SystemConfig onboardingContentUrl(@javax.annotation.Nullable String onboardingContentUrl) { + this.onboardingContentUrl = onboardingContentUrl; + return this; + } - public void setOnboardingContentUrl(@javax.annotation.Nullable String onboardingContentUrl) { - this.onboardingContentUrl = onboardingContentUrl; - } + /** + * Get onboardingContentUrl + * @return onboardingContentUrl + */ + @javax.annotation.Nullable + public String getOnboardingContentUrl() { + return onboardingContentUrl; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SystemConfig systemConfig = (SystemConfig) o; - return Objects.equals(this.onboardingContentUrl, systemConfig.onboardingContentUrl); - } + public void setOnboardingContentUrl(@javax.annotation.Nullable String onboardingContentUrl) { + this.onboardingContentUrl = onboardingContentUrl; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(onboardingContentUrl); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SystemConfig {\n"); - sb.append(" onboardingContentUrl: ") - .append(toIndentedString(onboardingContentUrl)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + SystemConfig systemConfig = (SystemConfig) o; + return Objects.equals(this.onboardingContentUrl, systemConfig.onboardingContentUrl); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(onboardingContentUrl); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("onboarding_content_url"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemConfig {\n"); + sb.append(" onboardingContentUrl: ").append(toIndentedString(onboardingContentUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SystemConfig - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SystemConfig.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SystemConfig is not found in the" - + " empty JSON string", - SystemConfig.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("onboarding_content_url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SystemConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SystemConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SystemConfig is not found in the empty JSON string", SystemConfig.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SystemConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SystemConfig` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SystemConfig.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SystemConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("onboarding_content_url") != null - && !jsonObj.get("onboarding_content_url").isJsonNull()) - && !jsonObj.get("onboarding_content_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `onboarding_content_url` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("onboarding_content_url").toString())); - } - } + if ((jsonObj.get("onboarding_content_url") != null && !jsonObj.get("onboarding_content_url").isJsonNull()) && !jsonObj.get("onboarding_content_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `onboarding_content_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("onboarding_content_url").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SystemConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SystemConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SystemConfig.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SystemConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SystemConfig read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SystemConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of SystemConfig - * @throws IOException if the JSON string is invalid with respect to SystemConfig - */ - public static SystemConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SystemConfig.class); - } - - /** - * Convert an instance of SystemConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SystemConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SystemConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SystemConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SystemConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SystemConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SystemConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of SystemConfig + * @throws IOException if the JSON string is invalid with respect to SystemConfig + */ + public static SystemConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SystemConfig.class); + } + + /** + * Convert an instance of SystemConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java index 1772ba77a..3f1db8899 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java @@ -4,1025 +4,863 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** SystemInfo */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class SystemInfo implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_RELEASE_VERSION = "release_version"; - - @SerializedName(SERIALIZED_NAME_RELEASE_VERSION) - @javax.annotation.Nullable - private String releaseVersion; - - public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; - - @SerializedName(SERIALIZED_NAME_TIME_ZONE) - @javax.annotation.Nullable - private String timeZone; - - public static final String SERIALIZED_NAME_LOCALE = "locale"; - - @SerializedName(SERIALIZED_NAME_LOCALE) - @javax.annotation.Nullable - private String locale; - - public static final String SERIALIZED_NAME_DATE_FORMAT = "date_format"; - - @SerializedName(SERIALIZED_NAME_DATE_FORMAT) - @javax.annotation.Nullable - private String dateFormat; - - public static final String SERIALIZED_NAME_API_VERSION = "api_version"; - - @SerializedName(SERIALIZED_NAME_API_VERSION) - @javax.annotation.Nullable - private String apiVersion; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private String type; - - public static final String SERIALIZED_NAME_ENVIRONMENT = "environment"; - - @SerializedName(SERIALIZED_NAME_ENVIRONMENT) - @javax.annotation.Nullable - private String environment; - - public static final String SERIALIZED_NAME_LICENSE = "license"; - - @SerializedName(SERIALIZED_NAME_LICENSE) - @javax.annotation.Nullable - private String license; - - public static final String SERIALIZED_NAME_DATE_TIME_FORMAT = "date_time_format"; - - @SerializedName(SERIALIZED_NAME_DATE_TIME_FORMAT) - @javax.annotation.Nullable - private String dateTimeFormat; - - public static final String SERIALIZED_NAME_TIME_FORMAT = "time_format"; - - @SerializedName(SERIALIZED_NAME_TIME_FORMAT) - @javax.annotation.Nullable - private String timeFormat; - - public static final String SERIALIZED_NAME_SYSTEM_USER_ID = "system_user_id"; - - @SerializedName(SERIALIZED_NAME_SYSTEM_USER_ID) - @javax.annotation.Nullable - private String systemUserId; - - public static final String SERIALIZED_NAME_SUPER_USER_ID = "super_user_id"; - - @SerializedName(SERIALIZED_NAME_SUPER_USER_ID) - @javax.annotation.Nullable - private String superUserId; - - public static final String SERIALIZED_NAME_HIDDEN_OBJECT_ID = "hidden_object_id"; - - @SerializedName(SERIALIZED_NAME_HIDDEN_OBJECT_ID) - @javax.annotation.Nullable - private String hiddenObjectId; - - public static final String SERIALIZED_NAME_SYSTEM_GROUP_ID = "system_group_id"; - - @SerializedName(SERIALIZED_NAME_SYSTEM_GROUP_ID) - @javax.annotation.Nullable - private String systemGroupId; - - public static final String SERIALIZED_NAME_TSADMIN_USER_ID = "tsadmin_user_id"; - - @SerializedName(SERIALIZED_NAME_TSADMIN_USER_ID) - @javax.annotation.Nullable - private String tsadminUserId; - - public static final String SERIALIZED_NAME_ADMIN_GROUP_ID = "admin_group_id"; - - @SerializedName(SERIALIZED_NAME_ADMIN_GROUP_ID) - @javax.annotation.Nullable - private String adminGroupId; - - public static final String SERIALIZED_NAME_ALL_TABLES_CONNECTION_ID = - "all_tables_connection_id"; - - @SerializedName(SERIALIZED_NAME_ALL_TABLES_CONNECTION_ID) - @javax.annotation.Nullable - private String allTablesConnectionId; - - public static final String SERIALIZED_NAME_ALL_USER_GROUP_ID = "all_user_group_id"; - - @SerializedName(SERIALIZED_NAME_ALL_USER_GROUP_ID) - @javax.annotation.Nullable - private String allUserGroupId; - - public static final String SERIALIZED_NAME_ACCEPT_LANGUAGE = "accept_language"; - - @SerializedName(SERIALIZED_NAME_ACCEPT_LANGUAGE) - @javax.annotation.Nullable - private String acceptLanguage; - - public static final String SERIALIZED_NAME_ALL_USER_GROUP_MEMBER_USER_COUNT = - "all_user_group_member_user_count"; - - @SerializedName(SERIALIZED_NAME_ALL_USER_GROUP_MEMBER_USER_COUNT) - @javax.annotation.Nullable - private Integer allUserGroupMemberUserCount; - - public static final String SERIALIZED_NAME_LOGICAL_MODEL_VERSION = "logical_model_version"; - - @SerializedName(SERIALIZED_NAME_LOGICAL_MODEL_VERSION) - @javax.annotation.Nullable - private Integer logicalModelVersion; - - public SystemInfo() {} - - public SystemInfo id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the object - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public SystemInfo name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the cluster. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public SystemInfo releaseVersion(@javax.annotation.Nullable String releaseVersion) { - this.releaseVersion = releaseVersion; - return this; - } - - /** - * The release version of the cluster. - * - * @return releaseVersion - */ - @javax.annotation.Nullable - public String getReleaseVersion() { - return releaseVersion; - } - - public void setReleaseVersion(@javax.annotation.Nullable String releaseVersion) { - this.releaseVersion = releaseVersion; - } - - public SystemInfo timeZone(@javax.annotation.Nullable String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * The timezone of the cluster. - * - * @return timeZone - */ - @javax.annotation.Nullable - public String getTimeZone() { - return timeZone; - } - - public void setTimeZone(@javax.annotation.Nullable String timeZone) { - this.timeZone = timeZone; - } - - public SystemInfo locale(@javax.annotation.Nullable String locale) { - this.locale = locale; - return this; - } - - /** - * The default locale of the cluster. - * - * @return locale - */ - @javax.annotation.Nullable - public String getLocale() { - return locale; - } - - public void setLocale(@javax.annotation.Nullable String locale) { - this.locale = locale; - } - - public SystemInfo dateFormat(@javax.annotation.Nullable String dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * The default date format representation of the cluster. - * - * @return dateFormat - */ - @javax.annotation.Nullable - public String getDateFormat() { - return dateFormat; - } - - public void setDateFormat(@javax.annotation.Nullable String dateFormat) { - this.dateFormat = dateFormat; - } - - public SystemInfo apiVersion(@javax.annotation.Nullable String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * The API version of the cluster. - * - * @return apiVersion - */ - @javax.annotation.Nullable - public String getApiVersion() { - return apiVersion; - } - - public void setApiVersion(@javax.annotation.Nullable String apiVersion) { - this.apiVersion = apiVersion; - } - - public SystemInfo type(@javax.annotation.Nullable String type) { - this.type = type; - return this; - } - - /** - * The deployment type of the cluster. - * - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nullable String type) { - this.type = type; - } - - public SystemInfo environment(@javax.annotation.Nullable String environment) { - this.environment = environment; - return this; - } - - /** - * The deployed environment of the cluster. - * - * @return environment - */ - @javax.annotation.Nullable - public String getEnvironment() { - return environment; - } - - public void setEnvironment(@javax.annotation.Nullable String environment) { - this.environment = environment; - } - - public SystemInfo license(@javax.annotation.Nullable String license) { - this.license = license; - return this; - } - - /** - * The license applied to the cluster. - * - * @return license - */ - @javax.annotation.Nullable - public String getLicense() { - return license; - } - - public void setLicense(@javax.annotation.Nullable String license) { - this.license = license; - } - - public SystemInfo dateTimeFormat(@javax.annotation.Nullable String dateTimeFormat) { - this.dateTimeFormat = dateTimeFormat; - return this; - } - /** - * The default date time format representation of the cluster. - * - * @return dateTimeFormat - */ - @javax.annotation.Nullable - public String getDateTimeFormat() { - return dateTimeFormat; - } - - public void setDateTimeFormat(@javax.annotation.Nullable String dateTimeFormat) { - this.dateTimeFormat = dateTimeFormat; - } - - public SystemInfo timeFormat(@javax.annotation.Nullable String timeFormat) { - this.timeFormat = timeFormat; - return this; - } - - /** - * The default time format representation of the cluster. - * - * @return timeFormat - */ - @javax.annotation.Nullable - public String getTimeFormat() { - return timeFormat; - } - - public void setTimeFormat(@javax.annotation.Nullable String timeFormat) { - this.timeFormat = timeFormat; - } - - public SystemInfo systemUserId(@javax.annotation.Nullable String systemUserId) { - this.systemUserId = systemUserId; - return this; - } - - /** - * The unique identifier of system user. - * - * @return systemUserId - */ - @javax.annotation.Nullable - public String getSystemUserId() { - return systemUserId; - } - - public void setSystemUserId(@javax.annotation.Nullable String systemUserId) { - this.systemUserId = systemUserId; - } - - public SystemInfo superUserId(@javax.annotation.Nullable String superUserId) { - this.superUserId = superUserId; - return this; - } - - /** - * The unique identifier of super user. - * - * @return superUserId - */ - @javax.annotation.Nullable - public String getSuperUserId() { - return superUserId; - } - - public void setSuperUserId(@javax.annotation.Nullable String superUserId) { - this.superUserId = superUserId; - } - - public SystemInfo hiddenObjectId(@javax.annotation.Nullable String hiddenObjectId) { - this.hiddenObjectId = hiddenObjectId; - return this; - } - - /** - * The unique identifier of hidden object. - * - * @return hiddenObjectId - */ - @javax.annotation.Nullable - public String getHiddenObjectId() { - return hiddenObjectId; - } - - public void setHiddenObjectId(@javax.annotation.Nullable String hiddenObjectId) { - this.hiddenObjectId = hiddenObjectId; - } - - public SystemInfo systemGroupId(@javax.annotation.Nullable String systemGroupId) { - this.systemGroupId = systemGroupId; - return this; - } - - /** - * The unique identifier of system group. - * - * @return systemGroupId - */ - @javax.annotation.Nullable - public String getSystemGroupId() { - return systemGroupId; - } - - public void setSystemGroupId(@javax.annotation.Nullable String systemGroupId) { - this.systemGroupId = systemGroupId; - } - - public SystemInfo tsadminUserId(@javax.annotation.Nullable String tsadminUserId) { - this.tsadminUserId = tsadminUserId; - return this; - } - - /** - * The unique identifier of tsadmin user. - * - * @return tsadminUserId - */ - @javax.annotation.Nullable - public String getTsadminUserId() { - return tsadminUserId; - } - - public void setTsadminUserId(@javax.annotation.Nullable String tsadminUserId) { - this.tsadminUserId = tsadminUserId; - } - - public SystemInfo adminGroupId(@javax.annotation.Nullable String adminGroupId) { - this.adminGroupId = adminGroupId; - return this; - } - - /** - * The unique identifier of admin group. - * - * @return adminGroupId - */ - @javax.annotation.Nullable - public String getAdminGroupId() { - return adminGroupId; - } - - public void setAdminGroupId(@javax.annotation.Nullable String adminGroupId) { - this.adminGroupId = adminGroupId; - } - - public SystemInfo allTablesConnectionId( - @javax.annotation.Nullable String allTablesConnectionId) { - this.allTablesConnectionId = allTablesConnectionId; - return this; - } - - /** - * The unique identifier of all tables connection. - * - * @return allTablesConnectionId - */ - @javax.annotation.Nullable - public String getAllTablesConnectionId() { - return allTablesConnectionId; - } - - public void setAllTablesConnectionId(@javax.annotation.Nullable String allTablesConnectionId) { - this.allTablesConnectionId = allTablesConnectionId; - } - - public SystemInfo allUserGroupId(@javax.annotation.Nullable String allUserGroupId) { - this.allUserGroupId = allUserGroupId; - return this; - } - - /** - * The unique identifier of ALL group. - * - * @return allUserGroupId - */ - @javax.annotation.Nullable - public String getAllUserGroupId() { - return allUserGroupId; - } - - public void setAllUserGroupId(@javax.annotation.Nullable String allUserGroupId) { - this.allUserGroupId = allUserGroupId; - } - - public SystemInfo acceptLanguage(@javax.annotation.Nullable String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** - * The supported accept language by the cluster. - * - * @return acceptLanguage - */ - @javax.annotation.Nullable - public String getAcceptLanguage() { - return acceptLanguage; - } - - public void setAcceptLanguage(@javax.annotation.Nullable String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - } - - public SystemInfo allUserGroupMemberUserCount( - @javax.annotation.Nullable Integer allUserGroupMemberUserCount) { - this.allUserGroupMemberUserCount = allUserGroupMemberUserCount; - return this; - } - - /** - * The count of users of ALL group. - * - * @return allUserGroupMemberUserCount - */ - @javax.annotation.Nullable - public Integer getAllUserGroupMemberUserCount() { - return allUserGroupMemberUserCount; - } - - public void setAllUserGroupMemberUserCount( - @javax.annotation.Nullable Integer allUserGroupMemberUserCount) { - this.allUserGroupMemberUserCount = allUserGroupMemberUserCount; - } - - public SystemInfo logicalModelVersion(@javax.annotation.Nullable Integer logicalModelVersion) { - this.logicalModelVersion = logicalModelVersion; - return this; - } - - /** - * The version number of logical model of the cluster. - * - * @return logicalModelVersion - */ - @javax.annotation.Nullable - public Integer getLogicalModelVersion() { - return logicalModelVersion; - } - - public void setLogicalModelVersion(@javax.annotation.Nullable Integer logicalModelVersion) { - this.logicalModelVersion = logicalModelVersion; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SystemInfo systemInfo = (SystemInfo) o; - return Objects.equals(this.id, systemInfo.id) - && Objects.equals(this.name, systemInfo.name) - && Objects.equals(this.releaseVersion, systemInfo.releaseVersion) - && Objects.equals(this.timeZone, systemInfo.timeZone) - && Objects.equals(this.locale, systemInfo.locale) - && Objects.equals(this.dateFormat, systemInfo.dateFormat) - && Objects.equals(this.apiVersion, systemInfo.apiVersion) - && Objects.equals(this.type, systemInfo.type) - && Objects.equals(this.environment, systemInfo.environment) - && Objects.equals(this.license, systemInfo.license) - && Objects.equals(this.dateTimeFormat, systemInfo.dateTimeFormat) - && Objects.equals(this.timeFormat, systemInfo.timeFormat) - && Objects.equals(this.systemUserId, systemInfo.systemUserId) - && Objects.equals(this.superUserId, systemInfo.superUserId) - && Objects.equals(this.hiddenObjectId, systemInfo.hiddenObjectId) - && Objects.equals(this.systemGroupId, systemInfo.systemGroupId) - && Objects.equals(this.tsadminUserId, systemInfo.tsadminUserId) - && Objects.equals(this.adminGroupId, systemInfo.adminGroupId) - && Objects.equals(this.allTablesConnectionId, systemInfo.allTablesConnectionId) - && Objects.equals(this.allUserGroupId, systemInfo.allUserGroupId) - && Objects.equals(this.acceptLanguage, systemInfo.acceptLanguage) - && Objects.equals( - this.allUserGroupMemberUserCount, systemInfo.allUserGroupMemberUserCount) - && Objects.equals(this.logicalModelVersion, systemInfo.logicalModelVersion); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - name, - releaseVersion, - timeZone, - locale, - dateFormat, - apiVersion, - type, - environment, - license, - dateTimeFormat, - timeFormat, - systemUserId, - superUserId, - hiddenObjectId, - systemGroupId, - tsadminUserId, - adminGroupId, - allTablesConnectionId, - allUserGroupId, - acceptLanguage, - allUserGroupMemberUserCount, - logicalModelVersion); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SystemInfo {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" releaseVersion: ").append(toIndentedString(releaseVersion)).append("\n"); - sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); - sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); - sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); - sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); - sb.append(" license: ").append(toIndentedString(license)).append("\n"); - sb.append(" dateTimeFormat: ").append(toIndentedString(dateTimeFormat)).append("\n"); - sb.append(" timeFormat: ").append(toIndentedString(timeFormat)).append("\n"); - sb.append(" systemUserId: ").append(toIndentedString(systemUserId)).append("\n"); - sb.append(" superUserId: ").append(toIndentedString(superUserId)).append("\n"); - sb.append(" hiddenObjectId: ").append(toIndentedString(hiddenObjectId)).append("\n"); - sb.append(" systemGroupId: ").append(toIndentedString(systemGroupId)).append("\n"); - sb.append(" tsadminUserId: ").append(toIndentedString(tsadminUserId)).append("\n"); - sb.append(" adminGroupId: ").append(toIndentedString(adminGroupId)).append("\n"); - sb.append(" allTablesConnectionId: ") - .append(toIndentedString(allTablesConnectionId)) - .append("\n"); - sb.append(" allUserGroupId: ").append(toIndentedString(allUserGroupId)).append("\n"); - sb.append(" acceptLanguage: ").append(toIndentedString(acceptLanguage)).append("\n"); - sb.append(" allUserGroupMemberUserCount: ") - .append(toIndentedString(allUserGroupMemberUserCount)) - .append("\n"); - sb.append(" logicalModelVersion: ") - .append(toIndentedString(logicalModelVersion)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("release_version"); - openapiFields.add("time_zone"); - openapiFields.add("locale"); - openapiFields.add("date_format"); - openapiFields.add("api_version"); - openapiFields.add("type"); - openapiFields.add("environment"); - openapiFields.add("license"); - openapiFields.add("date_time_format"); - openapiFields.add("time_format"); - openapiFields.add("system_user_id"); - openapiFields.add("super_user_id"); - openapiFields.add("hidden_object_id"); - openapiFields.add("system_group_id"); - openapiFields.add("tsadmin_user_id"); - openapiFields.add("admin_group_id"); - openapiFields.add("all_tables_connection_id"); - openapiFields.add("all_user_group_id"); - openapiFields.add("accept_language"); - openapiFields.add("all_user_group_member_user_count"); - openapiFields.add("logical_model_version"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SystemInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SystemInfo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SystemInfo is not found in the empty" - + " JSON string", - SystemInfo.openapiRequiredFields.toString())); - } +/** + * SystemInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SystemInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_RELEASE_VERSION = "release_version"; + @SerializedName(SERIALIZED_NAME_RELEASE_VERSION) + @javax.annotation.Nullable + private String releaseVersion; + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nullable + private String timeZone; + + public static final String SERIALIZED_NAME_LOCALE = "locale"; + @SerializedName(SERIALIZED_NAME_LOCALE) + @javax.annotation.Nullable + private String locale; + + public static final String SERIALIZED_NAME_DATE_FORMAT = "date_format"; + @SerializedName(SERIALIZED_NAME_DATE_FORMAT) + @javax.annotation.Nullable + private String dateFormat; + + public static final String SERIALIZED_NAME_API_VERSION = "api_version"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + @javax.annotation.Nullable + private String apiVersion; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_ENVIRONMENT = "environment"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT) + @javax.annotation.Nullable + private String environment; + + public static final String SERIALIZED_NAME_LICENSE = "license"; + @SerializedName(SERIALIZED_NAME_LICENSE) + @javax.annotation.Nullable + private String license; + + public static final String SERIALIZED_NAME_DATE_TIME_FORMAT = "date_time_format"; + @SerializedName(SERIALIZED_NAME_DATE_TIME_FORMAT) + @javax.annotation.Nullable + private String dateTimeFormat; + + public static final String SERIALIZED_NAME_TIME_FORMAT = "time_format"; + @SerializedName(SERIALIZED_NAME_TIME_FORMAT) + @javax.annotation.Nullable + private String timeFormat; + + public static final String SERIALIZED_NAME_SYSTEM_USER_ID = "system_user_id"; + @SerializedName(SERIALIZED_NAME_SYSTEM_USER_ID) + @javax.annotation.Nullable + private String systemUserId; + + public static final String SERIALIZED_NAME_SUPER_USER_ID = "super_user_id"; + @SerializedName(SERIALIZED_NAME_SUPER_USER_ID) + @javax.annotation.Nullable + private String superUserId; + + public static final String SERIALIZED_NAME_HIDDEN_OBJECT_ID = "hidden_object_id"; + @SerializedName(SERIALIZED_NAME_HIDDEN_OBJECT_ID) + @javax.annotation.Nullable + private String hiddenObjectId; + + public static final String SERIALIZED_NAME_SYSTEM_GROUP_ID = "system_group_id"; + @SerializedName(SERIALIZED_NAME_SYSTEM_GROUP_ID) + @javax.annotation.Nullable + private String systemGroupId; + + public static final String SERIALIZED_NAME_TSADMIN_USER_ID = "tsadmin_user_id"; + @SerializedName(SERIALIZED_NAME_TSADMIN_USER_ID) + @javax.annotation.Nullable + private String tsadminUserId; + + public static final String SERIALIZED_NAME_ADMIN_GROUP_ID = "admin_group_id"; + @SerializedName(SERIALIZED_NAME_ADMIN_GROUP_ID) + @javax.annotation.Nullable + private String adminGroupId; + + public static final String SERIALIZED_NAME_ALL_TABLES_CONNECTION_ID = "all_tables_connection_id"; + @SerializedName(SERIALIZED_NAME_ALL_TABLES_CONNECTION_ID) + @javax.annotation.Nullable + private String allTablesConnectionId; + + public static final String SERIALIZED_NAME_ALL_USER_GROUP_ID = "all_user_group_id"; + @SerializedName(SERIALIZED_NAME_ALL_USER_GROUP_ID) + @javax.annotation.Nullable + private String allUserGroupId; + + public static final String SERIALIZED_NAME_ACCEPT_LANGUAGE = "accept_language"; + @SerializedName(SERIALIZED_NAME_ACCEPT_LANGUAGE) + @javax.annotation.Nullable + private String acceptLanguage; + + public static final String SERIALIZED_NAME_ALL_USER_GROUP_MEMBER_USER_COUNT = "all_user_group_member_user_count"; + @SerializedName(SERIALIZED_NAME_ALL_USER_GROUP_MEMBER_USER_COUNT) + @javax.annotation.Nullable + private Integer allUserGroupMemberUserCount; + + public static final String SERIALIZED_NAME_LOGICAL_MODEL_VERSION = "logical_model_version"; + @SerializedName(SERIALIZED_NAME_LOGICAL_MODEL_VERSION) + @javax.annotation.Nullable + private Integer logicalModelVersion; + + public SystemInfo() { + } + + public SystemInfo id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public SystemInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the cluster. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public SystemInfo releaseVersion(@javax.annotation.Nullable String releaseVersion) { + this.releaseVersion = releaseVersion; + return this; + } + + /** + * The release version of the cluster. + * @return releaseVersion + */ + @javax.annotation.Nullable + public String getReleaseVersion() { + return releaseVersion; + } + + public void setReleaseVersion(@javax.annotation.Nullable String releaseVersion) { + this.releaseVersion = releaseVersion; + } + + + public SystemInfo timeZone(@javax.annotation.Nullable String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * The timezone of the cluster. + * @return timeZone + */ + @javax.annotation.Nullable + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nullable String timeZone) { + this.timeZone = timeZone; + } + + + public SystemInfo locale(@javax.annotation.Nullable String locale) { + this.locale = locale; + return this; + } + + /** + * The default locale of the cluster. + * @return locale + */ + @javax.annotation.Nullable + public String getLocale() { + return locale; + } + + public void setLocale(@javax.annotation.Nullable String locale) { + this.locale = locale; + } + + + public SystemInfo dateFormat(@javax.annotation.Nullable String dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * The default date format representation of the cluster. + * @return dateFormat + */ + @javax.annotation.Nullable + public String getDateFormat() { + return dateFormat; + } + + public void setDateFormat(@javax.annotation.Nullable String dateFormat) { + this.dateFormat = dateFormat; + } + + + public SystemInfo apiVersion(@javax.annotation.Nullable String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * The API version of the cluster. + * @return apiVersion + */ + @javax.annotation.Nullable + public String getApiVersion() { + return apiVersion; + } + + public void setApiVersion(@javax.annotation.Nullable String apiVersion) { + this.apiVersion = apiVersion; + } + + + public SystemInfo type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * The deployment type of the cluster. + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public SystemInfo environment(@javax.annotation.Nullable String environment) { + this.environment = environment; + return this; + } + + /** + * The deployed environment of the cluster. + * @return environment + */ + @javax.annotation.Nullable + public String getEnvironment() { + return environment; + } + + public void setEnvironment(@javax.annotation.Nullable String environment) { + this.environment = environment; + } + + + public SystemInfo license(@javax.annotation.Nullable String license) { + this.license = license; + return this; + } + + /** + * The license applied to the cluster. + * @return license + */ + @javax.annotation.Nullable + public String getLicense() { + return license; + } + + public void setLicense(@javax.annotation.Nullable String license) { + this.license = license; + } + + + public SystemInfo dateTimeFormat(@javax.annotation.Nullable String dateTimeFormat) { + this.dateTimeFormat = dateTimeFormat; + return this; + } + + /** + * The default date time format representation of the cluster. + * @return dateTimeFormat + */ + @javax.annotation.Nullable + public String getDateTimeFormat() { + return dateTimeFormat; + } + + public void setDateTimeFormat(@javax.annotation.Nullable String dateTimeFormat) { + this.dateTimeFormat = dateTimeFormat; + } + + + public SystemInfo timeFormat(@javax.annotation.Nullable String timeFormat) { + this.timeFormat = timeFormat; + return this; + } + + /** + * The default time format representation of the cluster. + * @return timeFormat + */ + @javax.annotation.Nullable + public String getTimeFormat() { + return timeFormat; + } + + public void setTimeFormat(@javax.annotation.Nullable String timeFormat) { + this.timeFormat = timeFormat; + } + + + public SystemInfo systemUserId(@javax.annotation.Nullable String systemUserId) { + this.systemUserId = systemUserId; + return this; + } + + /** + * The unique identifier of system user. + * @return systemUserId + */ + @javax.annotation.Nullable + public String getSystemUserId() { + return systemUserId; + } + + public void setSystemUserId(@javax.annotation.Nullable String systemUserId) { + this.systemUserId = systemUserId; + } + + + public SystemInfo superUserId(@javax.annotation.Nullable String superUserId) { + this.superUserId = superUserId; + return this; + } + + /** + * The unique identifier of super user. + * @return superUserId + */ + @javax.annotation.Nullable + public String getSuperUserId() { + return superUserId; + } + + public void setSuperUserId(@javax.annotation.Nullable String superUserId) { + this.superUserId = superUserId; + } + + + public SystemInfo hiddenObjectId(@javax.annotation.Nullable String hiddenObjectId) { + this.hiddenObjectId = hiddenObjectId; + return this; + } + + /** + * The unique identifier of hidden object. + * @return hiddenObjectId + */ + @javax.annotation.Nullable + public String getHiddenObjectId() { + return hiddenObjectId; + } + + public void setHiddenObjectId(@javax.annotation.Nullable String hiddenObjectId) { + this.hiddenObjectId = hiddenObjectId; + } + + + public SystemInfo systemGroupId(@javax.annotation.Nullable String systemGroupId) { + this.systemGroupId = systemGroupId; + return this; + } + + /** + * The unique identifier of system group. + * @return systemGroupId + */ + @javax.annotation.Nullable + public String getSystemGroupId() { + return systemGroupId; + } + + public void setSystemGroupId(@javax.annotation.Nullable String systemGroupId) { + this.systemGroupId = systemGroupId; + } + + + public SystemInfo tsadminUserId(@javax.annotation.Nullable String tsadminUserId) { + this.tsadminUserId = tsadminUserId; + return this; + } + + /** + * The unique identifier of tsadmin user. + * @return tsadminUserId + */ + @javax.annotation.Nullable + public String getTsadminUserId() { + return tsadminUserId; + } + + public void setTsadminUserId(@javax.annotation.Nullable String tsadminUserId) { + this.tsadminUserId = tsadminUserId; + } + + + public SystemInfo adminGroupId(@javax.annotation.Nullable String adminGroupId) { + this.adminGroupId = adminGroupId; + return this; + } + + /** + * The unique identifier of admin group. + * @return adminGroupId + */ + @javax.annotation.Nullable + public String getAdminGroupId() { + return adminGroupId; + } + + public void setAdminGroupId(@javax.annotation.Nullable String adminGroupId) { + this.adminGroupId = adminGroupId; + } + + + public SystemInfo allTablesConnectionId(@javax.annotation.Nullable String allTablesConnectionId) { + this.allTablesConnectionId = allTablesConnectionId; + return this; + } + + /** + * The unique identifier of all tables connection. + * @return allTablesConnectionId + */ + @javax.annotation.Nullable + public String getAllTablesConnectionId() { + return allTablesConnectionId; + } + + public void setAllTablesConnectionId(@javax.annotation.Nullable String allTablesConnectionId) { + this.allTablesConnectionId = allTablesConnectionId; + } + + + public SystemInfo allUserGroupId(@javax.annotation.Nullable String allUserGroupId) { + this.allUserGroupId = allUserGroupId; + return this; + } + + /** + * The unique identifier of ALL group. + * @return allUserGroupId + */ + @javax.annotation.Nullable + public String getAllUserGroupId() { + return allUserGroupId; + } + + public void setAllUserGroupId(@javax.annotation.Nullable String allUserGroupId) { + this.allUserGroupId = allUserGroupId; + } + + + public SystemInfo acceptLanguage(@javax.annotation.Nullable String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** + * The supported accept language by the cluster. + * @return acceptLanguage + */ + @javax.annotation.Nullable + public String getAcceptLanguage() { + return acceptLanguage; + } + + public void setAcceptLanguage(@javax.annotation.Nullable String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + } + + + public SystemInfo allUserGroupMemberUserCount(@javax.annotation.Nullable Integer allUserGroupMemberUserCount) { + this.allUserGroupMemberUserCount = allUserGroupMemberUserCount; + return this; + } + + /** + * The count of users of ALL group. + * @return allUserGroupMemberUserCount + */ + @javax.annotation.Nullable + public Integer getAllUserGroupMemberUserCount() { + return allUserGroupMemberUserCount; + } + + public void setAllUserGroupMemberUserCount(@javax.annotation.Nullable Integer allUserGroupMemberUserCount) { + this.allUserGroupMemberUserCount = allUserGroupMemberUserCount; + } + + + public SystemInfo logicalModelVersion(@javax.annotation.Nullable Integer logicalModelVersion) { + this.logicalModelVersion = logicalModelVersion; + return this; + } + + /** + * The version number of logical model of the cluster. + * @return logicalModelVersion + */ + @javax.annotation.Nullable + public Integer getLogicalModelVersion() { + return logicalModelVersion; + } + + public void setLogicalModelVersion(@javax.annotation.Nullable Integer logicalModelVersion) { + this.logicalModelVersion = logicalModelVersion; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SystemInfo systemInfo = (SystemInfo) o; + return Objects.equals(this.id, systemInfo.id) && + Objects.equals(this.name, systemInfo.name) && + Objects.equals(this.releaseVersion, systemInfo.releaseVersion) && + Objects.equals(this.timeZone, systemInfo.timeZone) && + Objects.equals(this.locale, systemInfo.locale) && + Objects.equals(this.dateFormat, systemInfo.dateFormat) && + Objects.equals(this.apiVersion, systemInfo.apiVersion) && + Objects.equals(this.type, systemInfo.type) && + Objects.equals(this.environment, systemInfo.environment) && + Objects.equals(this.license, systemInfo.license) && + Objects.equals(this.dateTimeFormat, systemInfo.dateTimeFormat) && + Objects.equals(this.timeFormat, systemInfo.timeFormat) && + Objects.equals(this.systemUserId, systemInfo.systemUserId) && + Objects.equals(this.superUserId, systemInfo.superUserId) && + Objects.equals(this.hiddenObjectId, systemInfo.hiddenObjectId) && + Objects.equals(this.systemGroupId, systemInfo.systemGroupId) && + Objects.equals(this.tsadminUserId, systemInfo.tsadminUserId) && + Objects.equals(this.adminGroupId, systemInfo.adminGroupId) && + Objects.equals(this.allTablesConnectionId, systemInfo.allTablesConnectionId) && + Objects.equals(this.allUserGroupId, systemInfo.allUserGroupId) && + Objects.equals(this.acceptLanguage, systemInfo.acceptLanguage) && + Objects.equals(this.allUserGroupMemberUserCount, systemInfo.allUserGroupMemberUserCount) && + Objects.equals(this.logicalModelVersion, systemInfo.logicalModelVersion); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, releaseVersion, timeZone, locale, dateFormat, apiVersion, type, environment, license, dateTimeFormat, timeFormat, systemUserId, superUserId, hiddenObjectId, systemGroupId, tsadminUserId, adminGroupId, allTablesConnectionId, allUserGroupId, acceptLanguage, allUserGroupMemberUserCount, logicalModelVersion); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" releaseVersion: ").append(toIndentedString(releaseVersion)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); + sb.append(" license: ").append(toIndentedString(license)).append("\n"); + sb.append(" dateTimeFormat: ").append(toIndentedString(dateTimeFormat)).append("\n"); + sb.append(" timeFormat: ").append(toIndentedString(timeFormat)).append("\n"); + sb.append(" systemUserId: ").append(toIndentedString(systemUserId)).append("\n"); + sb.append(" superUserId: ").append(toIndentedString(superUserId)).append("\n"); + sb.append(" hiddenObjectId: ").append(toIndentedString(hiddenObjectId)).append("\n"); + sb.append(" systemGroupId: ").append(toIndentedString(systemGroupId)).append("\n"); + sb.append(" tsadminUserId: ").append(toIndentedString(tsadminUserId)).append("\n"); + sb.append(" adminGroupId: ").append(toIndentedString(adminGroupId)).append("\n"); + sb.append(" allTablesConnectionId: ").append(toIndentedString(allTablesConnectionId)).append("\n"); + sb.append(" allUserGroupId: ").append(toIndentedString(allUserGroupId)).append("\n"); + sb.append(" acceptLanguage: ").append(toIndentedString(acceptLanguage)).append("\n"); + sb.append(" allUserGroupMemberUserCount: ").append(toIndentedString(allUserGroupMemberUserCount)).append("\n"); + sb.append(" logicalModelVersion: ").append(toIndentedString(logicalModelVersion)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("release_version"); + openapiFields.add("time_zone"); + openapiFields.add("locale"); + openapiFields.add("date_format"); + openapiFields.add("api_version"); + openapiFields.add("type"); + openapiFields.add("environment"); + openapiFields.add("license"); + openapiFields.add("date_time_format"); + openapiFields.add("time_format"); + openapiFields.add("system_user_id"); + openapiFields.add("super_user_id"); + openapiFields.add("hidden_object_id"); + openapiFields.add("system_group_id"); + openapiFields.add("tsadmin_user_id"); + openapiFields.add("admin_group_id"); + openapiFields.add("all_tables_connection_id"); + openapiFields.add("all_user_group_id"); + openapiFields.add("accept_language"); + openapiFields.add("all_user_group_member_user_count"); + openapiFields.add("logical_model_version"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SystemInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SystemInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SystemInfo is not found in the empty JSON string", SystemInfo.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SystemInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SystemInfo` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SystemInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SystemInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("release_version") != null && !jsonObj.get("release_version").isJsonNull()) - && !jsonObj.get("release_version").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `release_version` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("release_version").toString())); - } - if ((jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) - && !jsonObj.get("time_zone").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `time_zone` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("time_zone").toString())); - } - if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) - && !jsonObj.get("locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `locale` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("locale").toString())); - } - if ((jsonObj.get("date_format") != null && !jsonObj.get("date_format").isJsonNull()) - && !jsonObj.get("date_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `date_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("date_format").toString())); - } - if ((jsonObj.get("api_version") != null && !jsonObj.get("api_version").isJsonNull()) - && !jsonObj.get("api_version").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `api_version` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("api_version").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - if ((jsonObj.get("environment") != null && !jsonObj.get("environment").isJsonNull()) - && !jsonObj.get("environment").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `environment` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("environment").toString())); - } - if ((jsonObj.get("license") != null && !jsonObj.get("license").isJsonNull()) - && !jsonObj.get("license").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `license` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("license").toString())); - } - if ((jsonObj.get("date_time_format") != null - && !jsonObj.get("date_time_format").isJsonNull()) - && !jsonObj.get("date_time_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `date_time_format` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("date_time_format").toString())); - } - if ((jsonObj.get("time_format") != null && !jsonObj.get("time_format").isJsonNull()) - && !jsonObj.get("time_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `time_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("time_format").toString())); - } - if ((jsonObj.get("system_user_id") != null && !jsonObj.get("system_user_id").isJsonNull()) - && !jsonObj.get("system_user_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `system_user_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("system_user_id").toString())); - } - if ((jsonObj.get("super_user_id") != null && !jsonObj.get("super_user_id").isJsonNull()) - && !jsonObj.get("super_user_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `super_user_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("super_user_id").toString())); - } - if ((jsonObj.get("hidden_object_id") != null - && !jsonObj.get("hidden_object_id").isJsonNull()) - && !jsonObj.get("hidden_object_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `hidden_object_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("hidden_object_id").toString())); - } - if ((jsonObj.get("system_group_id") != null && !jsonObj.get("system_group_id").isJsonNull()) - && !jsonObj.get("system_group_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `system_group_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("system_group_id").toString())); - } - if ((jsonObj.get("tsadmin_user_id") != null && !jsonObj.get("tsadmin_user_id").isJsonNull()) - && !jsonObj.get("tsadmin_user_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tsadmin_user_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("tsadmin_user_id").toString())); - } - if ((jsonObj.get("admin_group_id") != null && !jsonObj.get("admin_group_id").isJsonNull()) - && !jsonObj.get("admin_group_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `admin_group_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("admin_group_id").toString())); - } - if ((jsonObj.get("all_tables_connection_id") != null - && !jsonObj.get("all_tables_connection_id").isJsonNull()) - && !jsonObj.get("all_tables_connection_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `all_tables_connection_id` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("all_tables_connection_id").toString())); - } - if ((jsonObj.get("all_user_group_id") != null - && !jsonObj.get("all_user_group_id").isJsonNull()) - && !jsonObj.get("all_user_group_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `all_user_group_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("all_user_group_id").toString())); - } - if ((jsonObj.get("accept_language") != null && !jsonObj.get("accept_language").isJsonNull()) - && !jsonObj.get("accept_language").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `accept_language` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("accept_language").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SystemInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SystemInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SystemInfo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SystemInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SystemInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SystemInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of SystemInfo - * @throws IOException if the JSON string is invalid with respect to SystemInfo - */ - public static SystemInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SystemInfo.class); - } - - /** - * Convert an instance of SystemInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("release_version") != null && !jsonObj.get("release_version").isJsonNull()) && !jsonObj.get("release_version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `release_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("release_version").toString())); + } + if ((jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) && !jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_zone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_zone").toString())); + } + if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) && !jsonObj.get("locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); + } + if ((jsonObj.get("date_format") != null && !jsonObj.get("date_format").isJsonNull()) && !jsonObj.get("date_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `date_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date_format").toString())); + } + if ((jsonObj.get("api_version") != null && !jsonObj.get("api_version").isJsonNull()) && !jsonObj.get("api_version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `api_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("api_version").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("environment") != null && !jsonObj.get("environment").isJsonNull()) && !jsonObj.get("environment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environment").toString())); + } + if ((jsonObj.get("license") != null && !jsonObj.get("license").isJsonNull()) && !jsonObj.get("license").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `license` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license").toString())); + } + if ((jsonObj.get("date_time_format") != null && !jsonObj.get("date_time_format").isJsonNull()) && !jsonObj.get("date_time_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `date_time_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date_time_format").toString())); + } + if ((jsonObj.get("time_format") != null && !jsonObj.get("time_format").isJsonNull()) && !jsonObj.get("time_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_format").toString())); + } + if ((jsonObj.get("system_user_id") != null && !jsonObj.get("system_user_id").isJsonNull()) && !jsonObj.get("system_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `system_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("system_user_id").toString())); + } + if ((jsonObj.get("super_user_id") != null && !jsonObj.get("super_user_id").isJsonNull()) && !jsonObj.get("super_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `super_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("super_user_id").toString())); + } + if ((jsonObj.get("hidden_object_id") != null && !jsonObj.get("hidden_object_id").isJsonNull()) && !jsonObj.get("hidden_object_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hidden_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hidden_object_id").toString())); + } + if ((jsonObj.get("system_group_id") != null && !jsonObj.get("system_group_id").isJsonNull()) && !jsonObj.get("system_group_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `system_group_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("system_group_id").toString())); + } + if ((jsonObj.get("tsadmin_user_id") != null && !jsonObj.get("tsadmin_user_id").isJsonNull()) && !jsonObj.get("tsadmin_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tsadmin_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tsadmin_user_id").toString())); + } + if ((jsonObj.get("admin_group_id") != null && !jsonObj.get("admin_group_id").isJsonNull()) && !jsonObj.get("admin_group_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `admin_group_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("admin_group_id").toString())); + } + if ((jsonObj.get("all_tables_connection_id") != null && !jsonObj.get("all_tables_connection_id").isJsonNull()) && !jsonObj.get("all_tables_connection_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `all_tables_connection_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("all_tables_connection_id").toString())); + } + if ((jsonObj.get("all_user_group_id") != null && !jsonObj.get("all_user_group_id").isJsonNull()) && !jsonObj.get("all_user_group_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `all_user_group_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("all_user_group_id").toString())); + } + if ((jsonObj.get("accept_language") != null && !jsonObj.get("accept_language").isJsonNull()) && !jsonObj.get("accept_language").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accept_language` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accept_language").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SystemInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SystemInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SystemInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SystemInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SystemInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SystemInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of SystemInfo + * @throws IOException if the JSON string is invalid with respect to SystemInfo + */ + public static SystemInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SystemInfo.class); + } + + /** + * Convert an instance of SystemInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java index 73927c8db..782dfbbce 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java @@ -4,206 +4,206 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** SystemOverrideInfo */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * SystemOverrideInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SystemOverrideInfo implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_CONFIG_OVERRIDE_INFO = "config_override_info"; + public static final String SERIALIZED_NAME_CONFIG_OVERRIDE_INFO = "config_override_info"; + @SerializedName(SERIALIZED_NAME_CONFIG_OVERRIDE_INFO) + @javax.annotation.Nullable + private Object configOverrideInfo; - @SerializedName(SERIALIZED_NAME_CONFIG_OVERRIDE_INFO) - @javax.annotation.Nullable - private Object configOverrideInfo; + public SystemOverrideInfo() { + } - public SystemOverrideInfo() {} + public SystemOverrideInfo configOverrideInfo(@javax.annotation.Nullable Object configOverrideInfo) { + this.configOverrideInfo = configOverrideInfo; + return this; + } - public SystemOverrideInfo configOverrideInfo( - @javax.annotation.Nullable Object configOverrideInfo) { - this.configOverrideInfo = configOverrideInfo; - return this; - } + /** + * Get configOverrideInfo + * @return configOverrideInfo + */ + @javax.annotation.Nullable + public Object getConfigOverrideInfo() { + return configOverrideInfo; + } - /** - * Get configOverrideInfo - * - * @return configOverrideInfo - */ - @javax.annotation.Nullable - public Object getConfigOverrideInfo() { - return configOverrideInfo; - } + public void setConfigOverrideInfo(@javax.annotation.Nullable Object configOverrideInfo) { + this.configOverrideInfo = configOverrideInfo; + } - public void setConfigOverrideInfo(@javax.annotation.Nullable Object configOverrideInfo) { - this.configOverrideInfo = configOverrideInfo; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SystemOverrideInfo systemOverrideInfo = (SystemOverrideInfo) o; - return Objects.equals(this.configOverrideInfo, systemOverrideInfo.configOverrideInfo); - } - 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 boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(configOverrideInfo); + if (o == null || getClass() != o.getClass()) { + return false; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + SystemOverrideInfo systemOverrideInfo = (SystemOverrideInfo) o; + return Objects.equals(this.configOverrideInfo, systemOverrideInfo.configOverrideInfo); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(configOverrideInfo); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SystemOverrideInfo {\n"); - sb.append(" configOverrideInfo: ") - .append(toIndentedString(configOverrideInfo)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemOverrideInfo {\n"); + sb.append(" configOverrideInfo: ").append(toIndentedString(configOverrideInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("config_override_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SystemOverrideInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SystemOverrideInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SystemOverrideInfo is not found in the empty JSON string", SystemOverrideInfo.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("config_override_info"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SystemOverrideInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SystemOverrideInfo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in SystemOverrideInfo is not found in" - + " the empty JSON string", - SystemOverrideInfo.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SystemOverrideInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `SystemOverrideInfo` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SystemOverrideInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SystemOverrideInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SystemOverrideInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SystemOverrideInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(SystemOverrideInfo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, SystemOverrideInfo value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SystemOverrideInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of SystemOverrideInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of SystemOverrideInfo - * @throws IOException if the JSON string is invalid with respect to SystemOverrideInfo - */ - public static SystemOverrideInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SystemOverrideInfo.class); - } + } - /** - * Convert an instance of SystemOverrideInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SystemOverrideInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SystemOverrideInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SystemOverrideInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SystemOverrideInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SystemOverrideInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of SystemOverrideInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of SystemOverrideInfo + * @throws IOException if the JSON string is invalid with respect to SystemOverrideInfo + */ + public static SystemOverrideInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SystemOverrideInfo.class); + } + + /** + * Convert an instance of SystemOverrideInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java index d96986f9b..91893a5a0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java @@ -4,452 +4,422 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Column; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Table */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Table implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_COLUMNS = "columns"; - - @SerializedName(SERIALIZED_NAME_COLUMNS) - @javax.annotation.Nullable - private List columns; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private String type; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_SELECTED = "selected"; - - @SerializedName(SERIALIZED_NAME_SELECTED) - @javax.annotation.Nullable - private Boolean selected; - - public static final String SERIALIZED_NAME_LINKED = "linked"; - - @SerializedName(SERIALIZED_NAME_LINKED) - @javax.annotation.Nullable - private Boolean linked; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - @javax.annotation.Nullable - private List relationships; - - public Table() {} - - public Table name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the table. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public Table columns(@javax.annotation.Nullable List columns) { - this.columns = columns; - return this; - } - - public Table addColumnsItem(Column columnsItem) { - if (this.columns == null) { - this.columns = new ArrayList<>(); - } - this.columns.add(columnsItem); - return this; - } - - /** - * Columns of the table. - * - * @return columns - */ - @javax.annotation.Nullable - public List getColumns() { - return columns; - } - - public void setColumns(@javax.annotation.Nullable List columns) { - this.columns = columns; - } - - public Table type(@javax.annotation.Nullable String type) { - this.type = type; - return this; - } - - /** - * Type of table. Either view or table - * - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nullable String type) { - this.type = type; - } - - public Table description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - /** - * Description of the table - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public Table selected(@javax.annotation.Nullable Boolean selected) { - this.selected = selected; - return this; - } - - /** - * Determines if the table is selected - * - * @return selected - */ - @javax.annotation.Nullable - public Boolean getSelected() { - return selected; - } - - public void setSelected(@javax.annotation.Nullable Boolean selected) { - this.selected = selected; - } - - public Table linked(@javax.annotation.Nullable Boolean linked) { - this.linked = linked; - return this; - } - - /** - * Determines if the table is linked - * - * @return linked - */ - @javax.annotation.Nullable - public Boolean getLinked() { - return linked; - } - - public void setLinked(@javax.annotation.Nullable Boolean linked) { - this.linked = linked; - } - - public Table relationships(@javax.annotation.Nullable List relationships) { - this.relationships = relationships; - return this; - } - - public Table addRelationshipsItem(Object relationshipsItem) { - if (this.relationships == null) { - this.relationships = new ArrayList<>(); - } - this.relationships.add(relationshipsItem); - return this; - } - - /** - * List of relationships for the table - * - * @return relationships - */ - @javax.annotation.Nullable - public List getRelationships() { - return relationships; - } - - public void setRelationships(@javax.annotation.Nullable List relationships) { - this.relationships = relationships; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Table table = (Table) o; - return Objects.equals(this.name, table.name) - && Objects.equals(this.columns, table.columns) - && Objects.equals(this.type, table.type) - && Objects.equals(this.description, table.description) - && Objects.equals(this.selected, table.selected) - && Objects.equals(this.linked, table.linked) - && Objects.equals(this.relationships, table.relationships); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(name, columns, type, description, selected, linked, relationships); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Table {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" selected: ").append(toIndentedString(selected)).append("\n"); - sb.append(" linked: ").append(toIndentedString(linked)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("columns"); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("selected"); - openapiFields.add("linked"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Table - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Table.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Table is not found in the empty JSON" - + " string", - Table.openapiRequiredFields.toString())); - } +/** + * Table + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Table implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_COLUMNS = "columns"; + @SerializedName(SERIALIZED_NAME_COLUMNS) + @javax.annotation.Nullable + private List columns; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_SELECTED = "selected"; + @SerializedName(SERIALIZED_NAME_SELECTED) + @javax.annotation.Nullable + private Boolean selected; + + public static final String SERIALIZED_NAME_LINKED = "linked"; + @SerializedName(SERIALIZED_NAME_LINKED) + @javax.annotation.Nullable + private Boolean linked; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + @javax.annotation.Nullable + private List relationships; + + public Table() { + } + + public Table name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the table. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Table columns(@javax.annotation.Nullable List columns) { + this.columns = columns; + return this; + } + + public Table addColumnsItem(Column columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Columns of the table. + * @return columns + */ + @javax.annotation.Nullable + public List getColumns() { + return columns; + } + + public void setColumns(@javax.annotation.Nullable List columns) { + this.columns = columns; + } + + + public Table type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of table. Either view or table + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public Table description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the table + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public Table selected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + return this; + } + + /** + * Determines if the table is selected + * @return selected + */ + @javax.annotation.Nullable + public Boolean getSelected() { + return selected; + } + + public void setSelected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + } + + + public Table linked(@javax.annotation.Nullable Boolean linked) { + this.linked = linked; + return this; + } + + /** + * Determines if the table is linked + * @return linked + */ + @javax.annotation.Nullable + public Boolean getLinked() { + return linked; + } + + public void setLinked(@javax.annotation.Nullable Boolean linked) { + this.linked = linked; + } + + + public Table relationships(@javax.annotation.Nullable List relationships) { + this.relationships = relationships; + return this; + } + + public Table addRelationshipsItem(Object relationshipsItem) { + if (this.relationships == null) { + this.relationships = new ArrayList<>(); + } + this.relationships.add(relationshipsItem); + return this; + } + + /** + * List of relationships for the table + * @return relationships + */ + @javax.annotation.Nullable + public List getRelationships() { + return relationships; + } + + public void setRelationships(@javax.annotation.Nullable List relationships) { + this.relationships = relationships; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Table table = (Table) o; + return Objects.equals(this.name, table.name) && + Objects.equals(this.columns, table.columns) && + Objects.equals(this.type, table.type) && + Objects.equals(this.description, table.description) && + Objects.equals(this.selected, table.selected) && + Objects.equals(this.linked, table.linked) && + Objects.equals(this.relationships, table.relationships); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, columns, type, description, selected, linked, relationships); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Table {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" selected: ").append(toIndentedString(selected)).append("\n"); + sb.append(" linked: ").append(toIndentedString(linked)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("columns"); + openapiFields.add("type"); + openapiFields.add("description"); + openapiFields.add("selected"); + openapiFields.add("linked"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Table + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Table.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Table is not found in the empty JSON string", Table.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Table.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Table`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Table.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Table` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Table.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Table.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (jsonObj.get("columns") != null && !jsonObj.get("columns").isJsonNull()) { - JsonArray jsonArraycolumns = jsonObj.getAsJsonArray("columns"); - if (jsonArraycolumns != null) { - // ensure the json data is an array - if (!jsonObj.get("columns").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `columns` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("columns").toString())); - } - - // validate the optional field `columns` (array) - for (int i = 0; i < jsonArraycolumns.size(); i++) { - Column.validateJsonElement(jsonArraycolumns.get(i)); - } - ; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("relationships") != null - && !jsonObj.get("relationships").isJsonNull() - && !jsonObj.get("relationships").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `relationships` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("relationships").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Table.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Table' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter
thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Table.class)); - - return (TypeAdapter) - new TypeAdapter
() { - @Override - public void write(JsonWriter out, Table value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Table read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("columns") != null && !jsonObj.get("columns").isJsonNull()) { + JsonArray jsonArraycolumns = jsonObj.getAsJsonArray("columns"); + if (jsonArraycolumns != null) { + // ensure the json data is an array + if (!jsonObj.get("columns").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `columns` to be an array in the JSON string but got `%s`", jsonObj.get("columns").toString())); + } + + // validate the optional field `columns` (array) + for (int i = 0; i < jsonArraycolumns.size(); i++) { + Column.validateJsonElement(jsonArraycolumns.get(i)); + }; } - } - - /** - * Create an instance of Table given an JSON string - * - * @param jsonString JSON string - * @return An instance of Table - * @throws IOException if the JSON string is invalid with respect to Table - */ - public static Table fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Table.class); - } - - /** - * Convert an instance of Table to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull() && !jsonObj.get("relationships").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `relationships` to be an array in the JSON string but got `%s`", jsonObj.get("relationships").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Table.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Table' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter
thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Table.class)); + + return (TypeAdapter) new TypeAdapter
() { + @Override + public void write(JsonWriter out, Table value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Table read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Table given an JSON string + * + * @param jsonString JSON string + * @return An instance of Table + * @throws IOException if the JSON string is invalid with respect to Table + */ + public static Table fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Table.class); + } + + /** + * Convert an instance of Table to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java index 03c53ab9b..c53085d7d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java @@ -4,586 +4,530 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Tag */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Tag implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_COLOR = "color"; - - @SerializedName(SERIALIZED_NAME_COLOR) - @javax.annotation.Nullable - private String color; - - public static final String SERIALIZED_NAME_DELETED = "deleted"; - - @SerializedName(SERIALIZED_NAME_DELETED) - @javax.annotation.Nullable - private Boolean deleted; - - public static final String SERIALIZED_NAME_HIDDEN = "hidden"; - - @SerializedName(SERIALIZED_NAME_HIDDEN) - @javax.annotation.Nullable - private Boolean hidden; - - public static final String SERIALIZED_NAME_EXTERNAL = "external"; - - @SerializedName(SERIALIZED_NAME_EXTERNAL) - @javax.annotation.Nullable - private Boolean external; - - public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; - - @SerializedName(SERIALIZED_NAME_DEPRECATED) - @javax.annotation.Nullable - private Boolean deprecated; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = - "modification_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float modificationTimeInMillis; - - public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; - @SerializedName(SERIALIZED_NAME_AUTHOR_ID) - @javax.annotation.Nullable - private String authorId; - - public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; - - @SerializedName(SERIALIZED_NAME_MODIFIER_ID) - @javax.annotation.Nullable - private String modifierId; - - public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; - - @SerializedName(SERIALIZED_NAME_OWNER_ID) - @javax.annotation.Nullable - private String ownerId; - - public Tag() {} - - public Tag name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public Tag id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public Tag color(@javax.annotation.Nullable String color) { - this.color = color; - return this; - } - - /** - * Get color - * - * @return color - */ - @javax.annotation.Nullable - public String getColor() { - return color; - } - - public void setColor(@javax.annotation.Nullable String color) { - this.color = color; - } - - public Tag deleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - return this; - } - - /** - * Get deleted - * - * @return deleted - */ - @javax.annotation.Nullable - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - } - - public Tag hidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - return this; - } - - /** - * Get hidden - * - * @return hidden - */ - @javax.annotation.Nullable - public Boolean getHidden() { - return hidden; - } - - public void setHidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - } - - public Tag external(@javax.annotation.Nullable Boolean external) { - this.external = external; - return this; - } - - /** - * Get external - * - * @return external - */ - @javax.annotation.Nullable - public Boolean getExternal() { - return external; - } - - public void setExternal(@javax.annotation.Nullable Boolean external) { - this.external = external; - } - - public Tag deprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - return this; - } - - /** - * Get deprecated - * - * @return deprecated - */ - @javax.annotation.Nullable - public Boolean getDeprecated() { - return deprecated; - } - - public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - } - - public Tag creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Get creationTimeInMillis - * - * @return creationTimeInMillis - */ - @javax.annotation.Nullable - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public Tag modificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - return this; - } - - /** - * Get modificationTimeInMillis - * - * @return modificationTimeInMillis - */ - @javax.annotation.Nullable - public Float getModificationTimeInMillis() { - return modificationTimeInMillis; - } - - public void setModificationTimeInMillis( - @javax.annotation.Nullable Float modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - } - - public Tag authorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - return this; - } - - /** - * Get authorId - * - * @return authorId - */ - @javax.annotation.Nullable - public String getAuthorId() { - return authorId; - } - - public void setAuthorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - } - - public Tag modifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - return this; - } - - /** - * Get modifierId - * - * @return modifierId - */ - @javax.annotation.Nullable - public String getModifierId() { - return modifierId; - } - - public void setModifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - } - - public Tag ownerId(@javax.annotation.Nullable String ownerId) { - this.ownerId = ownerId; - return this; - } - - /** - * Get ownerId - * - * @return ownerId - */ - @javax.annotation.Nullable - public String getOwnerId() { - return ownerId; - } - - public void setOwnerId(@javax.annotation.Nullable String ownerId) { - this.ownerId = ownerId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.name, tag.name) - && Objects.equals(this.id, tag.id) - && Objects.equals(this.color, tag.color) - && Objects.equals(this.deleted, tag.deleted) - && Objects.equals(this.hidden, tag.hidden) - && Objects.equals(this.external, tag.external) - && Objects.equals(this.deprecated, tag.deprecated) - && Objects.equals(this.creationTimeInMillis, tag.creationTimeInMillis) - && Objects.equals(this.modificationTimeInMillis, tag.modificationTimeInMillis) - && Objects.equals(this.authorId, tag.authorId) - && Objects.equals(this.modifierId, tag.modifierId) - && Objects.equals(this.ownerId, tag.ownerId); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - name, - id, - color, - deleted, - hidden, - external, - deprecated, - creationTimeInMillis, - modificationTimeInMillis, - authorId, - modifierId, - ownerId); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" external: ").append(toIndentedString(external)).append("\n"); - sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" modificationTimeInMillis: ") - .append(toIndentedString(modificationTimeInMillis)) - .append("\n"); - sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); - sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("id"); - openapiFields.add("color"); - openapiFields.add("deleted"); - openapiFields.add("hidden"); - openapiFields.add("external"); - openapiFields.add("deprecated"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("modification_time_in_millis"); - openapiFields.add("author_id"); - openapiFields.add("modifier_id"); - openapiFields.add("owner_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("id"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Tag - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Tag.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Tag is not found in the empty JSON" - + " string", - Tag.openapiRequiredFields.toString())); - } +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Tag implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_COLOR = "color"; + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = "modification_time_in_millis"; + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable + private String ownerId; + + public Tag() { + } + + public Tag name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Tag id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Tag color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + + public Tag deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + + public Tag hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Get hidden + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + public Tag external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Get external + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + + public Tag deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Get deprecated + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + + public Tag creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Get creationTimeInMillis + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public Tag modificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Get modificationTimeInMillis + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + + public Tag authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Get authorId + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public Tag modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Get modifierId + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + + public Tag ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * Get ownerId + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.name, tag.name) && + Objects.equals(this.id, tag.id) && + Objects.equals(this.color, tag.color) && + Objects.equals(this.deleted, tag.deleted) && + Objects.equals(this.hidden, tag.hidden) && + Objects.equals(this.external, tag.external) && + Objects.equals(this.deprecated, tag.deprecated) && + Objects.equals(this.creationTimeInMillis, tag.creationTimeInMillis) && + Objects.equals(this.modificationTimeInMillis, tag.modificationTimeInMillis) && + Objects.equals(this.authorId, tag.authorId) && + Objects.equals(this.modifierId, tag.modifierId) && + Objects.equals(this.ownerId, tag.ownerId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, id, color, deleted, hidden, external, deprecated, creationTimeInMillis, modificationTimeInMillis, authorId, modifierId, ownerId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" modificationTimeInMillis: ").append(toIndentedString(modificationTimeInMillis)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("id"); + openapiFields.add("color"); + openapiFields.add("deleted"); + openapiFields.add("hidden"); + openapiFields.add("external"); + openapiFields.add("deprecated"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("author_id"); + openapiFields.add("modifier_id"); + openapiFields.add("owner_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Tag + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Tag.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Tag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Tag`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Tag.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Tag.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Tag.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) - && !jsonObj.get("color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `color` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("color").toString())); - } - if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) - && !jsonObj.get("author_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_id").toString())); - } - if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) - && !jsonObj.get("modifier_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modifier_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("modifier_id").toString())); - } - if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) - && !jsonObj.get("owner_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `owner_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("owner_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Tag.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Tag' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Tag.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Tag value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Tag read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Tag given an JSON string - * - * @param jsonString JSON string - * @return An instance of Tag - * @throws IOException if the JSON string is invalid with respect to Tag - */ - public static Tag fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Tag.class); - } - - /** - * Convert an instance of Tag to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifier_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifier_id").toString())); + } + if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) && !jsonObj.get("owner_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `owner_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Tag.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Tag' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Tag.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Tag value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Tag read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Tag given an JSON string + * + * @param jsonString JSON string + * @return An instance of Tag + * @throws IOException if the JSON string is invalid with respect to Tag + */ + public static Tag fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Tag.class); + } + + /** + * Convert an instance of Tag to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java index 688e8c2bd..f7fe6a4c3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java @@ -4,327 +4,309 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** TagMetadataTypeInput */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class TagMetadataTypeInput implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. - * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a - * column of any data object such as tables, worksheets or views. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LIVEBOARD("LIVEBOARD"), - - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - CONNECTION("CONNECTION"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public TagMetadataTypeInput() {} - - public TagMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. - * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a - * column of any data object such as tables, worksheets or views. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public TagMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; +/** + * TagMetadataTypeInput + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TagMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * Unique ID or name of the metadata. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - TagMetadataTypeInput tagMetadataTypeInput = (TagMetadataTypeInput) o; - return Objects.equals(this.type, tagMetadataTypeInput.type) - && Objects.equals(this.identifier, tagMetadataTypeInput.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public TagMetadataTypeInput() { + } + + public TagMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public TagMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TagMetadataTypeInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + TagMetadataTypeInput tagMetadataTypeInput = (TagMetadataTypeInput) o; + return Objects.equals(this.type, tagMetadataTypeInput.type) && + Objects.equals(this.identifier, tagMetadataTypeInput.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TagMetadataTypeInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TagMetadataTypeInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TagMetadataTypeInput is not found in" - + " the empty JSON string", - TagMetadataTypeInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TagMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TagMetadataTypeInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TagMetadataTypeInput is not found in the empty JSON string", TagMetadataTypeInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TagMetadataTypeInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TagMetadataTypeInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TagMetadataTypeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TagMetadataTypeInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TagMetadataTypeInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TagMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TagMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TagMetadataTypeInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(TagMetadataTypeInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TagMetadataTypeInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TagMetadataTypeInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of TagMetadataTypeInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of TagMetadataTypeInput - * @throws IOException if the JSON string is invalid with respect to TagMetadataTypeInput - */ - public static TagMetadataTypeInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TagMetadataTypeInput.class); - } - - /** - * Convert an instance of TagMetadataTypeInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TagMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TagMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TagMetadataTypeInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TagMetadataTypeInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TagMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of TagMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of TagMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to TagMetadataTypeInput + */ + public static TagMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TagMetadataTypeInput.class); + } + + /** + * Convert an instance of TagMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java index b42ae4532..5ef0ae9d3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java @@ -4,1110 +4,896 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Email customization configuration properties */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class TemplatePropertiesInputCreate implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CTA_BUTTON_BG_COLOR = "cta_button_bg_color"; - - @SerializedName(SERIALIZED_NAME_CTA_BUTTON_BG_COLOR) - @javax.annotation.Nullable - private String ctaButtonBgColor; - - public static final String SERIALIZED_NAME_CTA_TEXT_FONT_COLOR = "cta_text_font_color"; - - @SerializedName(SERIALIZED_NAME_CTA_TEXT_FONT_COLOR) - @javax.annotation.Nullable - private String ctaTextFontColor; - - public static final String SERIALIZED_NAME_PRIMARY_BG_COLOR = "primary_bg_color"; - - @SerializedName(SERIALIZED_NAME_PRIMARY_BG_COLOR) - @javax.annotation.Nullable - private String primaryBgColor; - - public static final String SERIALIZED_NAME_HOME_URL = "home_url"; - - @SerializedName(SERIALIZED_NAME_HOME_URL) - @javax.annotation.Nullable - private String homeUrl; - - public static final String SERIALIZED_NAME_LOGO_URL = "logo_url"; - - @SerializedName(SERIALIZED_NAME_LOGO_URL) - @javax.annotation.Nullable - private String logoUrl; - - public static final String SERIALIZED_NAME_FONT_FAMILY = "font_family"; - - @SerializedName(SERIALIZED_NAME_FONT_FAMILY) - @javax.annotation.Nullable - private String fontFamily; - - public static final String SERIALIZED_NAME_PRODUCT_NAME = "product_name"; - - @SerializedName(SERIALIZED_NAME_PRODUCT_NAME) - @javax.annotation.Nullable - private String productName; - - public static final String SERIALIZED_NAME_FOOTER_ADDRESS = "footer_address"; - - @SerializedName(SERIALIZED_NAME_FOOTER_ADDRESS) - @javax.annotation.Nullable - private String footerAddress; - - public static final String SERIALIZED_NAME_FOOTER_PHONE = "footer_phone"; - - @SerializedName(SERIALIZED_NAME_FOOTER_PHONE) - @javax.annotation.Nullable - private String footerPhone; - - public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_LIVEBOARD = - "replacement_value_for_liveboard"; - - @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_LIVEBOARD) - @javax.annotation.Nullable - private String replacementValueForLiveboard; - - public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_ANSWER = - "replacement_value_for_answer"; - - @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_ANSWER) - @javax.annotation.Nullable - private String replacementValueForAnswer; - - public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_SPOT_IQ = - "replacement_value_for_spot_iq"; - - @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_SPOT_IQ) - @javax.annotation.Nullable - private String replacementValueForSpotIq; - - public static final String SERIALIZED_NAME_HIDE_FOOTER_ADDRESS = "hide_footer_address"; - - @SerializedName(SERIALIZED_NAME_HIDE_FOOTER_ADDRESS) - @javax.annotation.Nullable - private Boolean hideFooterAddress; - - public static final String SERIALIZED_NAME_HIDE_FOOTER_PHONE = "hide_footer_phone"; - - @SerializedName(SERIALIZED_NAME_HIDE_FOOTER_PHONE) - @javax.annotation.Nullable - private Boolean hideFooterPhone; - - public static final String SERIALIZED_NAME_HIDE_MANAGE_NOTIFICATION = - "hide_manage_notification"; - - @SerializedName(SERIALIZED_NAME_HIDE_MANAGE_NOTIFICATION) - @javax.annotation.Nullable - private Boolean hideManageNotification; - - public static final String SERIALIZED_NAME_HIDE_MOBILE_APP_NUDGE = "hide_mobile_app_nudge"; - - @SerializedName(SERIALIZED_NAME_HIDE_MOBILE_APP_NUDGE) - @javax.annotation.Nullable - private Boolean hideMobileAppNudge; - - public static final String SERIALIZED_NAME_HIDE_PRIVACY_POLICY = "hide_privacy_policy"; - - @SerializedName(SERIALIZED_NAME_HIDE_PRIVACY_POLICY) - @javax.annotation.Nullable - private Boolean hidePrivacyPolicy; - - public static final String SERIALIZED_NAME_HIDE_PRODUCT_NAME = "hide_product_name"; - - @SerializedName(SERIALIZED_NAME_HIDE_PRODUCT_NAME) - @javax.annotation.Nullable - private Boolean hideProductName; - - public static final String SERIALIZED_NAME_HIDE_TS_VOCABULARY_DEFINITIONS = - "hide_ts_vocabulary_definitions"; - - @SerializedName(SERIALIZED_NAME_HIDE_TS_VOCABULARY_DEFINITIONS) - @javax.annotation.Nullable - private Boolean hideTsVocabularyDefinitions; - - public static final String SERIALIZED_NAME_HIDE_NOTIFICATION_STATUS = - "hide_notification_status"; - - @SerializedName(SERIALIZED_NAME_HIDE_NOTIFICATION_STATUS) - @javax.annotation.Nullable - private Boolean hideNotificationStatus; - - public static final String SERIALIZED_NAME_HIDE_ERROR_MESSAGE = "hide_error_message"; - - @SerializedName(SERIALIZED_NAME_HIDE_ERROR_MESSAGE) - @javax.annotation.Nullable - private Boolean hideErrorMessage; - - public static final String SERIALIZED_NAME_HIDE_UNSUBSCRIBE_LINK = "hide_unsubscribe_link"; - - @SerializedName(SERIALIZED_NAME_HIDE_UNSUBSCRIBE_LINK) - @javax.annotation.Nullable - private Boolean hideUnsubscribeLink; - - public static final String SERIALIZED_NAME_HIDE_MODIFY_ALERT = "hide_modify_alert"; - - @SerializedName(SERIALIZED_NAME_HIDE_MODIFY_ALERT) - @javax.annotation.Nullable - private Boolean hideModifyAlert; - - public static final String SERIALIZED_NAME_COMPANY_PRIVACY_POLICY_URL = - "company_privacy_policy_url"; - @SerializedName(SERIALIZED_NAME_COMPANY_PRIVACY_POLICY_URL) - @javax.annotation.Nullable - private String companyPrivacyPolicyUrl; - - public static final String SERIALIZED_NAME_COMPANY_WEBSITE_URL = "company_website_url"; - - @SerializedName(SERIALIZED_NAME_COMPANY_WEBSITE_URL) - @javax.annotation.Nullable - private String companyWebsiteUrl; - - public TemplatePropertiesInputCreate() {} - - public TemplatePropertiesInputCreate ctaButtonBgColor( - @javax.annotation.Nullable String ctaButtonBgColor) { - this.ctaButtonBgColor = ctaButtonBgColor; - return this; - } - - /** - * Background color for call-to-action button in hex format - * - * @return ctaButtonBgColor - */ - @javax.annotation.Nullable - public String getCtaButtonBgColor() { - return ctaButtonBgColor; - } - - public void setCtaButtonBgColor(@javax.annotation.Nullable String ctaButtonBgColor) { - this.ctaButtonBgColor = ctaButtonBgColor; - } - - public TemplatePropertiesInputCreate ctaTextFontColor( - @javax.annotation.Nullable String ctaTextFontColor) { - this.ctaTextFontColor = ctaTextFontColor; - return this; - } - - /** - * Text color for call-to-action button in hex format - * - * @return ctaTextFontColor - */ - @javax.annotation.Nullable - public String getCtaTextFontColor() { - return ctaTextFontColor; - } - - public void setCtaTextFontColor(@javax.annotation.Nullable String ctaTextFontColor) { - this.ctaTextFontColor = ctaTextFontColor; - } - - public TemplatePropertiesInputCreate primaryBgColor( - @javax.annotation.Nullable String primaryBgColor) { - this.primaryBgColor = primaryBgColor; - return this; - } - - /** - * Primary background color in hex format - * - * @return primaryBgColor - */ - @javax.annotation.Nullable - public String getPrimaryBgColor() { - return primaryBgColor; - } - - public void setPrimaryBgColor(@javax.annotation.Nullable String primaryBgColor) { - this.primaryBgColor = primaryBgColor; - } - - public TemplatePropertiesInputCreate homeUrl(@javax.annotation.Nullable String homeUrl) { - this.homeUrl = homeUrl; - return this; - } - - /** - * Home page URL (HTTP/HTTPS only) - * - * @return homeUrl - */ - @javax.annotation.Nullable - public String getHomeUrl() { - return homeUrl; - } - - public void setHomeUrl(@javax.annotation.Nullable String homeUrl) { - this.homeUrl = homeUrl; - } - - public TemplatePropertiesInputCreate logoUrl(@javax.annotation.Nullable String logoUrl) { - this.logoUrl = logoUrl; - return this; - } - - /** - * Logo image URL (HTTP/HTTPS only) - * - * @return logoUrl - */ - @javax.annotation.Nullable - public String getLogoUrl() { - return logoUrl; - } - - public void setLogoUrl(@javax.annotation.Nullable String logoUrl) { - this.logoUrl = logoUrl; - } - - public TemplatePropertiesInputCreate fontFamily(@javax.annotation.Nullable String fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family for email content (e.g., Arial, sans-serif) - * - * @return fontFamily - */ - @javax.annotation.Nullable - public String getFontFamily() { - return fontFamily; - } - - public void setFontFamily(@javax.annotation.Nullable String fontFamily) { - this.fontFamily = fontFamily; - } - - public TemplatePropertiesInputCreate productName( - @javax.annotation.Nullable String productName) { - this.productName = productName; - return this; - } - - /** - * Product name to display - * - * @return productName - */ - @javax.annotation.Nullable - public String getProductName() { - return productName; - } - - public void setProductName(@javax.annotation.Nullable String productName) { - this.productName = productName; - } - - public TemplatePropertiesInputCreate footerAddress( - @javax.annotation.Nullable String footerAddress) { - this.footerAddress = footerAddress; - return this; - } - - /** - * Footer address text - * - * @return footerAddress - */ - @javax.annotation.Nullable - public String getFooterAddress() { - return footerAddress; - } - - public void setFooterAddress(@javax.annotation.Nullable String footerAddress) { - this.footerAddress = footerAddress; - } - - public TemplatePropertiesInputCreate footerPhone( - @javax.annotation.Nullable String footerPhone) { - this.footerPhone = footerPhone; - return this; - } - - /** - * Footer phone number - * - * @return footerPhone - */ - @javax.annotation.Nullable - public String getFooterPhone() { - return footerPhone; - } - - public void setFooterPhone(@javax.annotation.Nullable String footerPhone) { - this.footerPhone = footerPhone; - } - - public TemplatePropertiesInputCreate replacementValueForLiveboard( - @javax.annotation.Nullable String replacementValueForLiveboard) { - this.replacementValueForLiveboard = replacementValueForLiveboard; - return this; - } - - /** - * Replacement value for Liveboard - * - * @return replacementValueForLiveboard - */ - @javax.annotation.Nullable - public String getReplacementValueForLiveboard() { - return replacementValueForLiveboard; - } - - public void setReplacementValueForLiveboard( - @javax.annotation.Nullable String replacementValueForLiveboard) { - this.replacementValueForLiveboard = replacementValueForLiveboard; - } - - public TemplatePropertiesInputCreate replacementValueForAnswer( - @javax.annotation.Nullable String replacementValueForAnswer) { - this.replacementValueForAnswer = replacementValueForAnswer; - return this; - } - - /** - * Replacement value for Answer - * - * @return replacementValueForAnswer - */ - @javax.annotation.Nullable - public String getReplacementValueForAnswer() { - return replacementValueForAnswer; - } - - public void setReplacementValueForAnswer( - @javax.annotation.Nullable String replacementValueForAnswer) { - this.replacementValueForAnswer = replacementValueForAnswer; - } - - public TemplatePropertiesInputCreate replacementValueForSpotIq( - @javax.annotation.Nullable String replacementValueForSpotIq) { - this.replacementValueForSpotIq = replacementValueForSpotIq; - return this; - } - - /** - * Replacement value for SpotIQ - * - * @return replacementValueForSpotIq - */ - @javax.annotation.Nullable - public String getReplacementValueForSpotIq() { - return replacementValueForSpotIq; - } - - public void setReplacementValueForSpotIq( - @javax.annotation.Nullable String replacementValueForSpotIq) { - this.replacementValueForSpotIq = replacementValueForSpotIq; - } - - public TemplatePropertiesInputCreate hideFooterAddress( - @javax.annotation.Nullable Boolean hideFooterAddress) { - this.hideFooterAddress = hideFooterAddress; - return this; - } - - /** - * Whether to hide footer address - * - * @return hideFooterAddress - */ - @javax.annotation.Nullable - public Boolean getHideFooterAddress() { - return hideFooterAddress; - } - - public void setHideFooterAddress(@javax.annotation.Nullable Boolean hideFooterAddress) { - this.hideFooterAddress = hideFooterAddress; - } - - public TemplatePropertiesInputCreate hideFooterPhone( - @javax.annotation.Nullable Boolean hideFooterPhone) { - this.hideFooterPhone = hideFooterPhone; - return this; - } - - /** - * Whether to hide footer phone number - * - * @return hideFooterPhone - */ - @javax.annotation.Nullable - public Boolean getHideFooterPhone() { - return hideFooterPhone; - } - - public void setHideFooterPhone(@javax.annotation.Nullable Boolean hideFooterPhone) { - this.hideFooterPhone = hideFooterPhone; - } - - public TemplatePropertiesInputCreate hideManageNotification( - @javax.annotation.Nullable Boolean hideManageNotification) { - this.hideManageNotification = hideManageNotification; - return this; - } - - /** - * Whether to hide manage notification link - * - * @return hideManageNotification - */ - @javax.annotation.Nullable - public Boolean getHideManageNotification() { - return hideManageNotification; - } - - public void setHideManageNotification( - @javax.annotation.Nullable Boolean hideManageNotification) { - this.hideManageNotification = hideManageNotification; - } - - public TemplatePropertiesInputCreate hideMobileAppNudge( - @javax.annotation.Nullable Boolean hideMobileAppNudge) { - this.hideMobileAppNudge = hideMobileAppNudge; - return this; - } - - /** - * Whether to hide mobile app nudge - * - * @return hideMobileAppNudge - */ - @javax.annotation.Nullable - public Boolean getHideMobileAppNudge() { - return hideMobileAppNudge; - } - - public void setHideMobileAppNudge(@javax.annotation.Nullable Boolean hideMobileAppNudge) { - this.hideMobileAppNudge = hideMobileAppNudge; - } - - public TemplatePropertiesInputCreate hidePrivacyPolicy( - @javax.annotation.Nullable Boolean hidePrivacyPolicy) { - this.hidePrivacyPolicy = hidePrivacyPolicy; - return this; - } - - /** - * Whether to hide privacy policy link - * - * @return hidePrivacyPolicy - */ - @javax.annotation.Nullable - public Boolean getHidePrivacyPolicy() { - return hidePrivacyPolicy; - } - - public void setHidePrivacyPolicy(@javax.annotation.Nullable Boolean hidePrivacyPolicy) { - this.hidePrivacyPolicy = hidePrivacyPolicy; - } - - public TemplatePropertiesInputCreate hideProductName( - @javax.annotation.Nullable Boolean hideProductName) { - this.hideProductName = hideProductName; - return this; - } - - /** - * Whether to hide product name - * - * @return hideProductName - */ - @javax.annotation.Nullable - public Boolean getHideProductName() { - return hideProductName; - } - - public void setHideProductName(@javax.annotation.Nullable Boolean hideProductName) { - this.hideProductName = hideProductName; - } - - public TemplatePropertiesInputCreate hideTsVocabularyDefinitions( - @javax.annotation.Nullable Boolean hideTsVocabularyDefinitions) { - this.hideTsVocabularyDefinitions = hideTsVocabularyDefinitions; - return this; - } - - /** - * Whether to hide ThoughtSpot vocabulary definitions - * - * @return hideTsVocabularyDefinitions - */ - @javax.annotation.Nullable - public Boolean getHideTsVocabularyDefinitions() { - return hideTsVocabularyDefinitions; - } - - public void setHideTsVocabularyDefinitions( - @javax.annotation.Nullable Boolean hideTsVocabularyDefinitions) { - this.hideTsVocabularyDefinitions = hideTsVocabularyDefinitions; - } - - public TemplatePropertiesInputCreate hideNotificationStatus( - @javax.annotation.Nullable Boolean hideNotificationStatus) { - this.hideNotificationStatus = hideNotificationStatus; - return this; - } - - /** - * Whether to hide notification status - * - * @return hideNotificationStatus - */ - @javax.annotation.Nullable - public Boolean getHideNotificationStatus() { - return hideNotificationStatus; - } - - public void setHideNotificationStatus( - @javax.annotation.Nullable Boolean hideNotificationStatus) { - this.hideNotificationStatus = hideNotificationStatus; - } - - public TemplatePropertiesInputCreate hideErrorMessage( - @javax.annotation.Nullable Boolean hideErrorMessage) { - this.hideErrorMessage = hideErrorMessage; - return this; - } - - /** - * Whether to hide error message - * - * @return hideErrorMessage - */ - @javax.annotation.Nullable - public Boolean getHideErrorMessage() { - return hideErrorMessage; - } - - public void setHideErrorMessage(@javax.annotation.Nullable Boolean hideErrorMessage) { - this.hideErrorMessage = hideErrorMessage; - } - - public TemplatePropertiesInputCreate hideUnsubscribeLink( - @javax.annotation.Nullable Boolean hideUnsubscribeLink) { - this.hideUnsubscribeLink = hideUnsubscribeLink; - return this; - } - - /** - * Whether to hide unsubscribe link - * - * @return hideUnsubscribeLink - */ - @javax.annotation.Nullable - public Boolean getHideUnsubscribeLink() { - return hideUnsubscribeLink; - } - - public void setHideUnsubscribeLink(@javax.annotation.Nullable Boolean hideUnsubscribeLink) { - this.hideUnsubscribeLink = hideUnsubscribeLink; - } - - public TemplatePropertiesInputCreate hideModifyAlert( - @javax.annotation.Nullable Boolean hideModifyAlert) { - this.hideModifyAlert = hideModifyAlert; - return this; - } - - /** - * Whether to hide modify alert - * - * @return hideModifyAlert - */ - @javax.annotation.Nullable - public Boolean getHideModifyAlert() { - return hideModifyAlert; - } - - public void setHideModifyAlert(@javax.annotation.Nullable Boolean hideModifyAlert) { - this.hideModifyAlert = hideModifyAlert; - } - - public TemplatePropertiesInputCreate companyPrivacyPolicyUrl( - @javax.annotation.Nullable String companyPrivacyPolicyUrl) { - this.companyPrivacyPolicyUrl = companyPrivacyPolicyUrl; - return this; - } - - /** - * Company privacy policy URL (HTTP/HTTPS only) - * - * @return companyPrivacyPolicyUrl - */ - @javax.annotation.Nullable - public String getCompanyPrivacyPolicyUrl() { - return companyPrivacyPolicyUrl; - } - - public void setCompanyPrivacyPolicyUrl( - @javax.annotation.Nullable String companyPrivacyPolicyUrl) { - this.companyPrivacyPolicyUrl = companyPrivacyPolicyUrl; - } - - public TemplatePropertiesInputCreate companyWebsiteUrl( - @javax.annotation.Nullable String companyWebsiteUrl) { - this.companyWebsiteUrl = companyWebsiteUrl; - return this; - } - - /** - * Company website URL (HTTP/HTTPS only) - * - * @return companyWebsiteUrl - */ - @javax.annotation.Nullable - public String getCompanyWebsiteUrl() { - return companyWebsiteUrl; - } - - public void setCompanyWebsiteUrl(@javax.annotation.Nullable String companyWebsiteUrl) { - this.companyWebsiteUrl = companyWebsiteUrl; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplatePropertiesInputCreate templatePropertiesInputCreate = - (TemplatePropertiesInputCreate) o; - return Objects.equals(this.ctaButtonBgColor, templatePropertiesInputCreate.ctaButtonBgColor) - && Objects.equals( - this.ctaTextFontColor, templatePropertiesInputCreate.ctaTextFontColor) - && Objects.equals(this.primaryBgColor, templatePropertiesInputCreate.primaryBgColor) - && Objects.equals(this.homeUrl, templatePropertiesInputCreate.homeUrl) - && Objects.equals(this.logoUrl, templatePropertiesInputCreate.logoUrl) - && Objects.equals(this.fontFamily, templatePropertiesInputCreate.fontFamily) - && Objects.equals(this.productName, templatePropertiesInputCreate.productName) - && Objects.equals(this.footerAddress, templatePropertiesInputCreate.footerAddress) - && Objects.equals(this.footerPhone, templatePropertiesInputCreate.footerPhone) - && Objects.equals( - this.replacementValueForLiveboard, - templatePropertiesInputCreate.replacementValueForLiveboard) - && Objects.equals( - this.replacementValueForAnswer, - templatePropertiesInputCreate.replacementValueForAnswer) - && Objects.equals( - this.replacementValueForSpotIq, - templatePropertiesInputCreate.replacementValueForSpotIq) - && Objects.equals( - this.hideFooterAddress, templatePropertiesInputCreate.hideFooterAddress) - && Objects.equals( - this.hideFooterPhone, templatePropertiesInputCreate.hideFooterPhone) - && Objects.equals( - this.hideManageNotification, - templatePropertiesInputCreate.hideManageNotification) - && Objects.equals( - this.hideMobileAppNudge, templatePropertiesInputCreate.hideMobileAppNudge) - && Objects.equals( - this.hidePrivacyPolicy, templatePropertiesInputCreate.hidePrivacyPolicy) - && Objects.equals( - this.hideProductName, templatePropertiesInputCreate.hideProductName) - && Objects.equals( - this.hideTsVocabularyDefinitions, - templatePropertiesInputCreate.hideTsVocabularyDefinitions) - && Objects.equals( - this.hideNotificationStatus, - templatePropertiesInputCreate.hideNotificationStatus) - && Objects.equals( - this.hideErrorMessage, templatePropertiesInputCreate.hideErrorMessage) - && Objects.equals( - this.hideUnsubscribeLink, templatePropertiesInputCreate.hideUnsubscribeLink) - && Objects.equals( - this.hideModifyAlert, templatePropertiesInputCreate.hideModifyAlert) - && Objects.equals( - this.companyPrivacyPolicyUrl, - templatePropertiesInputCreate.companyPrivacyPolicyUrl) - && Objects.equals( - this.companyWebsiteUrl, templatePropertiesInputCreate.companyWebsiteUrl); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - ctaButtonBgColor, - ctaTextFontColor, - primaryBgColor, - homeUrl, - logoUrl, - fontFamily, - productName, - footerAddress, - footerPhone, - replacementValueForLiveboard, - replacementValueForAnswer, - replacementValueForSpotIq, - hideFooterAddress, - hideFooterPhone, - hideManageNotification, - hideMobileAppNudge, - hidePrivacyPolicy, - hideProductName, - hideTsVocabularyDefinitions, - hideNotificationStatus, - hideErrorMessage, - hideUnsubscribeLink, - hideModifyAlert, - companyPrivacyPolicyUrl, - companyWebsiteUrl); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplatePropertiesInputCreate {\n"); - sb.append(" ctaButtonBgColor: ").append(toIndentedString(ctaButtonBgColor)).append("\n"); - sb.append(" ctaTextFontColor: ").append(toIndentedString(ctaTextFontColor)).append("\n"); - sb.append(" primaryBgColor: ").append(toIndentedString(primaryBgColor)).append("\n"); - sb.append(" homeUrl: ").append(toIndentedString(homeUrl)).append("\n"); - sb.append(" logoUrl: ").append(toIndentedString(logoUrl)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" productName: ").append(toIndentedString(productName)).append("\n"); - sb.append(" footerAddress: ").append(toIndentedString(footerAddress)).append("\n"); - sb.append(" footerPhone: ").append(toIndentedString(footerPhone)).append("\n"); - sb.append(" replacementValueForLiveboard: ") - .append(toIndentedString(replacementValueForLiveboard)) - .append("\n"); - sb.append(" replacementValueForAnswer: ") - .append(toIndentedString(replacementValueForAnswer)) - .append("\n"); - sb.append(" replacementValueForSpotIq: ") - .append(toIndentedString(replacementValueForSpotIq)) - .append("\n"); - sb.append(" hideFooterAddress: ") - .append(toIndentedString(hideFooterAddress)) - .append("\n"); - sb.append(" hideFooterPhone: ").append(toIndentedString(hideFooterPhone)).append("\n"); - sb.append(" hideManageNotification: ") - .append(toIndentedString(hideManageNotification)) - .append("\n"); - sb.append(" hideMobileAppNudge: ") - .append(toIndentedString(hideMobileAppNudge)) - .append("\n"); - sb.append(" hidePrivacyPolicy: ") - .append(toIndentedString(hidePrivacyPolicy)) - .append("\n"); - sb.append(" hideProductName: ").append(toIndentedString(hideProductName)).append("\n"); - sb.append(" hideTsVocabularyDefinitions: ") - .append(toIndentedString(hideTsVocabularyDefinitions)) - .append("\n"); - sb.append(" hideNotificationStatus: ") - .append(toIndentedString(hideNotificationStatus)) - .append("\n"); - sb.append(" hideErrorMessage: ").append(toIndentedString(hideErrorMessage)).append("\n"); - sb.append(" hideUnsubscribeLink: ") - .append(toIndentedString(hideUnsubscribeLink)) - .append("\n"); - sb.append(" hideModifyAlert: ").append(toIndentedString(hideModifyAlert)).append("\n"); - sb.append(" companyPrivacyPolicyUrl: ") - .append(toIndentedString(companyPrivacyPolicyUrl)) - .append("\n"); - sb.append(" companyWebsiteUrl: ") - .append(toIndentedString(companyWebsiteUrl)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cta_button_bg_color"); - openapiFields.add("cta_text_font_color"); - openapiFields.add("primary_bg_color"); - openapiFields.add("home_url"); - openapiFields.add("logo_url"); - openapiFields.add("font_family"); - openapiFields.add("product_name"); - openapiFields.add("footer_address"); - openapiFields.add("footer_phone"); - openapiFields.add("replacement_value_for_liveboard"); - openapiFields.add("replacement_value_for_answer"); - openapiFields.add("replacement_value_for_spot_iq"); - openapiFields.add("hide_footer_address"); - openapiFields.add("hide_footer_phone"); - openapiFields.add("hide_manage_notification"); - openapiFields.add("hide_mobile_app_nudge"); - openapiFields.add("hide_privacy_policy"); - openapiFields.add("hide_product_name"); - openapiFields.add("hide_ts_vocabulary_definitions"); - openapiFields.add("hide_notification_status"); - openapiFields.add("hide_error_message"); - openapiFields.add("hide_unsubscribe_link"); - openapiFields.add("hide_modify_alert"); - openapiFields.add("company_privacy_policy_url"); - openapiFields.add("company_website_url"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * TemplatePropertiesInputCreate - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TemplatePropertiesInputCreate.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TemplatePropertiesInputCreate is not" - + " found in the empty JSON string", - TemplatePropertiesInputCreate.openapiRequiredFields.toString())); - } +/** + * Email customization configuration properties + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TemplatePropertiesInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CTA_BUTTON_BG_COLOR = "cta_button_bg_color"; + @SerializedName(SERIALIZED_NAME_CTA_BUTTON_BG_COLOR) + @javax.annotation.Nullable + private String ctaButtonBgColor; + + public static final String SERIALIZED_NAME_CTA_TEXT_FONT_COLOR = "cta_text_font_color"; + @SerializedName(SERIALIZED_NAME_CTA_TEXT_FONT_COLOR) + @javax.annotation.Nullable + private String ctaTextFontColor; + + public static final String SERIALIZED_NAME_PRIMARY_BG_COLOR = "primary_bg_color"; + @SerializedName(SERIALIZED_NAME_PRIMARY_BG_COLOR) + @javax.annotation.Nullable + private String primaryBgColor; + + public static final String SERIALIZED_NAME_HOME_URL = "home_url"; + @SerializedName(SERIALIZED_NAME_HOME_URL) + @javax.annotation.Nullable + private String homeUrl; + + public static final String SERIALIZED_NAME_LOGO_URL = "logo_url"; + @SerializedName(SERIALIZED_NAME_LOGO_URL) + @javax.annotation.Nullable + private String logoUrl; + + public static final String SERIALIZED_NAME_FONT_FAMILY = "font_family"; + @SerializedName(SERIALIZED_NAME_FONT_FAMILY) + @javax.annotation.Nullable + private String fontFamily; + + public static final String SERIALIZED_NAME_PRODUCT_NAME = "product_name"; + @SerializedName(SERIALIZED_NAME_PRODUCT_NAME) + @javax.annotation.Nullable + private String productName; + + public static final String SERIALIZED_NAME_FOOTER_ADDRESS = "footer_address"; + @SerializedName(SERIALIZED_NAME_FOOTER_ADDRESS) + @javax.annotation.Nullable + private String footerAddress; + + public static final String SERIALIZED_NAME_FOOTER_PHONE = "footer_phone"; + @SerializedName(SERIALIZED_NAME_FOOTER_PHONE) + @javax.annotation.Nullable + private String footerPhone; + + public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_LIVEBOARD = "replacement_value_for_liveboard"; + @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_LIVEBOARD) + @javax.annotation.Nullable + private String replacementValueForLiveboard; + + public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_ANSWER = "replacement_value_for_answer"; + @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_ANSWER) + @javax.annotation.Nullable + private String replacementValueForAnswer; + + public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_SPOT_IQ = "replacement_value_for_spot_iq"; + @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_SPOT_IQ) + @javax.annotation.Nullable + private String replacementValueForSpotIq; + + public static final String SERIALIZED_NAME_HIDE_FOOTER_ADDRESS = "hide_footer_address"; + @SerializedName(SERIALIZED_NAME_HIDE_FOOTER_ADDRESS) + @javax.annotation.Nullable + private Boolean hideFooterAddress; + + public static final String SERIALIZED_NAME_HIDE_FOOTER_PHONE = "hide_footer_phone"; + @SerializedName(SERIALIZED_NAME_HIDE_FOOTER_PHONE) + @javax.annotation.Nullable + private Boolean hideFooterPhone; + + public static final String SERIALIZED_NAME_HIDE_MANAGE_NOTIFICATION = "hide_manage_notification"; + @SerializedName(SERIALIZED_NAME_HIDE_MANAGE_NOTIFICATION) + @javax.annotation.Nullable + private Boolean hideManageNotification; + + public static final String SERIALIZED_NAME_HIDE_MOBILE_APP_NUDGE = "hide_mobile_app_nudge"; + @SerializedName(SERIALIZED_NAME_HIDE_MOBILE_APP_NUDGE) + @javax.annotation.Nullable + private Boolean hideMobileAppNudge; + + public static final String SERIALIZED_NAME_HIDE_PRIVACY_POLICY = "hide_privacy_policy"; + @SerializedName(SERIALIZED_NAME_HIDE_PRIVACY_POLICY) + @javax.annotation.Nullable + private Boolean hidePrivacyPolicy; + + public static final String SERIALIZED_NAME_HIDE_PRODUCT_NAME = "hide_product_name"; + @SerializedName(SERIALIZED_NAME_HIDE_PRODUCT_NAME) + @javax.annotation.Nullable + private Boolean hideProductName; + + public static final String SERIALIZED_NAME_HIDE_TS_VOCABULARY_DEFINITIONS = "hide_ts_vocabulary_definitions"; + @SerializedName(SERIALIZED_NAME_HIDE_TS_VOCABULARY_DEFINITIONS) + @javax.annotation.Nullable + private Boolean hideTsVocabularyDefinitions; + + public static final String SERIALIZED_NAME_HIDE_NOTIFICATION_STATUS = "hide_notification_status"; + @SerializedName(SERIALIZED_NAME_HIDE_NOTIFICATION_STATUS) + @javax.annotation.Nullable + private Boolean hideNotificationStatus; + + public static final String SERIALIZED_NAME_HIDE_ERROR_MESSAGE = "hide_error_message"; + @SerializedName(SERIALIZED_NAME_HIDE_ERROR_MESSAGE) + @javax.annotation.Nullable + private Boolean hideErrorMessage; + + public static final String SERIALIZED_NAME_HIDE_UNSUBSCRIBE_LINK = "hide_unsubscribe_link"; + @SerializedName(SERIALIZED_NAME_HIDE_UNSUBSCRIBE_LINK) + @javax.annotation.Nullable + private Boolean hideUnsubscribeLink; + + public static final String SERIALIZED_NAME_HIDE_MODIFY_ALERT = "hide_modify_alert"; + @SerializedName(SERIALIZED_NAME_HIDE_MODIFY_ALERT) + @javax.annotation.Nullable + private Boolean hideModifyAlert; + + public static final String SERIALIZED_NAME_COMPANY_PRIVACY_POLICY_URL = "company_privacy_policy_url"; + @SerializedName(SERIALIZED_NAME_COMPANY_PRIVACY_POLICY_URL) + @javax.annotation.Nullable + private String companyPrivacyPolicyUrl; + + public static final String SERIALIZED_NAME_COMPANY_WEBSITE_URL = "company_website_url"; + @SerializedName(SERIALIZED_NAME_COMPANY_WEBSITE_URL) + @javax.annotation.Nullable + private String companyWebsiteUrl; + + public TemplatePropertiesInputCreate() { + } + + public TemplatePropertiesInputCreate ctaButtonBgColor(@javax.annotation.Nullable String ctaButtonBgColor) { + this.ctaButtonBgColor = ctaButtonBgColor; + return this; + } + + /** + * Background color for call-to-action button in hex format + * @return ctaButtonBgColor + */ + @javax.annotation.Nullable + public String getCtaButtonBgColor() { + return ctaButtonBgColor; + } + + public void setCtaButtonBgColor(@javax.annotation.Nullable String ctaButtonBgColor) { + this.ctaButtonBgColor = ctaButtonBgColor; + } + + + public TemplatePropertiesInputCreate ctaTextFontColor(@javax.annotation.Nullable String ctaTextFontColor) { + this.ctaTextFontColor = ctaTextFontColor; + return this; + } + + /** + * Text color for call-to-action button in hex format + * @return ctaTextFontColor + */ + @javax.annotation.Nullable + public String getCtaTextFontColor() { + return ctaTextFontColor; + } + + public void setCtaTextFontColor(@javax.annotation.Nullable String ctaTextFontColor) { + this.ctaTextFontColor = ctaTextFontColor; + } + + + public TemplatePropertiesInputCreate primaryBgColor(@javax.annotation.Nullable String primaryBgColor) { + this.primaryBgColor = primaryBgColor; + return this; + } + + /** + * Primary background color in hex format + * @return primaryBgColor + */ + @javax.annotation.Nullable + public String getPrimaryBgColor() { + return primaryBgColor; + } + + public void setPrimaryBgColor(@javax.annotation.Nullable String primaryBgColor) { + this.primaryBgColor = primaryBgColor; + } + + + public TemplatePropertiesInputCreate homeUrl(@javax.annotation.Nullable String homeUrl) { + this.homeUrl = homeUrl; + return this; + } + + /** + * Home page URL (HTTP/HTTPS only) + * @return homeUrl + */ + @javax.annotation.Nullable + public String getHomeUrl() { + return homeUrl; + } + + public void setHomeUrl(@javax.annotation.Nullable String homeUrl) { + this.homeUrl = homeUrl; + } + + + public TemplatePropertiesInputCreate logoUrl(@javax.annotation.Nullable String logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + /** + * Logo image URL (HTTP/HTTPS only) + * @return logoUrl + */ + @javax.annotation.Nullable + public String getLogoUrl() { + return logoUrl; + } + + public void setLogoUrl(@javax.annotation.Nullable String logoUrl) { + this.logoUrl = logoUrl; + } + + + public TemplatePropertiesInputCreate fontFamily(@javax.annotation.Nullable String fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + /** + * Font family for email content (e.g., Arial, sans-serif) + * @return fontFamily + */ + @javax.annotation.Nullable + public String getFontFamily() { + return fontFamily; + } + + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { + this.fontFamily = fontFamily; + } + + + public TemplatePropertiesInputCreate productName(@javax.annotation.Nullable String productName) { + this.productName = productName; + return this; + } + + /** + * Product name to display + * @return productName + */ + @javax.annotation.Nullable + public String getProductName() { + return productName; + } + + public void setProductName(@javax.annotation.Nullable String productName) { + this.productName = productName; + } + + + public TemplatePropertiesInputCreate footerAddress(@javax.annotation.Nullable String footerAddress) { + this.footerAddress = footerAddress; + return this; + } + + /** + * Footer address text + * @return footerAddress + */ + @javax.annotation.Nullable + public String getFooterAddress() { + return footerAddress; + } + + public void setFooterAddress(@javax.annotation.Nullable String footerAddress) { + this.footerAddress = footerAddress; + } + + + public TemplatePropertiesInputCreate footerPhone(@javax.annotation.Nullable String footerPhone) { + this.footerPhone = footerPhone; + return this; + } + + /** + * Footer phone number + * @return footerPhone + */ + @javax.annotation.Nullable + public String getFooterPhone() { + return footerPhone; + } + + public void setFooterPhone(@javax.annotation.Nullable String footerPhone) { + this.footerPhone = footerPhone; + } + + + public TemplatePropertiesInputCreate replacementValueForLiveboard(@javax.annotation.Nullable String replacementValueForLiveboard) { + this.replacementValueForLiveboard = replacementValueForLiveboard; + return this; + } + + /** + * Replacement value for Liveboard + * @return replacementValueForLiveboard + */ + @javax.annotation.Nullable + public String getReplacementValueForLiveboard() { + return replacementValueForLiveboard; + } + + public void setReplacementValueForLiveboard(@javax.annotation.Nullable String replacementValueForLiveboard) { + this.replacementValueForLiveboard = replacementValueForLiveboard; + } + + + public TemplatePropertiesInputCreate replacementValueForAnswer(@javax.annotation.Nullable String replacementValueForAnswer) { + this.replacementValueForAnswer = replacementValueForAnswer; + return this; + } + + /** + * Replacement value for Answer + * @return replacementValueForAnswer + */ + @javax.annotation.Nullable + public String getReplacementValueForAnswer() { + return replacementValueForAnswer; + } + + public void setReplacementValueForAnswer(@javax.annotation.Nullable String replacementValueForAnswer) { + this.replacementValueForAnswer = replacementValueForAnswer; + } + + + public TemplatePropertiesInputCreate replacementValueForSpotIq(@javax.annotation.Nullable String replacementValueForSpotIq) { + this.replacementValueForSpotIq = replacementValueForSpotIq; + return this; + } + + /** + * Replacement value for SpotIQ + * @return replacementValueForSpotIq + */ + @javax.annotation.Nullable + public String getReplacementValueForSpotIq() { + return replacementValueForSpotIq; + } + + public void setReplacementValueForSpotIq(@javax.annotation.Nullable String replacementValueForSpotIq) { + this.replacementValueForSpotIq = replacementValueForSpotIq; + } + + + public TemplatePropertiesInputCreate hideFooterAddress(@javax.annotation.Nullable Boolean hideFooterAddress) { + this.hideFooterAddress = hideFooterAddress; + return this; + } + + /** + * Whether to hide footer address + * @return hideFooterAddress + */ + @javax.annotation.Nullable + public Boolean getHideFooterAddress() { + return hideFooterAddress; + } + + public void setHideFooterAddress(@javax.annotation.Nullable Boolean hideFooterAddress) { + this.hideFooterAddress = hideFooterAddress; + } + + + public TemplatePropertiesInputCreate hideFooterPhone(@javax.annotation.Nullable Boolean hideFooterPhone) { + this.hideFooterPhone = hideFooterPhone; + return this; + } + + /** + * Whether to hide footer phone number + * @return hideFooterPhone + */ + @javax.annotation.Nullable + public Boolean getHideFooterPhone() { + return hideFooterPhone; + } + + public void setHideFooterPhone(@javax.annotation.Nullable Boolean hideFooterPhone) { + this.hideFooterPhone = hideFooterPhone; + } + + + public TemplatePropertiesInputCreate hideManageNotification(@javax.annotation.Nullable Boolean hideManageNotification) { + this.hideManageNotification = hideManageNotification; + return this; + } + + /** + * Whether to hide manage notification link + * @return hideManageNotification + */ + @javax.annotation.Nullable + public Boolean getHideManageNotification() { + return hideManageNotification; + } + + public void setHideManageNotification(@javax.annotation.Nullable Boolean hideManageNotification) { + this.hideManageNotification = hideManageNotification; + } + + + public TemplatePropertiesInputCreate hideMobileAppNudge(@javax.annotation.Nullable Boolean hideMobileAppNudge) { + this.hideMobileAppNudge = hideMobileAppNudge; + return this; + } + + /** + * Whether to hide mobile app nudge + * @return hideMobileAppNudge + */ + @javax.annotation.Nullable + public Boolean getHideMobileAppNudge() { + return hideMobileAppNudge; + } + + public void setHideMobileAppNudge(@javax.annotation.Nullable Boolean hideMobileAppNudge) { + this.hideMobileAppNudge = hideMobileAppNudge; + } + + + public TemplatePropertiesInputCreate hidePrivacyPolicy(@javax.annotation.Nullable Boolean hidePrivacyPolicy) { + this.hidePrivacyPolicy = hidePrivacyPolicy; + return this; + } + + /** + * Whether to hide privacy policy link + * @return hidePrivacyPolicy + */ + @javax.annotation.Nullable + public Boolean getHidePrivacyPolicy() { + return hidePrivacyPolicy; + } + + public void setHidePrivacyPolicy(@javax.annotation.Nullable Boolean hidePrivacyPolicy) { + this.hidePrivacyPolicy = hidePrivacyPolicy; + } + + + public TemplatePropertiesInputCreate hideProductName(@javax.annotation.Nullable Boolean hideProductName) { + this.hideProductName = hideProductName; + return this; + } + + /** + * Whether to hide product name + * @return hideProductName + */ + @javax.annotation.Nullable + public Boolean getHideProductName() { + return hideProductName; + } + + public void setHideProductName(@javax.annotation.Nullable Boolean hideProductName) { + this.hideProductName = hideProductName; + } + + + public TemplatePropertiesInputCreate hideTsVocabularyDefinitions(@javax.annotation.Nullable Boolean hideTsVocabularyDefinitions) { + this.hideTsVocabularyDefinitions = hideTsVocabularyDefinitions; + return this; + } + + /** + * Whether to hide ThoughtSpot vocabulary definitions + * @return hideTsVocabularyDefinitions + */ + @javax.annotation.Nullable + public Boolean getHideTsVocabularyDefinitions() { + return hideTsVocabularyDefinitions; + } + + public void setHideTsVocabularyDefinitions(@javax.annotation.Nullable Boolean hideTsVocabularyDefinitions) { + this.hideTsVocabularyDefinitions = hideTsVocabularyDefinitions; + } + + + public TemplatePropertiesInputCreate hideNotificationStatus(@javax.annotation.Nullable Boolean hideNotificationStatus) { + this.hideNotificationStatus = hideNotificationStatus; + return this; + } + + /** + * Whether to hide notification status + * @return hideNotificationStatus + */ + @javax.annotation.Nullable + public Boolean getHideNotificationStatus() { + return hideNotificationStatus; + } + + public void setHideNotificationStatus(@javax.annotation.Nullable Boolean hideNotificationStatus) { + this.hideNotificationStatus = hideNotificationStatus; + } + + + public TemplatePropertiesInputCreate hideErrorMessage(@javax.annotation.Nullable Boolean hideErrorMessage) { + this.hideErrorMessage = hideErrorMessage; + return this; + } + + /** + * Whether to hide error message + * @return hideErrorMessage + */ + @javax.annotation.Nullable + public Boolean getHideErrorMessage() { + return hideErrorMessage; + } + + public void setHideErrorMessage(@javax.annotation.Nullable Boolean hideErrorMessage) { + this.hideErrorMessage = hideErrorMessage; + } + + + public TemplatePropertiesInputCreate hideUnsubscribeLink(@javax.annotation.Nullable Boolean hideUnsubscribeLink) { + this.hideUnsubscribeLink = hideUnsubscribeLink; + return this; + } + + /** + * Whether to hide unsubscribe link + * @return hideUnsubscribeLink + */ + @javax.annotation.Nullable + public Boolean getHideUnsubscribeLink() { + return hideUnsubscribeLink; + } + + public void setHideUnsubscribeLink(@javax.annotation.Nullable Boolean hideUnsubscribeLink) { + this.hideUnsubscribeLink = hideUnsubscribeLink; + } + + + public TemplatePropertiesInputCreate hideModifyAlert(@javax.annotation.Nullable Boolean hideModifyAlert) { + this.hideModifyAlert = hideModifyAlert; + return this; + } + + /** + * Whether to hide modify alert + * @return hideModifyAlert + */ + @javax.annotation.Nullable + public Boolean getHideModifyAlert() { + return hideModifyAlert; + } + + public void setHideModifyAlert(@javax.annotation.Nullable Boolean hideModifyAlert) { + this.hideModifyAlert = hideModifyAlert; + } + + + public TemplatePropertiesInputCreate companyPrivacyPolicyUrl(@javax.annotation.Nullable String companyPrivacyPolicyUrl) { + this.companyPrivacyPolicyUrl = companyPrivacyPolicyUrl; + return this; + } + + /** + * Company privacy policy URL (HTTP/HTTPS only) + * @return companyPrivacyPolicyUrl + */ + @javax.annotation.Nullable + public String getCompanyPrivacyPolicyUrl() { + return companyPrivacyPolicyUrl; + } + + public void setCompanyPrivacyPolicyUrl(@javax.annotation.Nullable String companyPrivacyPolicyUrl) { + this.companyPrivacyPolicyUrl = companyPrivacyPolicyUrl; + } + + + public TemplatePropertiesInputCreate companyWebsiteUrl(@javax.annotation.Nullable String companyWebsiteUrl) { + this.companyWebsiteUrl = companyWebsiteUrl; + return this; + } + + /** + * Company website URL (HTTP/HTTPS only) + * @return companyWebsiteUrl + */ + @javax.annotation.Nullable + public String getCompanyWebsiteUrl() { + return companyWebsiteUrl; + } + + public void setCompanyWebsiteUrl(@javax.annotation.Nullable String companyWebsiteUrl) { + this.companyWebsiteUrl = companyWebsiteUrl; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplatePropertiesInputCreate templatePropertiesInputCreate = (TemplatePropertiesInputCreate) o; + return Objects.equals(this.ctaButtonBgColor, templatePropertiesInputCreate.ctaButtonBgColor) && + Objects.equals(this.ctaTextFontColor, templatePropertiesInputCreate.ctaTextFontColor) && + Objects.equals(this.primaryBgColor, templatePropertiesInputCreate.primaryBgColor) && + Objects.equals(this.homeUrl, templatePropertiesInputCreate.homeUrl) && + Objects.equals(this.logoUrl, templatePropertiesInputCreate.logoUrl) && + Objects.equals(this.fontFamily, templatePropertiesInputCreate.fontFamily) && + Objects.equals(this.productName, templatePropertiesInputCreate.productName) && + Objects.equals(this.footerAddress, templatePropertiesInputCreate.footerAddress) && + Objects.equals(this.footerPhone, templatePropertiesInputCreate.footerPhone) && + Objects.equals(this.replacementValueForLiveboard, templatePropertiesInputCreate.replacementValueForLiveboard) && + Objects.equals(this.replacementValueForAnswer, templatePropertiesInputCreate.replacementValueForAnswer) && + Objects.equals(this.replacementValueForSpotIq, templatePropertiesInputCreate.replacementValueForSpotIq) && + Objects.equals(this.hideFooterAddress, templatePropertiesInputCreate.hideFooterAddress) && + Objects.equals(this.hideFooterPhone, templatePropertiesInputCreate.hideFooterPhone) && + Objects.equals(this.hideManageNotification, templatePropertiesInputCreate.hideManageNotification) && + Objects.equals(this.hideMobileAppNudge, templatePropertiesInputCreate.hideMobileAppNudge) && + Objects.equals(this.hidePrivacyPolicy, templatePropertiesInputCreate.hidePrivacyPolicy) && + Objects.equals(this.hideProductName, templatePropertiesInputCreate.hideProductName) && + Objects.equals(this.hideTsVocabularyDefinitions, templatePropertiesInputCreate.hideTsVocabularyDefinitions) && + Objects.equals(this.hideNotificationStatus, templatePropertiesInputCreate.hideNotificationStatus) && + Objects.equals(this.hideErrorMessage, templatePropertiesInputCreate.hideErrorMessage) && + Objects.equals(this.hideUnsubscribeLink, templatePropertiesInputCreate.hideUnsubscribeLink) && + Objects.equals(this.hideModifyAlert, templatePropertiesInputCreate.hideModifyAlert) && + Objects.equals(this.companyPrivacyPolicyUrl, templatePropertiesInputCreate.companyPrivacyPolicyUrl) && + Objects.equals(this.companyWebsiteUrl, templatePropertiesInputCreate.companyWebsiteUrl); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(ctaButtonBgColor, ctaTextFontColor, primaryBgColor, homeUrl, logoUrl, fontFamily, productName, footerAddress, footerPhone, replacementValueForLiveboard, replacementValueForAnswer, replacementValueForSpotIq, hideFooterAddress, hideFooterPhone, hideManageNotification, hideMobileAppNudge, hidePrivacyPolicy, hideProductName, hideTsVocabularyDefinitions, hideNotificationStatus, hideErrorMessage, hideUnsubscribeLink, hideModifyAlert, companyPrivacyPolicyUrl, companyWebsiteUrl); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplatePropertiesInputCreate {\n"); + sb.append(" ctaButtonBgColor: ").append(toIndentedString(ctaButtonBgColor)).append("\n"); + sb.append(" ctaTextFontColor: ").append(toIndentedString(ctaTextFontColor)).append("\n"); + sb.append(" primaryBgColor: ").append(toIndentedString(primaryBgColor)).append("\n"); + sb.append(" homeUrl: ").append(toIndentedString(homeUrl)).append("\n"); + sb.append(" logoUrl: ").append(toIndentedString(logoUrl)).append("\n"); + sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); + sb.append(" productName: ").append(toIndentedString(productName)).append("\n"); + sb.append(" footerAddress: ").append(toIndentedString(footerAddress)).append("\n"); + sb.append(" footerPhone: ").append(toIndentedString(footerPhone)).append("\n"); + sb.append(" replacementValueForLiveboard: ").append(toIndentedString(replacementValueForLiveboard)).append("\n"); + sb.append(" replacementValueForAnswer: ").append(toIndentedString(replacementValueForAnswer)).append("\n"); + sb.append(" replacementValueForSpotIq: ").append(toIndentedString(replacementValueForSpotIq)).append("\n"); + sb.append(" hideFooterAddress: ").append(toIndentedString(hideFooterAddress)).append("\n"); + sb.append(" hideFooterPhone: ").append(toIndentedString(hideFooterPhone)).append("\n"); + sb.append(" hideManageNotification: ").append(toIndentedString(hideManageNotification)).append("\n"); + sb.append(" hideMobileAppNudge: ").append(toIndentedString(hideMobileAppNudge)).append("\n"); + sb.append(" hidePrivacyPolicy: ").append(toIndentedString(hidePrivacyPolicy)).append("\n"); + sb.append(" hideProductName: ").append(toIndentedString(hideProductName)).append("\n"); + sb.append(" hideTsVocabularyDefinitions: ").append(toIndentedString(hideTsVocabularyDefinitions)).append("\n"); + sb.append(" hideNotificationStatus: ").append(toIndentedString(hideNotificationStatus)).append("\n"); + sb.append(" hideErrorMessage: ").append(toIndentedString(hideErrorMessage)).append("\n"); + sb.append(" hideUnsubscribeLink: ").append(toIndentedString(hideUnsubscribeLink)).append("\n"); + sb.append(" hideModifyAlert: ").append(toIndentedString(hideModifyAlert)).append("\n"); + sb.append(" companyPrivacyPolicyUrl: ").append(toIndentedString(companyPrivacyPolicyUrl)).append("\n"); + sb.append(" companyWebsiteUrl: ").append(toIndentedString(companyWebsiteUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cta_button_bg_color"); + openapiFields.add("cta_text_font_color"); + openapiFields.add("primary_bg_color"); + openapiFields.add("home_url"); + openapiFields.add("logo_url"); + openapiFields.add("font_family"); + openapiFields.add("product_name"); + openapiFields.add("footer_address"); + openapiFields.add("footer_phone"); + openapiFields.add("replacement_value_for_liveboard"); + openapiFields.add("replacement_value_for_answer"); + openapiFields.add("replacement_value_for_spot_iq"); + openapiFields.add("hide_footer_address"); + openapiFields.add("hide_footer_phone"); + openapiFields.add("hide_manage_notification"); + openapiFields.add("hide_mobile_app_nudge"); + openapiFields.add("hide_privacy_policy"); + openapiFields.add("hide_product_name"); + openapiFields.add("hide_ts_vocabulary_definitions"); + openapiFields.add("hide_notification_status"); + openapiFields.add("hide_error_message"); + openapiFields.add("hide_unsubscribe_link"); + openapiFields.add("hide_modify_alert"); + openapiFields.add("company_privacy_policy_url"); + openapiFields.add("company_website_url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TemplatePropertiesInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TemplatePropertiesInputCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TemplatePropertiesInputCreate is not found in the empty JSON string", TemplatePropertiesInputCreate.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TemplatePropertiesInputCreate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TemplatePropertiesInputCreate` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TemplatePropertiesInputCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplatePropertiesInputCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("cta_button_bg_color") != null - && !jsonObj.get("cta_button_bg_color").isJsonNull()) - && !jsonObj.get("cta_button_bg_color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cta_button_bg_color` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("cta_button_bg_color").toString())); - } - if ((jsonObj.get("cta_text_font_color") != null - && !jsonObj.get("cta_text_font_color").isJsonNull()) - && !jsonObj.get("cta_text_font_color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `cta_text_font_color` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("cta_text_font_color").toString())); - } - if ((jsonObj.get("primary_bg_color") != null - && !jsonObj.get("primary_bg_color").isJsonNull()) - && !jsonObj.get("primary_bg_color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `primary_bg_color` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("primary_bg_color").toString())); - } - if ((jsonObj.get("home_url") != null && !jsonObj.get("home_url").isJsonNull()) - && !jsonObj.get("home_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `home_url` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("home_url").toString())); - } - if ((jsonObj.get("logo_url") != null && !jsonObj.get("logo_url").isJsonNull()) - && !jsonObj.get("logo_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `logo_url` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("logo_url").toString())); - } - if ((jsonObj.get("font_family") != null && !jsonObj.get("font_family").isJsonNull()) - && !jsonObj.get("font_family").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `font_family` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("font_family").toString())); - } - if ((jsonObj.get("product_name") != null && !jsonObj.get("product_name").isJsonNull()) - && !jsonObj.get("product_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `product_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("product_name").toString())); - } - if ((jsonObj.get("footer_address") != null && !jsonObj.get("footer_address").isJsonNull()) - && !jsonObj.get("footer_address").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `footer_address` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("footer_address").toString())); - } - if ((jsonObj.get("footer_phone") != null && !jsonObj.get("footer_phone").isJsonNull()) - && !jsonObj.get("footer_phone").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `footer_phone` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("footer_phone").toString())); - } - if ((jsonObj.get("replacement_value_for_liveboard") != null - && !jsonObj.get("replacement_value_for_liveboard").isJsonNull()) - && !jsonObj.get("replacement_value_for_liveboard").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `replacement_value_for_liveboard` to be a" - + " primitive type in the JSON string but got `%s`", - jsonObj.get("replacement_value_for_liveboard").toString())); - } - if ((jsonObj.get("replacement_value_for_answer") != null - && !jsonObj.get("replacement_value_for_answer").isJsonNull()) - && !jsonObj.get("replacement_value_for_answer").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `replacement_value_for_answer` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("replacement_value_for_answer").toString())); - } - if ((jsonObj.get("replacement_value_for_spot_iq") != null - && !jsonObj.get("replacement_value_for_spot_iq").isJsonNull()) - && !jsonObj.get("replacement_value_for_spot_iq").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `replacement_value_for_spot_iq` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("replacement_value_for_spot_iq").toString())); - } - if ((jsonObj.get("company_privacy_policy_url") != null - && !jsonObj.get("company_privacy_policy_url").isJsonNull()) - && !jsonObj.get("company_privacy_policy_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `company_privacy_policy_url` to be a primitive" - + " type in the JSON string but got `%s`", - jsonObj.get("company_privacy_policy_url").toString())); - } - if ((jsonObj.get("company_website_url") != null - && !jsonObj.get("company_website_url").isJsonNull()) - && !jsonObj.get("company_website_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `company_website_url` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("company_website_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TemplatePropertiesInputCreate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TemplatePropertiesInputCreate' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(TemplatePropertiesInputCreate.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TemplatePropertiesInputCreate value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TemplatePropertiesInputCreate read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of TemplatePropertiesInputCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of TemplatePropertiesInputCreate - * @throws IOException if the JSON string is invalid with respect to - * TemplatePropertiesInputCreate - */ - public static TemplatePropertiesInputCreate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TemplatePropertiesInputCreate.class); - } - - /** - * Convert an instance of TemplatePropertiesInputCreate to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("cta_button_bg_color") != null && !jsonObj.get("cta_button_bg_color").isJsonNull()) && !jsonObj.get("cta_button_bg_color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cta_button_bg_color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cta_button_bg_color").toString())); + } + if ((jsonObj.get("cta_text_font_color") != null && !jsonObj.get("cta_text_font_color").isJsonNull()) && !jsonObj.get("cta_text_font_color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cta_text_font_color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cta_text_font_color").toString())); + } + if ((jsonObj.get("primary_bg_color") != null && !jsonObj.get("primary_bg_color").isJsonNull()) && !jsonObj.get("primary_bg_color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primary_bg_color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primary_bg_color").toString())); + } + if ((jsonObj.get("home_url") != null && !jsonObj.get("home_url").isJsonNull()) && !jsonObj.get("home_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `home_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("home_url").toString())); + } + if ((jsonObj.get("logo_url") != null && !jsonObj.get("logo_url").isJsonNull()) && !jsonObj.get("logo_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo_url").toString())); + } + if ((jsonObj.get("font_family") != null && !jsonObj.get("font_family").isJsonNull()) && !jsonObj.get("font_family").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `font_family` to be a primitive type in the JSON string but got `%s`", jsonObj.get("font_family").toString())); + } + if ((jsonObj.get("product_name") != null && !jsonObj.get("product_name").isJsonNull()) && !jsonObj.get("product_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `product_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_name").toString())); + } + if ((jsonObj.get("footer_address") != null && !jsonObj.get("footer_address").isJsonNull()) && !jsonObj.get("footer_address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `footer_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("footer_address").toString())); + } + if ((jsonObj.get("footer_phone") != null && !jsonObj.get("footer_phone").isJsonNull()) && !jsonObj.get("footer_phone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `footer_phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("footer_phone").toString())); + } + if ((jsonObj.get("replacement_value_for_liveboard") != null && !jsonObj.get("replacement_value_for_liveboard").isJsonNull()) && !jsonObj.get("replacement_value_for_liveboard").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `replacement_value_for_liveboard` to be a primitive type in the JSON string but got `%s`", jsonObj.get("replacement_value_for_liveboard").toString())); + } + if ((jsonObj.get("replacement_value_for_answer") != null && !jsonObj.get("replacement_value_for_answer").isJsonNull()) && !jsonObj.get("replacement_value_for_answer").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `replacement_value_for_answer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("replacement_value_for_answer").toString())); + } + if ((jsonObj.get("replacement_value_for_spot_iq") != null && !jsonObj.get("replacement_value_for_spot_iq").isJsonNull()) && !jsonObj.get("replacement_value_for_spot_iq").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `replacement_value_for_spot_iq` to be a primitive type in the JSON string but got `%s`", jsonObj.get("replacement_value_for_spot_iq").toString())); + } + if ((jsonObj.get("company_privacy_policy_url") != null && !jsonObj.get("company_privacy_policy_url").isJsonNull()) && !jsonObj.get("company_privacy_policy_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `company_privacy_policy_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("company_privacy_policy_url").toString())); + } + if ((jsonObj.get("company_website_url") != null && !jsonObj.get("company_website_url").isJsonNull()) && !jsonObj.get("company_website_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `company_website_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("company_website_url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TemplatePropertiesInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TemplatePropertiesInputCreate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TemplatePropertiesInputCreate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TemplatePropertiesInputCreate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TemplatePropertiesInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TemplatePropertiesInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of TemplatePropertiesInputCreate + * @throws IOException if the JSON string is invalid with respect to TemplatePropertiesInputCreate + */ + public static TemplatePropertiesInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TemplatePropertiesInputCreate.class); + } + + /** + * Convert an instance of TemplatePropertiesInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java index 2597a980e..8b379b4dc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java @@ -4,374 +4,354 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Scope; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** Token */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Token implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - - @SerializedName(SERIALIZED_NAME_TOKEN) - @javax.annotation.Nonnull - private String token; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = - "expiration_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float expirationTimeInMillis; - - public static final String SERIALIZED_NAME_SCOPE = "scope"; - - @SerializedName(SERIALIZED_NAME_SCOPE) - @javax.annotation.Nonnull - private Scope scope; - - public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; - - @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) - @javax.annotation.Nonnull - private String validForUserId; - - public static final String SERIALIZED_NAME_VALID_FOR_USERNAME = "valid_for_username"; - - @SerializedName(SERIALIZED_NAME_VALID_FOR_USERNAME) - @javax.annotation.Nonnull - private String validForUsername; - - public Token() {} - - public Token token(@javax.annotation.Nonnull String token) { - this.token = token; - return this; - } - - /** - * Bearer auth token. - * - * @return token - */ - @javax.annotation.Nonnull - public String getToken() { - return token; - } - - public void setToken(@javax.annotation.Nonnull String token) { - this.token = token; - } - - public Token creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Token creation time in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public Token expirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - return this; - } - - /** - * Token expiration time in milliseconds. - * - * @return expirationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getExpirationTimeInMillis() { - return expirationTimeInMillis; - } - - public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - } - - public Token scope(@javax.annotation.Nonnull Scope scope) { - this.scope = scope; - return this; - } - - /** - * Get scope - * - * @return scope - */ - @javax.annotation.Nonnull - public Scope getScope() { - return scope; - } - - public void setScope(@javax.annotation.Nonnull Scope scope) { - this.scope = scope; - } - - public Token validForUserId(@javax.annotation.Nonnull String validForUserId) { - this.validForUserId = validForUserId; - return this; - } - - /** - * Username to whom the token is issued. - * - * @return validForUserId - */ - @javax.annotation.Nonnull - public String getValidForUserId() { - return validForUserId; - } - - public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { - this.validForUserId = validForUserId; - } - - public Token validForUsername(@javax.annotation.Nonnull String validForUsername) { - this.validForUsername = validForUsername; - return this; - } - - /** - * Unique identifier of the user to whom the token is issued. - * - * @return validForUsername - */ - @javax.annotation.Nonnull - public String getValidForUsername() { - return validForUsername; - } - - public void setValidForUsername(@javax.annotation.Nonnull String validForUsername) { - this.validForUsername = validForUsername; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Token token = (Token) o; - return Objects.equals(this.token, token.token) - && Objects.equals(this.creationTimeInMillis, token.creationTimeInMillis) - && Objects.equals(this.expirationTimeInMillis, token.expirationTimeInMillis) - && Objects.equals(this.scope, token.scope) - && Objects.equals(this.validForUserId, token.validForUserId) - && Objects.equals(this.validForUsername, token.validForUsername); - } - - @Override - public int hashCode() { - return Objects.hash( - token, - creationTimeInMillis, - expirationTimeInMillis, - scope, - validForUserId, - validForUsername); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Token {\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" expirationTimeInMillis: ") - .append(toIndentedString(expirationTimeInMillis)) - .append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); - sb.append(" validForUsername: ").append(toIndentedString(validForUsername)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * Token + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Token implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = "expiration_time_in_millis"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nonnull + private Scope scope; + + public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; + @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) + @javax.annotation.Nonnull + private String validForUserId; + + public static final String SERIALIZED_NAME_VALID_FOR_USERNAME = "valid_for_username"; + @SerializedName(SERIALIZED_NAME_VALID_FOR_USERNAME) + @javax.annotation.Nonnull + private String validForUsername; + + public Token() { + } + + public Token token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Bearer auth token. + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + + public Token creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public Token expirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + + public Token scope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * @return scope + */ + @javax.annotation.Nonnull + public Scope getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + } + + + public Token validForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + return this; + } + + /** + * Username to whom the token is issued. + * @return validForUserId + */ + @javax.annotation.Nonnull + public String getValidForUserId() { + return validForUserId; + } + + public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + } + + + public Token validForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + return this; + } + + /** + * Unique identifier of the user to whom the token is issued. + * @return validForUsername + */ + @javax.annotation.Nonnull + public String getValidForUsername() { + return validForUsername; + } + + public void setValidForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("token"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("expiration_time_in_millis"); - openapiFields.add("scope"); - openapiFields.add("valid_for_user_id"); - openapiFields.add("valid_for_username"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - openapiRequiredFields.add("creation_time_in_millis"); - openapiRequiredFields.add("expiration_time_in_millis"); - openapiRequiredFields.add("scope"); - openapiRequiredFields.add("valid_for_user_id"); - openapiRequiredFields.add("valid_for_username"); + Token token = (Token) o; + return Objects.equals(this.token, token.token) && + Objects.equals(this.creationTimeInMillis, token.creationTimeInMillis) && + Objects.equals(this.expirationTimeInMillis, token.expirationTimeInMillis) && + Objects.equals(this.scope, token.scope) && + Objects.equals(this.validForUserId, token.validForUserId) && + Objects.equals(this.validForUsername, token.validForUsername); + } + + @Override + public int hashCode() { + return Objects.hash(token, creationTimeInMillis, expirationTimeInMillis, scope, validForUserId, validForUsername); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Token {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" expirationTimeInMillis: ").append(toIndentedString(expirationTimeInMillis)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); + sb.append(" validForUsername: ").append(toIndentedString(validForUsername)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Token - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Token.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Token is not found in the empty JSON" - + " string", - Token.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("scope"); + openapiFields.add("valid_for_user_id"); + openapiFields.add("valid_for_username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + openapiRequiredFields.add("scope"); + openapiRequiredFields.add("valid_for_user_id"); + openapiRequiredFields.add("valid_for_username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Token + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Token.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Token is not found in the empty JSON string", Token.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Token.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `Token`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Token.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Token` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Token.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Token.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `token` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("token").toString())); - } - // validate the required field `scope` - Scope.validateJsonElement(jsonObj.get("scope")); - if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `valid_for_user_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("valid_for_user_id").toString())); - } - if (!jsonObj.get("valid_for_username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `valid_for_username` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("valid_for_username").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Token.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Token' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Token.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Token value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Token read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Token given an JSON string - * - * @param jsonString JSON string - * @return An instance of Token - * @throws IOException if the JSON string is invalid with respect to Token - */ - public static Token fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Token.class); - } - - /** - * Convert an instance of Token to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + // validate the required field `scope` + Scope.validateJsonElement(jsonObj.get("scope")); + if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `valid_for_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("valid_for_user_id").toString())); + } + if (!jsonObj.get("valid_for_username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `valid_for_username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("valid_for_username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Token.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Token' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Token.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Token value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Token read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Token given an JSON string + * + * @param jsonString JSON string + * @return An instance of Token + * @throws IOException if the JSON string is invalid with respect to Token + */ + public static Token fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Token.class); + } + + /** + * Convert an instance of Token to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java index 36da2a875..85695b8be 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 @@ -4,319 +4,301 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Objects on which the filter rules and parameters values should be applied to */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class TokenAccessScopeObject implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of object. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOGICAL_TABLE("LOGICAL_TABLE"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public TokenAccessScopeObject() {} +import com.thoughtspot.client.JSON; - public TokenAccessScopeObject type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } +/** + * Objects on which the filter rules and parameters values should be applied to + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TokenAccessScopeObject implements Serializable { + private static final long serialVersionUID = 1L; - /** - * Type of object. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return 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`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } + private String value; - public TokenAccessScopeObject identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; + TypeEnum(String value) { + this.value = value; } - /** - * Unique name/id of the object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - TokenAccessScopeObject tokenAccessScopeObject = (TokenAccessScopeObject) o; - return Objects.equals(this.type, tokenAccessScopeObject.type) - && Objects.equals(this.identifier, tokenAccessScopeObject.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public TokenAccessScopeObject() { + } + + public TokenAccessScopeObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public TokenAccessScopeObject identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique name/id of the object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TokenAccessScopeObject {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + TokenAccessScopeObject tokenAccessScopeObject = (TokenAccessScopeObject) o; + return Objects.equals(this.type, tokenAccessScopeObject.type) && + Objects.equals(this.identifier, tokenAccessScopeObject.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenAccessScopeObject {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TokenAccessScopeObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TokenAccessScopeObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TokenAccessScopeObject is not found" - + " in the empty JSON string", - TokenAccessScopeObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenAccessScopeObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenAccessScopeObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TokenAccessScopeObject is not found in the empty JSON string", TokenAccessScopeObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TokenAccessScopeObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TokenAccessScopeObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TokenAccessScopeObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenAccessScopeObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TokenAccessScopeObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TokenAccessScopeObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TokenAccessScopeObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TokenAccessScopeObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(TokenAccessScopeObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TokenAccessScopeObject value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TokenAccessScopeObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of TokenAccessScopeObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenAccessScopeObject - * @throws IOException if the JSON string is invalid with respect to TokenAccessScopeObject - */ - public static TokenAccessScopeObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TokenAccessScopeObject.class); - } - - /** - * Convert an instance of TokenAccessScopeObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenAccessScopeObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenAccessScopeObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenAccessScopeObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenAccessScopeObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenAccessScopeObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of TokenAccessScopeObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenAccessScopeObject + * @throws IOException if the JSON string is invalid with respect to TokenAccessScopeObject + */ + public static TokenAccessScopeObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TokenAccessScopeObject.class); + } + + /** + * Convert an instance of TokenAccessScopeObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java index e0166bb1c..eca85687d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java @@ -4,339 +4,323 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Scope; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** TokenValidationResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class TokenValidationResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = - "expiration_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) - @javax.annotation.Nonnull - private Float expirationTimeInMillis; - - public static final String SERIALIZED_NAME_SCOPE = "scope"; - - @SerializedName(SERIALIZED_NAME_SCOPE) - @javax.annotation.Nonnull - private Scope scope; - - public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; - - @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) - @javax.annotation.Nonnull - private String validForUserId; - - public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type"; - - @SerializedName(SERIALIZED_NAME_TOKEN_TYPE) - @javax.annotation.Nonnull - private String tokenType; - - public TokenValidationResponse() {} - - public TokenValidationResponse creationTimeInMillis( - @javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Token creation time in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public TokenValidationResponse expirationTimeInMillis( - @javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - return this; - } - - /** - * Token expiration time in milliseconds. - * - * @return expirationTimeInMillis - */ - @javax.annotation.Nonnull - public Float getExpirationTimeInMillis() { - return expirationTimeInMillis; - } - - public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - } - - public TokenValidationResponse scope(@javax.annotation.Nonnull Scope scope) { - this.scope = scope; - return this; - } - - /** - * Get scope - * - * @return scope - */ - @javax.annotation.Nonnull - public Scope getScope() { - return scope; - } - - public void setScope(@javax.annotation.Nonnull Scope scope) { - this.scope = scope; - } - - public TokenValidationResponse validForUserId(@javax.annotation.Nonnull String validForUserId) { - this.validForUserId = validForUserId; - return this; - } - - /** - * Username to whom the token is issued. - * - * @return validForUserId - */ - @javax.annotation.Nonnull - public String getValidForUserId() { - return validForUserId; - } - - public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { - this.validForUserId = validForUserId; - } - - public TokenValidationResponse tokenType(@javax.annotation.Nonnull String tokenType) { - this.tokenType = tokenType; - return this; - } - - /** - * Type of token. - * - * @return tokenType - */ - @javax.annotation.Nonnull - public String getTokenType() { - return tokenType; - } - - public void setTokenType(@javax.annotation.Nonnull String tokenType) { - this.tokenType = tokenType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TokenValidationResponse tokenValidationResponse = (TokenValidationResponse) o; - return Objects.equals( - this.creationTimeInMillis, tokenValidationResponse.creationTimeInMillis) - && Objects.equals( - this.expirationTimeInMillis, tokenValidationResponse.expirationTimeInMillis) - && Objects.equals(this.scope, tokenValidationResponse.scope) - && Objects.equals(this.validForUserId, tokenValidationResponse.validForUserId) - && Objects.equals(this.tokenType, tokenValidationResponse.tokenType); - } - - @Override - public int hashCode() { - return Objects.hash( - creationTimeInMillis, expirationTimeInMillis, scope, validForUserId, tokenType); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TokenValidationResponse {\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" expirationTimeInMillis: ") - .append(toIndentedString(expirationTimeInMillis)) - .append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); - sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * TokenValidationResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TokenValidationResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = "expiration_time_in_millis"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nonnull + private Scope scope; + + public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; + @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) + @javax.annotation.Nonnull + private String validForUserId; + + public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type"; + @SerializedName(SERIALIZED_NAME_TOKEN_TYPE) + @javax.annotation.Nonnull + private String tokenType; + + public TokenValidationResponse() { + } + + public TokenValidationResponse creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public TokenValidationResponse expirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + + public TokenValidationResponse scope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * @return scope + */ + @javax.annotation.Nonnull + public Scope getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + } + + + public TokenValidationResponse validForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + return this; + } + + /** + * Username to whom the token is issued. + * @return validForUserId + */ + @javax.annotation.Nonnull + public String getValidForUserId() { + return validForUserId; + } + + public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + } + + + public TokenValidationResponse tokenType(@javax.annotation.Nonnull String tokenType) { + this.tokenType = tokenType; + return this; + } + + /** + * Type of token. + * @return tokenType + */ + @javax.annotation.Nonnull + public String getTokenType() { + return tokenType; + } + + public void setTokenType(@javax.annotation.Nonnull String tokenType) { + this.tokenType = tokenType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("expiration_time_in_millis"); - openapiFields.add("scope"); - openapiFields.add("valid_for_user_id"); - openapiFields.add("token_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("creation_time_in_millis"); - openapiRequiredFields.add("expiration_time_in_millis"); - openapiRequiredFields.add("scope"); - openapiRequiredFields.add("valid_for_user_id"); - openapiRequiredFields.add("token_type"); + TokenValidationResponse tokenValidationResponse = (TokenValidationResponse) o; + return Objects.equals(this.creationTimeInMillis, tokenValidationResponse.creationTimeInMillis) && + Objects.equals(this.expirationTimeInMillis, tokenValidationResponse.expirationTimeInMillis) && + Objects.equals(this.scope, tokenValidationResponse.scope) && + Objects.equals(this.validForUserId, tokenValidationResponse.validForUserId) && + Objects.equals(this.tokenType, tokenValidationResponse.tokenType); + } + + @Override + public int hashCode() { + return Objects.hash(creationTimeInMillis, expirationTimeInMillis, scope, validForUserId, tokenType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenValidationResponse {\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" expirationTimeInMillis: ").append(toIndentedString(expirationTimeInMillis)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); + sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TokenValidationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TokenValidationResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TokenValidationResponse is not found" - + " in the empty JSON string", - TokenValidationResponse.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("scope"); + openapiFields.add("valid_for_user_id"); + openapiFields.add("token_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + openapiRequiredFields.add("scope"); + openapiRequiredFields.add("valid_for_user_id"); + openapiRequiredFields.add("token_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenValidationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenValidationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TokenValidationResponse is not found in the empty JSON string", TokenValidationResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TokenValidationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TokenValidationResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TokenValidationResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenValidationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TokenValidationResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TokenValidationResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `scope` - Scope.validateJsonElement(jsonObj.get("scope")); - if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `valid_for_user_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("valid_for_user_id").toString())); - } - if (!jsonObj.get("token_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `token_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("token_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TokenValidationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TokenValidationResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(TokenValidationResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TokenValidationResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TokenValidationResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of TokenValidationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenValidationResponse - * @throws IOException if the JSON string is invalid with respect to TokenValidationResponse - */ - public static TokenValidationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TokenValidationResponse.class); - } - - /** - * Convert an instance of TokenValidationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `scope` + Scope.validateJsonElement(jsonObj.get("scope")); + if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `valid_for_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("valid_for_user_id").toString())); + } + if (!jsonObj.get("token_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenValidationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenValidationResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenValidationResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenValidationResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenValidationResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of TokenValidationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenValidationResponse + * @throws IOException if the JSON string is invalid with respect to TokenValidationResponse + */ + public static TokenValidationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TokenValidationResponse.class); + } + + /** + * Convert an instance of TokenValidationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java b/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java index 1c5ba9a8e..27bf3618e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java @@ -4,346 +4,331 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Authentication; +import com.thoughtspot.client.model.ParametersListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** URL Custom Action Type */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class URL implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; - - @SerializedName(SERIALIZED_NAME_AUTHENTICATION) - @javax.annotation.Nullable - private Authentication authentication; - - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; - - @SerializedName(SERIALIZED_NAME_PARAMETERS) - @javax.annotation.Nullable - private List parameters; - - public static final String SERIALIZED_NAME_URL = "url"; - - @SerializedName(SERIALIZED_NAME_URL) - @javax.annotation.Nonnull - private String url; - - public static final String SERIALIZED_NAME_REFERENCE = "reference"; - - @SerializedName(SERIALIZED_NAME_REFERENCE) - @javax.annotation.Nullable - private String reference; - - public URL() {} - - public URL authentication(@javax.annotation.Nullable Authentication authentication) { - this.authentication = authentication; - return this; - } - - /** - * Get authentication - * - * @return authentication - */ - @javax.annotation.Nullable - public Authentication getAuthentication() { - return authentication; - } - - public void setAuthentication(@javax.annotation.Nullable Authentication authentication) { - this.authentication = authentication; - } - - public URL parameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - return this; - } - - public URL addParametersItem(ParametersListItem parametersItem) { - if (this.parameters == null) { - this.parameters = new ArrayList<>(); - } - this.parameters.add(parametersItem); - return this; - } - - /** - * Query parameters for url. - * - * @return parameters - */ - @javax.annotation.Nullable - public List getParameters() { - return parameters; - } - public void setParameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - } - - public URL url(@javax.annotation.Nonnull String url) { - this.url = url; - return this; - } - - /** - * Request Url for the Custom action. - * - * @return url - */ - @javax.annotation.Nonnull - public String getUrl() { - return url; - } - - public void setUrl(@javax.annotation.Nonnull String url) { - this.url = url; - } - - public URL reference(@javax.annotation.Nullable String reference) { - this.reference = reference; - return this; - } - - /** - * Reference name of the SDK. By default, the value will be set to action name. - * - * @return reference - */ - @javax.annotation.Nullable - public String getReference() { - return reference; - } - - public void setReference(@javax.annotation.Nullable String reference) { - this.reference = reference; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - URL URL = (URL) o; - return Objects.equals(this.authentication, URL.authentication) - && Objects.equals(this.parameters, URL.parameters) - && Objects.equals(this.url, URL.url) - && Objects.equals(this.reference, URL.reference); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(authentication, parameters, url, reference); +/** + * URL Custom Action Type + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class URL implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private Authentication authentication; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public URL() { + } + + public URL authentication(@javax.annotation.Nullable Authentication authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * @return authentication + */ + @javax.annotation.Nullable + public Authentication getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable Authentication authentication) { + this.authentication = authentication; + } + + + public URL parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public URL addParametersItem(ParametersListItem parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.parameters.add(parametersItem); + return this; + } + + /** + * Query parameters for url. + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + + public URL url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Request Url for the Custom action. + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + + public URL reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name of the SDK. By default, the value will be set to action name. + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class URL {\n"); - sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); - sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + URL URL = (URL) o; + return Objects.equals(this.authentication, URL.authentication) && + Objects.equals(this.parameters, URL.parameters) && + Objects.equals(this.url, URL.url) && + Objects.equals(this.reference, URL.reference); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, parameters, url, reference); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authentication"); - openapiFields.add("parameters"); - openapiFields.add("url"); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("url"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class URL {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to URL - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!URL.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in URL is not found in the empty JSON" - + " string", - URL.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authentication"); + openapiFields.add("parameters"); + openapiFields.add("url"); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("url"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to URL + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!URL.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in URL is not found in the empty JSON string", URL.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!URL.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `URL`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!URL.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `URL` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : URL.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : URL.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `authentication` - if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { - Authentication.validateJsonElement(jsonObj.get("authentication")); - } - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); - if (jsonArrayparameters != null) { - // ensure the json data is an array - if (!jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("parameters").toString())); - } - - // validate the optional field `parameters` (array) - for (int i = 0; i < jsonArrayparameters.size(); i++) { - ParametersListItem.validateJsonElement(jsonArrayparameters.get(i)); - } - ; - } + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + Authentication.validateJsonElement(jsonObj.get("authentication")); + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + ParametersListItem.validateJsonElement(jsonArrayparameters.get(i)); + }; } - if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `url` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("url").toString())); - } - if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) - && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reference` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reference").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!URL.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'URL' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(URL.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, URL value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public URL read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of URL given an JSON string - * - * @param jsonString JSON string - * @return An instance of URL - * @throws IOException if the JSON string is invalid with respect to URL - */ - public static URL fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, URL.class); - } - - /** - * Convert an instance of URL to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!URL.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'URL' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(URL.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, URL value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public URL read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of URL given an JSON string + * + * @param jsonString JSON string + * @return An instance of URL + * @throws IOException if the JSON string is invalid with respect to URL + */ + public static URL fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, URL.class); + } + + /** + * Convert an instance of URL to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java index 8e797a8d2..3e5bc11cb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java @@ -4,337 +4,323 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthenticationInput; +import com.thoughtspot.client.model.ParametersListItemInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** URL Custom Action Type */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class URLInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; - - @SerializedName(SERIALIZED_NAME_AUTHENTICATION) - @javax.annotation.Nullable - private AuthenticationInput authentication; - - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; - - @SerializedName(SERIALIZED_NAME_PARAMETERS) - @javax.annotation.Nullable - private List parameters; - - public static final String SERIALIZED_NAME_URL = "url"; - - @SerializedName(SERIALIZED_NAME_URL) - @javax.annotation.Nullable - private String url; - - public static final String SERIALIZED_NAME_REFERENCE = "reference"; - - @SerializedName(SERIALIZED_NAME_REFERENCE) - @javax.annotation.Nullable - private String reference; - - public URLInput() {} - - public URLInput authentication(@javax.annotation.Nullable AuthenticationInput authentication) { - this.authentication = authentication; - return this; - } - - /** - * Get authentication - * - * @return authentication - */ - @javax.annotation.Nullable - public AuthenticationInput getAuthentication() { - return authentication; - } - - public void setAuthentication(@javax.annotation.Nullable AuthenticationInput authentication) { - this.authentication = authentication; - } - - public URLInput parameters( - @javax.annotation.Nullable List parameters) { - this.parameters = parameters; - return this; - } - - public URLInput addParametersItem(ParametersListItemInput parametersItem) { - if (this.parameters == null) { - this.parameters = new ArrayList<>(); - } - this.parameters.add(parametersItem); - return this; - } - - /** - * Query parameters for url. - * - * @return parameters - */ - @javax.annotation.Nullable - public List getParameters() { - return parameters; - } - public void setParameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - } - - public URLInput url(@javax.annotation.Nullable String url) { - this.url = url; - return this; - } - - /** - * Request Url for the Custom action. - * - * @return url - */ - @javax.annotation.Nullable - public String getUrl() { - return url; - } - - public void setUrl(@javax.annotation.Nullable String url) { - this.url = url; - } - - public URLInput reference(@javax.annotation.Nullable String reference) { - this.reference = reference; - return this; - } - - /** - * Reference name. By default the value will be set to action name - * - * @return reference - */ - @javax.annotation.Nullable - public String getReference() { - return reference; - } - - public void setReference(@javax.annotation.Nullable String reference) { - this.reference = reference; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - URLInput urLInput = (URLInput) o; - return Objects.equals(this.authentication, urLInput.authentication) - && Objects.equals(this.parameters, urLInput.parameters) - && Objects.equals(this.url, urLInput.url) - && Objects.equals(this.reference, urLInput.reference); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(authentication, parameters, url, reference); +/** + * URL Custom Action Type + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class URLInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private AuthenticationInput authentication; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nullable + private String url; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public URLInput() { + } + + public URLInput authentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * @return authentication + */ + @javax.annotation.Nullable + public AuthenticationInput getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + } + + + public URLInput parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public URLInput addParametersItem(ParametersListItemInput parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.parameters.add(parametersItem); + return this; + } + + /** + * Query parameters for url. + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + + public URLInput url(@javax.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Request Url for the Custom action. + * @return url + */ + @javax.annotation.Nullable + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nullable String url) { + this.url = url; + } + + + public URLInput reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name. By default the value will be set to action name + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class URLInput {\n"); - sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); - sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + URLInput urLInput = (URLInput) o; + return Objects.equals(this.authentication, urLInput.authentication) && + Objects.equals(this.parameters, urLInput.parameters) && + Objects.equals(this.url, urLInput.url) && + Objects.equals(this.reference, urLInput.reference); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, parameters, url, reference); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authentication"); - openapiFields.add("parameters"); - openapiFields.add("url"); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class URLInput {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to URLInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!URLInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in URLInput is not found in the empty" - + " JSON string", - URLInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authentication"); + openapiFields.add("parameters"); + openapiFields.add("url"); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to URLInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!URLInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in URLInput is not found in the empty JSON string", URLInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!URLInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `URLInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!URLInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `URLInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `authentication` - if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { - AuthenticationInput.validateJsonElement(jsonObj.get("authentication")); - } - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); - if (jsonArrayparameters != null) { - // ensure the json data is an array - if (!jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("parameters").toString())); - } - - // validate the optional field `parameters` (array) - for (int i = 0; i < jsonArrayparameters.size(); i++) { - ParametersListItemInput.validateJsonElement(jsonArrayparameters.get(i)); - } - ; - } + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + AuthenticationInput.validateJsonElement(jsonObj.get("authentication")); + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + ParametersListItemInput.validateJsonElement(jsonArrayparameters.get(i)); + }; } - if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) - && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `url` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("url").toString())); - } - if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) - && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reference` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reference").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!URLInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'URLInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(URLInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, URLInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public URLInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of URLInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of URLInput - * @throws IOException if the JSON string is invalid with respect to URLInput - */ - public static URLInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, URLInput.class); - } - - /** - * Convert an instance of URLInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!URLInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'URLInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(URLInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, URLInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public URLInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of URLInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of URLInput + * @throws IOException if the JSON string is invalid with respect to URLInput + */ + public static URLInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, URLInput.class); + } + + /** + * Convert an instance of URLInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java index 910704ac9..404ca4d87 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java @@ -4,349 +4,331 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthenticationInput; +import com.thoughtspot.client.model.ParametersListItemInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** URL Custom Action Type */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class URLInputMandatory implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; - - @SerializedName(SERIALIZED_NAME_AUTHENTICATION) - @javax.annotation.Nullable - private AuthenticationInput authentication; - - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; - - @SerializedName(SERIALIZED_NAME_PARAMETERS) - @javax.annotation.Nullable - private List parameters; - - public static final String SERIALIZED_NAME_URL = "url"; - - @SerializedName(SERIALIZED_NAME_URL) - @javax.annotation.Nonnull - private String url; - - public static final String SERIALIZED_NAME_REFERENCE = "reference"; - - @SerializedName(SERIALIZED_NAME_REFERENCE) - @javax.annotation.Nullable - private String reference; - - public URLInputMandatory() {} - - public URLInputMandatory authentication( - @javax.annotation.Nullable AuthenticationInput authentication) { - this.authentication = authentication; - return this; - } - - /** - * Get authentication - * - * @return authentication - */ - @javax.annotation.Nullable - public AuthenticationInput getAuthentication() { - return authentication; - } - - public void setAuthentication(@javax.annotation.Nullable AuthenticationInput authentication) { - this.authentication = authentication; - } - - public URLInputMandatory parameters( - @javax.annotation.Nullable List parameters) { - this.parameters = parameters; - return this; - } - - public URLInputMandatory addParametersItem(ParametersListItemInput parametersItem) { - if (this.parameters == null) { - this.parameters = new ArrayList<>(); - } - this.parameters.add(parametersItem); - return this; - } - - /** - * Query parameters for url. - * - * @return parameters - */ - @javax.annotation.Nullable - public List getParameters() { - return parameters; - } - public void setParameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - } - - public URLInputMandatory url(@javax.annotation.Nonnull String url) { - this.url = url; - return this; - } - - /** - * Request Url for the Custom action. - * - * @return url - */ - @javax.annotation.Nonnull - public String getUrl() { - return url; - } - - public void setUrl(@javax.annotation.Nonnull String url) { - this.url = url; - } - - public URLInputMandatory reference(@javax.annotation.Nullable String reference) { - this.reference = reference; - return this; - } - - /** - * Reference name. By default the value will be set to action name - * - * @return reference - */ - @javax.annotation.Nullable - public String getReference() { - return reference; - } - - public void setReference(@javax.annotation.Nullable String reference) { - this.reference = reference; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - URLInputMandatory urLInputMandatory = (URLInputMandatory) o; - return Objects.equals(this.authentication, urLInputMandatory.authentication) - && Objects.equals(this.parameters, urLInputMandatory.parameters) - && Objects.equals(this.url, urLInputMandatory.url) - && Objects.equals(this.reference, urLInputMandatory.reference); - } - - 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())); - } +import com.thoughtspot.client.JSON; - @Override - public int hashCode() { - return Objects.hash(authentication, parameters, url, reference); +/** + * URL Custom Action Type + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class URLInputMandatory implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private AuthenticationInput authentication; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public URLInputMandatory() { + } + + public URLInputMandatory authentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * @return authentication + */ + @javax.annotation.Nullable + public AuthenticationInput getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + } + + + public URLInputMandatory parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public URLInputMandatory addParametersItem(ParametersListItemInput parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + this.parameters.add(parametersItem); + return this; + } + + /** + * Query parameters for url. + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + + public URLInputMandatory url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Request Url for the Custom action. + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + + public URLInputMandatory reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name. By default the value will be set to action name + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class URLInputMandatory {\n"); - sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); - sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + URLInputMandatory urLInputMandatory = (URLInputMandatory) o; + return Objects.equals(this.authentication, urLInputMandatory.authentication) && + Objects.equals(this.parameters, urLInputMandatory.parameters) && + Objects.equals(this.url, urLInputMandatory.url) && + Objects.equals(this.reference, urLInputMandatory.reference); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, parameters, url, reference); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authentication"); - openapiFields.add("parameters"); - openapiFields.add("url"); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("url"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class URLInputMandatory {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to URLInputMandatory - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!URLInputMandatory.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in URLInputMandatory is not found in the" - + " empty JSON string", - URLInputMandatory.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authentication"); + openapiFields.add("parameters"); + openapiFields.add("url"); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("url"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to URLInputMandatory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!URLInputMandatory.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in URLInputMandatory is not found in the empty JSON string", URLInputMandatory.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!URLInputMandatory.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `URLInputMandatory` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!URLInputMandatory.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `URLInputMandatory` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : URLInputMandatory.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : URLInputMandatory.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `authentication` - if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { - AuthenticationInput.validateJsonElement(jsonObj.get("authentication")); - } - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); - if (jsonArrayparameters != null) { - // ensure the json data is an array - if (!jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("parameters").toString())); - } - - // validate the optional field `parameters` (array) - for (int i = 0; i < jsonArrayparameters.size(); i++) { - ParametersListItemInput.validateJsonElement(jsonArrayparameters.get(i)); - } - ; - } + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + AuthenticationInput.validateJsonElement(jsonObj.get("authentication")); + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + ParametersListItemInput.validateJsonElement(jsonArrayparameters.get(i)); + }; } - if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `url` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("url").toString())); - } - if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) - && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `reference` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("reference").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!URLInputMandatory.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'URLInputMandatory' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(URLInputMandatory.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, URLInputMandatory value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public URLInputMandatory read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of URLInputMandatory given an JSON string - * - * @param jsonString JSON string - * @return An instance of URLInputMandatory - * @throws IOException if the JSON string is invalid with respect to URLInputMandatory - */ - public static URLInputMandatory fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, URLInputMandatory.class); - } - - /** - * Convert an instance of URLInputMandatory to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!URLInputMandatory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'URLInputMandatory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(URLInputMandatory.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, URLInputMandatory value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public URLInputMandatory read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of URLInputMandatory given an JSON string + * + * @param jsonString JSON string + * @return An instance of URLInputMandatory + * @throws IOException if the JSON string is invalid with respect to URLInputMandatory + */ + public static URLInputMandatory fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, URLInputMandatory.class); + } + + /** + * Convert an instance of URLInputMandatory to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java index 05bc1ba67..fdcd90413 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java @@ -4,468 +4,438 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UnparameterizeMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UnparameterizeMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of metadata object to unparameterize. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LOGICAL_TABLE("LOGICAL_TABLE"), - - CONNECTION("CONNECTION"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nullable - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nonnull - private String metadataIdentifier; - - /** Type of field in the metadata to unparameterize. */ - @JsonAdapter(FieldTypeEnum.Adapter.class) - public enum FieldTypeEnum { - ATTRIBUTE("ATTRIBUTE"), - - CONNECTION_PROPERTY("CONNECTION_PROPERTY"); - - private String value; - - FieldTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FieldTypeEnum fromValue(String value) { - for (FieldTypeEnum b : FieldTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FieldTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FieldTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; - - @SerializedName(SERIALIZED_NAME_FIELD_TYPE) - @javax.annotation.Nonnull - private FieldTypeEnum fieldType; - - public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; +import com.thoughtspot.client.JSON; - @SerializedName(SERIALIZED_NAME_FIELD_NAME) - @javax.annotation.Nonnull - private String fieldName; +/** + * UnparameterizeMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UnparameterizeMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_VALUE = "value"; + /** + * Type of metadata object to unparameterize. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"); - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nonnull private String value; - public UnparameterizeMetadataRequest() {} - - public UnparameterizeMetadataRequest metadataType( - @javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; + MetadataTypeEnum(String value) { + this.value = value; } - /** - * Type of metadata object to unparameterize. - * - * @return metadataType - */ - @javax.annotation.Nullable - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public UnparameterizeMetadataRequest metadataIdentifier( - @javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * Unique ID or name of the metadata object to unparameterize. - * - * @return metadataIdentifier - */ - @javax.annotation.Nonnull - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public UnparameterizeMetadataRequest fieldType( - @javax.annotation.Nonnull FieldTypeEnum fieldType) { - this.fieldType = fieldType; - return this; + public String getValue() { + return value; } - /** - * Type of field in the metadata to unparameterize. - * - * @return fieldType - */ - @javax.annotation.Nonnull - public FieldTypeEnum getFieldType() { - return fieldType; + @Override + public String toString() { + return String.valueOf(value); } - public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { - this.fieldType = fieldType; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public UnparameterizeMetadataRequest fieldName(@javax.annotation.Nonnull String fieldName) { - this.fieldName = fieldName; - return this; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - /** - * Name of the field which needs to be unparameterized. - * - * @return fieldName - */ - @javax.annotation.Nonnull - public String getFieldName() { - return fieldName; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** + * Type of field in the metadata to unparameterize. + */ + @JsonAdapter(FieldTypeEnum.Adapter.class) + public enum FieldTypeEnum { + ATTRIBUTE("ATTRIBUTE"), + + CONNECTION_PROPERTY("CONNECTION_PROPERTY"); - public void setFieldName(@javax.annotation.Nonnull String fieldName) { - this.fieldName = fieldName; - } + private String value; - public UnparameterizeMetadataRequest value(@javax.annotation.Nonnull String value) { - this.value = value; - return this; + FieldTypeEnum(String value) { + this.value = value; } - /** - * The value to use in place of the variable for the field - * - * @return value - */ - @javax.annotation.Nonnull public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nonnull String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnparameterizeMetadataRequest unparameterizeMetadataRequest = - (UnparameterizeMetadataRequest) o; - return Objects.equals(this.metadataType, unparameterizeMetadataRequest.metadataType) - && Objects.equals( - this.metadataIdentifier, unparameterizeMetadataRequest.metadataIdentifier) - && Objects.equals(this.fieldType, unparameterizeMetadataRequest.fieldType) - && Objects.equals(this.fieldName, unparameterizeMetadataRequest.fieldName) - && Objects.equals(this.value, unparameterizeMetadataRequest.value); - } - - @Override - public int hashCode() { - return Objects.hash(metadataType, metadataIdentifier, fieldType, fieldName, value); + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnparameterizeMetadataRequest {\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); - sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static FieldTypeEnum fromValue(String value) { + for (FieldTypeEnum b : FieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_type"); - openapiFields.add("metadata_identifier"); - openapiFields.add("field_type"); - openapiFields.add("field_name"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata_identifier"); - openapiRequiredFields.add("field_type"); - openapiRequiredFields.add("field_name"); - openapiRequiredFields.add("value"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UnparameterizeMetadataRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnparameterizeMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnparameterizeMetadataRequest is not" - + " found in the empty JSON string", - UnparameterizeMetadataRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + FieldTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; + @SerializedName(SERIALIZED_NAME_FIELD_TYPE) + @javax.annotation.Nonnull + private FieldTypeEnum fieldType; + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nonnull + private String fieldName; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public UnparameterizeMetadataRequest() { + } + + public UnparameterizeMetadataRequest metadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to unparameterize. + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public UnparameterizeMetadataRequest metadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object to unparameterize. + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public UnparameterizeMetadataRequest fieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Type of field in the metadata to unparameterize. + * @return fieldType + */ + @javax.annotation.Nonnull + public FieldTypeEnum getFieldType() { + return fieldType; + } + + public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + } + + + public UnparameterizeMetadataRequest fieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field which needs to be unparameterized. + * @return fieldName + */ + @javax.annotation.Nonnull + public String getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + } + + + public UnparameterizeMetadataRequest value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The value to use in place of the variable for the field + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnparameterizeMetadataRequest unparameterizeMetadataRequest = (UnparameterizeMetadataRequest) o; + return Objects.equals(this.metadataType, unparameterizeMetadataRequest.metadataType) && + Objects.equals(this.metadataIdentifier, unparameterizeMetadataRequest.metadataIdentifier) && + Objects.equals(this.fieldType, unparameterizeMetadataRequest.fieldType) && + Objects.equals(this.fieldName, unparameterizeMetadataRequest.fieldName) && + Objects.equals(this.value, unparameterizeMetadataRequest.value); + } + + @Override + public int hashCode() { + return Objects.hash(metadataType, metadataIdentifier, fieldType, fieldName, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnparameterizeMetadataRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("field_type"); + openapiFields.add("field_name"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("field_type"); + openapiRequiredFields.add("field_name"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UnparameterizeMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnparameterizeMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnparameterizeMetadataRequest is not found in the empty JSON string", UnparameterizeMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnparameterizeMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnparameterizeMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UnparameterizeMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnparameterizeMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnparameterizeMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UnparameterizeMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) - && !jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the optional field `metadata_type` - if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - } - if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if (!jsonObj.get("field_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `field_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("field_type").toString())); - } - // validate the required field `field_type` - FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); - if (!jsonObj.get("field_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `field_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("field_name").toString())); - } - if (!jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnparameterizeMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnparameterizeMetadataRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UnparameterizeMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnparameterizeMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnparameterizeMetadataRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnparameterizeMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnparameterizeMetadataRequest - * @throws IOException if the JSON string is invalid with respect to - * UnparameterizeMetadataRequest - */ - public static UnparameterizeMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnparameterizeMetadataRequest.class); - } - - /** - * Convert an instance of UnparameterizeMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("field_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_type").toString())); + } + // validate the required field `field_type` + FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); + if (!jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnparameterizeMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnparameterizeMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnparameterizeMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UnparameterizeMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UnparameterizeMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UnparameterizeMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnparameterizeMetadataRequest + * @throws IOException if the JSON string is invalid with respect to UnparameterizeMetadataRequest + */ + public static UnparameterizeMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnparameterizeMetadataRequest.class); + } + + /** + * Convert an instance of UnparameterizeMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java index fe5184ddb..b1024ed27 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java @@ -4,355 +4,332 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PublishMetadataListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UnpublishMetadataRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UnpublishMetadataRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_FORCE = "force"; - - @SerializedName(SERIALIZED_NAME_FORCE) - @javax.annotation.Nullable - private Boolean force; - - public static final String SERIALIZED_NAME_INCLUDE_DEPENDENCIES = "include_dependencies"; - - @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENCIES) - @javax.annotation.Nonnull - private Boolean includeDependencies; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nonnull - private List orgIdentifiers; - - public UnpublishMetadataRequest() {} - - public UnpublishMetadataRequest force(@javax.annotation.Nullable Boolean force) { - this.force = force; - return this; - } - - /** - * Force unpublishes the object. This will break all the dependent objects in the unpublished - * orgs. - * - * @return force - */ - @javax.annotation.Nullable - public Boolean getForce() { - return force; - } - - public void setForce(@javax.annotation.Nullable Boolean force) { - this.force = force; - } - - public UnpublishMetadataRequest includeDependencies( - @javax.annotation.Nonnull Boolean includeDependencies) { - this.includeDependencies = includeDependencies; - return this; - } - - /** - * Should we unpublish all the dependencies for the objects specified. The dependencies will be - * unpublished if no other published object is using it. - * - * @return includeDependencies - */ - @javax.annotation.Nonnull - public Boolean getIncludeDependencies() { - return includeDependencies; - } - - public void setIncludeDependencies(@javax.annotation.Nonnull Boolean includeDependencies) { - this.includeDependencies = includeDependencies; - } - - public UnpublishMetadataRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; - } - - public UnpublishMetadataRequest addMetadataItem(PublishMetadataListItem metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - /** - * Metadata objects. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } - - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } - - public UnpublishMetadataRequest orgIdentifiers( - @javax.annotation.Nonnull List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; - } +import com.thoughtspot.client.JSON; - public UnpublishMetadataRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); - } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; +/** + * UnpublishMetadataRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UnpublishMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FORCE = "force"; + @SerializedName(SERIALIZED_NAME_FORCE) + @javax.annotation.Nullable + private Boolean force; + + public static final String SERIALIZED_NAME_INCLUDE_DEPENDENCIES = "include_dependencies"; + @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENCIES) + @javax.annotation.Nonnull + private Boolean includeDependencies; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nonnull + private List orgIdentifiers; + + public UnpublishMetadataRequest() { + } + + public UnpublishMetadataRequest force(@javax.annotation.Nullable Boolean force) { + this.force = force; + return this; + } + + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. + * @return force + */ + @javax.annotation.Nullable + public Boolean getForce() { + return force; + } + + public void setForce(@javax.annotation.Nullable Boolean force) { + this.force = force; + } + + + public UnpublishMetadataRequest includeDependencies(@javax.annotation.Nonnull Boolean includeDependencies) { + this.includeDependencies = includeDependencies; + return this; + } + + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + * @return includeDependencies + */ + @javax.annotation.Nonnull + public Boolean getIncludeDependencies() { + return includeDependencies; + } + + public void setIncludeDependencies(@javax.annotation.Nonnull Boolean includeDependencies) { + this.includeDependencies = includeDependencies; + } + + + public UnpublishMetadataRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public UnpublishMetadataRequest addMetadataItem(PublishMetadataListItem metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - - /** - * Unique ID or name of orgs. - * - * @return orgIdentifiers - */ - @javax.annotation.Nonnull - public List getOrgIdentifiers() { - return orgIdentifiers; + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + + public UnpublishMetadataRequest orgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public UnpublishMetadataRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } - public void setOrgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } + /** + * Unique ID or name of orgs. + * @return orgIdentifiers + */ + @javax.annotation.Nonnull + public List getOrgIdentifiers() { + return orgIdentifiers; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnpublishMetadataRequest unpublishMetadataRequest = (UnpublishMetadataRequest) o; - return Objects.equals(this.force, unpublishMetadataRequest.force) - && Objects.equals( - this.includeDependencies, unpublishMetadataRequest.includeDependencies) - && Objects.equals(this.metadata, unpublishMetadataRequest.metadata) - && Objects.equals(this.orgIdentifiers, unpublishMetadataRequest.orgIdentifiers); - } + public void setOrgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(force, includeDependencies, metadata, orgIdentifiers); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnpublishMetadataRequest {\n"); - sb.append(" force: ").append(toIndentedString(force)).append("\n"); - sb.append(" includeDependencies: ") - .append(toIndentedString(includeDependencies)) - .append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UnpublishMetadataRequest unpublishMetadataRequest = (UnpublishMetadataRequest) o; + return Objects.equals(this.force, unpublishMetadataRequest.force) && + Objects.equals(this.includeDependencies, unpublishMetadataRequest.includeDependencies) && + Objects.equals(this.metadata, unpublishMetadataRequest.metadata) && + Objects.equals(this.orgIdentifiers, unpublishMetadataRequest.orgIdentifiers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(force, includeDependencies, metadata, orgIdentifiers); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("force"); - openapiFields.add("include_dependencies"); - openapiFields.add("metadata"); - openapiFields.add("org_identifiers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("include_dependencies"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("org_identifiers"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnpublishMetadataRequest {\n"); + sb.append(" force: ").append(toIndentedString(force)).append("\n"); + sb.append(" includeDependencies: ").append(toIndentedString(includeDependencies)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnpublishMetadataRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnpublishMetadataRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UnpublishMetadataRequest is not found" - + " in the empty JSON string", - UnpublishMetadataRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("force"); + openapiFields.add("include_dependencies"); + openapiFields.add("metadata"); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("include_dependencies"); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("org_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UnpublishMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnpublishMetadataRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnpublishMetadataRequest is not found in the empty JSON string", UnpublishMetadataRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnpublishMetadataRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UnpublishMetadataRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UnpublishMetadataRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnpublishMetadataRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UnpublishMetadataRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UnpublishMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - PublishMetadataListItem.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - // ensure the required json array is present - if (jsonObj.get("org_identifiers") == null) { - throw new IllegalArgumentException( - "Expected the field `linkedContent` to be an array in the JSON string but got" - + " `null`"); - } else if (!jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnpublishMetadataRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnpublishMetadataRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UnpublishMetadataRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UnpublishMetadataRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnpublishMetadataRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UnpublishMetadataRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnpublishMetadataRequest - * @throws IOException if the JSON string is invalid with respect to UnpublishMetadataRequest - */ - public static UnpublishMetadataRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnpublishMetadataRequest.class); - } - - /** - * Convert an instance of UnpublishMetadataRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PublishMetadataListItem.validateJsonElement(jsonArraymetadata.get(i)); + }; + // ensure the required json array is present + if (jsonObj.get("org_identifiers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnpublishMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnpublishMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnpublishMetadataRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UnpublishMetadataRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UnpublishMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UnpublishMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnpublishMetadataRequest + * @throws IOException if the JSON string is invalid with respect to UnpublishMetadataRequest + */ + public static UnpublishMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnpublishMetadataRequest.class); + } + + /** + * Convert an instance of UnpublishMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java index 937004c2c..2c0401c66 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java @@ -4,777 +4,703 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExternalTableInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateCalendarRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateCalendarRequest implements Serializable { - private static final long serialVersionUID = 1L; - - /** Type of update operation. */ - @JsonAdapter(UpdateMethodEnum.Adapter.class) - public enum UpdateMethodEnum { - FROM_INPUT_PARAMS("FROM_INPUT_PARAMS"), - - FROM_EXISTING_TABLE("FROM_EXISTING_TABLE"); - - private String value; - - UpdateMethodEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - return String.valueOf(value); - } +/** + * UpdateCalendarRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateCalendarRequest implements Serializable { + private static final long serialVersionUID = 1L; - public static UpdateMethodEnum fromValue(String value) { - for (UpdateMethodEnum b : UpdateMethodEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } + /** + * Type of update operation. + */ + @JsonAdapter(UpdateMethodEnum.Adapter.class) + public enum UpdateMethodEnum { + FROM_INPUT_PARAMS("FROM_INPUT_PARAMS"), + + FROM_EXISTING_TABLE("FROM_EXISTING_TABLE"); - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final UpdateMethodEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public UpdateMethodEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return UpdateMethodEnum.fromValue(value); - } - } + private String value; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - UpdateMethodEnum.fromValue(value); - } + UpdateMethodEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_UPDATE_METHOD = "update_method"; - - @SerializedName(SERIALIZED_NAME_UPDATE_METHOD) - @javax.annotation.Nullable - private UpdateMethodEnum updateMethod = UpdateMethodEnum.FROM_INPUT_PARAMS; - - public static final String SERIALIZED_NAME_TABLE_REFERENCE = "table_reference"; - - @SerializedName(SERIALIZED_NAME_TABLE_REFERENCE) - @javax.annotation.Nonnull - private ExternalTableInput tableReference; - - public static final String SERIALIZED_NAME_START_DATE = "start_date"; - - @SerializedName(SERIALIZED_NAME_START_DATE) - @javax.annotation.Nullable - private String startDate; - - public static final String SERIALIZED_NAME_END_DATE = "end_date"; - - @SerializedName(SERIALIZED_NAME_END_DATE) - @javax.annotation.Nullable - private String endDate; - - /** Type of the calendar. */ - @JsonAdapter(CalendarTypeEnum.Adapter.class) - public enum CalendarTypeEnum { - MONTH_OFFSET("MONTH_OFFSET"), - - FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), - - FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), - - FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); - - private String value; - - CalendarTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CalendarTypeEnum fromValue(String value) { - for (CalendarTypeEnum b : CalendarTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CalendarTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - CalendarTypeEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; - - @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) - @javax.annotation.Nullable - private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; - - /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if - * you set `month_offset` to \"April\", the custom calendar will treat - * \"April\" as the first month of the year, and the related attributes such as - * quarters and start date will be based on this offset. The default value is - * `January`, which represents the standard calendar year (January to December). - */ - @JsonAdapter(MonthOffsetEnum.Adapter.class) - public enum MonthOffsetEnum { - JANUARY("January"), - - FEBRUARY("February"), - - MARCH("March"), - - APRIL("April"), - - MAY("May"), - - JUNE("June"), - - JULY("July"), - - AUGUST("August"), - - SEPTEMBER("September"), - - OCTOBER("October"), - - NOVEMBER("November"), - - DECEMBER("December"); - - private String value; - - MonthOffsetEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MonthOffsetEnum fromValue(String value) { - for (MonthOffsetEnum b : MonthOffsetEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MonthOffsetEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MonthOffsetEnum.fromValue(value); - } + @Override + public String toString() { + return String.valueOf(value); } - public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; - - @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) - @javax.annotation.Nullable - private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; - - /** Specify the starting day of the week */ - @JsonAdapter(StartDayOfWeekEnum.Adapter.class) - public enum StartDayOfWeekEnum { - SUNDAY("Sunday"), - - MONDAY("Monday"), - - TUESDAY("Tuesday"), - - WEDNESDAY("Wednesday"), - - THURSDAY("Thursday"), - - FRIDAY("Friday"), - - SATURDAY("Saturday"); - - private String value; - - StartDayOfWeekEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StartDayOfWeekEnum fromValue(String value) { - for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StartDayOfWeekEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StartDayOfWeekEnum.fromValue(value); + public static UpdateMethodEnum fromValue(String value) { + for (UpdateMethodEnum b : UpdateMethodEnum.values()) { + if (b.value.equals(value)) { + return b; } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; - - @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) - @javax.annotation.Nullable - private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; - - public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; - - @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) - @javax.annotation.Nullable - private String quarterNamePrefix = ""; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UpdateMethodEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; - - @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) - @javax.annotation.Nullable - private String yearNamePrefix = ""; - - public UpdateCalendarRequest() {} - - public UpdateCalendarRequest updateMethod( - @javax.annotation.Nullable UpdateMethodEnum updateMethod) { - this.updateMethod = updateMethod; - return this; + @Override + public UpdateMethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UpdateMethodEnum.fromValue(value); + } } - /** - * Type of update operation. - * - * @return updateMethod - */ - @javax.annotation.Nullable - public UpdateMethodEnum getUpdateMethod() { - return updateMethod; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UpdateMethodEnum.fromValue(value); } + } - public void setUpdateMethod(@javax.annotation.Nullable UpdateMethodEnum updateMethod) { - this.updateMethod = updateMethod; - } + public static final String SERIALIZED_NAME_UPDATE_METHOD = "update_method"; + @SerializedName(SERIALIZED_NAME_UPDATE_METHOD) + @javax.annotation.Nullable + private UpdateMethodEnum updateMethod = UpdateMethodEnum.FROM_INPUT_PARAMS; - public UpdateCalendarRequest tableReference( - @javax.annotation.Nonnull ExternalTableInput tableReference) { - this.tableReference = tableReference; - return this; - } + public static final String SERIALIZED_NAME_TABLE_REFERENCE = "table_reference"; + @SerializedName(SERIALIZED_NAME_TABLE_REFERENCE) + @javax.annotation.Nonnull + private ExternalTableInput tableReference; - /** - * Table reference containing connection identifier and table details in this format: - * `{\"connection_identifier\":\"conn1\", - * \"database_name\":\"db1\", \"schema_name\":\"sc1\", - * \"table_name\":\"tb1\"}`. - * - * @return tableReference - */ - @javax.annotation.Nonnull - public ExternalTableInput getTableReference() { - return tableReference; - } + public static final String SERIALIZED_NAME_START_DATE = "start_date"; + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nullable + private String startDate; - public void setTableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { - this.tableReference = tableReference; - } + public static final String SERIALIZED_NAME_END_DATE = "end_date"; + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nullable + private String endDate; - public UpdateCalendarRequest startDate(@javax.annotation.Nullable String startDate) { - this.startDate = startDate; - return this; - } + /** + * Type of the calendar. + */ + @JsonAdapter(CalendarTypeEnum.Adapter.class) + public enum CalendarTypeEnum { + MONTH_OFFSET("MONTH_OFFSET"), + + FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), + + FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), + + FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); - /** - * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if - * `update_method` is set as `FROM_INPUT_PARAMS`. - * - * @return startDate - */ - @javax.annotation.Nullable - public String getStartDate() { - return startDate; - } + private String value; - public void setStartDate(@javax.annotation.Nullable String startDate) { - this.startDate = startDate; + CalendarTypeEnum(String value) { + this.value = value; } - public UpdateCalendarRequest endDate(@javax.annotation.Nullable String endDate) { - this.endDate = endDate; - return this; + public String getValue() { + return value; } - /** - * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if - * `update_method` is set as `FROM_INPUT_PARAMS`. - * - * @return endDate - */ - @javax.annotation.Nullable - public String getEndDate() { - return endDate; - } - - public void setEndDate(@javax.annotation.Nullable String endDate) { - this.endDate = endDate; - } - - public UpdateCalendarRequest calendarType( - @javax.annotation.Nullable CalendarTypeEnum calendarType) { - this.calendarType = calendarType; - return this; - } - - /** - * Type of the calendar. - * - * @return calendarType - */ - @javax.annotation.Nullable - public CalendarTypeEnum getCalendarType() { - return calendarType; + @Override + public String toString() { + return String.valueOf(value); } - public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { - this.calendarType = calendarType; + public static CalendarTypeEnum fromValue(String value) { + for (CalendarTypeEnum b : CalendarTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public UpdateCalendarRequest monthOffset( - @javax.annotation.Nullable MonthOffsetEnum monthOffset) { - this.monthOffset = monthOffset; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if - * you set `month_offset` to \"April\", the custom calendar will treat - * \"April\" as the first month of the year, and the related attributes such as - * quarters and start date will be based on this offset. The default value is - * `January`, which represents the standard calendar year (January to December). - * - * @return monthOffset - */ - @javax.annotation.Nullable - public MonthOffsetEnum getMonthOffset() { - return monthOffset; + @Override + public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CalendarTypeEnum.fromValue(value); + } } - public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { - this.monthOffset = monthOffset; - } - - public UpdateCalendarRequest startDayOfWeek( - @javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { - this.startDayOfWeek = startDayOfWeek; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; + @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) + @javax.annotation.Nullable + private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + @JsonAdapter(MonthOffsetEnum.Adapter.class) + public enum MonthOffsetEnum { + JANUARY("January"), + + FEBRUARY("February"), + + MARCH("March"), + + APRIL("April"), + + MAY("May"), + + JUNE("June"), + + JULY("July"), + + AUGUST("August"), + + SEPTEMBER("September"), + + OCTOBER("October"), + + NOVEMBER("November"), + + DECEMBER("December"); + + private String value; + + MonthOffsetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - /** - * Specify the starting day of the week - * - * @return startDayOfWeek - */ - @javax.annotation.Nullable - public StartDayOfWeekEnum getStartDayOfWeek() { - return startDayOfWeek; + @Override + public String toString() { + return String.valueOf(value); } - public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { - this.startDayOfWeek = startDayOfWeek; + public static MonthOffsetEnum fromValue(String value) { + for (MonthOffsetEnum b : MonthOffsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public UpdateCalendarRequest quarterNamePrefix( - @javax.annotation.Nullable String quarterNamePrefix) { - this.quarterNamePrefix = quarterNamePrefix; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Prefix to add before the quarter. - * - * @return quarterNamePrefix - */ - @javax.annotation.Nullable - public String getQuarterNamePrefix() { - return quarterNamePrefix; + @Override + public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthOffsetEnum.fromValue(value); + } } - public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { - this.quarterNamePrefix = quarterNamePrefix; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthOffsetEnum.fromValue(value); } + } - public UpdateCalendarRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { - this.yearNamePrefix = yearNamePrefix; - return this; - } + public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; + @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) + @javax.annotation.Nullable + private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; - /** - * Prefix to add before the year. - * - * @return yearNamePrefix - */ - @javax.annotation.Nullable - public String getYearNamePrefix() { - return yearNamePrefix; - } + /** + * Specify the starting day of the week + */ + @JsonAdapter(StartDayOfWeekEnum.Adapter.class) + public enum StartDayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); - public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { - this.yearNamePrefix = yearNamePrefix; - } + private String value; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCalendarRequest updateCalendarRequest = (UpdateCalendarRequest) o; - return Objects.equals(this.updateMethod, updateCalendarRequest.updateMethod) - && Objects.equals(this.tableReference, updateCalendarRequest.tableReference) - && Objects.equals(this.startDate, updateCalendarRequest.startDate) - && Objects.equals(this.endDate, updateCalendarRequest.endDate) - && Objects.equals(this.calendarType, updateCalendarRequest.calendarType) - && Objects.equals(this.monthOffset, updateCalendarRequest.monthOffset) - && Objects.equals(this.startDayOfWeek, updateCalendarRequest.startDayOfWeek) - && Objects.equals(this.quarterNamePrefix, updateCalendarRequest.quarterNamePrefix) - && Objects.equals(this.yearNamePrefix, updateCalendarRequest.yearNamePrefix); + StartDayOfWeekEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - updateMethod, - tableReference, - startDate, - endDate, - calendarType, - monthOffset, - startDayOfWeek, - quarterNamePrefix, - yearNamePrefix); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCalendarRequest {\n"); - sb.append(" updateMethod: ").append(toIndentedString(updateMethod)).append("\n"); - sb.append(" tableReference: ").append(toIndentedString(tableReference)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); - sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); - sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); - sb.append(" quarterNamePrefix: ") - .append(toIndentedString(quarterNamePrefix)) - .append("\n"); - sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static StartDayOfWeekEnum fromValue(String value) { + for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("update_method"); - openapiFields.add("table_reference"); - openapiFields.add("start_date"); - openapiFields.add("end_date"); - openapiFields.add("calendar_type"); - openapiFields.add("month_offset"); - openapiFields.add("start_day_of_week"); - openapiFields.add("quarter_name_prefix"); - openapiFields.add("year_name_prefix"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("table_reference"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartDayOfWeekEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCalendarRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCalendarRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateCalendarRequest is not found in" - + " the empty JSON string", - UpdateCalendarRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCalendarRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateCalendarRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateCalendarRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + StartDayOfWeekEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; + @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) + @javax.annotation.Nullable + private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; + + public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; + @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) + @javax.annotation.Nullable + private String quarterNamePrefix = ""; + + public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; + @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) + @javax.annotation.Nullable + private String yearNamePrefix = ""; + + public UpdateCalendarRequest() { + } + + public UpdateCalendarRequest updateMethod(@javax.annotation.Nullable UpdateMethodEnum updateMethod) { + this.updateMethod = updateMethod; + return this; + } + + /** + * Type of update operation. + * @return updateMethod + */ + @javax.annotation.Nullable + public UpdateMethodEnum getUpdateMethod() { + return updateMethod; + } + + public void setUpdateMethod(@javax.annotation.Nullable UpdateMethodEnum updateMethod) { + this.updateMethod = updateMethod; + } + + + public UpdateCalendarRequest tableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + return this; + } + + /** + * Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. + * @return tableReference + */ + @javax.annotation.Nonnull + public ExternalTableInput getTableReference() { + return tableReference; + } + + public void setTableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + } + + + public UpdateCalendarRequest startDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + * @return startDate + */ + @javax.annotation.Nullable + public String getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + } + + + public UpdateCalendarRequest endDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + * @return endDate + */ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + } + + + public UpdateCalendarRequest calendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + return this; + } + + /** + * Type of the calendar. + * @return calendarType + */ + @javax.annotation.Nullable + public CalendarTypeEnum getCalendarType() { + return calendarType; + } + + public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + } + + + public UpdateCalendarRequest monthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + return this; + } + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + * @return monthOffset + */ + @javax.annotation.Nullable + public MonthOffsetEnum getMonthOffset() { + return monthOffset; + } + + public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + } + + + public UpdateCalendarRequest startDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + return this; + } + + /** + * Specify the starting day of the week + * @return startDayOfWeek + */ + @javax.annotation.Nullable + public StartDayOfWeekEnum getStartDayOfWeek() { + return startDayOfWeek; + } + + public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + } + + + public UpdateCalendarRequest quarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + return this; + } + + /** + * Prefix to add before the quarter. + * @return quarterNamePrefix + */ + @javax.annotation.Nullable + public String getQuarterNamePrefix() { + return quarterNamePrefix; + } + + public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + } + + + public UpdateCalendarRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + return this; + } + + /** + * Prefix to add before the year. + * @return yearNamePrefix + */ + @javax.annotation.Nullable + public String getYearNamePrefix() { + return yearNamePrefix; + } + + public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCalendarRequest updateCalendarRequest = (UpdateCalendarRequest) o; + return Objects.equals(this.updateMethod, updateCalendarRequest.updateMethod) && + Objects.equals(this.tableReference, updateCalendarRequest.tableReference) && + Objects.equals(this.startDate, updateCalendarRequest.startDate) && + Objects.equals(this.endDate, updateCalendarRequest.endDate) && + Objects.equals(this.calendarType, updateCalendarRequest.calendarType) && + Objects.equals(this.monthOffset, updateCalendarRequest.monthOffset) && + Objects.equals(this.startDayOfWeek, updateCalendarRequest.startDayOfWeek) && + Objects.equals(this.quarterNamePrefix, updateCalendarRequest.quarterNamePrefix) && + Objects.equals(this.yearNamePrefix, updateCalendarRequest.yearNamePrefix); + } + + @Override + public int hashCode() { + return Objects.hash(updateMethod, tableReference, startDate, endDate, calendarType, monthOffset, startDayOfWeek, quarterNamePrefix, yearNamePrefix); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCalendarRequest {\n"); + sb.append(" updateMethod: ").append(toIndentedString(updateMethod)).append("\n"); + sb.append(" tableReference: ").append(toIndentedString(tableReference)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); + sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); + sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); + sb.append(" quarterNamePrefix: ").append(toIndentedString(quarterNamePrefix)).append("\n"); + sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("update_method"); + openapiFields.add("table_reference"); + openapiFields.add("start_date"); + openapiFields.add("end_date"); + openapiFields.add("calendar_type"); + openapiFields.add("month_offset"); + openapiFields.add("start_day_of_week"); + openapiFields.add("quarter_name_prefix"); + openapiFields.add("year_name_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("table_reference"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCalendarRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCalendarRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCalendarRequest is not found in the empty JSON string", UpdateCalendarRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateCalendarRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCalendarRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateCalendarRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("update_method") != null && !jsonObj.get("update_method").isJsonNull()) - && !jsonObj.get("update_method").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `update_method` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("update_method").toString())); - } - // validate the optional field `update_method` - if (jsonObj.get("update_method") != null && !jsonObj.get("update_method").isJsonNull()) { - UpdateMethodEnum.validateJsonElement(jsonObj.get("update_method")); - } - // validate the required field `table_reference` - ExternalTableInput.validateJsonElement(jsonObj.get("table_reference")); - if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) - && !jsonObj.get("start_date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `start_date` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("start_date").toString())); - } - if ((jsonObj.get("end_date") != null && !jsonObj.get("end_date").isJsonNull()) - && !jsonObj.get("end_date").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `end_date` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("end_date").toString())); - } - if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) - && !jsonObj.get("calendar_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `calendar_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("calendar_type").toString())); - } - // validate the optional field `calendar_type` - if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { - CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); - } - if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) - && !jsonObj.get("month_offset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `month_offset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("month_offset").toString())); - } - // validate the optional field `month_offset` - if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { - MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); - } - if ((jsonObj.get("start_day_of_week") != null - && !jsonObj.get("start_day_of_week").isJsonNull()) - && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `start_day_of_week` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("start_day_of_week").toString())); - } - // validate the optional field `start_day_of_week` - if (jsonObj.get("start_day_of_week") != null - && !jsonObj.get("start_day_of_week").isJsonNull()) { - StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); - } - if ((jsonObj.get("quarter_name_prefix") != null - && !jsonObj.get("quarter_name_prefix").isJsonNull()) - && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `quarter_name_prefix` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("quarter_name_prefix").toString())); - } - if ((jsonObj.get("year_name_prefix") != null - && !jsonObj.get("year_name_prefix").isJsonNull()) - && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `year_name_prefix` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("year_name_prefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCalendarRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCalendarRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateCalendarRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCalendarRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCalendarRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCalendarRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCalendarRequest - * @throws IOException if the JSON string is invalid with respect to UpdateCalendarRequest - */ - public static UpdateCalendarRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCalendarRequest.class); - } - - /** - * Convert an instance of UpdateCalendarRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("update_method") != null && !jsonObj.get("update_method").isJsonNull()) && !jsonObj.get("update_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `update_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("update_method").toString())); + } + // validate the optional field `update_method` + if (jsonObj.get("update_method") != null && !jsonObj.get("update_method").isJsonNull()) { + UpdateMethodEnum.validateJsonElement(jsonObj.get("update_method")); + } + // validate the required field `table_reference` + ExternalTableInput.validateJsonElement(jsonObj.get("table_reference")); + if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_date").toString())); + } + if ((jsonObj.get("end_date") != null && !jsonObj.get("end_date").isJsonNull()) && !jsonObj.get("end_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `end_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("end_date").toString())); + } + if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) && !jsonObj.get("calendar_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `calendar_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendar_type").toString())); + } + // validate the optional field `calendar_type` + if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { + CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); + } + if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) && !jsonObj.get("month_offset").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `month_offset` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month_offset").toString())); + } + // validate the optional field `month_offset` + if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { + MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); + } + if ((jsonObj.get("start_day_of_week") != null && !jsonObj.get("start_day_of_week").isJsonNull()) && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_day_of_week` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_day_of_week").toString())); + } + // validate the optional field `start_day_of_week` + if (jsonObj.get("start_day_of_week") != null && !jsonObj.get("start_day_of_week").isJsonNull()) { + StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); + } + if ((jsonObj.get("quarter_name_prefix") != null && !jsonObj.get("quarter_name_prefix").isJsonNull()) && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quarter_name_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quarter_name_prefix").toString())); + } + if ((jsonObj.get("year_name_prefix") != null && !jsonObj.get("year_name_prefix").isJsonNull()) && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `year_name_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("year_name_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCalendarRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCalendarRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCalendarRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCalendarRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateCalendarRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCalendarRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCalendarRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCalendarRequest + */ + public static UpdateCalendarRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCalendarRequest.class); + } + + /** + * Convert an instance of UpdateCalendarRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java index 1955a415f..4a693d20b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java @@ -4,357 +4,322 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleUpdate; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UpdateColumnSecurityRulesRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateColumnSecurityRulesRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; - - @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) - @javax.annotation.Nullable - private String objIdentifier; - - public static final String SERIALIZED_NAME_CLEAR_CSR = "clear_csr"; - - @SerializedName(SERIALIZED_NAME_CLEAR_CSR) - @javax.annotation.Nullable - private Boolean clearCsr; - - public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "column_security_rules"; - - @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) - @javax.annotation.Nonnull - private List columnSecurityRules; - - public UpdateColumnSecurityRulesRequest() {} - - public UpdateColumnSecurityRulesRequest identifier( - @javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * GUID or name of the table for which we want to create column security rules - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } - - public UpdateColumnSecurityRulesRequest objIdentifier( - @javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; - return this; - } - - /** - * The object ID of the table - * - * @return objIdentifier - */ - @javax.annotation.Nullable - public String getObjIdentifier() { - return objIdentifier; - } - - public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { - this.objIdentifier = objIdentifier; - } - public UpdateColumnSecurityRulesRequest clearCsr(@javax.annotation.Nullable Boolean clearCsr) { - this.clearCsr = clearCsr; - return this; - } - - /** - * If true, then all the secured columns will be marked as unprotected, and all the group - * associations will be removed - * - * @return clearCsr - */ - @javax.annotation.Nullable - public Boolean getClearCsr() { - return clearCsr; - } - - public void setClearCsr(@javax.annotation.Nullable Boolean clearCsr) { - this.clearCsr = clearCsr; - } - - public UpdateColumnSecurityRulesRequest columnSecurityRules( - @javax.annotation.Nonnull List columnSecurityRules) { - this.columnSecurityRules = columnSecurityRules; - return this; - } - - public UpdateColumnSecurityRulesRequest addColumnSecurityRulesItem( - ColumnSecurityRuleUpdate columnSecurityRulesItem) { - if (this.columnSecurityRules == null) { - this.columnSecurityRules = new ArrayList<>(); - } - this.columnSecurityRules.add(columnSecurityRulesItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * Array where each object defines the security rule for a specific column - * - * @return columnSecurityRules - */ - @javax.annotation.Nonnull - public List getColumnSecurityRules() { - return columnSecurityRules; +/** + * UpdateColumnSecurityRulesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateColumnSecurityRulesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + public static final String SERIALIZED_NAME_CLEAR_CSR = "clear_csr"; + @SerializedName(SERIALIZED_NAME_CLEAR_CSR) + @javax.annotation.Nullable + private Boolean clearCsr; + + public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "column_security_rules"; + @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) + @javax.annotation.Nonnull + private List columnSecurityRules; + + public UpdateColumnSecurityRulesRequest() { + } + + public UpdateColumnSecurityRulesRequest identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * GUID or name of the table for which we want to create column security rules + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public UpdateColumnSecurityRulesRequest objIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * The object ID of the table + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + + public UpdateColumnSecurityRulesRequest clearCsr(@javax.annotation.Nullable Boolean clearCsr) { + this.clearCsr = clearCsr; + return this; + } + + /** + * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + * @return clearCsr + */ + @javax.annotation.Nullable + public Boolean getClearCsr() { + return clearCsr; + } + + public void setClearCsr(@javax.annotation.Nullable Boolean clearCsr) { + this.clearCsr = clearCsr; + } + + + public UpdateColumnSecurityRulesRequest columnSecurityRules(@javax.annotation.Nonnull List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + return this; + } + + public UpdateColumnSecurityRulesRequest addColumnSecurityRulesItem(ColumnSecurityRuleUpdate columnSecurityRulesItem) { + if (this.columnSecurityRules == null) { + this.columnSecurityRules = new ArrayList<>(); } + this.columnSecurityRules.add(columnSecurityRulesItem); + return this; + } - public void setColumnSecurityRules( - @javax.annotation.Nonnull List columnSecurityRules) { - this.columnSecurityRules = columnSecurityRules; - } + /** + * Array where each object defines the security rule for a specific column + * @return columnSecurityRules + */ + @javax.annotation.Nonnull + public List getColumnSecurityRules() { + return columnSecurityRules; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest = - (UpdateColumnSecurityRulesRequest) o; - return Objects.equals(this.identifier, updateColumnSecurityRulesRequest.identifier) - && Objects.equals( - this.objIdentifier, updateColumnSecurityRulesRequest.objIdentifier) - && Objects.equals(this.clearCsr, updateColumnSecurityRulesRequest.clearCsr) - && Objects.equals( - this.columnSecurityRules, - updateColumnSecurityRulesRequest.columnSecurityRules); - } + public void setColumnSecurityRules(@javax.annotation.Nonnull List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(identifier, objIdentifier, clearCsr, columnSecurityRules); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateColumnSecurityRulesRequest {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); - sb.append(" clearCsr: ").append(toIndentedString(clearCsr)).append("\n"); - sb.append(" columnSecurityRules: ") - .append(toIndentedString(columnSecurityRules)) - .append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest = (UpdateColumnSecurityRulesRequest) o; + return Objects.equals(this.identifier, updateColumnSecurityRulesRequest.identifier) && + Objects.equals(this.objIdentifier, updateColumnSecurityRulesRequest.objIdentifier) && + Objects.equals(this.clearCsr, updateColumnSecurityRulesRequest.clearCsr) && + Objects.equals(this.columnSecurityRules, updateColumnSecurityRulesRequest.columnSecurityRules); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, objIdentifier, clearCsr, columnSecurityRules); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("obj_identifier"); - openapiFields.add("clear_csr"); - openapiFields.add("column_security_rules"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("column_security_rules"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateColumnSecurityRulesRequest {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" clearCsr: ").append(toIndentedString(clearCsr)).append("\n"); + sb.append(" columnSecurityRules: ").append(toIndentedString(columnSecurityRules)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UpdateColumnSecurityRulesRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateColumnSecurityRulesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateColumnSecurityRulesRequest is" - + " not found in the empty JSON string", - UpdateColumnSecurityRulesRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + openapiFields.add("clear_csr"); + openapiFields.add("column_security_rules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_security_rules"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateColumnSecurityRulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateColumnSecurityRulesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateColumnSecurityRulesRequest is not found in the empty JSON string", UpdateColumnSecurityRulesRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateColumnSecurityRulesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateColumnSecurityRulesRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateColumnSecurityRulesRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateColumnSecurityRulesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateColumnSecurityRulesRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateColumnSecurityRulesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) - && !jsonObj.get("obj_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `obj_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("obj_identifier").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("column_security_rules").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `column_security_rules` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("column_security_rules").toString())); - } - - JsonArray jsonArraycolumnSecurityRules = jsonObj.getAsJsonArray("column_security_rules"); - // validate the required field `column_security_rules` (array) - for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { - ColumnSecurityRuleUpdate.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateColumnSecurityRulesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateColumnSecurityRulesRequest' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateColumnSecurityRulesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateColumnSecurityRulesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateColumnSecurityRulesRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateColumnSecurityRulesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateColumnSecurityRulesRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateColumnSecurityRulesRequest - */ - public static UpdateColumnSecurityRulesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateColumnSecurityRulesRequest.class); - } - - /** - * Convert an instance of UpdateColumnSecurityRulesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `obj_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obj_identifier").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("column_security_rules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `column_security_rules` to be an array in the JSON string but got `%s`", jsonObj.get("column_security_rules").toString())); + } + + JsonArray jsonArraycolumnSecurityRules = jsonObj.getAsJsonArray("column_security_rules"); + // validate the required field `column_security_rules` (array) + for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { + ColumnSecurityRuleUpdate.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateColumnSecurityRulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateColumnSecurityRulesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateColumnSecurityRulesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateColumnSecurityRulesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateColumnSecurityRulesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateColumnSecurityRulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateColumnSecurityRulesRequest + * @throws IOException if the JSON string is invalid with respect to UpdateColumnSecurityRulesRequest + */ + public static UpdateColumnSecurityRulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateColumnSecurityRulesRequest.class); + } + + /** + * Convert an instance of UpdateColumnSecurityRulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java index 574ea44b7..d3f2a2c42 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java @@ -4,455 +4,397 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UpdateConfigRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateConfigRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nullable - private String username; - - public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; - - @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) - @javax.annotation.Nullable - private String accessToken; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - public static final String SERIALIZED_NAME_BRANCH_NAMES = "branch_names"; - - @SerializedName(SERIALIZED_NAME_BRANCH_NAMES) - @javax.annotation.Nullable - private List branchNames; - - public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; - - @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) - @javax.annotation.Nullable - private String commitBranchName; - - public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; - - @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) - @javax.annotation.Nullable - private Boolean enableGuidMapping; - - public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = - "configuration_branch_name"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) - @javax.annotation.Nullable - private String configurationBranchName; - - public UpdateConfigRequest() {} - - public UpdateConfigRequest username(@javax.annotation.Nullable String username) { - this.username = username; - return this; - } - - /** - * Username to authenticate connection to version control system - * - * @return username - */ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nullable String username) { - this.username = username; - } - - public UpdateConfigRequest accessToken(@javax.annotation.Nullable String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Access token corresponding to the user to authenticate connection to version control system - * - * @return accessToken - */ - @javax.annotation.Nullable - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(@javax.annotation.Nullable String accessToken) { - this.accessToken = accessToken; - } - - public UpdateConfigRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for - * cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: - * If no value is specified, then the configurations will be returned for all orgs the user has - * access to Version: 9.5.0.cl or later - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - public UpdateConfigRequest branchNames(@javax.annotation.Nullable List branchNames) { - this.branchNames = branchNames; - return this; - } - - public UpdateConfigRequest addBranchNamesItem(String branchNamesItem) { - if (this.branchNames == null) { - this.branchNames = new ArrayList<>(); - } - this.branchNames.add(branchNamesItem); - return this; - } - /** - * List the remote branches to configure. Example:[development, production] - * - * @return branchNames - */ - @javax.annotation.Nullable - public List getBranchNames() { - return branchNames; - } - - public void setBranchNames(@javax.annotation.Nullable List branchNames) { - this.branchNames = branchNames; - } - - public UpdateConfigRequest commitBranchName( - @javax.annotation.Nullable String commitBranchName) { - this.commitBranchName = commitBranchName; - return this; - } - - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. - * Version: 9.7.0.cl or later - * - * @return commitBranchName - */ - @javax.annotation.Nullable - public String getCommitBranchName() { - return commitBranchName; - } - - public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { - this.commitBranchName = commitBranchName; - } - - public UpdateConfigRequest enableGuidMapping( - @javax.annotation.Nullable Boolean enableGuidMapping) { - this.enableGuidMapping = enableGuidMapping; - return this; - } - - /** - * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later - * - * @return enableGuidMapping - */ - @javax.annotation.Nullable - public Boolean getEnableGuidMapping() { - return enableGuidMapping; - } - - public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { - this.enableGuidMapping = enableGuidMapping; - } - - public UpdateConfigRequest configurationBranchName( - @javax.annotation.Nullable String configurationBranchName) { - this.configurationBranchName = configurationBranchName; - return this; - } - - /** - * Name of the branch where the configuration files related to operations between Thoughtspot - * and version control repo should be maintained. Version: 9.7.0.cl or later - * - * @return configurationBranchName - */ - @javax.annotation.Nullable - public String getConfigurationBranchName() { - return configurationBranchName; - } - - public void setConfigurationBranchName( - @javax.annotation.Nullable String configurationBranchName) { - this.configurationBranchName = configurationBranchName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateConfigRequest updateConfigRequest = (UpdateConfigRequest) o; - return Objects.equals(this.username, updateConfigRequest.username) - && Objects.equals(this.accessToken, updateConfigRequest.accessToken) - && Objects.equals(this.orgIdentifier, updateConfigRequest.orgIdentifier) - && Objects.equals(this.branchNames, updateConfigRequest.branchNames) - && Objects.equals(this.commitBranchName, updateConfigRequest.commitBranchName) - && Objects.equals(this.enableGuidMapping, updateConfigRequest.enableGuidMapping) - && Objects.equals( - this.configurationBranchName, updateConfigRequest.configurationBranchName); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - username, - accessToken, - orgIdentifier, - branchNames, - commitBranchName, - enableGuidMapping, - configurationBranchName); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateConfigRequest {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" branchNames: ").append(toIndentedString(branchNames)).append("\n"); - sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); - sb.append(" enableGuidMapping: ") - .append(toIndentedString(enableGuidMapping)) - .append("\n"); - sb.append(" configurationBranchName: ") - .append(toIndentedString(configurationBranchName)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("access_token"); - openapiFields.add("org_identifier"); - openapiFields.add("branch_names"); - openapiFields.add("commit_branch_name"); - openapiFields.add("enable_guid_mapping"); - openapiFields.add("configuration_branch_name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateConfigRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateConfigRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateConfigRequest is not found in" - + " the empty JSON string", - UpdateConfigRequest.openapiRequiredFields.toString())); - } +/** + * UpdateConfigRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + @javax.annotation.Nullable + private String accessToken; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_BRANCH_NAMES = "branch_names"; + @SerializedName(SERIALIZED_NAME_BRANCH_NAMES) + @javax.annotation.Nullable + private List branchNames; + + public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; + @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) + @javax.annotation.Nullable + private String commitBranchName; + + public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; + @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) + @javax.annotation.Nullable + private Boolean enableGuidMapping; + + public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = "configuration_branch_name"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) + @javax.annotation.Nullable + private String configurationBranchName; + + public UpdateConfigRequest() { + } + + public UpdateConfigRequest username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username to authenticate connection to version control system + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + + public UpdateConfigRequest accessToken(@javax.annotation.Nullable String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Access token corresponding to the user to authenticate connection to version control system + * @return accessToken + */ + @javax.annotation.Nullable + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(@javax.annotation.Nullable String accessToken) { + this.accessToken = accessToken; + } + + + public UpdateConfigRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + public UpdateConfigRequest branchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + return this; + } + + public UpdateConfigRequest addBranchNamesItem(String branchNamesItem) { + if (this.branchNames == null) { + this.branchNames = new ArrayList<>(); + } + this.branchNames.add(branchNamesItem); + return this; + } + + /** + * List the remote branches to configure. Example:[development, production] + * @return branchNames + */ + @javax.annotation.Nullable + public List getBranchNames() { + return branchNames; + } + + public void setBranchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + } + + + public UpdateConfigRequest commitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + return this; + } + + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + * @return commitBranchName + */ + @javax.annotation.Nullable + public String getCommitBranchName() { + return commitBranchName; + } + + public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + } + + + public UpdateConfigRequest enableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + return this; + } + + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + * @return enableGuidMapping + */ + @javax.annotation.Nullable + public Boolean getEnableGuidMapping() { + return enableGuidMapping; + } + + public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + } + + + public UpdateConfigRequest configurationBranchName(@javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + return this; + } + + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later + * @return configurationBranchName + */ + @javax.annotation.Nullable + public String getConfigurationBranchName() { + return configurationBranchName; + } + + public void setConfigurationBranchName(@javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConfigRequest updateConfigRequest = (UpdateConfigRequest) o; + return Objects.equals(this.username, updateConfigRequest.username) && + Objects.equals(this.accessToken, updateConfigRequest.accessToken) && + Objects.equals(this.orgIdentifier, updateConfigRequest.orgIdentifier) && + Objects.equals(this.branchNames, updateConfigRequest.branchNames) && + Objects.equals(this.commitBranchName, updateConfigRequest.commitBranchName) && + Objects.equals(this.enableGuidMapping, updateConfigRequest.enableGuidMapping) && + Objects.equals(this.configurationBranchName, updateConfigRequest.configurationBranchName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, accessToken, orgIdentifier, branchNames, commitBranchName, enableGuidMapping, configurationBranchName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConfigRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" branchNames: ").append(toIndentedString(branchNames)).append("\n"); + sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); + sb.append(" enableGuidMapping: ").append(toIndentedString(enableGuidMapping)).append("\n"); + sb.append(" configurationBranchName: ").append(toIndentedString(configurationBranchName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("access_token"); + openapiFields.add("org_identifier"); + openapiFields.add("branch_names"); + openapiFields.add("commit_branch_name"); + openapiFields.add("enable_guid_mapping"); + openapiFields.add("configuration_branch_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConfigRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConfigRequest is not found in the empty JSON string", UpdateConfigRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateConfigRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateConfigRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateConfigRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConfigRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) - && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `username` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("username").toString())); - } - if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) - && !jsonObj.get("access_token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `access_token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("access_token").toString())); - } - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("branch_names") != null - && !jsonObj.get("branch_names").isJsonNull() - && !jsonObj.get("branch_names").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `branch_names` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("branch_names").toString())); - } - if ((jsonObj.get("commit_branch_name") != null - && !jsonObj.get("commit_branch_name").isJsonNull()) - && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `commit_branch_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("commit_branch_name").toString())); - } - if ((jsonObj.get("configuration_branch_name") != null - && !jsonObj.get("configuration_branch_name").isJsonNull()) - && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `configuration_branch_name` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("configuration_branch_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateConfigRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateConfigRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateConfigRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateConfigRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateConfigRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateConfigRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateConfigRequest - * @throws IOException if the JSON string is invalid with respect to UpdateConfigRequest - */ - public static UpdateConfigRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateConfigRequest.class); - } - - /** - * Convert an instance of UpdateConfigRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) && !jsonObj.get("access_token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_token").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("branch_names") != null && !jsonObj.get("branch_names").isJsonNull() && !jsonObj.get("branch_names").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `branch_names` to be an array in the JSON string but got `%s`", jsonObj.get("branch_names").toString())); + } + if ((jsonObj.get("commit_branch_name") != null && !jsonObj.get("commit_branch_name").isJsonNull()) && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commit_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_branch_name").toString())); + } + if ((jsonObj.get("configuration_branch_name") != null && !jsonObj.get("configuration_branch_name").isJsonNull()) && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configuration_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configuration_branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateConfigRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConfigRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConfigRequest + * @throws IOException if the JSON string is invalid with respect to UpdateConfigRequest + */ + public static UpdateConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConfigRequest.class); + } + + /** + * Convert an instance of UpdateConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java index f4567b40b..31680b9a7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java @@ -4,740 +4,651 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import java.util.Objects; 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; +import java.io.Serializable; -/** UpdateConnectionConfigurationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateConnectionConfigurationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Type of authentication. */ - @JsonAdapter(AuthenticationTypeEnum.Adapter.class) - public enum AuthenticationTypeEnum { - SERVICE_ACCOUNT("SERVICE_ACCOUNT"), - - OAUTH("OAUTH"), - - OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), - - EXTOAUTH("EXTOAUTH"), - - KEY_PAIR("KEY_PAIR"), - - EXTOAUTH_WITH_PKCE("EXTOAUTH_WITH_PKCE"), - - OAUTH_WITH_PKCE("OAUTH_WITH_PKCE"), - - PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), - - OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); - - private String value; - - AuthenticationTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public static AuthenticationTypeEnum fromValue(String value) { - for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AuthenticationTypeEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AuthenticationTypeEnum.fromValue(value); - } +/** + * UpdateConnectionConfigurationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateConnectionConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Type of authentication. + */ + @JsonAdapter(AuthenticationTypeEnum.Adapter.class) + public enum AuthenticationTypeEnum { + SERVICE_ACCOUNT("SERVICE_ACCOUNT"), + + OAUTH("OAUTH"), + + OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), + + EXTOAUTH("EXTOAUTH"), + + KEY_PAIR("KEY_PAIR"), + + EXTOAUTH_WITH_PKCE("EXTOAUTH_WITH_PKCE"), + + OAUTH_WITH_PKCE("OAUTH_WITH_PKCE"), + + PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), + + OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); + + private String value; + + AuthenticationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; - - @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) - @javax.annotation.Nullable - private AuthenticationTypeEnum authenticationType; - - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - @javax.annotation.Nullable - private Object _configuration; - - /** Type of policy. */ - @JsonAdapter(PolicyTypeEnum.Adapter.class) - public enum PolicyTypeEnum { - NO_POLICY("NO_POLICY"), - - PRINCIPALS("PRINCIPALS"), - - PROCESSES("PROCESSES"); - - private String value; - - PolicyTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyTypeEnum fromValue(String value) { - for (PolicyTypeEnum b : PolicyTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyTypeEnum.fromValue(value); - } + @Override + public String toString() { + return String.valueOf(value); } - public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; - - @SerializedName(SERIALIZED_NAME_POLICY_TYPE) - @javax.annotation.Nullable - private PolicyTypeEnum policyType; - - public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; - - @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) - @javax.annotation.Nullable - private List policyPrincipals; - - /** Gets or Sets policyProcesses */ - @JsonAdapter(PolicyProcessesEnum.Adapter.class) - public enum PolicyProcessesEnum { - SAGE_INDEXING("SAGE_INDEXING"), - - ROW_COUNT_STATS("ROW_COUNT_STATS"); - - private String value; - - PolicyProcessesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; + public static AuthenticationTypeEnum fromValue(String value) { + for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PolicyProcessesEnum fromValue(String value) { - for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PolicyProcessesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PolicyProcessesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; - - @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) - @javax.annotation.Nullable - private List policyProcesses; - - public static final String SERIALIZED_NAME_DISABLE = "disable"; - - @SerializedName(SERIALIZED_NAME_DISABLE) - @javax.annotation.Nullable - private Boolean disable = false; - - public UpdateConnectionConfigurationRequest() {} - - public UpdateConnectionConfigurationRequest connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; - } - - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } - - public UpdateConnectionConfigurationRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Name of the configuration to update. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateConnectionConfigurationRequest description( - @javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the configuration. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public UpdateConnectionConfigurationRequest authenticationType( - @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { - this.authenticationType = authenticationType; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Type of authentication. - * - * @return authenticationType - */ - @javax.annotation.Nullable - public AuthenticationTypeEnum getAuthenticationType() { - return authenticationType; + @Override + public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationTypeEnum.fromValue(value); + } } - public void setAuthenticationType( - @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { - this.authenticationType = authenticationType; - } - - public UpdateConnectionConfigurationRequest _configuration( - @javax.annotation.Nullable Object _configuration) { - this._configuration = _configuration; - return this; - } - - /** - * Configuration properties in JSON. - * - * @return _configuration - */ - @javax.annotation.Nullable - public Object getConfiguration() { - return _configuration; - } - - public void setConfiguration(@javax.annotation.Nullable Object _configuration) { - this._configuration = _configuration; - } - - public UpdateConnectionConfigurationRequest policyType( - @javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthenticationTypeEnum.fromValue(value); } + } - /** - * Type of policy. - * - * @return policyType - */ - @javax.annotation.Nullable - public PolicyTypeEnum getPolicyType() { - return policyType; - } + public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) + @javax.annotation.Nullable + private AuthenticationTypeEnum authenticationType; - public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { - this.policyType = policyType; - } + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nullable + private Object _configuration; - public UpdateConnectionConfigurationRequest policyPrincipals( - @javax.annotation.Nullable List policyPrincipals) { - this.policyPrincipals = policyPrincipals; - return this; - } + /** + * Type of policy. + */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); - public UpdateConnectionConfigurationRequest addPolicyPrincipalsItem( - String policyPrincipalsItem) { - if (this.policyPrincipals == null) { - this.policyPrincipals = new ArrayList<>(); - } - this.policyPrincipals.add(policyPrincipalsItem); - return this; - } + private String value; - /** - * Unique ID or name of the User and User Groups. - * - * @return policyPrincipals - */ - @javax.annotation.Nullable - public List getPolicyPrincipals() { - return policyPrincipals; + PolicyTypeEnum(String value) { + this.value = value; } - public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { - this.policyPrincipals = policyPrincipals; + public String getValue() { + return value; } - public UpdateConnectionConfigurationRequest policyProcesses( - @javax.annotation.Nullable List policyProcesses) { - this.policyProcesses = policyProcesses; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateConnectionConfigurationRequest addPolicyProcessesItem( - PolicyProcessesEnum policyProcessesItem) { - if (this.policyProcesses == null) { - this.policyProcesses = new ArrayList<>(); + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.policyProcesses.add(policyProcessesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Action that the query performed on the data warehouse, such as SAGE_INDEXING and - * ROW_COUNT_STATS. - * - * @return policyProcesses - */ - @javax.annotation.Nullable - public List getPolicyProcesses() { - return policyProcesses; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setPolicyProcesses( - @javax.annotation.Nullable List policyProcesses) { - this.policyProcesses = policyProcesses; + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } } - public UpdateConnectionConfigurationRequest disable( - @javax.annotation.Nullable Boolean disable) { - this.disable = disable; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); } + } - /** - * Indicates whether the configuration enable/disable. - * - * @return disable - */ - @javax.annotation.Nullable - public Boolean getDisable() { - return disable; - } + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType; - public void setDisable(@javax.annotation.Nullable Boolean disable) { - this.disable = disable; - } + public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; + @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) + @javax.annotation.Nullable + private List policyPrincipals; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = - (UpdateConnectionConfigurationRequest) o; - return Objects.equals( - this.connectionIdentifier, - updateConnectionConfigurationRequest.connectionIdentifier) - && Objects.equals(this.name, updateConnectionConfigurationRequest.name) - && Objects.equals( - this.description, updateConnectionConfigurationRequest.description) - && Objects.equals( - this.authenticationType, - updateConnectionConfigurationRequest.authenticationType) - && Objects.equals( - this._configuration, updateConnectionConfigurationRequest._configuration) - && Objects.equals(this.policyType, updateConnectionConfigurationRequest.policyType) - && Objects.equals( - this.policyPrincipals, - updateConnectionConfigurationRequest.policyPrincipals) - && Objects.equals( - this.policyProcesses, updateConnectionConfigurationRequest.policyProcesses) - && Objects.equals(this.disable, updateConnectionConfigurationRequest.disable); - } + /** + * Gets or Sets policyProcesses + */ + @JsonAdapter(PolicyProcessesEnum.Adapter.class) + public enum PolicyProcessesEnum { + SAGE_INDEXING("SAGE_INDEXING"), + + ROW_COUNT_STATS("ROW_COUNT_STATS"); - 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())); - } + private String value; - @Override - public int hashCode() { - return Objects.hash( - connectionIdentifier, - name, - description, - authenticationType, - _configuration, - policyType, - policyPrincipals, - policyProcesses, - disable); + PolicyProcessesEnum(String value) { + this.value = value; } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateConnectionConfigurationRequest {\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" authenticationType: ") - .append(toIndentedString(authenticationType)) - .append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); - sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); - sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); - sb.append(" disable: ").append(toIndentedString(disable)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PolicyProcessesEnum fromValue(String value) { + for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_identifier"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("authentication_type"); - openapiFields.add("configuration"); - openapiFields.add("policy_type"); - openapiFields.add("policy_principals"); - openapiFields.add("policy_processes"); - openapiFields.add("disable"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("connection_identifier"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyProcessesEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UpdateConnectionConfigurationRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateConnectionConfigurationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateConnectionConfigurationRequest" - + " is not found in the empty JSON string", - UpdateConnectionConfigurationRequest.openapiRequiredFields - .toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateConnectionConfigurationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateConnectionConfigurationRequest` properties. JSON:" - + " %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateConnectionConfigurationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } + String value = jsonElement.getAsString(); + PolicyProcessesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; + @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) + @javax.annotation.Nullable + private List policyProcesses; + + public static final String SERIALIZED_NAME_DISABLE = "disable"; + @SerializedName(SERIALIZED_NAME_DISABLE) + @javax.annotation.Nullable + private Boolean disable = false; + + public UpdateConnectionConfigurationRequest() { + } + + public UpdateConnectionConfigurationRequest connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + public UpdateConnectionConfigurationRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration to update. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateConnectionConfigurationRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the configuration. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateConnectionConfigurationRequest authenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Type of authentication. + * @return authenticationType + */ + @javax.annotation.Nullable + public AuthenticationTypeEnum getAuthenticationType() { + return authenticationType; + } + + public void setAuthenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + } + + + public UpdateConnectionConfigurationRequest _configuration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration properties in JSON. + * @return _configuration + */ + @javax.annotation.Nullable + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + } + + + public UpdateConnectionConfigurationRequest policyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Type of policy. + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + + public UpdateConnectionConfigurationRequest policyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + return this; + } + + public UpdateConnectionConfigurationRequest addPolicyPrincipalsItem(String policyPrincipalsItem) { + if (this.policyPrincipals == null) { + this.policyPrincipals = new ArrayList<>(); + } + this.policyPrincipals.add(policyPrincipalsItem); + return this; + } + + /** + * Unique ID or name of the User and User Groups. + * @return policyPrincipals + */ + @javax.annotation.Nullable + public List getPolicyPrincipals() { + return policyPrincipals; + } + + public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + } + + + public UpdateConnectionConfigurationRequest policyProcesses(@javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + return this; + } + + public UpdateConnectionConfigurationRequest addPolicyProcessesItem(PolicyProcessesEnum policyProcessesItem) { + if (this.policyProcesses == null) { + this.policyProcesses = new ArrayList<>(); + } + this.policyProcesses.add(policyProcessesItem); + return this; + } + + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + * @return policyProcesses + */ + @javax.annotation.Nullable + public List getPolicyProcesses() { + return policyProcesses; + } + + public void setPolicyProcesses(@javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + } + + + public UpdateConnectionConfigurationRequest disable(@javax.annotation.Nullable Boolean disable) { + this.disable = disable; + return this; + } + + /** + * Indicates whether the configuration enable/disable. + * @return disable + */ + @javax.annotation.Nullable + public Boolean getDisable() { + return disable; + } + + public void setDisable(@javax.annotation.Nullable Boolean disable) { + this.disable = disable; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = (UpdateConnectionConfigurationRequest) o; + return Objects.equals(this.connectionIdentifier, updateConnectionConfigurationRequest.connectionIdentifier) && + Objects.equals(this.name, updateConnectionConfigurationRequest.name) && + Objects.equals(this.description, updateConnectionConfigurationRequest.description) && + Objects.equals(this.authenticationType, updateConnectionConfigurationRequest.authenticationType) && + Objects.equals(this._configuration, updateConnectionConfigurationRequest._configuration) && + Objects.equals(this.policyType, updateConnectionConfigurationRequest.policyType) && + Objects.equals(this.policyPrincipals, updateConnectionConfigurationRequest.policyPrincipals) && + Objects.equals(this.policyProcesses, updateConnectionConfigurationRequest.policyProcesses) && + Objects.equals(this.disable, updateConnectionConfigurationRequest.disable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier, name, description, authenticationType, _configuration, policyType, policyPrincipals, policyProcesses, disable); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionConfigurationRequest {\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" authenticationType: ").append(toIndentedString(authenticationType)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); + sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); + sb.append(" disable: ").append(toIndentedString(disable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("authentication_type"); + openapiFields.add("configuration"); + openapiFields.add("policy_type"); + openapiFields.add("policy_principals"); + openapiFields.add("policy_processes"); + openapiFields.add("disable"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionConfigurationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConnectionConfigurationRequest is not found in the empty JSON string", UpdateConnectionConfigurationRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateConnectionConfigurationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConnectionConfigurationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateConnectionConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if ((jsonObj.get("authentication_type") != null - && !jsonObj.get("authentication_type").isJsonNull()) - && !jsonObj.get("authentication_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `authentication_type` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("authentication_type").toString())); - } - // validate the optional field `authentication_type` - if (jsonObj.get("authentication_type") != null - && !jsonObj.get("authentication_type").isJsonNull()) { - AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); - } - if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) - && !jsonObj.get("policy_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("policy_type").toString())); - } - // validate the optional field `policy_type` - if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { - PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("policy_principals") != null - && !jsonObj.get("policy_principals").isJsonNull() - && !jsonObj.get("policy_principals").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_principals` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("policy_principals").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("policy_processes") != null - && !jsonObj.get("policy_processes").isJsonNull() - && !jsonObj.get("policy_processes").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `policy_processes` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("policy_processes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateConnectionConfigurationRequest' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateConnectionConfigurationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, UpdateConnectionConfigurationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateConnectionConfigurationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateConnectionConfigurationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateConnectionConfigurationRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateConnectionConfigurationRequest - */ - public static UpdateConnectionConfigurationRequest fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateConnectionConfigurationRequest.class); - } - - /** - * Convert an instance of UpdateConnectionConfigurationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("authentication_type") != null && !jsonObj.get("authentication_type").isJsonNull()) && !jsonObj.get("authentication_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authentication_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authentication_type").toString())); + } + // validate the optional field `authentication_type` + if (jsonObj.get("authentication_type") != null && !jsonObj.get("authentication_type").isJsonNull()) { + AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_principals") != null && !jsonObj.get("policy_principals").isJsonNull() && !jsonObj.get("policy_principals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_principals` to be an array in the JSON string but got `%s`", jsonObj.get("policy_principals").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_processes") != null && !jsonObj.get("policy_processes").isJsonNull() && !jsonObj.get("policy_processes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `policy_processes` to be an array in the JSON string but got `%s`", jsonObj.get("policy_processes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionConfigurationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionConfigurationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConnectionConfigurationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionConfigurationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConnectionConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to UpdateConnectionConfigurationRequest + */ + public static UpdateConnectionConfigurationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionConfigurationRequest.class); + } + + /** + * Convert an instance of UpdateConnectionConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java index 348074b1f..0b6ef69a1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java @@ -4,358 +4,331 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UpdateConnectionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateConnectionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String connectionIdentifier; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) - @javax.annotation.Nullable - private Object dataWarehouseConfig; - - public static final String SERIALIZED_NAME_VALIDATE = "validate"; - - @SerializedName(SERIALIZED_NAME_VALIDATE) - @javax.annotation.Nullable - private Boolean validate = true; - - public UpdateConnectionRequest() {} - - public UpdateConnectionRequest connectionIdentifier( - @javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - return this; - } - - /** - * Unique ID or name of the connection. - * - * @return connectionIdentifier - */ - @javax.annotation.Nonnull - public String getConnectionIdentifier() { - return connectionIdentifier; - } - - public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { - this.connectionIdentifier = connectionIdentifier; - } - - public UpdateConnectionRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Updated name of the connection. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateConnectionRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Updated description of the connection. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public UpdateConnectionRequest dataWarehouseConfig( - @javax.annotation.Nullable Object dataWarehouseConfig) { - this.dataWarehouseConfig = dataWarehouseConfig; - return this; - } - - /** - * Configuration of the data warehouse in JSON. - * - * @return dataWarehouseConfig - */ - @javax.annotation.Nullable - public Object getDataWarehouseConfig() { - return dataWarehouseConfig; - } - - public void setDataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { - this.dataWarehouseConfig = dataWarehouseConfig; - } - - public UpdateConnectionRequest validate(@javax.annotation.Nullable Boolean validate) { - this.validate = validate; - return this; - } - - /** - * Indicates whether to validate the connection details. - * - * @return validate - */ - @javax.annotation.Nullable - public Boolean getValidate() { - return validate; - } - - public void setValidate(@javax.annotation.Nullable Boolean validate) { - this.validate = validate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateConnectionRequest updateConnectionRequest = (UpdateConnectionRequest) o; - return Objects.equals( - this.connectionIdentifier, updateConnectionRequest.connectionIdentifier) - && Objects.equals(this.name, updateConnectionRequest.name) - && Objects.equals(this.description, updateConnectionRequest.description) - && Objects.equals( - this.dataWarehouseConfig, updateConnectionRequest.dataWarehouseConfig) - && Objects.equals(this.validate, updateConnectionRequest.validate); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(connectionIdentifier, name, description, dataWarehouseConfig, validate); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * UpdateConnectionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) + @javax.annotation.Nullable + private Object dataWarehouseConfig; + + public static final String SERIALIZED_NAME_VALIDATE = "validate"; + @SerializedName(SERIALIZED_NAME_VALIDATE) + @javax.annotation.Nullable + private Boolean validate = true; + + public UpdateConnectionRequest() { + } + + public UpdateConnectionRequest connectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + + public UpdateConnectionRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Updated name of the connection. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateConnectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Updated description of the connection. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateConnectionRequest dataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + return this; + } + + /** + * Configuration of the data warehouse in JSON. + * @return dataWarehouseConfig + */ + @javax.annotation.Nullable + public Object getDataWarehouseConfig() { + return dataWarehouseConfig; + } + + public void setDataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + } + + + public UpdateConnectionRequest validate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + return this; + } + + /** + * Indicates whether to validate the connection details. + * @return validate + */ + @javax.annotation.Nullable + public Boolean getValidate() { + return validate; + } + + public void setValidate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateConnectionRequest {\n"); - sb.append(" connectionIdentifier: ") - .append(toIndentedString(connectionIdentifier)) - .append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dataWarehouseConfig: ") - .append(toIndentedString(dataWarehouseConfig)) - .append("\n"); - sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UpdateConnectionRequest updateConnectionRequest = (UpdateConnectionRequest) o; + return Objects.equals(this.connectionIdentifier, updateConnectionRequest.connectionIdentifier) && + Objects.equals(this.name, updateConnectionRequest.name) && + Objects.equals(this.description, updateConnectionRequest.description) && + Objects.equals(this.dataWarehouseConfig, updateConnectionRequest.dataWarehouseConfig) && + Objects.equals(this.validate, updateConnectionRequest.validate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier, name, description, dataWarehouseConfig, validate); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("connection_identifier"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("data_warehouse_config"); - openapiFields.add("validate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("connection_identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionRequest {\n"); + sb.append(" connectionIdentifier: ").append(toIndentedString(connectionIdentifier)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseConfig: ").append(toIndentedString(dataWarehouseConfig)).append("\n"); + sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateConnectionRequest is not found" - + " in the empty JSON string", - UpdateConnectionRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_config"); + openapiFields.add("validate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConnectionRequest is not found in the empty JSON string", UpdateConnectionRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateConnectionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConnectionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateConnectionRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateConnectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("connection_identifier").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateConnectionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateConnectionRequest - * @throws IOException if the JSON string is invalid with respect to UpdateConnectionRequest - */ - public static UpdateConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateConnectionRequest.class); - } - - /** - * Convert an instance of UpdateConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `connection_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConnectionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionRequest + * @throws IOException if the JSON string is invalid with respect to UpdateConnectionRequest + */ + public static UpdateConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionRequest.class); + } + + /** + * Convert an instance of UpdateConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java index b02a37410..774c180fe 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java @@ -4,308 +4,293 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UpdateConnectionV2Request */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateConnectionV2Request implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; - - @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) - @javax.annotation.Nullable - private Object dataWarehouseConfig; - - public static final String SERIALIZED_NAME_VALIDATE = "validate"; - - @SerializedName(SERIALIZED_NAME_VALIDATE) - @javax.annotation.Nullable - private Boolean validate = true; - - public UpdateConnectionV2Request() {} - - public UpdateConnectionV2Request name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Updated name of the connection. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateConnectionV2Request description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Updated description of the connection. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public UpdateConnectionV2Request dataWarehouseConfig( - @javax.annotation.Nullable Object dataWarehouseConfig) { - this.dataWarehouseConfig = dataWarehouseConfig; - return this; - } - - /** - * Configuration of the data warehouse in JSON. - * - * @return dataWarehouseConfig - */ - @javax.annotation.Nullable - public Object getDataWarehouseConfig() { - return dataWarehouseConfig; - } - - public void setDataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { - this.dataWarehouseConfig = dataWarehouseConfig; - } - - public UpdateConnectionV2Request validate(@javax.annotation.Nullable Boolean validate) { - this.validate = validate; - return this; - } - - /** - * Indicates whether to validate the connection details. - * - * @return validate - */ - @javax.annotation.Nullable - public Boolean getValidate() { - return validate; - } - - public void setValidate(@javax.annotation.Nullable Boolean validate) { - this.validate = validate; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateConnectionV2Request updateConnectionV2Request = (UpdateConnectionV2Request) o; - return Objects.equals(this.name, updateConnectionV2Request.name) - && Objects.equals(this.description, updateConnectionV2Request.description) - && Objects.equals( - this.dataWarehouseConfig, updateConnectionV2Request.dataWarehouseConfig) - && Objects.equals(this.validate, updateConnectionV2Request.validate); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(name, description, dataWarehouseConfig, validate); - } +import com.thoughtspot.client.JSON; - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; +/** + * UpdateConnectionV2Request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateConnectionV2Request implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) + @javax.annotation.Nullable + private Object dataWarehouseConfig; + + public static final String SERIALIZED_NAME_VALIDATE = "validate"; + @SerializedName(SERIALIZED_NAME_VALIDATE) + @javax.annotation.Nullable + private Boolean validate = true; + + public UpdateConnectionV2Request() { + } + + public UpdateConnectionV2Request name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Updated name of the connection. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateConnectionV2Request description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Updated description of the connection. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateConnectionV2Request dataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + return this; + } + + /** + * Configuration of the data warehouse in JSON. + * @return dataWarehouseConfig + */ + @javax.annotation.Nullable + public Object getDataWarehouseConfig() { + return dataWarehouseConfig; + } + + public void setDataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + } + + + public UpdateConnectionV2Request validate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + return this; + } + + /** + * Indicates whether to validate the connection details. + * @return validate + */ + @javax.annotation.Nullable + public Boolean getValidate() { + return validate; + } + + public void setValidate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateConnectionV2Request {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dataWarehouseConfig: ") - .append(toIndentedString(dataWarehouseConfig)) - .append("\n"); - sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UpdateConnectionV2Request updateConnectionV2Request = (UpdateConnectionV2Request) o; + return Objects.equals(this.name, updateConnectionV2Request.name) && + Objects.equals(this.description, updateConnectionV2Request.description) && + Objects.equals(this.dataWarehouseConfig, updateConnectionV2Request.dataWarehouseConfig) && + Objects.equals(this.validate, updateConnectionV2Request.validate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, dataWarehouseConfig, validate); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("data_warehouse_config"); - openapiFields.add("validate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionV2Request {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseConfig: ").append(toIndentedString(dataWarehouseConfig)).append("\n"); + sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionV2Request - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateConnectionV2Request.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateConnectionV2Request is not" - + " found in the empty JSON string", - UpdateConnectionV2Request.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_config"); + openapiFields.add("validate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionV2Request + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConnectionV2Request is not found in the empty JSON string", UpdateConnectionV2Request.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateConnectionV2Request.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateConnectionV2Request` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateConnectionV2Request.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConnectionV2Request` 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateConnectionV2Request.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateConnectionV2Request' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionV2Request.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateConnectionV2Request value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateConnectionV2Request read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateConnectionV2Request given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateConnectionV2Request - * @throws IOException if the JSON string is invalid with respect to UpdateConnectionV2Request - */ - public static UpdateConnectionV2Request fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateConnectionV2Request.class); - } - - /** - * Convert an instance of UpdateConnectionV2Request to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionV2Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionV2Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConnectionV2Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionV2Request read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateConnectionV2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionV2Request + * @throws IOException if the JSON string is invalid with respect to UpdateConnectionV2Request + */ + public static UpdateConnectionV2Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionV2Request.class); + } + + /** + * Convert an instance of UpdateConnectionV2Request to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java index 2a9e2eaf6..6c2c1a26e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java @@ -4,478 +4,438 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionDetailsInput; +import com.thoughtspot.client.model.AssociateMetadataInput; +import com.thoughtspot.client.model.DefaultActionConfigInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateCustomActionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateCustomActionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; - - @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) - @javax.annotation.Nullable - private ActionDetailsInput actionDetails; - - public static final String SERIALIZED_NAME_ASSOCIATE_METADATA = "associate_metadata"; - - @SerializedName(SERIALIZED_NAME_ASSOCIATE_METADATA) - @javax.annotation.Nullable - private List associateMetadata; - - public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) - @javax.annotation.Nullable - private DefaultActionConfigInput defaultActionConfig; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - /** Type of update operation. Default operation type is ADD */ - @JsonAdapter(OperationEnum.Adapter.class) - public enum OperationEnum { - ADD("ADD"), - - REMOVE("REMOVE"); - - private String value; - - OperationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperationEnum fromValue(String value) { - for (OperationEnum b : OperationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperationEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperationEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_OPERATION = "operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - @javax.annotation.Nullable - private OperationEnum operation = OperationEnum.ADD; - - public UpdateCustomActionRequest() {} - - public UpdateCustomActionRequest actionDetails( - @javax.annotation.Nullable ActionDetailsInput actionDetails) { - this.actionDetails = actionDetails; - return this; - } - - /** - * Action details includes `Type` and Configuration for Custom Actions, either - * Callback or URL is required. - * - * @return actionDetails - */ - @javax.annotation.Nullable - public ActionDetailsInput getActionDetails() { - return actionDetails; - } - - public void setActionDetails(@javax.annotation.Nullable ActionDetailsInput actionDetails) { - this.actionDetails = actionDetails; - } - - public UpdateCustomActionRequest associateMetadata( - @javax.annotation.Nullable List associateMetadata) { - this.associateMetadata = associateMetadata; - return this; - } - - public UpdateCustomActionRequest addAssociateMetadataItem( - AssociateMetadataInput associateMetadataItem) { - if (this.associateMetadata == null) { - this.associateMetadata = new ArrayList<>(); - } - this.associateMetadata.add(associateMetadataItem); - return this; - } - - /** - * Metadata objects to which the custom action needs to be associated. - * - * @return associateMetadata - */ - @javax.annotation.Nullable - public List getAssociateMetadata() { - return associateMetadata; - } - - public void setAssociateMetadata( - @javax.annotation.Nullable List associateMetadata) { - this.associateMetadata = associateMetadata; - } - - public UpdateCustomActionRequest defaultActionConfig( - @javax.annotation.Nullable DefaultActionConfigInput defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Default Custom action configuration. This includes if the custom action available on - * visualizations and Answers. By default, a custom action is added to all visualizations and - * Answers. - * - * @return defaultActionConfig - */ - @javax.annotation.Nullable - public DefaultActionConfigInput getDefaultActionConfig() { - return defaultActionConfig; +/** + * UpdateCustomActionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateCustomActionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; + @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) + @javax.annotation.Nullable + private ActionDetailsInput actionDetails; + + public static final String SERIALIZED_NAME_ASSOCIATE_METADATA = "associate_metadata"; + @SerializedName(SERIALIZED_NAME_ASSOCIATE_METADATA) + @javax.annotation.Nullable + private List associateMetadata; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nullable + private DefaultActionConfigInput defaultActionConfig; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + /** + * Type of update operation. Default operation type is ADD + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"); + + private String value; + + OperationEnum(String value) { + this.value = value; } - public void setDefaultActionConfig( - @javax.annotation.Nullable DefaultActionConfigInput defaultActionConfig) { - this.defaultActionConfig = defaultActionConfig; + public String getValue() { + return value; } - public UpdateCustomActionRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateCustomActionRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Unique ID or name of the groups that can view and access the custom action. - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; + public 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 void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); } - - public UpdateCustomActionRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.ADD; + + public UpdateCustomActionRequest() { + } + + public UpdateCustomActionRequest actionDetails(@javax.annotation.Nullable ActionDetailsInput actionDetails) { + this.actionDetails = actionDetails; + return this; + } + + /** + * Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. + * @return actionDetails + */ + @javax.annotation.Nullable + public ActionDetailsInput getActionDetails() { + return actionDetails; + } + + public void setActionDetails(@javax.annotation.Nullable ActionDetailsInput actionDetails) { + this.actionDetails = actionDetails; + } + + + public UpdateCustomActionRequest associateMetadata(@javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + return this; + } + + public UpdateCustomActionRequest addAssociateMetadataItem(AssociateMetadataInput associateMetadataItem) { + if (this.associateMetadata == null) { + this.associateMetadata = new ArrayList<>(); } - - /** - * Name of the custom action. The custom action name must be unique. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; + this.associateMetadata.add(associateMetadataItem); + return this; + } + + /** + * Metadata objects to which the custom action needs to be associated. + * @return associateMetadata + */ + @javax.annotation.Nullable + public List getAssociateMetadata() { + return associateMetadata; + } + + public void setAssociateMetadata(@javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + } + + + public UpdateCustomActionRequest defaultActionConfig(@javax.annotation.Nullable DefaultActionConfigInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. + * @return defaultActionConfig + */ + @javax.annotation.Nullable + public DefaultActionConfigInput getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig(@javax.annotation.Nullable DefaultActionConfigInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + + public UpdateCustomActionRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public UpdateCustomActionRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the groups that can view and access the custom action. + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public UpdateCustomActionRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the custom action. The custom action name must be unique. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateCustomActionRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is ADD + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public UpdateCustomActionRequest operation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - return this; - } - - /** - * Type of update operation. Default operation type is ADD - * - * @return operation - */ - @javax.annotation.Nullable - public OperationEnum getOperation() { - return operation; + if (o == null || getClass() != o.getClass()) { + return false; } - - public void setOperation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; + UpdateCustomActionRequest updateCustomActionRequest = (UpdateCustomActionRequest) o; + return Objects.equals(this.actionDetails, updateCustomActionRequest.actionDetails) && + Objects.equals(this.associateMetadata, updateCustomActionRequest.associateMetadata) && + Objects.equals(this.defaultActionConfig, updateCustomActionRequest.defaultActionConfig) && + Objects.equals(this.groupIdentifiers, updateCustomActionRequest.groupIdentifiers) && + Objects.equals(this.name, updateCustomActionRequest.name) && + Objects.equals(this.operation, updateCustomActionRequest.operation); + } + + @Override + public int hashCode() { + return Objects.hash(actionDetails, associateMetadata, defaultActionConfig, groupIdentifiers, name, operation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCustomActionRequest {\n"); + sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); + sb.append(" associateMetadata: ").append(toIndentedString(associateMetadata)).append("\n"); + sb.append(" defaultActionConfig: ").append(toIndentedString(defaultActionConfig)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_details"); + openapiFields.add("associate_metadata"); + openapiFields.add("default_action_config"); + openapiFields.add("group_identifiers"); + openapiFields.add("name"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCustomActionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCustomActionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCustomActionRequest is not found in the empty JSON string", UpdateCustomActionRequest.openapiRequiredFields.toString())); } - UpdateCustomActionRequest updateCustomActionRequest = (UpdateCustomActionRequest) o; - return Objects.equals(this.actionDetails, updateCustomActionRequest.actionDetails) - && Objects.equals( - this.associateMetadata, updateCustomActionRequest.associateMetadata) - && Objects.equals( - this.defaultActionConfig, updateCustomActionRequest.defaultActionConfig) - && Objects.equals(this.groupIdentifiers, updateCustomActionRequest.groupIdentifiers) - && Objects.equals(this.name, updateCustomActionRequest.name) - && Objects.equals(this.operation, updateCustomActionRequest.operation); - } + } - @Override - public int hashCode() { - return Objects.hash( - actionDetails, - associateMetadata, - defaultActionConfig, - groupIdentifiers, - name, - operation); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCustomActionRequest {\n"); - sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); - sb.append(" associateMetadata: ") - .append(toIndentedString(associateMetadata)) - .append("\n"); - sb.append(" defaultActionConfig: ") - .append(toIndentedString(defaultActionConfig)) - .append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("action_details"); - openapiFields.add("associate_metadata"); - openapiFields.add("default_action_config"); - openapiFields.add("group_identifiers"); - openapiFields.add("name"); - openapiFields.add("operation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCustomActionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCustomActionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateCustomActionRequest is not" - + " found in the empty JSON string", - UpdateCustomActionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCustomActionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateCustomActionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateCustomActionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCustomActionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `action_details` - if (jsonObj.get("action_details") != null && !jsonObj.get("action_details").isJsonNull()) { - ActionDetailsInput.validateJsonElement(jsonObj.get("action_details")); - } - if (jsonObj.get("associate_metadata") != null - && !jsonObj.get("associate_metadata").isJsonNull()) { - JsonArray jsonArrayassociateMetadata = jsonObj.getAsJsonArray("associate_metadata"); - if (jsonArrayassociateMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("associate_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `associate_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("associate_metadata").toString())); - } - - // validate the optional field `associate_metadata` (array) - for (int i = 0; i < jsonArrayassociateMetadata.size(); i++) { - AssociateMetadataInput.validateJsonElement(jsonArrayassociateMetadata.get(i)); - } - ; - } + // validate the optional field `action_details` + if (jsonObj.get("action_details") != null && !jsonObj.get("action_details").isJsonNull()) { + ActionDetailsInput.validateJsonElement(jsonObj.get("action_details")); + } + if (jsonObj.get("associate_metadata") != null && !jsonObj.get("associate_metadata").isJsonNull()) { + JsonArray jsonArrayassociateMetadata = jsonObj.getAsJsonArray("associate_metadata"); + if (jsonArrayassociateMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("associate_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `associate_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("associate_metadata").toString())); + } + + // validate the optional field `associate_metadata` (array) + for (int i = 0; i < jsonArrayassociateMetadata.size(); i++) { + AssociateMetadataInput.validateJsonElement(jsonArrayassociateMetadata.get(i)); + }; } - // validate the optional field `default_action_config` - if (jsonObj.get("default_action_config") != null - && !jsonObj.get("default_action_config").isJsonNull()) { - DefaultActionConfigInput.validateJsonElement(jsonObj.get("default_action_config")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) - && !jsonObj.get("operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operation").toString())); - } - // validate the optional field `operation` - if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { - OperationEnum.validateJsonElement(jsonObj.get("operation")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCustomActionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCustomActionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateCustomActionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCustomActionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCustomActionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCustomActionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCustomActionRequest - * @throws IOException if the JSON string is invalid with respect to UpdateCustomActionRequest - */ - public static UpdateCustomActionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCustomActionRequest.class); - } - - /** - * Convert an instance of UpdateCustomActionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + } + // validate the optional field `default_action_config` + if (jsonObj.get("default_action_config") != null && !jsonObj.get("default_action_config").isJsonNull()) { + DefaultActionConfigInput.validateJsonElement(jsonObj.get("default_action_config")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCustomActionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCustomActionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCustomActionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCustomActionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateCustomActionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateCustomActionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCustomActionRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCustomActionRequest + */ + public static UpdateCustomActionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCustomActionRequest.class); + } + + /** + * Convert an instance of UpdateCustomActionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateDbtConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateDbtConnectionRequest.java deleted file mode 100644 index 25c6db8c0..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateDbtConnectionRequest.java +++ /dev/null @@ -1,637 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import com.google.gson.Gson; -import 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.File; -import java.io.IOException; -import java.io.Serializable; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -/** UpdateDbtConnectionRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateDbtConnectionRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER = - "dbt_connection_identifier"; - - @SerializedName(SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER) - @javax.annotation.Nonnull - private String dbtConnectionIdentifier; - - public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; - - @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) - @javax.annotation.Nullable - private String connectionName; - - public static final String SERIALIZED_NAME_DATABASE_NAME = "database_name"; - - @SerializedName(SERIALIZED_NAME_DATABASE_NAME) - @javax.annotation.Nullable - private String databaseName; - - /** Mention type of Import */ - @JsonAdapter(ImportTypeEnum.Adapter.class) - public enum ImportTypeEnum { - DBT_CLOUD("DBT_CLOUD"), - - ZIP_FILE("ZIP_FILE"); - - private String value; - - ImportTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ImportTypeEnum fromValue(String value) { - for (ImportTypeEnum b : ImportTypeEnum.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 ImportTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ImportTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ImportTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ImportTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_IMPORT_TYPE = "import_type"; - - @SerializedName(SERIALIZED_NAME_IMPORT_TYPE) - @javax.annotation.Nullable - private ImportTypeEnum importType = ImportTypeEnum.DBT_CLOUD; - - public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; - - @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) - @javax.annotation.Nullable - private String accessToken; - - public static final String SERIALIZED_NAME_DBT_URL = "dbt_url"; - - @SerializedName(SERIALIZED_NAME_DBT_URL) - @javax.annotation.Nullable - private String dbtUrl; - - public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - @javax.annotation.Nullable - private String accountId; - - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - @javax.annotation.Nullable - private String projectId; - - public static final String SERIALIZED_NAME_DBT_ENV_ID = "dbt_env_id"; - - @SerializedName(SERIALIZED_NAME_DBT_ENV_ID) - @javax.annotation.Nullable - private String dbtEnvId; - - public static final String SERIALIZED_NAME_PROJECT_NAME = "project_name"; - - @SerializedName(SERIALIZED_NAME_PROJECT_NAME) - @javax.annotation.Nullable - private String projectName; - - public static final String SERIALIZED_NAME_FILE_CONTENT = "file_content"; - - @SerializedName(SERIALIZED_NAME_FILE_CONTENT) - @javax.annotation.Nullable - private File fileContent; - - public UpdateDbtConnectionRequest() {} - - public UpdateDbtConnectionRequest dbtConnectionIdentifier( - @javax.annotation.Nonnull String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - return this; - } - - /** - * Unique ID of the DBT Connection. - * - * @return dbtConnectionIdentifier - */ - @javax.annotation.Nonnull - public String getDbtConnectionIdentifier() { - return dbtConnectionIdentifier; - } - - public void setDbtConnectionIdentifier( - @javax.annotation.Nonnull String dbtConnectionIdentifier) { - this.dbtConnectionIdentifier = dbtConnectionIdentifier; - } - - public UpdateDbtConnectionRequest connectionName( - @javax.annotation.Nullable String connectionName) { - this.connectionName = connectionName; - return this; - } - - /** - * Name of the connection. - * - * @return connectionName - */ - @javax.annotation.Nullable - public String getConnectionName() { - return connectionName; - } - - public void setConnectionName(@javax.annotation.Nullable String connectionName) { - this.connectionName = connectionName; - } - - public UpdateDbtConnectionRequest databaseName(@javax.annotation.Nullable String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Name of the Database. - * - * @return databaseName - */ - @javax.annotation.Nullable - public String getDatabaseName() { - return databaseName; - } - - public void setDatabaseName(@javax.annotation.Nullable String databaseName) { - this.databaseName = databaseName; - } - - public UpdateDbtConnectionRequest importType( - @javax.annotation.Nullable ImportTypeEnum importType) { - this.importType = importType; - return this; - } - - /** - * Mention type of Import - * - * @return importType - */ - @javax.annotation.Nullable - public ImportTypeEnum getImportType() { - return importType; - } - - public void setImportType(@javax.annotation.Nullable ImportTypeEnum importType) { - this.importType = importType; - } - - public UpdateDbtConnectionRequest accessToken(@javax.annotation.Nullable String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Access token is mandatory when Import_Type is DBT_CLOUD. - * - * @return accessToken - */ - @javax.annotation.Nullable - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(@javax.annotation.Nullable String accessToken) { - this.accessToken = accessToken; - } - - public UpdateDbtConnectionRequest dbtUrl(@javax.annotation.Nullable String dbtUrl) { - this.dbtUrl = dbtUrl; - return this; - } - - /** - * DBT URL is mandatory when Import_Type is DBT_CLOUD. - * - * @return dbtUrl - */ - @javax.annotation.Nullable - public String getDbtUrl() { - return dbtUrl; - } - - public void setDbtUrl(@javax.annotation.Nullable String dbtUrl) { - this.dbtUrl = dbtUrl; - } - - public UpdateDbtConnectionRequest accountId(@javax.annotation.Nullable String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account ID is mandatory when Import_Type is DBT_CLOUD - * - * @return accountId - */ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - public void setAccountId(@javax.annotation.Nullable String accountId) { - this.accountId = accountId; - } - - public UpdateDbtConnectionRequest projectId(@javax.annotation.Nullable String projectId) { - this.projectId = projectId; - return this; - } - - /** - * Project ID is mandatory when Import_Type is DBT_CLOUD - * - * @return projectId - */ - @javax.annotation.Nullable - public String getProjectId() { - return projectId; - } - - public void setProjectId(@javax.annotation.Nullable String projectId) { - this.projectId = projectId; - } - - public UpdateDbtConnectionRequest dbtEnvId(@javax.annotation.Nullable String dbtEnvId) { - this.dbtEnvId = dbtEnvId; - return this; - } - - /** - * DBT Environment ID\" - * - * @return dbtEnvId - */ - @javax.annotation.Nullable - public String getDbtEnvId() { - return dbtEnvId; - } - - public void setDbtEnvId(@javax.annotation.Nullable String dbtEnvId) { - this.dbtEnvId = dbtEnvId; - } - - public UpdateDbtConnectionRequest projectName(@javax.annotation.Nullable String projectName) { - this.projectName = projectName; - return this; - } - - /** - * Name of the project - * - * @return projectName - */ - @javax.annotation.Nullable - public String getProjectName() { - return projectName; - } - - public void setProjectName(@javax.annotation.Nullable String projectName) { - this.projectName = projectName; - } - - public UpdateDbtConnectionRequest fileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - return this; - } - - /** - * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when - * Import Type is 'ZIP_FILE' - * - * @return fileContent - */ - @javax.annotation.Nullable - public File getFileContent() { - return fileContent; - } - - public void setFileContent(@javax.annotation.Nullable File fileContent) { - this.fileContent = fileContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDbtConnectionRequest updateDbtConnectionRequest = (UpdateDbtConnectionRequest) o; - return Objects.equals( - this.dbtConnectionIdentifier, - updateDbtConnectionRequest.dbtConnectionIdentifier) - && Objects.equals(this.connectionName, updateDbtConnectionRequest.connectionName) - && Objects.equals(this.databaseName, updateDbtConnectionRequest.databaseName) - && Objects.equals(this.importType, updateDbtConnectionRequest.importType) - && Objects.equals(this.accessToken, updateDbtConnectionRequest.accessToken) - && Objects.equals(this.dbtUrl, updateDbtConnectionRequest.dbtUrl) - && Objects.equals(this.accountId, updateDbtConnectionRequest.accountId) - && Objects.equals(this.projectId, updateDbtConnectionRequest.projectId) - && Objects.equals(this.dbtEnvId, updateDbtConnectionRequest.dbtEnvId) - && Objects.equals(this.projectName, updateDbtConnectionRequest.projectName) - && Objects.equals(this.fileContent, updateDbtConnectionRequest.fileContent); - } - - @Override - public int hashCode() { - return Objects.hash( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDbtConnectionRequest {\n"); - sb.append(" dbtConnectionIdentifier: ") - .append(toIndentedString(dbtConnectionIdentifier)) - .append("\n"); - sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); - sb.append(" databaseName: ").append(toIndentedString(databaseName)).append("\n"); - sb.append(" importType: ").append(toIndentedString(importType)).append("\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" dbtUrl: ").append(toIndentedString(dbtUrl)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" dbtEnvId: ").append(toIndentedString(dbtEnvId)).append("\n"); - sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); - sb.append(" fileContent: ").append(toIndentedString(fileContent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dbt_connection_identifier"); - openapiFields.add("connection_name"); - openapiFields.add("database_name"); - openapiFields.add("import_type"); - openapiFields.add("access_token"); - openapiFields.add("dbt_url"); - openapiFields.add("account_id"); - openapiFields.add("project_id"); - openapiFields.add("dbt_env_id"); - openapiFields.add("project_name"); - openapiFields.add("file_content"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("dbt_connection_identifier"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateDbtConnectionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateDbtConnectionRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateDbtConnectionRequest is not" - + " found in the empty JSON string", - UpdateDbtConnectionRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateDbtConnectionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateDbtConnectionRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateDbtConnectionRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - 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("dbt_connection_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_connection_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("dbt_connection_identifier").toString())); - } - if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) - && !jsonObj.get("connection_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `connection_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("connection_name").toString())); - } - if ((jsonObj.get("database_name") != null && !jsonObj.get("database_name").isJsonNull()) - && !jsonObj.get("database_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `database_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("database_name").toString())); - } - if ((jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) - && !jsonObj.get("import_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `import_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("import_type").toString())); - } - // validate the optional field `import_type` - if (jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) { - ImportTypeEnum.validateJsonElement(jsonObj.get("import_type")); - } - if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) - && !jsonObj.get("access_token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `access_token` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("access_token").toString())); - } - if ((jsonObj.get("dbt_url") != null && !jsonObj.get("dbt_url").isJsonNull()) - && !jsonObj.get("dbt_url").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_url` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("dbt_url").toString())); - } - if ((jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonNull()) - && !jsonObj.get("account_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_id").toString())); - } - if ((jsonObj.get("project_id") != null && !jsonObj.get("project_id").isJsonNull()) - && !jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `project_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("project_id").toString())); - } - if ((jsonObj.get("dbt_env_id") != null && !jsonObj.get("dbt_env_id").isJsonNull()) - && !jsonObj.get("dbt_env_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `dbt_env_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("dbt_env_id").toString())); - } - if ((jsonObj.get("project_name") != null && !jsonObj.get("project_name").isJsonNull()) - && !jsonObj.get("project_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `project_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("project_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDbtConnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDbtConnectionRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateDbtConnectionRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDbtConnectionRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDbtConnectionRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDbtConnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDbtConnectionRequest - * @throws IOException if the JSON string is invalid with respect to UpdateDbtConnectionRequest - */ - public static UpdateDbtConnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDbtConnectionRequest.class); - } - - /** - * Convert an instance of UpdateDbtConnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java index 9bb0b210b..fd5633410 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java @@ -4,247 +4,235 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.TemplatePropertiesInputCreate; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateEmailCustomizationRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateEmailCustomizationRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; - - @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) - @javax.annotation.Nonnull - private TemplatePropertiesInputCreate templateProperties; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; - - public UpdateEmailCustomizationRequest() {} - - public UpdateEmailCustomizationRequest templateProperties( - @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { - this.templateProperties = templateProperties; - return this; - } - - /** - * Email customization configuration as key value pair - * - * @return templateProperties - */ - @javax.annotation.Nonnull - public TemplatePropertiesInputCreate getTemplateProperties() { - return templateProperties; - } - - public void setTemplateProperties( - @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { - this.templateProperties = templateProperties; - } - - public UpdateEmailCustomizationRequest orgIdentifier( - @javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - - /** - * Unique ID or name of org - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateEmailCustomizationRequest updateEmailCustomizationRequest = - (UpdateEmailCustomizationRequest) o; - return Objects.equals( - this.templateProperties, updateEmailCustomizationRequest.templateProperties) - && Objects.equals( - this.orgIdentifier, updateEmailCustomizationRequest.orgIdentifier); - } - - @Override - public int hashCode() { - return Objects.hash(templateProperties, orgIdentifier); - } +import com.thoughtspot.client.JSON; - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateEmailCustomizationRequest {\n"); - sb.append(" templateProperties: ") - .append(toIndentedString(templateProperties)) - .append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append("}"); - return sb.toString(); +/** + * UpdateEmailCustomizationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateEmailCustomizationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; + @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) + @javax.annotation.Nonnull + private TemplatePropertiesInputCreate templateProperties; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public UpdateEmailCustomizationRequest() { + } + + public UpdateEmailCustomizationRequest templateProperties(@javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Email customization configuration as key value pair + * @return templateProperties + */ + @javax.annotation.Nonnull + public TemplatePropertiesInputCreate getTemplateProperties() { + return templateProperties; + } + + public void setTemplateProperties(@javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + } + + + public UpdateEmailCustomizationRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of org + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("template_properties"); - openapiFields.add("org_identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("template_properties"); + UpdateEmailCustomizationRequest updateEmailCustomizationRequest = (UpdateEmailCustomizationRequest) o; + return Objects.equals(this.templateProperties, updateEmailCustomizationRequest.templateProperties) && + Objects.equals(this.orgIdentifier, updateEmailCustomizationRequest.orgIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(templateProperties, orgIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateEmailCustomizationRequest {\n"); + sb.append(" templateProperties: ").append(toIndentedString(templateProperties)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UpdateEmailCustomizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateEmailCustomizationRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateEmailCustomizationRequest is" - + " not found in the empty JSON string", - UpdateEmailCustomizationRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("template_properties"); + openapiFields.add("org_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("template_properties"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateEmailCustomizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateEmailCustomizationRequest is not found in the empty JSON string", UpdateEmailCustomizationRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateEmailCustomizationRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateEmailCustomizationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateEmailCustomizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateEmailCustomizationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateEmailCustomizationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `template_properties` - TemplatePropertiesInputCreate.validateJsonElement(jsonObj.get("template_properties")); - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateEmailCustomizationRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(UpdateEmailCustomizationRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateEmailCustomizationRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateEmailCustomizationRequest read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateEmailCustomizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateEmailCustomizationRequest - * @throws IOException if the JSON string is invalid with respect to - * UpdateEmailCustomizationRequest - */ - public static UpdateEmailCustomizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateEmailCustomizationRequest.class); - } - - /** - * Convert an instance of UpdateEmailCustomizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // validate the required field `template_properties` + TemplatePropertiesInputCreate.validateJsonElement(jsonObj.get("template_properties")); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateEmailCustomizationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateEmailCustomizationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateEmailCustomizationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateEmailCustomizationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to UpdateEmailCustomizationRequest + */ + public static UpdateEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateEmailCustomizationRequest.class); + } + + /** + * Convert an instance of UpdateEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java index a4b29f002..461787fde 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java @@ -4,262 +4,253 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.HeaderUpdateInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateMetadataHeaderRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateMetadataHeaderRequest implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_HEADERS_UPDATE = "headers_update"; +/** + * UpdateMetadataHeaderRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateMetadataHeaderRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_HEADERS_UPDATE) - @javax.annotation.Nonnull - private List headersUpdate; + public static final String SERIALIZED_NAME_HEADERS_UPDATE = "headers_update"; + @SerializedName(SERIALIZED_NAME_HEADERS_UPDATE) + @javax.annotation.Nonnull + private List headersUpdate; - public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) - @javax.annotation.Nullable - private String orgIdentifier; + public UpdateMetadataHeaderRequest() { + } - public UpdateMetadataHeaderRequest() {} + public UpdateMetadataHeaderRequest headersUpdate(@javax.annotation.Nonnull List headersUpdate) { + this.headersUpdate = headersUpdate; + return this; + } - public UpdateMetadataHeaderRequest headersUpdate( - @javax.annotation.Nonnull List headersUpdate) { - this.headersUpdate = headersUpdate; - return this; + public UpdateMetadataHeaderRequest addHeadersUpdateItem(HeaderUpdateInput headersUpdateItem) { + if (this.headersUpdate == null) { + this.headersUpdate = new ArrayList<>(); } + this.headersUpdate.add(headersUpdateItem); + return this; + } - public UpdateMetadataHeaderRequest addHeadersUpdateItem(HeaderUpdateInput headersUpdateItem) { - if (this.headersUpdate == null) { - this.headersUpdate = new ArrayList<>(); - } - this.headersUpdate.add(headersUpdateItem); - return this; - } + /** + * List of header objects to update. + * @return headersUpdate + */ + @javax.annotation.Nonnull + public List getHeadersUpdate() { + return headersUpdate; + } - /** - * List of header objects to update. - * - * @return headersUpdate - */ - @javax.annotation.Nonnull - public List getHeadersUpdate() { - return headersUpdate; - } + public void setHeadersUpdate(@javax.annotation.Nonnull List headersUpdate) { + this.headersUpdate = headersUpdate; + } - public void setHeadersUpdate(@javax.annotation.Nonnull List headersUpdate) { - this.headersUpdate = headersUpdate; - } - public UpdateMetadataHeaderRequest orgIdentifier( - @javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } + public UpdateMetadataHeaderRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } - /** - * Unique ID or name of the organization. - * - * @return orgIdentifier - */ - @javax.annotation.Nullable - public String getOrgIdentifier() { - return orgIdentifier; - } + /** + * Unique ID or name of the organization. + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } - public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateMetadataHeaderRequest updateMetadataHeaderRequest = (UpdateMetadataHeaderRequest) o; - return Objects.equals(this.headersUpdate, updateMetadataHeaderRequest.headersUpdate) - && Objects.equals(this.orgIdentifier, updateMetadataHeaderRequest.orgIdentifier); - } - @Override - public int hashCode() { - return Objects.hash(headersUpdate, orgIdentifier); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateMetadataHeaderRequest {\n"); - sb.append(" headersUpdate: ").append(toIndentedString(headersUpdate)).append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } + UpdateMetadataHeaderRequest updateMetadataHeaderRequest = (UpdateMetadataHeaderRequest) o; + return Objects.equals(this.headersUpdate, updateMetadataHeaderRequest.headersUpdate) && + Objects.equals(this.orgIdentifier, updateMetadataHeaderRequest.orgIdentifier); + } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + @Override + public int hashCode() { + return Objects.hash(headersUpdate, orgIdentifier); + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("headers_update"); - openapiFields.add("org_identifier"); + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateMetadataHeaderRequest {\n"); + sb.append(" headersUpdate: ").append(toIndentedString(headersUpdate)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("headers_update"); + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("headers_update"); + openapiFields.add("org_identifier"); - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UpdateMetadataHeaderRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateMetadataHeaderRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateMetadataHeaderRequest is not" - + " found in the empty JSON string", - UpdateMetadataHeaderRequest.openapiRequiredFields.toString())); - } + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("headers_update"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateMetadataHeaderRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateMetadataHeaderRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateMetadataHeaderRequest is not found in the empty JSON string", UpdateMetadataHeaderRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateMetadataHeaderRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateMetadataHeaderRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateMetadataHeaderRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateMetadataHeaderRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateMetadataHeaderRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateMetadataHeaderRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("headers_update").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `headers_update` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("headers_update").toString())); - } + // ensure the json data is an array + if (!jsonObj.get("headers_update").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `headers_update` to be an array in the JSON string but got `%s`", jsonObj.get("headers_update").toString())); + } - JsonArray jsonArrayheadersUpdate = jsonObj.getAsJsonArray("headers_update"); - // validate the required field `headers_update` (array) - for (int i = 0; i < jsonArrayheadersUpdate.size(); i++) { - HeaderUpdateInput.validateJsonElement(jsonArrayheadersUpdate.get(i)); - } - ; - if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) - && !jsonObj.get("org_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifier` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("org_identifier").toString())); - } - } + JsonArray jsonArrayheadersUpdate = jsonObj.getAsJsonArray("headers_update"); + // validate the required field `headers_update` (array) + for (int i = 0; i < jsonArrayheadersUpdate.size(); i++) { + HeaderUpdateInput.validateJsonElement(jsonArrayheadersUpdate.get(i)); + }; + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateMetadataHeaderRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateMetadataHeaderRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateMetadataHeaderRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateMetadataHeaderRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateMetadataHeaderRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateMetadataHeaderRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateMetadataHeaderRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateMetadataHeaderRequest.class)); - /** - * Create an instance of UpdateMetadataHeaderRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateMetadataHeaderRequest - * @throws IOException if the JSON string is invalid with respect to UpdateMetadataHeaderRequest - */ - public static UpdateMetadataHeaderRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateMetadataHeaderRequest.class); - } + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateMetadataHeaderRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateMetadataHeaderRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } - /** - * Convert an instance of UpdateMetadataHeaderRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + }.nullSafe(); } + } + + /** + * Create an instance of UpdateMetadataHeaderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateMetadataHeaderRequest + * @throws IOException if the JSON string is invalid with respect to UpdateMetadataHeaderRequest + */ + public static UpdateMetadataHeaderRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateMetadataHeaderRequest.class); + } + + /** + * Convert an instance of UpdateMetadataHeaderRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java index e0cfa04d4..894d88b16 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java @@ -4,224 +4,223 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UpdateObjIdInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateMetadataObjIdRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * UpdateMetadataObjIdRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class UpdateMetadataObjIdRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_METADATA = "metadata"; + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nonnull - private List metadata; + public UpdateMetadataObjIdRequest() { + } - public UpdateMetadataObjIdRequest() {} + public UpdateMetadataObjIdRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } - public UpdateMetadataObjIdRequest metadata( - @javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - return this; + public UpdateMetadataObjIdRequest addMetadataItem(UpdateObjIdInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } + this.metadata.add(metadataItem); + return this; + } - public UpdateMetadataObjIdRequest addMetadataItem(UpdateObjIdInput metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } + /** + * List of metadata objects to update their object IDs. + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } - /** - * List of metadata objects to update their object IDs. - * - * @return metadata - */ - @javax.annotation.Nonnull - public List getMetadata() { - return metadata; - } + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } - public void setMetadata(@javax.annotation.Nonnull List metadata) { - this.metadata = metadata; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateMetadataObjIdRequest updateMetadataObjIdRequest = (UpdateMetadataObjIdRequest) o; - return Objects.equals(this.metadata, updateMetadataObjIdRequest.metadata); - } - @Override - public int hashCode() { - return Objects.hash(metadata); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateMetadataObjIdRequest {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); + UpdateMetadataObjIdRequest updateMetadataObjIdRequest = (UpdateMetadataObjIdRequest) o; + return Objects.equals(this.metadata, updateMetadataObjIdRequest.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateMetadataObjIdRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateMetadataObjIdRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateMetadataObjIdRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateMetadataObjIdRequest is not" - + " found in the empty JSON string", - UpdateMetadataObjIdRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateMetadataObjIdRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateMetadataObjIdRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateMetadataObjIdRequest is not found in the empty JSON string", UpdateMetadataObjIdRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateMetadataObjIdRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateMetadataObjIdRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateMetadataObjIdRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateMetadataObjIdRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateMetadataObjIdRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateMetadataObjIdRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("metadata").toString())); - } - - JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); - // validate the required field `metadata` (array) - for (int i = 0; i < jsonArraymetadata.size(); i++) { - UpdateObjIdInput.validateJsonElement(jsonArraymetadata.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateMetadataObjIdRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateMetadataObjIdRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateMetadataObjIdRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateMetadataObjIdRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateMetadataObjIdRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateMetadataObjIdRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateMetadataObjIdRequest - * @throws IOException if the JSON string is invalid with respect to UpdateMetadataObjIdRequest - */ - public static UpdateMetadataObjIdRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateMetadataObjIdRequest.class); - } - - /** - * Convert an instance of UpdateMetadataObjIdRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + UpdateObjIdInput.validateJsonElement(jsonArraymetadata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateMetadataObjIdRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateMetadataObjIdRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateMetadataObjIdRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateMetadataObjIdRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateMetadataObjIdRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateMetadataObjIdRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateMetadataObjIdRequest + * @throws IOException if the JSON string is invalid with respect to UpdateMetadataObjIdRequest + */ + public static UpdateMetadataObjIdRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateMetadataObjIdRequest.class); + } + + /** + * Convert an instance of UpdateMetadataObjIdRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java index 0374c1980..648fe3e5b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java @@ -4,401 +4,375 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Input for updating object ID of a metadata object. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateObjIdInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nullable - private String metadataIdentifier; - - /** Type of metadata. Required if metadata_identifier is name of the object. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ANSWER("ANSWER"), - - LOGICAL_TABLE("LOGICAL_TABLE"), - - LOGICAL_COLUMN("LOGICAL_COLUMN"), - - LIVEBOARD("LIVEBOARD"), - - ACTION_OBJECT("ACTION_OBJECT"), - - DATA_SOURCE("DATA_SOURCE"), - - USER("USER"), - - USER_GROUP("USER_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_CURRENT_OBJ_ID = "current_obj_id"; - - @SerializedName(SERIALIZED_NAME_CURRENT_OBJ_ID) - @javax.annotation.Nullable - private String currentObjId; - - public static final String SERIALIZED_NAME_NEW_OBJ_ID = "new_obj_id"; - - @SerializedName(SERIALIZED_NAME_NEW_OBJ_ID) - @javax.annotation.Nonnull - private String newObjId; - public UpdateObjIdInput() {} - - public UpdateObjIdInput metadataIdentifier( - @javax.annotation.Nullable String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } - - /** - * GUID or name of the metadata object. - * - * @return metadataIdentifier - */ - @javax.annotation.Nullable - public String getMetadataIdentifier() { - return metadataIdentifier; - } - - public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } - - public UpdateObjIdInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of metadata. Required if metadata_identifier is name of the object. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - public UpdateObjIdInput currentObjId(@javax.annotation.Nullable String currentObjId) { - this.currentObjId = currentObjId; - return this; - } - - /** - * Current object ID value. - * - * @return currentObjId - */ - @javax.annotation.Nullable - public String getCurrentObjId() { - return currentObjId; - } - - public void setCurrentObjId(@javax.annotation.Nullable String currentObjId) { - this.currentObjId = currentObjId; - } +import com.thoughtspot.client.JSON; - public UpdateObjIdInput newObjId(@javax.annotation.Nonnull String newObjId) { - this.newObjId = newObjId; - return this; +/** + * Input for updating object ID of a metadata object. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateObjIdInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nullable + private String metadataIdentifier; + + /** + * Type of metadata. Required if metadata_identifier is name of the object. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + LIVEBOARD("LIVEBOARD"), + + ACTION_OBJECT("ACTION_OBJECT"), + + DATA_SOURCE("DATA_SOURCE"), + + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * New object ID value to set. - * - * @return newObjId - */ - @javax.annotation.Nonnull - public String getNewObjId() { - return newObjId; + public String getValue() { + return value; } - public void setNewObjId(@javax.annotation.Nonnull String newObjId) { - this.newObjId = newObjId; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateObjIdInput updateObjIdInput = (UpdateObjIdInput) o; - return Objects.equals(this.metadataIdentifier, updateObjIdInput.metadataIdentifier) - && Objects.equals(this.type, updateObjIdInput.type) - && Objects.equals(this.currentObjId, updateObjIdInput.currentObjId) - && Objects.equals(this.newObjId, updateObjIdInput.newObjId); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(metadataIdentifier, type, currentObjId, newObjId); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_CURRENT_OBJ_ID = "current_obj_id"; + @SerializedName(SERIALIZED_NAME_CURRENT_OBJ_ID) + @javax.annotation.Nullable + private String currentObjId; + + public static final String SERIALIZED_NAME_NEW_OBJ_ID = "new_obj_id"; + @SerializedName(SERIALIZED_NAME_NEW_OBJ_ID) + @javax.annotation.Nonnull + private String newObjId; + + public UpdateObjIdInput() { + } + + public UpdateObjIdInput metadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the metadata object. + * @return metadataIdentifier + */ + @javax.annotation.Nullable + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public UpdateObjIdInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if metadata_identifier is name of the object. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public UpdateObjIdInput currentObjId(@javax.annotation.Nullable String currentObjId) { + this.currentObjId = currentObjId; + return this; + } + + /** + * Current object ID value. + * @return currentObjId + */ + @javax.annotation.Nullable + public String getCurrentObjId() { + return currentObjId; + } + + public void setCurrentObjId(@javax.annotation.Nullable String currentObjId) { + this.currentObjId = currentObjId; + } + + + public UpdateObjIdInput newObjId(@javax.annotation.Nonnull String newObjId) { + this.newObjId = newObjId; + return this; + } + + /** + * New object ID value to set. + * @return newObjId + */ + @javax.annotation.Nonnull + public String getNewObjId() { + return newObjId; + } + + public void setNewObjId(@javax.annotation.Nonnull String newObjId) { + this.newObjId = newObjId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateObjIdInput {\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" currentObjId: ").append(toIndentedString(currentObjId)).append("\n"); - sb.append(" newObjId: ").append(toIndentedString(newObjId)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UpdateObjIdInput updateObjIdInput = (UpdateObjIdInput) o; + return Objects.equals(this.metadataIdentifier, updateObjIdInput.metadataIdentifier) && + Objects.equals(this.type, updateObjIdInput.type) && + Objects.equals(this.currentObjId, updateObjIdInput.currentObjId) && + Objects.equals(this.newObjId, updateObjIdInput.newObjId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, type, currentObjId, newObjId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metadata_identifier"); - openapiFields.add("type"); - openapiFields.add("current_obj_id"); - openapiFields.add("new_obj_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("new_obj_id"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateObjIdInput {\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" currentObjId: ").append(toIndentedString(currentObjId)).append("\n"); + sb.append(" newObjId: ").append(toIndentedString(newObjId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateObjIdInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateObjIdInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateObjIdInput is not found in the" - + " empty JSON string", - UpdateObjIdInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("type"); + openapiFields.add("current_obj_id"); + openapiFields.add("new_obj_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("new_obj_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateObjIdInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateObjIdInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateObjIdInput is not found in the empty JSON string", UpdateObjIdInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateObjIdInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateObjIdInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateObjIdInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateObjIdInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateObjIdInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateObjIdInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metadata_identifier") != null - && !jsonObj.get("metadata_identifier").isJsonNull()) - && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("current_obj_id") != null && !jsonObj.get("current_obj_id").isJsonNull()) - && !jsonObj.get("current_obj_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `current_obj_id` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("current_obj_id").toString())); - } - if (!jsonObj.get("new_obj_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `new_obj_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("new_obj_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateObjIdInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateObjIdInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateObjIdInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateObjIdInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateObjIdInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateObjIdInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateObjIdInput - * @throws IOException if the JSON string is invalid with respect to UpdateObjIdInput - */ - public static UpdateObjIdInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateObjIdInput.class); - } - - /** - * Convert an instance of UpdateObjIdInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("metadata_identifier") != null && !jsonObj.get("metadata_identifier").isJsonNull()) && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("current_obj_id") != null && !jsonObj.get("current_obj_id").isJsonNull()) && !jsonObj.get("current_obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `current_obj_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("current_obj_id").toString())); + } + if (!jsonObj.get("new_obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `new_obj_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("new_obj_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateObjIdInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateObjIdInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateObjIdInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateObjIdInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateObjIdInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateObjIdInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateObjIdInput + * @throws IOException if the JSON string is invalid with respect to UpdateObjIdInput + */ + public static UpdateObjIdInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateObjIdInput.class); + } + + /** + * Convert an instance of UpdateObjIdInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java index bbd4b0aa8..c04a8f816 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java @@ -4,419 +4,395 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateOrgRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateOrgRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - /** Type of update operation. Default operation type is ADD */ - @JsonAdapter(OperationEnum.Adapter.class) - public enum OperationEnum { - ADD("ADD"), - - REMOVE("REMOVE"), - - REPLACE("REPLACE"); - - private String value; - - OperationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperationEnum fromValue(String value) { - for (OperationEnum b : OperationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperationEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperationEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_OPERATION = "operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - @javax.annotation.Nullable - private OperationEnum operation = OperationEnum.ADD; - - public UpdateOrgRequest() {} - - public UpdateOrgRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the Org - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateOrgRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the Org - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public UpdateOrgRequest userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; - } - - public UpdateOrgRequest addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); - } - this.userIdentifiers.add(userIdentifiersItem); - return this; - } +import com.thoughtspot.client.JSON; - /** - * Add Users to an Org - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; +/** + * UpdateOrgRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateOrgRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** + * Type of update operation. Default operation type is ADD + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; } - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; + public String getValue() { + return value; } - public UpdateOrgRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateOrgRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; - } - - /** - * Add Default Groups to an Org - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; + 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 UpdateOrgRequest operation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - return this; - } - - /** - * Type of update operation. Default operation type is ADD - * - * @return operation - */ - @javax.annotation.Nullable - public OperationEnum getOperation() { - return operation; - } - - public void setOperation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateOrgRequest updateOrgRequest = (UpdateOrgRequest) o; - return Objects.equals(this.name, updateOrgRequest.name) - && Objects.equals(this.description, updateOrgRequest.description) - && Objects.equals(this.userIdentifiers, updateOrgRequest.userIdentifiers) - && Objects.equals(this.groupIdentifiers, updateOrgRequest.groupIdentifiers) - && Objects.equals(this.operation, updateOrgRequest.operation); + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.ADD; + + public UpdateOrgRequest() { + } + + public UpdateOrgRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the Org + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateOrgRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateOrgRequest userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public UpdateOrgRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); } - - @Override - public int hashCode() { - return Objects.hash(name, description, userIdentifiers, groupIdentifiers, operation); + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Add Users to an Org + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + + public UpdateOrgRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public UpdateOrgRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateOrgRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append("}"); - return sb.toString(); + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Add Default Groups to an Org + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public UpdateOrgRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is ADD + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("user_identifiers"); - openapiFields.add("group_identifiers"); - openapiFields.add("operation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + UpdateOrgRequest updateOrgRequest = (UpdateOrgRequest) o; + return Objects.equals(this.name, updateOrgRequest.name) && + Objects.equals(this.description, updateOrgRequest.description) && + Objects.equals(this.userIdentifiers, updateOrgRequest.userIdentifiers) && + Objects.equals(this.groupIdentifiers, updateOrgRequest.groupIdentifiers) && + Objects.equals(this.operation, updateOrgRequest.operation); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, userIdentifiers, groupIdentifiers, operation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateOrgRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateOrgRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateOrgRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateOrgRequest is not found in the" - + " empty JSON string", - UpdateOrgRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("user_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateOrgRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateOrgRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateOrgRequest is not found in the empty JSON string", UpdateOrgRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateOrgRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateOrgRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateOrgRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateOrgRequest` 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())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) - && !jsonObj.get("operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operation").toString())); - } - // validate the optional field `operation` - if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { - OperationEnum.validateJsonElement(jsonObj.get("operation")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateOrgRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateOrgRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateOrgRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateOrgRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateOrgRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateOrgRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateOrgRequest - * @throws IOException if the JSON string is invalid with respect to UpdateOrgRequest - */ - public static UpdateOrgRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateOrgRequest.class); - } - - /** - * Convert an instance of UpdateOrgRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateOrgRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateOrgRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateOrgRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateOrgRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateOrgRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateOrgRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateOrgRequest + * @throws IOException if the JSON string is invalid with respect to UpdateOrgRequest + */ + public static UpdateOrgRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateOrgRequest.class); + } + + /** + * Convert an instance of UpdateOrgRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java index d29956f54..5d1e7b693 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 @@ -4,406 +4,396 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateRoleRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateRoleRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - BYPASSRLS("BYPASSRLS"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - DEVELOPER("DEVELOPER"), - - APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - ORG_ADMINISTRATION("ORG_ADMINISTRATION"), - - ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), - - AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), - - BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), - - CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), - - TAGMANAGEMENT("TAGMANAGEMENT"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), - - CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), - - CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public UpdateRoleRequest() {} - - public UpdateRoleRequest name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Name of the Role. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; +/** + * UpdateRoleRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateRoleRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + BYPASSRLS("BYPASSRLS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; } - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; + public String getValue() { + return value; } - public UpdateRoleRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Description of the Role. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public UpdateRoleRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } - - public UpdateRoleRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); - } - this.privileges.add(privilegesItem); - return this; + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public UpdateRoleRequest() { + } + + public UpdateRoleRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the Role. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public UpdateRoleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Role. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateRoleRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public UpdateRoleRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); } + this.privileges.add(privilegesItem); + return this; + } - /** - * Privileges granted to the role. See - * [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for - * supported roles privileges. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } + /** + * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; - } + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRoleRequest updateRoleRequest = (UpdateRoleRequest) o; - return Objects.equals(this.name, updateRoleRequest.name) - && Objects.equals(this.description, updateRoleRequest.description) - && Objects.equals(this.privileges, updateRoleRequest.privileges); - } - @Override - public int hashCode() { - return Objects.hash(name, description, privileges); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRoleRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("privileges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + UpdateRoleRequest updateRoleRequest = (UpdateRoleRequest) o; + return Objects.equals(this.name, updateRoleRequest.name) && + Objects.equals(this.description, updateRoleRequest.description) && + Objects.equals(this.privileges, updateRoleRequest.privileges); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, privileges); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRoleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateRoleRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateRoleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateRoleRequest is not found in the" - + " empty JSON string", - UpdateRoleRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("privileges"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateRoleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateRoleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateRoleRequest is not found in the empty JSON string", UpdateRoleRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateRoleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateRoleRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateRoleRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateRoleRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateRoleRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateRoleRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateRoleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateRoleRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateRoleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateRoleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateRoleRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateRoleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateRoleRequest - * @throws IOException if the JSON string is invalid with respect to UpdateRoleRequest - */ - public static UpdateRoleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateRoleRequest.class); - } - - /** - * Convert an instance of UpdateRoleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateRoleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateRoleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateRoleRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateRoleRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateRoleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateRoleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateRoleRequest + * @throws IOException if the JSON string is invalid with respect to UpdateRoleRequest + */ + public static UpdateRoleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateRoleRequest.class); + } + + /** + * Convert an instance of UpdateRoleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java index bbdea6e75..2a940ecb3 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java @@ -4,2081 +4,2015 @@ package com.thoughtspot.client.model; -import com.google.gson.Gson; -import 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; - -/** UpdateScheduleRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateScheduleRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - /** Type of metadata object. */ - @JsonAdapter(MetadataTypeEnum.Adapter.class) - public enum MetadataTypeEnum { - LIVEBOARD("LIVEBOARD"); - - private String value; - - MetadataTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MetadataTypeEnum fromValue(String value) { - for (MetadataTypeEnum b : MetadataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MetadataTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - MetadataTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; - - @SerializedName(SERIALIZED_NAME_METADATA_TYPE) - @javax.annotation.Nullable - private MetadataTypeEnum metadataType; - - public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; - - @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) - @javax.annotation.Nullable - private String metadataIdentifier; - - /** Export file format. */ - @JsonAdapter(FileFormatEnum.Adapter.class) - public enum FileFormatEnum { - CSV("CSV"), - - PDF("PDF"), - - XLSX("XLSX"); - - private String value; - - FileFormatEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FileFormatEnum fromValue(String value) { - for (FileFormatEnum b : FileFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FileFormatEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FileFormatEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FileFormatEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; - - @SerializedName(SERIALIZED_NAME_FILE_FORMAT) - @javax.annotation.Nullable - private FileFormatEnum fileFormat; - - public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; - - @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) - @javax.annotation.Nullable - private LiveboardOptionsInput liveboardOptions; - - public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; - - @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) - @javax.annotation.Nullable - private SchedulesPdfOptionsInput pdfOptions; - - /** Time zone */ - @JsonAdapter(TimeZoneEnum.Adapter.class) - public enum TimeZoneEnum { - AFRICA_ABIDJAN("Africa/Abidjan"), - - AFRICA_ACCRA("Africa/Accra"), - - AFRICA_ADDIS_ABABA("Africa/Addis_Ababa"), - - AFRICA_ALGIERS("Africa/Algiers"), - - AFRICA_ASMARA("Africa/Asmara"), - - AFRICA_ASMERA("Africa/Asmera"), - - AFRICA_BAMAKO("Africa/Bamako"), - - AFRICA_BANGUI("Africa/Bangui"), - - AFRICA_BANJUL("Africa/Banjul"), - - AFRICA_BISSAU("Africa/Bissau"), - - AFRICA_BLANTYRE("Africa/Blantyre"), - - AFRICA_BRAZZAVILLE("Africa/Brazzaville"), - - AFRICA_BUJUMBURA("Africa/Bujumbura"), - - AFRICA_CAIRO("Africa/Cairo"), - - AFRICA_CASABLANCA("Africa/Casablanca"), - - AFRICA_CEUTA("Africa/Ceuta"), - - AFRICA_CONAKRY("Africa/Conakry"), - - AFRICA_DAKAR("Africa/Dakar"), - - AFRICA_DAR_ES_SALAAM("Africa/Dar_es_Salaam"), - - AFRICA_DJIBOUTI("Africa/Djibouti"), - - AFRICA_DOUALA("Africa/Douala"), - - AFRICA_EL_AAIUN("Africa/El_Aaiun"), - - AFRICA_FREETOWN("Africa/Freetown"), - - AFRICA_GABORONE("Africa/Gaborone"), - - AFRICA_HARARE("Africa/Harare"), - - AFRICA_JOHANNESBURG("Africa/Johannesburg"), - - AFRICA_JUBA("Africa/Juba"), - - AFRICA_KAMPALA("Africa/Kampala"), - - AFRICA_KHARTOUM("Africa/Khartoum"), - - AFRICA_KIGALI("Africa/Kigali"), - - AFRICA_KINSHASA("Africa/Kinshasa"), - - AFRICA_LAGOS("Africa/Lagos"), - - AFRICA_LIBREVILLE("Africa/Libreville"), - - AFRICA_LOME("Africa/Lome"), - - AFRICA_LUANDA("Africa/Luanda"), - - AFRICA_LUBUMBASHI("Africa/Lubumbashi"), - - AFRICA_LUSAKA("Africa/Lusaka"), - - AFRICA_MALABO("Africa/Malabo"), - - AFRICA_MAPUTO("Africa/Maputo"), - - AFRICA_MASERU("Africa/Maseru"), - - AFRICA_MBABANE("Africa/Mbabane"), - - AFRICA_MOGADISHU("Africa/Mogadishu"), - - AFRICA_MONROVIA("Africa/Monrovia"), - - AFRICA_NAIROBI("Africa/Nairobi"), - - AFRICA_NDJAMENA("Africa/Ndjamena"), - - AFRICA_NIAMEY("Africa/Niamey"), - - AFRICA_NOUAKCHOTT("Africa/Nouakchott"), - - AFRICA_OUAGADOUGOU("Africa/Ouagadougou"), - - AFRICA_PORTO_NOVO("Africa/Porto-Novo"), - - AFRICA_SAO_TOME("Africa/Sao_Tome"), - - AFRICA_TIMBUKTU("Africa/Timbuktu"), - - AFRICA_TRIPOLI("Africa/Tripoli"), - - AFRICA_TUNIS("Africa/Tunis"), - - AFRICA_WINDHOEK("Africa/Windhoek"), - - AMERICA_ADAK("America/Adak"), - - AMERICA_ANCHORAGE("America/Anchorage"), - - AMERICA_ANGUILLA("America/Anguilla"), - - AMERICA_ANTIGUA("America/Antigua"), - - AMERICA_ARAGUAINA("America/Araguaina"), - - AMERICA_ARGENTINA_BUENOS_AIRES("America/Argentina/Buenos_Aires"), - - AMERICA_ARGENTINA_CATAMARCA("America/Argentina/Catamarca"), - - AMERICA_ARGENTINA_COMOD_RIVADAVIA("America/Argentina/ComodRivadavia"), - - AMERICA_ARGENTINA_CORDOBA("America/Argentina/Cordoba"), - - AMERICA_ARGENTINA_JUJUY("America/Argentina/Jujuy"), - - AMERICA_ARGENTINA_LA_RIOJA("America/Argentina/La_Rioja"), - - AMERICA_ARGENTINA_MENDOZA("America/Argentina/Mendoza"), - - AMERICA_ARGENTINA_RIO_GALLEGOS("America/Argentina/Rio_Gallegos"), - - AMERICA_ARGENTINA_SALTA("America/Argentina/Salta"), - - AMERICA_ARGENTINA_SAN_JUAN("America/Argentina/San_Juan"), - - AMERICA_ARGENTINA_SAN_LUIS("America/Argentina/San_Luis"), - - AMERICA_ARGENTINA_TUCUMAN("America/Argentina/Tucuman"), - - AMERICA_ARGENTINA_USHUAIA("America/Argentina/Ushuaia"), - - AMERICA_ARUBA("America/Aruba"), - - AMERICA_ASUNCION("America/Asuncion"), - - AMERICA_ATIKOKAN("America/Atikokan"), - - AMERICA_ATKA("America/Atka"), - - AMERICA_BAHIA("America/Bahia"), - - AMERICA_BAHIA_BANDERAS("America/Bahia_Banderas"), - - AMERICA_BARBADOS("America/Barbados"), - - AMERICA_BELEM("America/Belem"), - - AMERICA_BELIZE("America/Belize"), - - AMERICA_BLANC_SABLON("America/Blanc-Sablon"), - - AMERICA_BOA_VISTA("America/Boa_Vista"), - - AMERICA_BOGOTA("America/Bogota"), - - AMERICA_BOISE("America/Boise"), - - AMERICA_BUENOS_AIRES("America/Buenos_Aires"), - - AMERICA_CAMBRIDGE_BAY("America/Cambridge_Bay"), - - AMERICA_CAMPO_GRANDE("America/Campo_Grande"), - - AMERICA_CANCUN("America/Cancun"), - - AMERICA_CARACAS("America/Caracas"), - - AMERICA_CATAMARCA("America/Catamarca"), - - AMERICA_CAYENNE("America/Cayenne"), - - AMERICA_CAYMAN("America/Cayman"), - - AMERICA_CHICAGO("America/Chicago"), - - AMERICA_CHIHUAHUA("America/Chihuahua"), - - AMERICA_CORAL_HARBOUR("America/Coral_Harbour"), - - AMERICA_CORDOBA("America/Cordoba"), - - AMERICA_COSTA_RICA("America/Costa_Rica"), - - AMERICA_CRESTON("America/Creston"), - - AMERICA_CUIABA("America/Cuiaba"), - - AMERICA_CURACAO("America/Curacao"), - - AMERICA_DANMARKSHAVN("America/Danmarkshavn"), - - AMERICA_DAWSON("America/Dawson"), - - AMERICA_DAWSON_CREEK("America/Dawson_Creek"), - - AMERICA_DENVER("America/Denver"), - - AMERICA_DETROIT("America/Detroit"), - - AMERICA_DOMINICA("America/Dominica"), - - AMERICA_EDMONTON("America/Edmonton"), - - AMERICA_EIRUNEPE("America/Eirunepe"), - - AMERICA_EL_SALVADOR("America/El_Salvador"), - - AMERICA_ENSENADA("America/Ensenada"), - - AMERICA_FORT_NELSON("America/Fort_Nelson"), - - AMERICA_FORT_WAYNE("America/Fort_Wayne"), - - AMERICA_FORTALEZA("America/Fortaleza"), - - AMERICA_GLACE_BAY("America/Glace_Bay"), - - AMERICA_GODTHAB("America/Godthab"), - - AMERICA_GOOSE_BAY("America/Goose_Bay"), - - AMERICA_GRAND_TURK("America/Grand_Turk"), - - AMERICA_GRENADA("America/Grenada"), - - AMERICA_GUADELOUPE("America/Guadeloupe"), - - AMERICA_GUATEMALA("America/Guatemala"), - - AMERICA_GUAYAQUIL("America/Guayaquil"), - - AMERICA_GUYANA("America/Guyana"), - - AMERICA_HALIFAX("America/Halifax"), - - AMERICA_HAVANA("America/Havana"), - - AMERICA_HERMOSILLO("America/Hermosillo"), - - AMERICA_INDIANA_INDIANAPOLIS("America/Indiana/Indianapolis"), - - AMERICA_INDIANA_KNOX("America/Indiana/Knox"), - - AMERICA_INDIANA_MARENGO("America/Indiana/Marengo"), - - AMERICA_INDIANA_PETERSBURG("America/Indiana/Petersburg"), - - AMERICA_INDIANA_TELL_CITY("America/Indiana/Tell_City"), - - AMERICA_INDIANA_VEVAY("America/Indiana/Vevay"), - - AMERICA_INDIANA_VINCENNES("America/Indiana/Vincennes"), - - AMERICA_INDIANA_WINAMAC("America/Indiana/Winamac"), - - AMERICA_INDIANAPOLIS("America/Indianapolis"), - - AMERICA_INUVIK("America/Inuvik"), - - AMERICA_IQALUIT("America/Iqaluit"), - - AMERICA_JAMAICA("America/Jamaica"), - - AMERICA_JUJUY("America/Jujuy"), - - AMERICA_JUNEAU("America/Juneau"), - - AMERICA_KENTUCKY_LOUISVILLE("America/Kentucky/Louisville"), - - AMERICA_KENTUCKY_MONTICELLO("America/Kentucky/Monticello"), - - AMERICA_KNOX_IN("America/Knox_IN"), - - AMERICA_KRALENDIJK("America/Kralendijk"), - - AMERICA_LA_PAZ("America/La_Paz"), - - AMERICA_LIMA("America/Lima"), - - AMERICA_LOS_ANGELES("America/Los_Angeles"), - - AMERICA_LOUISVILLE("America/Louisville"), - - AMERICA_LOWER_PRINCES("America/Lower_Princes"), - - AMERICA_MACEIO("America/Maceio"), - - AMERICA_MANAGUA("America/Managua"), - - AMERICA_MANAUS("America/Manaus"), - - AMERICA_MARIGOT("America/Marigot"), - - AMERICA_MARTINIQUE("America/Martinique"), - - AMERICA_MATAMOROS("America/Matamoros"), - - AMERICA_MAZATLAN("America/Mazatlan"), - - AMERICA_MENDOZA("America/Mendoza"), - - AMERICA_MENOMINEE("America/Menominee"), - - AMERICA_MERIDA("America/Merida"), - - AMERICA_METLAKATLA("America/Metlakatla"), - - AMERICA_MEXICO_CITY("America/Mexico_City"), - - AMERICA_MIQUELON("America/Miquelon"), - - AMERICA_MONCTON("America/Moncton"), - - AMERICA_MONTERREY("America/Monterrey"), - - AMERICA_MONTEVIDEO("America/Montevideo"), - - AMERICA_MONTREAL("America/Montreal"), - - AMERICA_MONTSERRAT("America/Montserrat"), - - AMERICA_NASSAU("America/Nassau"), - - AMERICA_NEW_YORK("America/New_York"), - - AMERICA_NIPIGON("America/Nipigon"), - - AMERICA_NOME("America/Nome"), - - AMERICA_NORONHA("America/Noronha"), - - AMERICA_NORTH_DAKOTA_BEULAH("America/North_Dakota/Beulah"), - - AMERICA_NORTH_DAKOTA_CENTER("America/North_Dakota/Center"), - - AMERICA_NORTH_DAKOTA_NEW_SALEM("America/North_Dakota/New_Salem"), - - AMERICA_NUUK("America/Nuuk"), - - AMERICA_OJINAGA("America/Ojinaga"), - - AMERICA_PANAMA("America/Panama"), - - AMERICA_PANGNIRTUNG("America/Pangnirtung"), - - AMERICA_PARAMARIBO("America/Paramaribo"), - - AMERICA_PHOENIX("America/Phoenix"), - - AMERICA_PORT_AU_PRINCE("America/Port-au-Prince"), - - AMERICA_PORT_OF_SPAIN("America/Port_of_Spain"), - - AMERICA_PORTO_ACRE("America/Porto_Acre"), - - AMERICA_PORTO_VELHO("America/Porto_Velho"), - - AMERICA_PUERTO_RICO("America/Puerto_Rico"), - - AMERICA_PUNTA_ARENAS("America/Punta_Arenas"), - - AMERICA_RAINY_RIVER("America/Rainy_River"), - - AMERICA_RANKIN_INLET("America/Rankin_Inlet"), - - AMERICA_RECIFE("America/Recife"), - - AMERICA_REGINA("America/Regina"), - - AMERICA_RESOLUTE("America/Resolute"), - - AMERICA_RIO_BRANCO("America/Rio_Branco"), - - AMERICA_ROSARIO("America/Rosario"), - - AMERICA_SANTA_ISABEL("America/Santa_Isabel"), - - AMERICA_SANTAREM("America/Santarem"), - - AMERICA_SANTIAGO("America/Santiago"), - - AMERICA_SANTO_DOMINGO("America/Santo_Domingo"), - - AMERICA_SAO_PAULO("America/Sao_Paulo"), - - AMERICA_SCORESBYSUND("America/Scoresbysund"), - - AMERICA_SHIPROCK("America/Shiprock"), - - AMERICA_SITKA("America/Sitka"), - - AMERICA_ST_BARTHELEMY("America/St_Barthelemy"), - - AMERICA_ST_JOHNS("America/St_Johns"), - - AMERICA_ST_KITTS("America/St_Kitts"), - - AMERICA_ST_LUCIA("America/St_Lucia"), - - AMERICA_ST_THOMAS("America/St_Thomas"), - - AMERICA_ST_VINCENT("America/St_Vincent"), - - AMERICA_SWIFT_CURRENT("America/Swift_Current"), - - AMERICA_TEGUCIGALPA("America/Tegucigalpa"), - - AMERICA_THULE("America/Thule"), - - AMERICA_THUNDER_BAY("America/Thunder_Bay"), - - AMERICA_TIJUANA("America/Tijuana"), - - AMERICA_TORONTO("America/Toronto"), - - AMERICA_TORTOLA("America/Tortola"), - - AMERICA_VANCOUVER("America/Vancouver"), - - AMERICA_VIRGIN("America/Virgin"), - - AMERICA_WHITEHORSE("America/Whitehorse"), - - AMERICA_WINNIPEG("America/Winnipeg"), - - AMERICA_YAKUTAT("America/Yakutat"), - - AMERICA_YELLOWKNIFE("America/Yellowknife"), - - ANTARCTICA_CASEY("Antarctica/Casey"), - - ANTARCTICA_DAVIS("Antarctica/Davis"), - - ANTARCTICA_DUMONT_D_URVILLE("Antarctica/DumontDUrville"), - - ANTARCTICA_MACQUARIE("Antarctica/Macquarie"), - - ANTARCTICA_MAWSON("Antarctica/Mawson"), - - ANTARCTICA_MC_MURDO("Antarctica/McMurdo"), - - ANTARCTICA_PALMER("Antarctica/Palmer"), - - ANTARCTICA_ROTHERA("Antarctica/Rothera"), - - ANTARCTICA_SOUTH_POLE("Antarctica/South_Pole"), - - ANTARCTICA_SYOWA("Antarctica/Syowa"), - - ANTARCTICA_TROLL("Antarctica/Troll"), - - ANTARCTICA_VOSTOK("Antarctica/Vostok"), - - ARCTIC_LONGYEARBYEN("Arctic/Longyearbyen"), - - ASIA_ADEN("Asia/Aden"), - - ASIA_ALMATY("Asia/Almaty"), - - ASIA_AMMAN("Asia/Amman"), - - ASIA_ANADYR("Asia/Anadyr"), - - ASIA_AQTAU("Asia/Aqtau"), - - ASIA_AQTOBE("Asia/Aqtobe"), - - ASIA_ASHGABAT("Asia/Ashgabat"), - - ASIA_ASHKHABAD("Asia/Ashkhabad"), - - ASIA_ATYRAU("Asia/Atyrau"), - - ASIA_BAGHDAD("Asia/Baghdad"), - - ASIA_BAHRAIN("Asia/Bahrain"), - - ASIA_BAKU("Asia/Baku"), - - ASIA_BANGKOK("Asia/Bangkok"), - - ASIA_BARNAUL("Asia/Barnaul"), - - ASIA_BEIRUT("Asia/Beirut"), - - ASIA_BISHKEK("Asia/Bishkek"), - - ASIA_BRUNEI("Asia/Brunei"), - - ASIA_CALCUTTA("Asia/Calcutta"), - - ASIA_CHITA("Asia/Chita"), - - ASIA_CHOIBALSAN("Asia/Choibalsan"), - - ASIA_CHONGQING("Asia/Chongqing"), - - ASIA_CHUNGKING("Asia/Chungking"), - - ASIA_COLOMBO("Asia/Colombo"), - - ASIA_DACCA("Asia/Dacca"), - - ASIA_DAMASCUS("Asia/Damascus"), - - ASIA_DHAKA("Asia/Dhaka"), - - ASIA_DILI("Asia/Dili"), - - ASIA_DUBAI("Asia/Dubai"), - - ASIA_DUSHANBE("Asia/Dushanbe"), - - ASIA_FAMAGUSTA("Asia/Famagusta"), - - ASIA_GAZA("Asia/Gaza"), - - ASIA_HARBIN("Asia/Harbin"), - - ASIA_HEBRON("Asia/Hebron"), - - ASIA_HO_CHI_MINH("Asia/Ho_Chi_Minh"), - - ASIA_HONG_KONG("Asia/Hong_Kong"), - - ASIA_HOVD("Asia/Hovd"), - - ASIA_IRKUTSK("Asia/Irkutsk"), - - ASIA_ISTANBUL("Asia/Istanbul"), - - ASIA_JAKARTA("Asia/Jakarta"), - - ASIA_JAYAPURA("Asia/Jayapura"), - - ASIA_JERUSALEM("Asia/Jerusalem"), - - ASIA_KABUL("Asia/Kabul"), - - ASIA_KAMCHATKA("Asia/Kamchatka"), - - ASIA_KARACHI("Asia/Karachi"), - - ASIA_KASHGAR("Asia/Kashgar"), - - ASIA_KATHMANDU("Asia/Kathmandu"), - - ASIA_KATMANDU("Asia/Katmandu"), - - ASIA_KHANDYGA("Asia/Khandyga"), - - ASIA_KOLKATA("Asia/Kolkata"), - - ASIA_KRASNOYARSK("Asia/Krasnoyarsk"), - - ASIA_KUALA_LUMPUR("Asia/Kuala_Lumpur"), - - ASIA_KUCHING("Asia/Kuching"), - - ASIA_KUWAIT("Asia/Kuwait"), - - ASIA_MACAO("Asia/Macao"), - - ASIA_MACAU("Asia/Macau"), - - ASIA_MAGADAN("Asia/Magadan"), - - ASIA_MAKASSAR("Asia/Makassar"), - - ASIA_MANILA("Asia/Manila"), - - ASIA_MUSCAT("Asia/Muscat"), - - ASIA_NICOSIA("Asia/Nicosia"), - - ASIA_NOVOKUZNETSK("Asia/Novokuznetsk"), - - ASIA_NOVOSIBIRSK("Asia/Novosibirsk"), - - ASIA_OMSK("Asia/Omsk"), - - ASIA_ORAL("Asia/Oral"), - - ASIA_PHNOM_PENH("Asia/Phnom_Penh"), - - ASIA_PONTIANAK("Asia/Pontianak"), - - ASIA_PYONGYANG("Asia/Pyongyang"), - - ASIA_QATAR("Asia/Qatar"), - - ASIA_QOSTANAY("Asia/Qostanay"), - - ASIA_QYZYLORDA("Asia/Qyzylorda"), - - ASIA_RANGOON("Asia/Rangoon"), - - ASIA_RIYADH("Asia/Riyadh"), - - ASIA_SAIGON("Asia/Saigon"), - - ASIA_SAKHALIN("Asia/Sakhalin"), - - ASIA_SAMARKAND("Asia/Samarkand"), - - ASIA_SEOUL("Asia/Seoul"), - - ASIA_SHANGHAI("Asia/Shanghai"), - - ASIA_SINGAPORE("Asia/Singapore"), - - ASIA_SREDNEKOLYMSK("Asia/Srednekolymsk"), - - ASIA_TAIPEI("Asia/Taipei"), - - ASIA_TASHKENT("Asia/Tashkent"), - - ASIA_TBILISI("Asia/Tbilisi"), - - ASIA_TEHRAN("Asia/Tehran"), - - ASIA_TEL_AVIV("Asia/Tel_Aviv"), - - ASIA_THIMBU("Asia/Thimbu"), - - ASIA_THIMPHU("Asia/Thimphu"), - - ASIA_TOKYO("Asia/Tokyo"), - - ASIA_TOMSK("Asia/Tomsk"), - - ASIA_UJUNG_PANDANG("Asia/Ujung_Pandang"), - - ASIA_ULAANBAATAR("Asia/Ulaanbaatar"), - - ASIA_ULAN_BATOR("Asia/Ulan_Bator"), - - ASIA_URUMQI("Asia/Urumqi"), - - ASIA_UST_NERA("Asia/Ust-Nera"), - - ASIA_VIENTIANE("Asia/Vientiane"), - - ASIA_VLADIVOSTOK("Asia/Vladivostok"), - - ASIA_YAKUTSK("Asia/Yakutsk"), - - ASIA_YANGON("Asia/Yangon"), - - ASIA_YEKATERINBURG("Asia/Yekaterinburg"), - - ASIA_YEREVAN("Asia/Yerevan"), - - ATLANTIC_AZORES("Atlantic/Azores"), - - ATLANTIC_BERMUDA("Atlantic/Bermuda"), - - ATLANTIC_CANARY("Atlantic/Canary"), - - ATLANTIC_CAPE_VERDE("Atlantic/Cape_Verde"), - - ATLANTIC_FAEROE("Atlantic/Faeroe"), - - ATLANTIC_FAROE("Atlantic/Faroe"), - - ATLANTIC_JAN_MAYEN("Atlantic/Jan_Mayen"), - - ATLANTIC_MADEIRA("Atlantic/Madeira"), - - ATLANTIC_REYKJAVIK("Atlantic/Reykjavik"), - - ATLANTIC_SOUTH_GEORGIA("Atlantic/South_Georgia"), - - ATLANTIC_ST_HELENA("Atlantic/St_Helena"), - - ATLANTIC_STANLEY("Atlantic/Stanley"), - - AUSTRALIA_ACT("Australia/ACT"), - - AUSTRALIA_ADELAIDE("Australia/Adelaide"), - - AUSTRALIA_BRISBANE("Australia/Brisbane"), - - AUSTRALIA_BROKEN_HILL("Australia/Broken_Hill"), - - AUSTRALIA_CANBERRA("Australia/Canberra"), - - AUSTRALIA_CURRIE("Australia/Currie"), - - AUSTRALIA_DARWIN("Australia/Darwin"), - - AUSTRALIA_EUCLA("Australia/Eucla"), - - AUSTRALIA_HOBART("Australia/Hobart"), - - AUSTRALIA_LHI("Australia/LHI"), - - AUSTRALIA_LINDEMAN("Australia/Lindeman"), - - AUSTRALIA_LORD_HOWE("Australia/Lord_Howe"), - - AUSTRALIA_MELBOURNE("Australia/Melbourne"), - - AUSTRALIA_NSW("Australia/NSW"), - - AUSTRALIA_NORTH("Australia/North"), - - AUSTRALIA_PERTH("Australia/Perth"), - - AUSTRALIA_QUEENSLAND("Australia/Queensland"), - - AUSTRALIA_SOUTH("Australia/South"), - - AUSTRALIA_SYDNEY("Australia/Sydney"), - - AUSTRALIA_TASMANIA("Australia/Tasmania"), - - AUSTRALIA_VICTORIA("Australia/Victoria"), - - AUSTRALIA_WEST("Australia/West"), - - AUSTRALIA_YANCOWINNA("Australia/Yancowinna"), - - BRAZIL_ACRE("Brazil/Acre"), - - BRAZIL_DE_NORONHA("Brazil/DeNoronha"), - - BRAZIL_EAST("Brazil/East"), - - BRAZIL_WEST("Brazil/West"), - - CET("CET"), - - CST6_CDT("CST6CDT"), - - CANADA_ATLANTIC("Canada/Atlantic"), - - CANADA_CENTRAL("Canada/Central"), - - CANADA_EASTERN("Canada/Eastern"), - - CANADA_MOUNTAIN("Canada/Mountain"), - - CANADA_NEWFOUNDLAND("Canada/Newfoundland"), - - CANADA_PACIFIC("Canada/Pacific"), - - CANADA_SASKATCHEWAN("Canada/Saskatchewan"), - - CANADA_YUKON("Canada/Yukon"), - - CHILE_CONTINENTAL("Chile/Continental"), - - CHILE_EASTER_ISLAND("Chile/EasterIsland"), - - CUBA("Cuba"), - - EET("EET"), - - EST5_EDT("EST5EDT"), - - EGYPT("Egypt"), - - EIRE("Eire"), - - ETC_GMT("Etc/GMT"), - - ETC_GMT_0("Etc/GMT+0"), - - ETC_GMT_1("Etc/GMT+1"), - - ETC_GMT_10("Etc/GMT+10"), - - ETC_GMT_11("Etc/GMT+11"), - - ETC_GMT_121("Etc/GMT+12"), - - ETC_GMT_2("Etc/GMT+2"), - - ETC_GMT_3("Etc/GMT+3"), - - ETC_GMT_4("Etc/GMT+4"), - - ETC_GMT_5("Etc/GMT+5"), - - ETC_GMT_6("Etc/GMT+6"), - - ETC_GMT_7("Etc/GMT+7"), - - ETC_GMT_8("Etc/GMT+8"), - - ETC_GMT_9("Etc/GMT+9"), - - ETC_GMT_02("Etc/GMT-0"), - - ETC_GMT_12("Etc/GMT-1"), - - ETC_GMT_102("Etc/GMT-10"), - - ETC_GMT_112("Etc/GMT-11"), - - ETC_GMT_122("Etc/GMT-12"), - - ETC_GMT_13("Etc/GMT-13"), - - ETC_GMT_14("Etc/GMT-14"), - - ETC_GMT_22("Etc/GMT-2"), - - ETC_GMT_32("Etc/GMT-3"), - - ETC_GMT_42("Etc/GMT-4"), - - ETC_GMT_52("Etc/GMT-5"), - - ETC_GMT_62("Etc/GMT-6"), - - ETC_GMT_72("Etc/GMT-7"), - - ETC_GMT_82("Etc/GMT-8"), - - ETC_GMT_92("Etc/GMT-9"), - - ETC_GMT0("Etc/GMT0"), - - ETC_GREENWICH("Etc/Greenwich"), - - ETC_UCT("Etc/UCT"), - - ETC_UTC("Etc/UTC"), - - ETC_UNIVERSAL("Etc/Universal"), - - ETC_ZULU("Etc/Zulu"), - - EUROPE_AMSTERDAM("Europe/Amsterdam"), - - EUROPE_ANDORRA("Europe/Andorra"), - - EUROPE_ASTRAKHAN("Europe/Astrakhan"), - - EUROPE_ATHENS("Europe/Athens"), - - EUROPE_BELFAST("Europe/Belfast"), - - EUROPE_BELGRADE("Europe/Belgrade"), - - EUROPE_BERLIN("Europe/Berlin"), - - EUROPE_BRATISLAVA("Europe/Bratislava"), - - EUROPE_BRUSSELS("Europe/Brussels"), - - EUROPE_BUCHAREST("Europe/Bucharest"), - - EUROPE_BUDAPEST("Europe/Budapest"), - - EUROPE_BUSINGEN("Europe/Busingen"), - - EUROPE_CHISINAU("Europe/Chisinau"), - - EUROPE_COPENHAGEN("Europe/Copenhagen"), - - EUROPE_DUBLIN("Europe/Dublin"), - - EUROPE_GIBRALTAR("Europe/Gibraltar"), - - EUROPE_GUERNSEY("Europe/Guernsey"), - - EUROPE_HELSINKI("Europe/Helsinki"), - - EUROPE_ISLE_OF_MAN("Europe/Isle_of_Man"), - - EUROPE_ISTANBUL("Europe/Istanbul"), - - EUROPE_JERSEY("Europe/Jersey"), - - EUROPE_KALININGRAD("Europe/Kaliningrad"), - - EUROPE_KIEV("Europe/Kiev"), - - EUROPE_KIROV("Europe/Kirov"), - - EUROPE_KYIV("Europe/Kyiv"), - - EUROPE_LISBON("Europe/Lisbon"), - - EUROPE_LJUBLJANA("Europe/Ljubljana"), - - EUROPE_LONDON("Europe/London"), - - EUROPE_LUXEMBOURG("Europe/Luxembourg"), - - EUROPE_MADRID("Europe/Madrid"), - - EUROPE_MALTA("Europe/Malta"), - - EUROPE_MARIEHAMN("Europe/Mariehamn"), - - EUROPE_MINSK("Europe/Minsk"), - - EUROPE_MONACO("Europe/Monaco"), - - EUROPE_MOSCOW("Europe/Moscow"), - - EUROPE_NICOSIA("Europe/Nicosia"), - - EUROPE_OSLO("Europe/Oslo"), - - EUROPE_PARIS("Europe/Paris"), - - EUROPE_PODGORICA("Europe/Podgorica"), - - EUROPE_PRAGUE("Europe/Prague"), - - EUROPE_RIGA("Europe/Riga"), - - EUROPE_ROME("Europe/Rome"), - - EUROPE_SAMARA("Europe/Samara"), - - EUROPE_SAN_MARINO("Europe/San_Marino"), - - EUROPE_SARAJEVO("Europe/Sarajevo"), - - EUROPE_SARATOV("Europe/Saratov"), - - EUROPE_SIMFEROPOL("Europe/Simferopol"), - - EUROPE_SKOPJE("Europe/Skopje"), - - EUROPE_SOFIA("Europe/Sofia"), - - EUROPE_STOCKHOLM("Europe/Stockholm"), - - EUROPE_TALLINN("Europe/Tallinn"), - - EUROPE_TIRANE("Europe/Tirane"), - - EUROPE_TIRASPOL("Europe/Tiraspol"), - - EUROPE_ULYANOVSK("Europe/Ulyanovsk"), - - EUROPE_UZHGOROD("Europe/Uzhgorod"), - - EUROPE_VADUZ("Europe/Vaduz"), - - EUROPE_VATICAN("Europe/Vatican"), - - EUROPE_VIENNA("Europe/Vienna"), - - EUROPE_VILNIUS("Europe/Vilnius"), - - EUROPE_VOLGOGRAD("Europe/Volgograd"), - - EUROPE_WARSAW("Europe/Warsaw"), - - EUROPE_ZAGREB("Europe/Zagreb"), - - EUROPE_ZAPOROZHYE("Europe/Zaporozhye"), - - EUROPE_ZURICH("Europe/Zurich"), - - GB("GB"), - - GB_EIRE("GB-Eire"), - - GMT("GMT"), - - GMT0("GMT0"), - - GREENWICH("Greenwich"), - - HONGKONG("Hongkong"), - - ICELAND("Iceland"), - - INDIAN_ANTANANARIVO("Indian/Antananarivo"), - - INDIAN_CHAGOS("Indian/Chagos"), - - INDIAN_CHRISTMAS("Indian/Christmas"), - - INDIAN_COCOS("Indian/Cocos"), - - INDIAN_COMORO("Indian/Comoro"), - - INDIAN_KERGUELEN("Indian/Kerguelen"), - - INDIAN_MAHE("Indian/Mahe"), - - INDIAN_MALDIVES("Indian/Maldives"), - - INDIAN_MAURITIUS("Indian/Mauritius"), - - INDIAN_MAYOTTE("Indian/Mayotte"), - - INDIAN_REUNION("Indian/Reunion"), - - IRAN("Iran"), - - ISRAEL("Israel"), - - JAMAICA("Jamaica"), - - JAPAN("Japan"), - - KWAJALEIN("Kwajalein"), - - LIBYA("Libya"), - - MET("MET"), - - MST7_MDT("MST7MDT"), - - MEXICO_BAJA_NORTE("Mexico/BajaNorte"), - - MEXICO_BAJA_SUR("Mexico/BajaSur"), - - MEXICO_GENERAL("Mexico/General"), - - NZ("NZ"), - - NZ_CHAT("NZ-CHAT"), - - NAVAJO("Navajo"), - - PRC("PRC"), - - PST8_PDT("PST8PDT"), - - PACIFIC_APIA("Pacific/Apia"), - - PACIFIC_AUCKLAND("Pacific/Auckland"), - - PACIFIC_BOUGAINVILLE("Pacific/Bougainville"), - - PACIFIC_CHATHAM("Pacific/Chatham"), - - PACIFIC_CHUUK("Pacific/Chuuk"), - - PACIFIC_EASTER("Pacific/Easter"), - - PACIFIC_EFATE("Pacific/Efate"), - - PACIFIC_ENDERBURY("Pacific/Enderbury"), - - PACIFIC_FAKAOFO("Pacific/Fakaofo"), - - PACIFIC_FIJI("Pacific/Fiji"), - - PACIFIC_FUNAFUTI("Pacific/Funafuti"), - - PACIFIC_GALAPAGOS("Pacific/Galapagos"), - - PACIFIC_GAMBIER("Pacific/Gambier"), - - PACIFIC_GUADALCANAL("Pacific/Guadalcanal"), - - PACIFIC_GUAM("Pacific/Guam"), - - PACIFIC_HONOLULU("Pacific/Honolulu"), - - PACIFIC_JOHNSTON("Pacific/Johnston"), - - PACIFIC_KANTON("Pacific/Kanton"), - - PACIFIC_KIRITIMATI("Pacific/Kiritimati"), - - PACIFIC_KOSRAE("Pacific/Kosrae"), - - PACIFIC_KWAJALEIN("Pacific/Kwajalein"), - - PACIFIC_MAJURO("Pacific/Majuro"), - - PACIFIC_MARQUESAS("Pacific/Marquesas"), - - PACIFIC_MIDWAY("Pacific/Midway"), - - PACIFIC_NAURU("Pacific/Nauru"), - - PACIFIC_NIUE("Pacific/Niue"), - - PACIFIC_NORFOLK("Pacific/Norfolk"), - - PACIFIC_NOUMEA("Pacific/Noumea"), - - PACIFIC_PAGO_PAGO("Pacific/Pago_Pago"), - - PACIFIC_PALAU("Pacific/Palau"), - - PACIFIC_PITCAIRN("Pacific/Pitcairn"), - - PACIFIC_POHNPEI("Pacific/Pohnpei"), - - PACIFIC_PONAPE("Pacific/Ponape"), - - PACIFIC_PORT_MORESBY("Pacific/Port_Moresby"), - - PACIFIC_RAROTONGA("Pacific/Rarotonga"), - - PACIFIC_SAIPAN("Pacific/Saipan"), - - PACIFIC_SAMOA("Pacific/Samoa"), - - PACIFIC_TAHITI("Pacific/Tahiti"), - - PACIFIC_TARAWA("Pacific/Tarawa"), - - PACIFIC_TONGATAPU("Pacific/Tongatapu"), - - PACIFIC_TRUK("Pacific/Truk"), - - PACIFIC_WAKE("Pacific/Wake"), - - PACIFIC_WALLIS("Pacific/Wallis"), - - PACIFIC_YAP("Pacific/Yap"), - - POLAND("Poland"), - - PORTUGAL("Portugal"), - - ROK("ROK"), - - SINGAPORE("Singapore"), - - SYSTEM_V_AST4("SystemV/AST4"), - - SYSTEM_V_AST4_ADT("SystemV/AST4ADT"), - - SYSTEM_V_CST6("SystemV/CST6"), - - SYSTEM_V_CST6_CDT("SystemV/CST6CDT"), - - SYSTEM_V_EST5("SystemV/EST5"), - - SYSTEM_V_EST5_EDT("SystemV/EST5EDT"), - - SYSTEM_V_HST10("SystemV/HST10"), - - SYSTEM_V_MST7("SystemV/MST7"), - - SYSTEM_V_MST7_MDT("SystemV/MST7MDT"), - - SYSTEM_V_PST8("SystemV/PST8"), - - SYSTEM_V_PST8_PDT("SystemV/PST8PDT"), - - SYSTEM_V_YST9("SystemV/YST9"), - - SYSTEM_V_YST9_YDT("SystemV/YST9YDT"), - - TURKEY("Turkey"), - - UCT("UCT"), - - US_ALASKA("US/Alaska"), - - US_ALEUTIAN("US/Aleutian"), - - US_ARIZONA("US/Arizona"), - - US_CENTRAL("US/Central"), - - US_EAST_INDIANA("US/East-Indiana"), - - US_EASTERN("US/Eastern"), - - US_HAWAII("US/Hawaii"), - - US_INDIANA_STARKE("US/Indiana-Starke"), - - US_MICHIGAN("US/Michigan"), - - US_MOUNTAIN("US/Mountain"), - - US_PACIFIC("US/Pacific"), - - US_SAMOA("US/Samoa"), - - UTC("UTC"), - - UNIVERSAL("Universal"), - - W_SU("W-SU"), - - WET("WET"), - - ZULU("Zulu"), - - EST("EST"), - - HST("HST"), - - MST("MST"), - - ACT("ACT"), - - AET("AET"), - - AGT("AGT"), - - ART("ART"), - - AST("AST"), - - BET("BET"), - - BST("BST"), - - CAT("CAT"), - - CNT("CNT"), - - CST("CST"), - - CTT("CTT"), - - EAT("EAT"), - - ECT("ECT"), - - IET("IET"), - - IST("IST"), - - JST("JST"), - - MIT("MIT"), - - NET("NET"), - - NST("NST"), - - PLT("PLT"), - - PNT("PNT"), - - PRT("PRT"), - - PST("PST"), - - SST("SST"), - - VST("VST"); - - private String value; - - TimeZoneEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TimeZoneEnum fromValue(String value) { - for (TimeZoneEnum b : TimeZoneEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TimeZoneEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TimeZoneEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TimeZoneEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TimeZoneEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; - - @SerializedName(SERIALIZED_NAME_TIME_ZONE) - @javax.annotation.Nullable - private TimeZoneEnum timeZone; - - public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; - - @SerializedName(SERIALIZED_NAME_FREQUENCY) - @javax.annotation.Nullable - private FrequencyInput frequency; - - public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; - - @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) - @javax.annotation.Nullable - private RecipientDetailsInput recipientDetails; - - /** Status of the schedule */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("ACTIVE"), - - PAUSE("PAUSE"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private StatusEnum status; - - public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; - - @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) - @javax.annotation.Nullable - private String personalisedViewId; - - public UpdateScheduleRequest() {} - - public UpdateScheduleRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the scheduled job. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateScheduleRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the scheduled job. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public UpdateScheduleRequest metadataType( - @javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - return this; - } - - /** - * Type of metadata object. - * - * @return metadataType - */ - @javax.annotation.Nullable - public MetadataTypeEnum getMetadataType() { - return metadataType; - } - - public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { - this.metadataType = metadataType; - } - - public UpdateScheduleRequest metadataIdentifier( - @javax.annotation.Nullable String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - return this; - } +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FrequencyInput; +import com.thoughtspot.client.model.LiveboardOptionsInput; +import com.thoughtspot.client.model.RecipientDetailsInput; +import com.thoughtspot.client.model.SchedulesPdfOptionsInput; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; - /** - * Unique ID or name of the metadata object. - * - * @return metadataIdentifier - */ - @javax.annotation.Nullable - public String getMetadataIdentifier() { - return metadataIdentifier; - } +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; - public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { - this.metadataIdentifier = metadataIdentifier; - } +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public UpdateScheduleRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Export file format. - * - * @return fileFormat - */ - @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { - return fileFormat; - } +/** + * UpdateScheduleRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateScheduleRequest implements Serializable { + private static final long serialVersionUID = 1L; - public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { - this.fileFormat = fileFormat; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; - public UpdateScheduleRequest liveboardOptions( - @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { - this.liveboardOptions = liveboardOptions; - return this; - } + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; - /** - * Options to specify the details of a Liveboard. - * - * @return liveboardOptions - */ - @javax.annotation.Nullable - public LiveboardOptionsInput getLiveboardOptions() { - return liveboardOptions; - } + /** + * Type of metadata object. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"); - public void setLiveboardOptions( - @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { - this.liveboardOptions = liveboardOptions; - } + private String value; - public UpdateScheduleRequest pdfOptions( - @javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { - this.pdfOptions = pdfOptions; - return this; + MetadataTypeEnum(String value) { + this.value = value; } - /** - * Options for PDF export. - * - * @return pdfOptions - */ - @javax.annotation.Nullable - public SchedulesPdfOptionsInput getPdfOptions() { - return pdfOptions; + public String getValue() { + return value; } - public void setPdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { - this.pdfOptions = pdfOptions; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateScheduleRequest timeZone(@javax.annotation.Nullable TimeZoneEnum timeZone) { - this.timeZone = timeZone; - return this; + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Time zone - * - * @return timeZone - */ - @javax.annotation.Nullable - public TimeZoneEnum getTimeZone() { - return timeZone; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } } - public void setTimeZone(@javax.annotation.Nullable TimeZoneEnum timeZone) { - this.timeZone = timeZone; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); } - - public UpdateScheduleRequest frequency(@javax.annotation.Nullable FrequencyInput frequency) { - this.frequency = frequency; - return this; + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nullable + private String metadataIdentifier; + + /** + * Export file format. + */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + CSV("CSV"), + + PDF("PDF"), + + XLSX("XLSX"); + + private String value; + + FileFormatEnum(String value) { + this.value = value; } - /** - * Frequency of the scheduled job run. - * - * @return frequency - */ - @javax.annotation.Nullable - public FrequencyInput getFrequency() { - return frequency; + public String getValue() { + return value; } - public void setFrequency(@javax.annotation.Nullable FrequencyInput frequency) { - this.frequency = frequency; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateScheduleRequest recipientDetails( - @javax.annotation.Nullable RecipientDetailsInput recipientDetails) { - this.recipientDetails = recipientDetails; - return this; + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot - * users or groups as recipients in the `principals` array. If a recipient is not a - * ThoughtSpot user, specify email address. - * - * @return recipientDetails - */ - @javax.annotation.Nullable - public RecipientDetailsInput getRecipientDetails() { - return recipientDetails; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } } - public void setRecipientDetails( - @javax.annotation.Nullable RecipientDetailsInput recipientDetails) { - this.recipientDetails = recipientDetails; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); } - - public UpdateScheduleRequest status(@javax.annotation.Nullable StatusEnum status) { - this.status = status; - return this; + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat; + + public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; + @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) + @javax.annotation.Nullable + private LiveboardOptionsInput liveboardOptions; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private SchedulesPdfOptionsInput pdfOptions; + + /** + * Time zone + */ + @JsonAdapter(TimeZoneEnum.Adapter.class) + public enum TimeZoneEnum { + AFRICA_ABIDJAN("Africa/Abidjan"), + + AFRICA_ACCRA("Africa/Accra"), + + AFRICA_ADDIS_ABABA("Africa/Addis_Ababa"), + + AFRICA_ALGIERS("Africa/Algiers"), + + AFRICA_ASMARA("Africa/Asmara"), + + AFRICA_ASMERA("Africa/Asmera"), + + AFRICA_BAMAKO("Africa/Bamako"), + + AFRICA_BANGUI("Africa/Bangui"), + + AFRICA_BANJUL("Africa/Banjul"), + + AFRICA_BISSAU("Africa/Bissau"), + + AFRICA_BLANTYRE("Africa/Blantyre"), + + AFRICA_BRAZZAVILLE("Africa/Brazzaville"), + + AFRICA_BUJUMBURA("Africa/Bujumbura"), + + AFRICA_CAIRO("Africa/Cairo"), + + AFRICA_CASABLANCA("Africa/Casablanca"), + + AFRICA_CEUTA("Africa/Ceuta"), + + AFRICA_CONAKRY("Africa/Conakry"), + + AFRICA_DAKAR("Africa/Dakar"), + + AFRICA_DAR_ES_SALAAM("Africa/Dar_es_Salaam"), + + AFRICA_DJIBOUTI("Africa/Djibouti"), + + AFRICA_DOUALA("Africa/Douala"), + + AFRICA_EL_AAIUN("Africa/El_Aaiun"), + + AFRICA_FREETOWN("Africa/Freetown"), + + AFRICA_GABORONE("Africa/Gaborone"), + + AFRICA_HARARE("Africa/Harare"), + + AFRICA_JOHANNESBURG("Africa/Johannesburg"), + + AFRICA_JUBA("Africa/Juba"), + + AFRICA_KAMPALA("Africa/Kampala"), + + AFRICA_KHARTOUM("Africa/Khartoum"), + + AFRICA_KIGALI("Africa/Kigali"), + + AFRICA_KINSHASA("Africa/Kinshasa"), + + AFRICA_LAGOS("Africa/Lagos"), + + AFRICA_LIBREVILLE("Africa/Libreville"), + + AFRICA_LOME("Africa/Lome"), + + AFRICA_LUANDA("Africa/Luanda"), + + AFRICA_LUBUMBASHI("Africa/Lubumbashi"), + + AFRICA_LUSAKA("Africa/Lusaka"), + + AFRICA_MALABO("Africa/Malabo"), + + AFRICA_MAPUTO("Africa/Maputo"), + + AFRICA_MASERU("Africa/Maseru"), + + AFRICA_MBABANE("Africa/Mbabane"), + + AFRICA_MOGADISHU("Africa/Mogadishu"), + + AFRICA_MONROVIA("Africa/Monrovia"), + + AFRICA_NAIROBI("Africa/Nairobi"), + + AFRICA_NDJAMENA("Africa/Ndjamena"), + + AFRICA_NIAMEY("Africa/Niamey"), + + AFRICA_NOUAKCHOTT("Africa/Nouakchott"), + + AFRICA_OUAGADOUGOU("Africa/Ouagadougou"), + + AFRICA_PORTO_NOVO("Africa/Porto-Novo"), + + AFRICA_SAO_TOME("Africa/Sao_Tome"), + + AFRICA_TIMBUKTU("Africa/Timbuktu"), + + AFRICA_TRIPOLI("Africa/Tripoli"), + + AFRICA_TUNIS("Africa/Tunis"), + + AFRICA_WINDHOEK("Africa/Windhoek"), + + AMERICA_ADAK("America/Adak"), + + AMERICA_ANCHORAGE("America/Anchorage"), + + AMERICA_ANGUILLA("America/Anguilla"), + + AMERICA_ANTIGUA("America/Antigua"), + + AMERICA_ARAGUAINA("America/Araguaina"), + + AMERICA_ARGENTINA_BUENOS_AIRES("America/Argentina/Buenos_Aires"), + + AMERICA_ARGENTINA_CATAMARCA("America/Argentina/Catamarca"), + + AMERICA_ARGENTINA_COMOD_RIVADAVIA("America/Argentina/ComodRivadavia"), + + AMERICA_ARGENTINA_CORDOBA("America/Argentina/Cordoba"), + + AMERICA_ARGENTINA_JUJUY("America/Argentina/Jujuy"), + + AMERICA_ARGENTINA_LA_RIOJA("America/Argentina/La_Rioja"), + + AMERICA_ARGENTINA_MENDOZA("America/Argentina/Mendoza"), + + AMERICA_ARGENTINA_RIO_GALLEGOS("America/Argentina/Rio_Gallegos"), + + AMERICA_ARGENTINA_SALTA("America/Argentina/Salta"), + + AMERICA_ARGENTINA_SAN_JUAN("America/Argentina/San_Juan"), + + AMERICA_ARGENTINA_SAN_LUIS("America/Argentina/San_Luis"), + + AMERICA_ARGENTINA_TUCUMAN("America/Argentina/Tucuman"), + + AMERICA_ARGENTINA_USHUAIA("America/Argentina/Ushuaia"), + + AMERICA_ARUBA("America/Aruba"), + + AMERICA_ASUNCION("America/Asuncion"), + + AMERICA_ATIKOKAN("America/Atikokan"), + + AMERICA_ATKA("America/Atka"), + + AMERICA_BAHIA("America/Bahia"), + + AMERICA_BAHIA_BANDERAS("America/Bahia_Banderas"), + + AMERICA_BARBADOS("America/Barbados"), + + AMERICA_BELEM("America/Belem"), + + AMERICA_BELIZE("America/Belize"), + + AMERICA_BLANC_SABLON("America/Blanc-Sablon"), + + AMERICA_BOA_VISTA("America/Boa_Vista"), + + AMERICA_BOGOTA("America/Bogota"), + + AMERICA_BOISE("America/Boise"), + + AMERICA_BUENOS_AIRES("America/Buenos_Aires"), + + AMERICA_CAMBRIDGE_BAY("America/Cambridge_Bay"), + + AMERICA_CAMPO_GRANDE("America/Campo_Grande"), + + AMERICA_CANCUN("America/Cancun"), + + AMERICA_CARACAS("America/Caracas"), + + AMERICA_CATAMARCA("America/Catamarca"), + + AMERICA_CAYENNE("America/Cayenne"), + + AMERICA_CAYMAN("America/Cayman"), + + AMERICA_CHICAGO("America/Chicago"), + + AMERICA_CHIHUAHUA("America/Chihuahua"), + + AMERICA_CORAL_HARBOUR("America/Coral_Harbour"), + + AMERICA_CORDOBA("America/Cordoba"), + + AMERICA_COSTA_RICA("America/Costa_Rica"), + + AMERICA_CRESTON("America/Creston"), + + AMERICA_CUIABA("America/Cuiaba"), + + AMERICA_CURACAO("America/Curacao"), + + AMERICA_DANMARKSHAVN("America/Danmarkshavn"), + + AMERICA_DAWSON("America/Dawson"), + + AMERICA_DAWSON_CREEK("America/Dawson_Creek"), + + AMERICA_DENVER("America/Denver"), + + AMERICA_DETROIT("America/Detroit"), + + AMERICA_DOMINICA("America/Dominica"), + + AMERICA_EDMONTON("America/Edmonton"), + + AMERICA_EIRUNEPE("America/Eirunepe"), + + AMERICA_EL_SALVADOR("America/El_Salvador"), + + AMERICA_ENSENADA("America/Ensenada"), + + AMERICA_FORT_NELSON("America/Fort_Nelson"), + + AMERICA_FORT_WAYNE("America/Fort_Wayne"), + + AMERICA_FORTALEZA("America/Fortaleza"), + + AMERICA_GLACE_BAY("America/Glace_Bay"), + + AMERICA_GODTHAB("America/Godthab"), + + AMERICA_GOOSE_BAY("America/Goose_Bay"), + + AMERICA_GRAND_TURK("America/Grand_Turk"), + + AMERICA_GRENADA("America/Grenada"), + + AMERICA_GUADELOUPE("America/Guadeloupe"), + + AMERICA_GUATEMALA("America/Guatemala"), + + AMERICA_GUAYAQUIL("America/Guayaquil"), + + AMERICA_GUYANA("America/Guyana"), + + AMERICA_HALIFAX("America/Halifax"), + + AMERICA_HAVANA("America/Havana"), + + AMERICA_HERMOSILLO("America/Hermosillo"), + + AMERICA_INDIANA_INDIANAPOLIS("America/Indiana/Indianapolis"), + + AMERICA_INDIANA_KNOX("America/Indiana/Knox"), + + AMERICA_INDIANA_MARENGO("America/Indiana/Marengo"), + + AMERICA_INDIANA_PETERSBURG("America/Indiana/Petersburg"), + + AMERICA_INDIANA_TELL_CITY("America/Indiana/Tell_City"), + + AMERICA_INDIANA_VEVAY("America/Indiana/Vevay"), + + AMERICA_INDIANA_VINCENNES("America/Indiana/Vincennes"), + + AMERICA_INDIANA_WINAMAC("America/Indiana/Winamac"), + + AMERICA_INDIANAPOLIS("America/Indianapolis"), + + AMERICA_INUVIK("America/Inuvik"), + + AMERICA_IQALUIT("America/Iqaluit"), + + AMERICA_JAMAICA("America/Jamaica"), + + AMERICA_JUJUY("America/Jujuy"), + + AMERICA_JUNEAU("America/Juneau"), + + AMERICA_KENTUCKY_LOUISVILLE("America/Kentucky/Louisville"), + + AMERICA_KENTUCKY_MONTICELLO("America/Kentucky/Monticello"), + + AMERICA_KNOX_IN("America/Knox_IN"), + + AMERICA_KRALENDIJK("America/Kralendijk"), + + AMERICA_LA_PAZ("America/La_Paz"), + + AMERICA_LIMA("America/Lima"), + + AMERICA_LOS_ANGELES("America/Los_Angeles"), + + AMERICA_LOUISVILLE("America/Louisville"), + + AMERICA_LOWER_PRINCES("America/Lower_Princes"), + + AMERICA_MACEIO("America/Maceio"), + + AMERICA_MANAGUA("America/Managua"), + + AMERICA_MANAUS("America/Manaus"), + + AMERICA_MARIGOT("America/Marigot"), + + AMERICA_MARTINIQUE("America/Martinique"), + + AMERICA_MATAMOROS("America/Matamoros"), + + AMERICA_MAZATLAN("America/Mazatlan"), + + AMERICA_MENDOZA("America/Mendoza"), + + AMERICA_MENOMINEE("America/Menominee"), + + AMERICA_MERIDA("America/Merida"), + + AMERICA_METLAKATLA("America/Metlakatla"), + + AMERICA_MEXICO_CITY("America/Mexico_City"), + + AMERICA_MIQUELON("America/Miquelon"), + + AMERICA_MONCTON("America/Moncton"), + + AMERICA_MONTERREY("America/Monterrey"), + + AMERICA_MONTEVIDEO("America/Montevideo"), + + AMERICA_MONTREAL("America/Montreal"), + + AMERICA_MONTSERRAT("America/Montserrat"), + + AMERICA_NASSAU("America/Nassau"), + + AMERICA_NEW_YORK("America/New_York"), + + AMERICA_NIPIGON("America/Nipigon"), + + AMERICA_NOME("America/Nome"), + + AMERICA_NORONHA("America/Noronha"), + + AMERICA_NORTH_DAKOTA_BEULAH("America/North_Dakota/Beulah"), + + AMERICA_NORTH_DAKOTA_CENTER("America/North_Dakota/Center"), + + AMERICA_NORTH_DAKOTA_NEW_SALEM("America/North_Dakota/New_Salem"), + + AMERICA_NUUK("America/Nuuk"), + + AMERICA_OJINAGA("America/Ojinaga"), + + AMERICA_PANAMA("America/Panama"), + + AMERICA_PANGNIRTUNG("America/Pangnirtung"), + + AMERICA_PARAMARIBO("America/Paramaribo"), + + AMERICA_PHOENIX("America/Phoenix"), + + AMERICA_PORT_AU_PRINCE("America/Port-au-Prince"), + + AMERICA_PORT_OF_SPAIN("America/Port_of_Spain"), + + AMERICA_PORTO_ACRE("America/Porto_Acre"), + + AMERICA_PORTO_VELHO("America/Porto_Velho"), + + AMERICA_PUERTO_RICO("America/Puerto_Rico"), + + AMERICA_PUNTA_ARENAS("America/Punta_Arenas"), + + AMERICA_RAINY_RIVER("America/Rainy_River"), + + AMERICA_RANKIN_INLET("America/Rankin_Inlet"), + + AMERICA_RECIFE("America/Recife"), + + AMERICA_REGINA("America/Regina"), + + AMERICA_RESOLUTE("America/Resolute"), + + AMERICA_RIO_BRANCO("America/Rio_Branco"), + + AMERICA_ROSARIO("America/Rosario"), + + AMERICA_SANTA_ISABEL("America/Santa_Isabel"), + + AMERICA_SANTAREM("America/Santarem"), + + AMERICA_SANTIAGO("America/Santiago"), + + AMERICA_SANTO_DOMINGO("America/Santo_Domingo"), + + AMERICA_SAO_PAULO("America/Sao_Paulo"), + + AMERICA_SCORESBYSUND("America/Scoresbysund"), + + AMERICA_SHIPROCK("America/Shiprock"), + + AMERICA_SITKA("America/Sitka"), + + AMERICA_ST_BARTHELEMY("America/St_Barthelemy"), + + AMERICA_ST_JOHNS("America/St_Johns"), + + AMERICA_ST_KITTS("America/St_Kitts"), + + AMERICA_ST_LUCIA("America/St_Lucia"), + + AMERICA_ST_THOMAS("America/St_Thomas"), + + AMERICA_ST_VINCENT("America/St_Vincent"), + + AMERICA_SWIFT_CURRENT("America/Swift_Current"), + + AMERICA_TEGUCIGALPA("America/Tegucigalpa"), + + AMERICA_THULE("America/Thule"), + + AMERICA_THUNDER_BAY("America/Thunder_Bay"), + + AMERICA_TIJUANA("America/Tijuana"), + + AMERICA_TORONTO("America/Toronto"), + + AMERICA_TORTOLA("America/Tortola"), + + AMERICA_VANCOUVER("America/Vancouver"), + + AMERICA_VIRGIN("America/Virgin"), + + AMERICA_WHITEHORSE("America/Whitehorse"), + + AMERICA_WINNIPEG("America/Winnipeg"), + + AMERICA_YAKUTAT("America/Yakutat"), + + AMERICA_YELLOWKNIFE("America/Yellowknife"), + + ANTARCTICA_CASEY("Antarctica/Casey"), + + ANTARCTICA_DAVIS("Antarctica/Davis"), + + ANTARCTICA_DUMONT_D_URVILLE("Antarctica/DumontDUrville"), + + ANTARCTICA_MACQUARIE("Antarctica/Macquarie"), + + ANTARCTICA_MAWSON("Antarctica/Mawson"), + + ANTARCTICA_MC_MURDO("Antarctica/McMurdo"), + + ANTARCTICA_PALMER("Antarctica/Palmer"), + + ANTARCTICA_ROTHERA("Antarctica/Rothera"), + + ANTARCTICA_SOUTH_POLE("Antarctica/South_Pole"), + + ANTARCTICA_SYOWA("Antarctica/Syowa"), + + ANTARCTICA_TROLL("Antarctica/Troll"), + + ANTARCTICA_VOSTOK("Antarctica/Vostok"), + + ARCTIC_LONGYEARBYEN("Arctic/Longyearbyen"), + + ASIA_ADEN("Asia/Aden"), + + ASIA_ALMATY("Asia/Almaty"), + + ASIA_AMMAN("Asia/Amman"), + + ASIA_ANADYR("Asia/Anadyr"), + + ASIA_AQTAU("Asia/Aqtau"), + + ASIA_AQTOBE("Asia/Aqtobe"), + + ASIA_ASHGABAT("Asia/Ashgabat"), + + ASIA_ASHKHABAD("Asia/Ashkhabad"), + + ASIA_ATYRAU("Asia/Atyrau"), + + ASIA_BAGHDAD("Asia/Baghdad"), + + ASIA_BAHRAIN("Asia/Bahrain"), + + ASIA_BAKU("Asia/Baku"), + + ASIA_BANGKOK("Asia/Bangkok"), + + ASIA_BARNAUL("Asia/Barnaul"), + + ASIA_BEIRUT("Asia/Beirut"), + + ASIA_BISHKEK("Asia/Bishkek"), + + ASIA_BRUNEI("Asia/Brunei"), + + ASIA_CALCUTTA("Asia/Calcutta"), + + ASIA_CHITA("Asia/Chita"), + + ASIA_CHOIBALSAN("Asia/Choibalsan"), + + ASIA_CHONGQING("Asia/Chongqing"), + + ASIA_CHUNGKING("Asia/Chungking"), + + ASIA_COLOMBO("Asia/Colombo"), + + ASIA_DACCA("Asia/Dacca"), + + ASIA_DAMASCUS("Asia/Damascus"), + + ASIA_DHAKA("Asia/Dhaka"), + + ASIA_DILI("Asia/Dili"), + + ASIA_DUBAI("Asia/Dubai"), + + ASIA_DUSHANBE("Asia/Dushanbe"), + + ASIA_FAMAGUSTA("Asia/Famagusta"), + + ASIA_GAZA("Asia/Gaza"), + + ASIA_HARBIN("Asia/Harbin"), + + ASIA_HEBRON("Asia/Hebron"), + + ASIA_HO_CHI_MINH("Asia/Ho_Chi_Minh"), + + ASIA_HONG_KONG("Asia/Hong_Kong"), + + ASIA_HOVD("Asia/Hovd"), + + ASIA_IRKUTSK("Asia/Irkutsk"), + + ASIA_ISTANBUL("Asia/Istanbul"), + + ASIA_JAKARTA("Asia/Jakarta"), + + ASIA_JAYAPURA("Asia/Jayapura"), + + ASIA_JERUSALEM("Asia/Jerusalem"), + + ASIA_KABUL("Asia/Kabul"), + + ASIA_KAMCHATKA("Asia/Kamchatka"), + + ASIA_KARACHI("Asia/Karachi"), + + ASIA_KASHGAR("Asia/Kashgar"), + + ASIA_KATHMANDU("Asia/Kathmandu"), + + ASIA_KATMANDU("Asia/Katmandu"), + + ASIA_KHANDYGA("Asia/Khandyga"), + + ASIA_KOLKATA("Asia/Kolkata"), + + ASIA_KRASNOYARSK("Asia/Krasnoyarsk"), + + ASIA_KUALA_LUMPUR("Asia/Kuala_Lumpur"), + + ASIA_KUCHING("Asia/Kuching"), + + ASIA_KUWAIT("Asia/Kuwait"), + + ASIA_MACAO("Asia/Macao"), + + ASIA_MACAU("Asia/Macau"), + + ASIA_MAGADAN("Asia/Magadan"), + + ASIA_MAKASSAR("Asia/Makassar"), + + ASIA_MANILA("Asia/Manila"), + + ASIA_MUSCAT("Asia/Muscat"), + + ASIA_NICOSIA("Asia/Nicosia"), + + ASIA_NOVOKUZNETSK("Asia/Novokuznetsk"), + + ASIA_NOVOSIBIRSK("Asia/Novosibirsk"), + + ASIA_OMSK("Asia/Omsk"), + + ASIA_ORAL("Asia/Oral"), + + ASIA_PHNOM_PENH("Asia/Phnom_Penh"), + + ASIA_PONTIANAK("Asia/Pontianak"), + + ASIA_PYONGYANG("Asia/Pyongyang"), + + ASIA_QATAR("Asia/Qatar"), + + ASIA_QOSTANAY("Asia/Qostanay"), + + ASIA_QYZYLORDA("Asia/Qyzylorda"), + + ASIA_RANGOON("Asia/Rangoon"), + + ASIA_RIYADH("Asia/Riyadh"), + + ASIA_SAIGON("Asia/Saigon"), + + ASIA_SAKHALIN("Asia/Sakhalin"), + + ASIA_SAMARKAND("Asia/Samarkand"), + + ASIA_SEOUL("Asia/Seoul"), + + ASIA_SHANGHAI("Asia/Shanghai"), + + ASIA_SINGAPORE("Asia/Singapore"), + + ASIA_SREDNEKOLYMSK("Asia/Srednekolymsk"), + + ASIA_TAIPEI("Asia/Taipei"), + + ASIA_TASHKENT("Asia/Tashkent"), + + ASIA_TBILISI("Asia/Tbilisi"), + + ASIA_TEHRAN("Asia/Tehran"), + + ASIA_TEL_AVIV("Asia/Tel_Aviv"), + + ASIA_THIMBU("Asia/Thimbu"), + + ASIA_THIMPHU("Asia/Thimphu"), + + ASIA_TOKYO("Asia/Tokyo"), + + ASIA_TOMSK("Asia/Tomsk"), + + ASIA_UJUNG_PANDANG("Asia/Ujung_Pandang"), + + ASIA_ULAANBAATAR("Asia/Ulaanbaatar"), + + ASIA_ULAN_BATOR("Asia/Ulan_Bator"), + + ASIA_URUMQI("Asia/Urumqi"), + + ASIA_UST_NERA("Asia/Ust-Nera"), + + ASIA_VIENTIANE("Asia/Vientiane"), + + ASIA_VLADIVOSTOK("Asia/Vladivostok"), + + ASIA_YAKUTSK("Asia/Yakutsk"), + + ASIA_YANGON("Asia/Yangon"), + + ASIA_YEKATERINBURG("Asia/Yekaterinburg"), + + ASIA_YEREVAN("Asia/Yerevan"), + + ATLANTIC_AZORES("Atlantic/Azores"), + + ATLANTIC_BERMUDA("Atlantic/Bermuda"), + + ATLANTIC_CANARY("Atlantic/Canary"), + + ATLANTIC_CAPE_VERDE("Atlantic/Cape_Verde"), + + ATLANTIC_FAEROE("Atlantic/Faeroe"), + + ATLANTIC_FAROE("Atlantic/Faroe"), + + ATLANTIC_JAN_MAYEN("Atlantic/Jan_Mayen"), + + ATLANTIC_MADEIRA("Atlantic/Madeira"), + + ATLANTIC_REYKJAVIK("Atlantic/Reykjavik"), + + ATLANTIC_SOUTH_GEORGIA("Atlantic/South_Georgia"), + + ATLANTIC_ST_HELENA("Atlantic/St_Helena"), + + ATLANTIC_STANLEY("Atlantic/Stanley"), + + AUSTRALIA_ACT("Australia/ACT"), + + AUSTRALIA_ADELAIDE("Australia/Adelaide"), + + AUSTRALIA_BRISBANE("Australia/Brisbane"), + + AUSTRALIA_BROKEN_HILL("Australia/Broken_Hill"), + + AUSTRALIA_CANBERRA("Australia/Canberra"), + + AUSTRALIA_CURRIE("Australia/Currie"), + + AUSTRALIA_DARWIN("Australia/Darwin"), + + AUSTRALIA_EUCLA("Australia/Eucla"), + + AUSTRALIA_HOBART("Australia/Hobart"), + + AUSTRALIA_LHI("Australia/LHI"), + + AUSTRALIA_LINDEMAN("Australia/Lindeman"), + + AUSTRALIA_LORD_HOWE("Australia/Lord_Howe"), + + AUSTRALIA_MELBOURNE("Australia/Melbourne"), + + AUSTRALIA_NSW("Australia/NSW"), + + AUSTRALIA_NORTH("Australia/North"), + + AUSTRALIA_PERTH("Australia/Perth"), + + AUSTRALIA_QUEENSLAND("Australia/Queensland"), + + AUSTRALIA_SOUTH("Australia/South"), + + AUSTRALIA_SYDNEY("Australia/Sydney"), + + AUSTRALIA_TASMANIA("Australia/Tasmania"), + + AUSTRALIA_VICTORIA("Australia/Victoria"), + + AUSTRALIA_WEST("Australia/West"), + + AUSTRALIA_YANCOWINNA("Australia/Yancowinna"), + + BRAZIL_ACRE("Brazil/Acre"), + + BRAZIL_DE_NORONHA("Brazil/DeNoronha"), + + BRAZIL_EAST("Brazil/East"), + + BRAZIL_WEST("Brazil/West"), + + CET("CET"), + + CST6_CDT("CST6CDT"), + + CANADA_ATLANTIC("Canada/Atlantic"), + + CANADA_CENTRAL("Canada/Central"), + + CANADA_EASTERN("Canada/Eastern"), + + CANADA_MOUNTAIN("Canada/Mountain"), + + CANADA_NEWFOUNDLAND("Canada/Newfoundland"), + + CANADA_PACIFIC("Canada/Pacific"), + + CANADA_SASKATCHEWAN("Canada/Saskatchewan"), + + CANADA_YUKON("Canada/Yukon"), + + CHILE_CONTINENTAL("Chile/Continental"), + + CHILE_EASTER_ISLAND("Chile/EasterIsland"), + + CUBA("Cuba"), + + EET("EET"), + + EST5_EDT("EST5EDT"), + + EGYPT("Egypt"), + + EIRE("Eire"), + + ETC_GMT("Etc/GMT"), + + ETC_GMT_0("Etc/GMT+0"), + + ETC_GMT_1("Etc/GMT+1"), + + ETC_GMT_10("Etc/GMT+10"), + + ETC_GMT_11("Etc/GMT+11"), + + ETC_GMT_121("Etc/GMT+12"), + + ETC_GMT_2("Etc/GMT+2"), + + ETC_GMT_3("Etc/GMT+3"), + + ETC_GMT_4("Etc/GMT+4"), + + ETC_GMT_5("Etc/GMT+5"), + + ETC_GMT_6("Etc/GMT+6"), + + ETC_GMT_7("Etc/GMT+7"), + + ETC_GMT_8("Etc/GMT+8"), + + ETC_GMT_9("Etc/GMT+9"), + + ETC_GMT_02("Etc/GMT-0"), + + ETC_GMT_12("Etc/GMT-1"), + + ETC_GMT_102("Etc/GMT-10"), + + ETC_GMT_112("Etc/GMT-11"), + + ETC_GMT_122("Etc/GMT-12"), + + ETC_GMT_13("Etc/GMT-13"), + + ETC_GMT_14("Etc/GMT-14"), + + ETC_GMT_22("Etc/GMT-2"), + + ETC_GMT_32("Etc/GMT-3"), + + ETC_GMT_42("Etc/GMT-4"), + + ETC_GMT_52("Etc/GMT-5"), + + ETC_GMT_62("Etc/GMT-6"), + + ETC_GMT_72("Etc/GMT-7"), + + ETC_GMT_82("Etc/GMT-8"), + + ETC_GMT_92("Etc/GMT-9"), + + ETC_GMT0("Etc/GMT0"), + + ETC_GREENWICH("Etc/Greenwich"), + + ETC_UCT("Etc/UCT"), + + ETC_UTC("Etc/UTC"), + + ETC_UNIVERSAL("Etc/Universal"), + + ETC_ZULU("Etc/Zulu"), + + EUROPE_AMSTERDAM("Europe/Amsterdam"), + + EUROPE_ANDORRA("Europe/Andorra"), + + EUROPE_ASTRAKHAN("Europe/Astrakhan"), + + EUROPE_ATHENS("Europe/Athens"), + + EUROPE_BELFAST("Europe/Belfast"), + + EUROPE_BELGRADE("Europe/Belgrade"), + + EUROPE_BERLIN("Europe/Berlin"), + + EUROPE_BRATISLAVA("Europe/Bratislava"), + + EUROPE_BRUSSELS("Europe/Brussels"), + + EUROPE_BUCHAREST("Europe/Bucharest"), + + EUROPE_BUDAPEST("Europe/Budapest"), + + EUROPE_BUSINGEN("Europe/Busingen"), + + EUROPE_CHISINAU("Europe/Chisinau"), + + EUROPE_COPENHAGEN("Europe/Copenhagen"), + + EUROPE_DUBLIN("Europe/Dublin"), + + EUROPE_GIBRALTAR("Europe/Gibraltar"), + + EUROPE_GUERNSEY("Europe/Guernsey"), + + EUROPE_HELSINKI("Europe/Helsinki"), + + EUROPE_ISLE_OF_MAN("Europe/Isle_of_Man"), + + EUROPE_ISTANBUL("Europe/Istanbul"), + + EUROPE_JERSEY("Europe/Jersey"), + + EUROPE_KALININGRAD("Europe/Kaliningrad"), + + EUROPE_KIEV("Europe/Kiev"), + + EUROPE_KIROV("Europe/Kirov"), + + EUROPE_KYIV("Europe/Kyiv"), + + EUROPE_LISBON("Europe/Lisbon"), + + EUROPE_LJUBLJANA("Europe/Ljubljana"), + + EUROPE_LONDON("Europe/London"), + + EUROPE_LUXEMBOURG("Europe/Luxembourg"), + + EUROPE_MADRID("Europe/Madrid"), + + EUROPE_MALTA("Europe/Malta"), + + EUROPE_MARIEHAMN("Europe/Mariehamn"), + + EUROPE_MINSK("Europe/Minsk"), + + EUROPE_MONACO("Europe/Monaco"), + + EUROPE_MOSCOW("Europe/Moscow"), + + EUROPE_NICOSIA("Europe/Nicosia"), + + EUROPE_OSLO("Europe/Oslo"), + + EUROPE_PARIS("Europe/Paris"), + + EUROPE_PODGORICA("Europe/Podgorica"), + + EUROPE_PRAGUE("Europe/Prague"), + + EUROPE_RIGA("Europe/Riga"), + + EUROPE_ROME("Europe/Rome"), + + EUROPE_SAMARA("Europe/Samara"), + + EUROPE_SAN_MARINO("Europe/San_Marino"), + + EUROPE_SARAJEVO("Europe/Sarajevo"), + + EUROPE_SARATOV("Europe/Saratov"), + + EUROPE_SIMFEROPOL("Europe/Simferopol"), + + EUROPE_SKOPJE("Europe/Skopje"), + + EUROPE_SOFIA("Europe/Sofia"), + + EUROPE_STOCKHOLM("Europe/Stockholm"), + + EUROPE_TALLINN("Europe/Tallinn"), + + EUROPE_TIRANE("Europe/Tirane"), + + EUROPE_TIRASPOL("Europe/Tiraspol"), + + EUROPE_ULYANOVSK("Europe/Ulyanovsk"), + + EUROPE_UZHGOROD("Europe/Uzhgorod"), + + EUROPE_VADUZ("Europe/Vaduz"), + + EUROPE_VATICAN("Europe/Vatican"), + + EUROPE_VIENNA("Europe/Vienna"), + + EUROPE_VILNIUS("Europe/Vilnius"), + + EUROPE_VOLGOGRAD("Europe/Volgograd"), + + EUROPE_WARSAW("Europe/Warsaw"), + + EUROPE_ZAGREB("Europe/Zagreb"), + + EUROPE_ZAPOROZHYE("Europe/Zaporozhye"), + + EUROPE_ZURICH("Europe/Zurich"), + + GB("GB"), + + GB_EIRE("GB-Eire"), + + GMT("GMT"), + + GMT0("GMT0"), + + GREENWICH("Greenwich"), + + HONGKONG("Hongkong"), + + ICELAND("Iceland"), + + INDIAN_ANTANANARIVO("Indian/Antananarivo"), + + INDIAN_CHAGOS("Indian/Chagos"), + + INDIAN_CHRISTMAS("Indian/Christmas"), + + INDIAN_COCOS("Indian/Cocos"), + + INDIAN_COMORO("Indian/Comoro"), + + INDIAN_KERGUELEN("Indian/Kerguelen"), + + INDIAN_MAHE("Indian/Mahe"), + + INDIAN_MALDIVES("Indian/Maldives"), + + INDIAN_MAURITIUS("Indian/Mauritius"), + + INDIAN_MAYOTTE("Indian/Mayotte"), + + INDIAN_REUNION("Indian/Reunion"), + + IRAN("Iran"), + + ISRAEL("Israel"), + + JAMAICA("Jamaica"), + + JAPAN("Japan"), + + KWAJALEIN("Kwajalein"), + + LIBYA("Libya"), + + MET("MET"), + + MST7_MDT("MST7MDT"), + + MEXICO_BAJA_NORTE("Mexico/BajaNorte"), + + MEXICO_BAJA_SUR("Mexico/BajaSur"), + + MEXICO_GENERAL("Mexico/General"), + + NZ("NZ"), + + NZ_CHAT("NZ-CHAT"), + + NAVAJO("Navajo"), + + PRC("PRC"), + + PST8_PDT("PST8PDT"), + + PACIFIC_APIA("Pacific/Apia"), + + PACIFIC_AUCKLAND("Pacific/Auckland"), + + PACIFIC_BOUGAINVILLE("Pacific/Bougainville"), + + PACIFIC_CHATHAM("Pacific/Chatham"), + + PACIFIC_CHUUK("Pacific/Chuuk"), + + PACIFIC_EASTER("Pacific/Easter"), + + PACIFIC_EFATE("Pacific/Efate"), + + PACIFIC_ENDERBURY("Pacific/Enderbury"), + + PACIFIC_FAKAOFO("Pacific/Fakaofo"), + + PACIFIC_FIJI("Pacific/Fiji"), + + PACIFIC_FUNAFUTI("Pacific/Funafuti"), + + PACIFIC_GALAPAGOS("Pacific/Galapagos"), + + PACIFIC_GAMBIER("Pacific/Gambier"), + + PACIFIC_GUADALCANAL("Pacific/Guadalcanal"), + + PACIFIC_GUAM("Pacific/Guam"), + + PACIFIC_HONOLULU("Pacific/Honolulu"), + + PACIFIC_JOHNSTON("Pacific/Johnston"), + + PACIFIC_KANTON("Pacific/Kanton"), + + PACIFIC_KIRITIMATI("Pacific/Kiritimati"), + + PACIFIC_KOSRAE("Pacific/Kosrae"), + + PACIFIC_KWAJALEIN("Pacific/Kwajalein"), + + PACIFIC_MAJURO("Pacific/Majuro"), + + PACIFIC_MARQUESAS("Pacific/Marquesas"), + + PACIFIC_MIDWAY("Pacific/Midway"), + + PACIFIC_NAURU("Pacific/Nauru"), + + PACIFIC_NIUE("Pacific/Niue"), + + PACIFIC_NORFOLK("Pacific/Norfolk"), + + PACIFIC_NOUMEA("Pacific/Noumea"), + + PACIFIC_PAGO_PAGO("Pacific/Pago_Pago"), + + PACIFIC_PALAU("Pacific/Palau"), + + PACIFIC_PITCAIRN("Pacific/Pitcairn"), + + PACIFIC_POHNPEI("Pacific/Pohnpei"), + + PACIFIC_PONAPE("Pacific/Ponape"), + + PACIFIC_PORT_MORESBY("Pacific/Port_Moresby"), + + PACIFIC_RAROTONGA("Pacific/Rarotonga"), + + PACIFIC_SAIPAN("Pacific/Saipan"), + + PACIFIC_SAMOA("Pacific/Samoa"), + + PACIFIC_TAHITI("Pacific/Tahiti"), + + PACIFIC_TARAWA("Pacific/Tarawa"), + + PACIFIC_TONGATAPU("Pacific/Tongatapu"), + + PACIFIC_TRUK("Pacific/Truk"), + + PACIFIC_WAKE("Pacific/Wake"), + + PACIFIC_WALLIS("Pacific/Wallis"), + + PACIFIC_YAP("Pacific/Yap"), + + POLAND("Poland"), + + PORTUGAL("Portugal"), + + ROK("ROK"), + + SINGAPORE("Singapore"), + + SYSTEM_V_AST4("SystemV/AST4"), + + SYSTEM_V_AST4_ADT("SystemV/AST4ADT"), + + SYSTEM_V_CST6("SystemV/CST6"), + + SYSTEM_V_CST6_CDT("SystemV/CST6CDT"), + + SYSTEM_V_EST5("SystemV/EST5"), + + SYSTEM_V_EST5_EDT("SystemV/EST5EDT"), + + SYSTEM_V_HST10("SystemV/HST10"), + + SYSTEM_V_MST7("SystemV/MST7"), + + SYSTEM_V_MST7_MDT("SystemV/MST7MDT"), + + SYSTEM_V_PST8("SystemV/PST8"), + + SYSTEM_V_PST8_PDT("SystemV/PST8PDT"), + + SYSTEM_V_YST9("SystemV/YST9"), + + SYSTEM_V_YST9_YDT("SystemV/YST9YDT"), + + TURKEY("Turkey"), + + UCT("UCT"), + + US_ALASKA("US/Alaska"), + + US_ALEUTIAN("US/Aleutian"), + + US_ARIZONA("US/Arizona"), + + US_CENTRAL("US/Central"), + + US_EAST_INDIANA("US/East-Indiana"), + + US_EASTERN("US/Eastern"), + + US_HAWAII("US/Hawaii"), + + US_INDIANA_STARKE("US/Indiana-Starke"), + + US_MICHIGAN("US/Michigan"), + + US_MOUNTAIN("US/Mountain"), + + US_PACIFIC("US/Pacific"), + + US_SAMOA("US/Samoa"), + + UTC("UTC"), + + UNIVERSAL("Universal"), + + W_SU("W-SU"), + + WET("WET"), + + ZULU("Zulu"), + + EST("EST"), + + HST("HST"), + + MST("MST"), + + ACT("ACT"), + + AET("AET"), + + AGT("AGT"), + + ART("ART"), + + AST("AST"), + + BET("BET"), + + BST("BST"), + + CAT("CAT"), + + CNT("CNT"), + + CST("CST"), + + CTT("CTT"), + + EAT("EAT"), + + ECT("ECT"), + + IET("IET"), + + IST("IST"), + + JST("JST"), + + MIT("MIT"), + + NET("NET"), + + NST("NST"), + + PLT("PLT"), + + PNT("PNT"), + + PRT("PRT"), + + PST("PST"), + + SST("SST"), + + VST("VST"); + + private String value; + + TimeZoneEnum(String value) { + this.value = value; } - /** - * Status of the schedule - * - * @return status - */ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; + public String getValue() { + return value; } - public void setStatus(@javax.annotation.Nullable StatusEnum status) { - this.status = status; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateScheduleRequest personalisedViewId( - @javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; - return this; + public static TimeZoneEnum fromValue(String value) { + for (TimeZoneEnum b : TimeZoneEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Personalised view id of the liveboard to be scheduled. - * - * @return personalisedViewId - */ - @javax.annotation.Nullable - public String getPersonalisedViewId() { - return personalisedViewId; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TimeZoneEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeZoneEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeZoneEnum.fromValue(value); + } } - public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { - this.personalisedViewId = personalisedViewId; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TimeZoneEnum.fromValue(value); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateScheduleRequest updateScheduleRequest = (UpdateScheduleRequest) o; - return Objects.equals(this.name, updateScheduleRequest.name) - && Objects.equals(this.description, updateScheduleRequest.description) - && Objects.equals(this.metadataType, updateScheduleRequest.metadataType) - && Objects.equals(this.metadataIdentifier, updateScheduleRequest.metadataIdentifier) - && Objects.equals(this.fileFormat, updateScheduleRequest.fileFormat) - && Objects.equals(this.liveboardOptions, updateScheduleRequest.liveboardOptions) - && Objects.equals(this.pdfOptions, updateScheduleRequest.pdfOptions) - && Objects.equals(this.timeZone, updateScheduleRequest.timeZone) - && Objects.equals(this.frequency, updateScheduleRequest.frequency) - && Objects.equals(this.recipientDetails, updateScheduleRequest.recipientDetails) - && Objects.equals(this.status, updateScheduleRequest.status) - && Objects.equals( - this.personalisedViewId, updateScheduleRequest.personalisedViewId); + } + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nullable + private TimeZoneEnum timeZone; + + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nullable + private FrequencyInput frequency; + + public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) + @javax.annotation.Nullable + private RecipientDetailsInput recipientDetails; + + /** + * Status of the schedule + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + PAUSE("PAUSE"); + + private String value; + + StatusEnum(String value) { + this.value = value; } - @Override - public int hashCode() { - return Objects.hash( - name, - description, - metadataType, - metadataIdentifier, - fileFormat, - liveboardOptions, - pdfOptions, - timeZone, - frequency, - recipientDetails, - status, - personalisedViewId); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateScheduleRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); - sb.append(" metadataIdentifier: ") - .append(toIndentedString(metadataIdentifier)) - .append("\n"); - sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); - sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); - sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); - sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); - sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); - sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" personalisedViewId: ") - .append(toIndentedString(personalisedViewId)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("metadata_type"); - openapiFields.add("metadata_identifier"); - openapiFields.add("file_format"); - openapiFields.add("liveboard_options"); - openapiFields.add("pdf_options"); - openapiFields.add("time_zone"); - openapiFields.add("frequency"); - openapiFields.add("recipient_details"); - openapiFields.add("status"); - openapiFields.add("personalised_view_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateScheduleRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateScheduleRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateScheduleRequest is not found in" - + " the empty JSON string", - UpdateScheduleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateScheduleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateScheduleRequest` 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("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) - && !jsonObj.get("metadata_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("metadata_type").toString())); - } - // validate the optional field `metadata_type` - if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { - MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); - } - if ((jsonObj.get("metadata_identifier") != null - && !jsonObj.get("metadata_identifier").isJsonNull()) - && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `metadata_identifier` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("metadata_identifier").toString())); - } - if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) - && !jsonObj.get("file_format").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `file_format` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("file_format").toString())); - } - // validate the optional field `file_format` - if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { - FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); - } - // validate the optional field `liveboard_options` - if (jsonObj.get("liveboard_options") != null - && !jsonObj.get("liveboard_options").isJsonNull()) { - LiveboardOptionsInput.validateJsonElement(jsonObj.get("liveboard_options")); - } - // validate the optional field `pdf_options` - if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { - SchedulesPdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); - } - if ((jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) - && !jsonObj.get("time_zone").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `time_zone` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("time_zone").toString())); - } - // validate the optional field `time_zone` - if (jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) { - TimeZoneEnum.validateJsonElement(jsonObj.get("time_zone")); - } - // validate the optional field `frequency` - if (jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) { - FrequencyInput.validateJsonElement(jsonObj.get("frequency")); - } - // validate the optional field `recipient_details` - if (jsonObj.get("recipient_details") != null - && !jsonObj.get("recipient_details").isJsonNull()) { - RecipientDetailsInput.validateJsonElement(jsonObj.get("recipient_details")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) - && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `status` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - if ((jsonObj.get("personalised_view_id") != null - && !jsonObj.get("personalised_view_id").isJsonNull()) - && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `personalised_view_id` to be a primitive type in" - + " the JSON string but got `%s`", - jsonObj.get("personalised_view_id").toString())); - } + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateScheduleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateScheduleRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateScheduleRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateScheduleRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateScheduleRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public UpdateScheduleRequest() { + } + + public UpdateScheduleRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the scheduled job. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateScheduleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the scheduled job. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateScheduleRequest metadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object. + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + + public UpdateScheduleRequest metadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * @return metadataIdentifier + */ + @javax.annotation.Nullable + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + + public UpdateScheduleRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + + public UpdateScheduleRequest liveboardOptions(@javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + return this; + } + + /** + * Options to specify the details of a Liveboard. + * @return liveboardOptions + */ + @javax.annotation.Nullable + public LiveboardOptionsInput getLiveboardOptions() { + return liveboardOptions; + } + + public void setLiveboardOptions(@javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + } + + + public UpdateScheduleRequest pdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * Options for PDF export. + * @return pdfOptions + */ + @javax.annotation.Nullable + public SchedulesPdfOptionsInput getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + } + + + public UpdateScheduleRequest timeZone(@javax.annotation.Nullable TimeZoneEnum timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Time zone + * @return timeZone + */ + @javax.annotation.Nullable + public TimeZoneEnum getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nullable TimeZoneEnum timeZone) { + this.timeZone = timeZone; + } + + + public UpdateScheduleRequest frequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + return this; + } + + /** + * Frequency of the scheduled job run. + * @return frequency + */ + @javax.annotation.Nullable + public FrequencyInput getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + } + + + public UpdateScheduleRequest recipientDetails(@javax.annotation.Nullable RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + return this; + } + + /** + * Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. + * @return recipientDetails + */ + @javax.annotation.Nullable + public RecipientDetailsInput getRecipientDetails() { + return recipientDetails; + } + + public void setRecipientDetails(@javax.annotation.Nullable RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + } + + + public UpdateScheduleRequest status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the schedule + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public UpdateScheduleRequest personalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Personalised view id of the liveboard to be scheduled. + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Create an instance of UpdateScheduleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateScheduleRequest - * @throws IOException if the JSON string is invalid with respect to UpdateScheduleRequest - */ - public static UpdateScheduleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateScheduleRequest.class); + if (o == null || getClass() != o.getClass()) { + return false; } + UpdateScheduleRequest updateScheduleRequest = (UpdateScheduleRequest) o; + return Objects.equals(this.name, updateScheduleRequest.name) && + Objects.equals(this.description, updateScheduleRequest.description) && + Objects.equals(this.metadataType, updateScheduleRequest.metadataType) && + Objects.equals(this.metadataIdentifier, updateScheduleRequest.metadataIdentifier) && + Objects.equals(this.fileFormat, updateScheduleRequest.fileFormat) && + Objects.equals(this.liveboardOptions, updateScheduleRequest.liveboardOptions) && + Objects.equals(this.pdfOptions, updateScheduleRequest.pdfOptions) && + Objects.equals(this.timeZone, updateScheduleRequest.timeZone) && + Objects.equals(this.frequency, updateScheduleRequest.frequency) && + Objects.equals(this.recipientDetails, updateScheduleRequest.recipientDetails) && + Objects.equals(this.status, updateScheduleRequest.status) && + Objects.equals(this.personalisedViewId, updateScheduleRequest.personalisedViewId); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, metadataType, metadataIdentifier, fileFormat, liveboardOptions, pdfOptions, timeZone, frequency, recipientDetails, status, personalisedViewId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateScheduleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ").append(toIndentedString(metadataIdentifier)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" personalisedViewId: ").append(toIndentedString(personalisedViewId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("file_format"); + openapiFields.add("liveboard_options"); + openapiFields.add("pdf_options"); + openapiFields.add("time_zone"); + openapiFields.add("frequency"); + openapiFields.add("recipient_details"); + openapiFields.add("status"); + openapiFields.add("personalised_view_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateScheduleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateScheduleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateScheduleRequest is not found in the empty JSON string", UpdateScheduleRequest.openapiRequiredFields.toString())); + } + } - /** - * Convert an instance of UpdateScheduleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateScheduleRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateScheduleRequest` 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("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if ((jsonObj.get("metadata_identifier") != null && !jsonObj.get("metadata_identifier").isJsonNull()) && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `file_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `liveboard_options` + if (jsonObj.get("liveboard_options") != null && !jsonObj.get("liveboard_options").isJsonNull()) { + LiveboardOptionsInput.validateJsonElement(jsonObj.get("liveboard_options")); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + SchedulesPdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); + } + if ((jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) && !jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_zone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_zone").toString())); + } + // validate the optional field `time_zone` + if (jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) { + TimeZoneEnum.validateJsonElement(jsonObj.get("time_zone")); + } + // validate the optional field `frequency` + if (jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) { + FrequencyInput.validateJsonElement(jsonObj.get("frequency")); + } + // validate the optional field `recipient_details` + if (jsonObj.get("recipient_details") != null && !jsonObj.get("recipient_details").isJsonNull()) { + RecipientDetailsInput.validateJsonElement(jsonObj.get("recipient_details")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("personalised_view_id") != null && !jsonObj.get("personalised_view_id").isJsonNull()) && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `personalised_view_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateScheduleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateScheduleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateScheduleRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateScheduleRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateScheduleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateScheduleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateScheduleRequest + * @throws IOException if the JSON string is invalid with respect to UpdateScheduleRequest + */ + public static UpdateScheduleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateScheduleRequest.class); + } + + /** + * Convert an instance of UpdateScheduleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java index 052002e4c..9fb6dbcd7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java @@ -4,198 +4,202 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateSystemConfigRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +import com.thoughtspot.client.JSON; + +/** + * UpdateSystemConfigRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class UpdateSystemConfigRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nonnull + private Object _configuration; - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - @javax.annotation.Nonnull - private Object _configuration; + public UpdateSystemConfigRequest() { + } - public UpdateSystemConfigRequest() {} + public UpdateSystemConfigRequest _configuration(@javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + return this; + } - public UpdateSystemConfigRequest _configuration( - @javax.annotation.Nonnull Object _configuration) { - this._configuration = _configuration; - return this; - } + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + * @return _configuration + */ + @javax.annotation.Nonnull + public Object getConfiguration() { + return _configuration; + } - /** - * Configuration JSON with the key-value pair of configuration attributes to be updated. - * - * @return _configuration - */ - @javax.annotation.Nonnull - public Object getConfiguration() { - return _configuration; - } + public void setConfiguration(@javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + } - public void setConfiguration(@javax.annotation.Nonnull Object _configuration) { - this._configuration = _configuration; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateSystemConfigRequest updateSystemConfigRequest = (UpdateSystemConfigRequest) o; - return Objects.equals(this._configuration, updateSystemConfigRequest._configuration); - } - @Override - public int hashCode() { - return Objects.hash(_configuration); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateSystemConfigRequest {\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UpdateSystemConfigRequest updateSystemConfigRequest = (UpdateSystemConfigRequest) o; + return Objects.equals(this._configuration, updateSystemConfigRequest._configuration); + } + + @Override + public int hashCode() { + return Objects.hash(_configuration); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateSystemConfigRequest {\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("configuration"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("configuration"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateSystemConfigRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateSystemConfigRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateSystemConfigRequest is not" - + " found in the empty JSON string", - UpdateSystemConfigRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("configuration"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateSystemConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateSystemConfigRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateSystemConfigRequest is not found in the empty JSON string", UpdateSystemConfigRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateSystemConfigRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateSystemConfigRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateSystemConfigRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateSystemConfigRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateSystemConfigRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateSystemConfigRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateSystemConfigRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateSystemConfigRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateSystemConfigRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateSystemConfigRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateSystemConfigRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateSystemConfigRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateSystemConfigRequest - * @throws IOException if the JSON string is invalid with respect to UpdateSystemConfigRequest - */ - public static UpdateSystemConfigRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateSystemConfigRequest.class); - } + } - /** - * Convert an instance of UpdateSystemConfigRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateSystemConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateSystemConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateSystemConfigRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateSystemConfigRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateSystemConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateSystemConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateSystemConfigRequest + * @throws IOException if the JSON string is invalid with respect to UpdateSystemConfigRequest + */ + public static UpdateSystemConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateSystemConfigRequest.class); + } + + /** + * Convert an instance of UpdateSystemConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java index a1a6c378e..15b8ebf32 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java @@ -4,229 +4,227 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateTagRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateTagRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_COLOR = "color"; - - @SerializedName(SERIALIZED_NAME_COLOR) - @javax.annotation.Nullable - private String color; - - public UpdateTagRequest() {} - - public UpdateTagRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the tag. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateTagRequest color(@javax.annotation.Nullable String color) { - this.color = color; - return this; - } - - /** - * Hex color code to be assigned to the tag. For example, #ff78a9. - * - * @return color - */ - @javax.annotation.Nullable - public String getColor() { - return color; - } - - public void setColor(@javax.annotation.Nullable String color) { - this.color = color; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateTagRequest updateTagRequest = (UpdateTagRequest) o; - return Objects.equals(this.name, updateTagRequest.name) - && Objects.equals(this.color, updateTagRequest.color); +/** + * UpdateTagRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateTagRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_COLOR = "color"; + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public UpdateTagRequest() { + } + + public UpdateTagRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the tag. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateTagRequest color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(name, color); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateTagRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); + UpdateTagRequest updateTagRequest = (UpdateTagRequest) o; + return Objects.equals(this.name, updateTagRequest.name) && + Objects.equals(this.color, updateTagRequest.color); + } + + @Override + public int hashCode() { + return Objects.hash(name, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTagRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateTagRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTagRequest is not found in the empty JSON string", UpdateTagRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("color"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateTagRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateTagRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateTagRequest is not found in the" - + " empty JSON string", - UpdateTagRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateTagRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateTagRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateTagRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTagRequest` 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("color") != null && !jsonObj.get("color").isJsonNull()) - && !jsonObj.get("color").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `color` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("color").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateTagRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateTagRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateTagRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateTagRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateTagRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateTagRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateTagRequest - * @throws IOException if the JSON string is invalid with respect to UpdateTagRequest - */ - public static UpdateTagRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateTagRequest.class); - } - - /** - * Convert an instance of UpdateTagRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateTagRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateTagRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateTagRequest + * @throws IOException if the JSON string is invalid with respect to UpdateTagRequest + */ + public static UpdateTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateTagRequest.class); + } + + /** + * Convert an instance of UpdateTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java index e6580e6e4..1cddc30e1 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 @@ -4,913 +4,828 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateUserGroupRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateUserGroupRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = - "default_liveboard_identifiers"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) - @javax.annotation.Nullable - private List defaultLiveboardIdentifiers; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - /** Gets or Sets privileges */ - @JsonAdapter(PrivilegesEnum.Adapter.class) - public enum PrivilegesEnum { - ADMINISTRATION("ADMINISTRATION"), - - AUTHORING("AUTHORING"), - - USERDATAUPLOADING("USERDATAUPLOADING"), - - DATADOWNLOADING("DATADOWNLOADING"), - - USERMANAGEMENT("USERMANAGEMENT"), - - DATAMANAGEMENT("DATAMANAGEMENT"), - - SHAREWITHALL("SHAREWITHALL"), - - JOBSCHEDULING("JOBSCHEDULING"), - - A3_ANALYSIS("A3ANALYSIS"), - - EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), - - BYPASSRLS("BYPASSRLS"), - - RANALYSIS("RANALYSIS"), - - DEVELOPER("DEVELOPER"), - - USER_ADMINISTRATION("USER_ADMINISTRATION"), - - GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), - - SYNCMANAGEMENT("SYNCMANAGEMENT"), - - CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), - - DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), - - LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), - - PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), - - CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), - - THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), - - ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), - - CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), - - CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), - - PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), - - CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), - - CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), - - CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); - - private String value; - - PrivilegesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PrivilegesEnum fromValue(String value) { - for (PrivilegesEnum b : PrivilegesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PrivilegesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PrivilegesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; - - @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List subGroupIdentifiers; - - /** Type of the group */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOCAL_GROUP("LOCAL_GROUP"), - - LDAP_GROUP("LDAP_GROUP"), - - TEAM_GROUP("TEAM_GROUP"), - - TENANT_GROUP("TENANT_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } +import com.thoughtspot.client.JSON; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } +/** + * UpdateUserGroupRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateUserGroupRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = "default_liveboard_identifiers"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + /** + * Gets or Sets privileges + */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_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"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; - - @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) - @javax.annotation.Nullable - private List userIdentifiers; - - /** - * Visibility of the group. To make a group visible to other users and groups, set the - * visibility to SHAREABLE. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } + @Override + public String toString() { + return String.valueOf(value); } - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; - - @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) - @javax.annotation.Nullable - private List roleIdentifiers; - - /** Type of update operation. Default operation type is REPLACE */ - @JsonAdapter(OperationEnum.Adapter.class) - public enum OperationEnum { - ADD("ADD"), - - REMOVE("REMOVE"), - - REPLACE("REPLACE"); - - private String value; - - OperationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperationEnum fromValue(String value) { - for (OperationEnum b : OperationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperationEnum.fromValue(value); - } + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperationEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_OPERATION = "operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - @javax.annotation.Nullable - private OperationEnum operation = OperationEnum.REPLACE; - - public UpdateUserGroupRequest() {} - - public UpdateUserGroupRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the group to modify. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateUserGroupRequest defaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public UpdateUserGroupRequest addDefaultLiveboardIdentifiersItem( - String defaultLiveboardIdentifiersItem) { - if (this.defaultLiveboardIdentifiers == null) { - this.defaultLiveboardIdentifiers = new ArrayList<>(); - } - this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * ID of the Liveboards to be assigned as default Liveboards to the users in the group. - * - * @return defaultLiveboardIdentifiers - */ - @javax.annotation.Nullable - public List getDefaultLiveboardIdentifiers() { - return defaultLiveboardIdentifiers; + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } } - public void setDefaultLiveboardIdentifiers( - @javax.annotation.Nullable List defaultLiveboardIdentifiers) { - this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); } + } - public UpdateUserGroupRequest description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - /** - * Description for the group. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } + /** + * Type of the group + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); - public UpdateUserGroupRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } + private String value; - /** - * Display name of the group. - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; + TypeEnum(String value) { + this.value = value; } - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; + public String getValue() { + return value; } - public UpdateUserGroupRequest privileges( - @javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateUserGroupRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.privileges.add(privilegesItem); - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Privileges to assign to the group. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } } - public UpdateUserGroupRequest subGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } + } - public UpdateUserGroupRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { - if (this.subGroupIdentifiers == null) { - this.subGroupIdentifiers = new ArrayList<>(); - } - this.subGroupIdentifiers.add(subGroupIdentifiersItem); - return this; - } + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - * - * @return subGroupIdentifiers - */ - @javax.annotation.Nullable - public List getSubGroupIdentifiers() { - return subGroupIdentifiers; - } + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; - public void setSubGroupIdentifiers( - @javax.annotation.Nullable List subGroupIdentifiers) { - this.subGroupIdentifiers = subGroupIdentifiers; - } + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - public UpdateUserGroupRequest type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } + private String value; - /** - * Type of the group - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + VisibilityEnum(String value) { + this.value = value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public String getValue() { + return value; } - public UpdateUserGroupRequest userIdentifiers( - @javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateUserGroupRequest addUserIdentifiersItem(String userIdentifiersItem) { - if (this.userIdentifiers == null) { - this.userIdentifiers = new ArrayList<>(); + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.userIdentifiers.add(userIdentifiersItem); - return this; - } - - /** - * GUID or name of the users to assign to the group. - * - * @return userIdentifiers - */ - @javax.annotation.Nullable - public List getUserIdentifiers() { - return userIdentifiers; - } - - public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { - this.userIdentifiers = userIdentifiers; - } - - public UpdateUserGroupRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the group. To make a group visible to other users and groups, set the - * visibility to SHAREABLE. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public UpdateUserGroupRequest roleIdentifiers( - @javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - return this; + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - public UpdateUserGroupRequest addRoleIdentifiersItem(String roleIdentifiersItem) { - if (this.roleIdentifiers == null) { - this.roleIdentifiers = new ArrayList<>(); - } - this.roleIdentifiers.add(roleIdentifiersItem); - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); } + } - /** - * Role identifiers of the Roles that should be assigned to the group. - * - * @return roleIdentifiers - */ - @javax.annotation.Nullable - public List getRoleIdentifiers() { - return roleIdentifiers; - } + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; - public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { - this.roleIdentifiers = roleIdentifiers; - } + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; - public UpdateUserGroupRequest operation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - return this; - } + /** + * Type of update operation. Default operation type is REPLACE + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); - /** - * Type of update operation. Default operation type is REPLACE - * - * @return operation - */ - @javax.annotation.Nullable - public OperationEnum getOperation() { - return operation; - } + private String value; - public void setOperation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; + OperationEnum(String value) { + this.value = value; } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUserGroupRequest updateUserGroupRequest = (UpdateUserGroupRequest) o; - return Objects.equals(this.name, updateUserGroupRequest.name) - && Objects.equals( - this.defaultLiveboardIdentifiers, - updateUserGroupRequest.defaultLiveboardIdentifiers) - && Objects.equals(this.description, updateUserGroupRequest.description) - && Objects.equals(this.displayName, updateUserGroupRequest.displayName) - && Objects.equals(this.privileges, updateUserGroupRequest.privileges) - && Objects.equals( - this.subGroupIdentifiers, updateUserGroupRequest.subGroupIdentifiers) - && Objects.equals(this.type, updateUserGroupRequest.type) - && Objects.equals(this.userIdentifiers, updateUserGroupRequest.userIdentifiers) - && Objects.equals(this.visibility, updateUserGroupRequest.visibility) - && Objects.equals(this.roleIdentifiers, updateUserGroupRequest.roleIdentifiers) - && Objects.equals(this.operation, updateUserGroupRequest.operation); - } - - @Override - public int hashCode() { - return Objects.hash( - name, - defaultLiveboardIdentifiers, - description, - displayName, - privileges, - subGroupIdentifiers, - type, - userIdentifiers, - visibility, - roleIdentifiers, - operation); + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUserGroupRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" defaultLiveboardIdentifiers: ") - .append(toIndentedString(defaultLiveboardIdentifiers)) - .append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" subGroupIdentifiers: ") - .append(toIndentedString(subGroupIdentifiers)) - .append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("default_liveboard_identifiers"); - openapiFields.add("description"); - openapiFields.add("display_name"); - openapiFields.add("privileges"); - openapiFields.add("sub_group_identifiers"); - openapiFields.add("type"); - openapiFields.add("user_identifiers"); - openapiFields.add("visibility"); - openapiFields.add("role_identifiers"); - openapiFields.add("operation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateUserGroupRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateUserGroupRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateUserGroupRequest is not found" - + " in the empty JSON string", - UpdateUserGroupRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateUserGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateUserGroupRequest` 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())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("default_liveboard_identifiers") != null - && !jsonObj.get("default_liveboard_identifiers").isJsonNull() - && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_liveboard_identifiers` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("default_liveboard_identifiers").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); - } - if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("sub_group_identifiers") != null - && !jsonObj.get("sub_group_identifiers").isJsonNull() - && !jsonObj.get("sub_group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sub_group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("sub_group_identifiers").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_identifiers") != null - && !jsonObj.get("user_identifiers").isJsonNull() - && !jsonObj.get("user_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_identifiers").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("role_identifiers") != null - && !jsonObj.get("role_identifiers").isJsonNull() - && !jsonObj.get("role_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `role_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("role_identifiers").toString())); - } - if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) - && !jsonObj.get("operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operation").toString())); - } - // validate the optional field `operation` - if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { - OperationEnum.validateJsonElement(jsonObj.get("operation")); - } + return String.valueOf(value); } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUserGroupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateUserGroupRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUserGroupRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUserGroupRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Create an instance of UpdateUserGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserGroupRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserGroupRequest - */ - public static UpdateUserGroupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUserGroupRequest.class); - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Convert an instance of UpdateUserGroupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + public UpdateUserGroupRequest() { + } + + public UpdateUserGroupRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the group to modify. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateUserGroupRequest defaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public UpdateUserGroupRequest addDefaultLiveboardIdentifiersItem(String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers(@javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + + public UpdateUserGroupRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description for the group. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateUserGroupRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the group. + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public UpdateUserGroupRequest privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public UpdateUserGroupRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges to assign to the group. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public UpdateUserGroupRequest subGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public UpdateUserGroupRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers(@javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + + public UpdateUserGroupRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the group + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public UpdateUserGroupRequest userIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public UpdateUserGroupRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users to assign to the group. + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + + public UpdateUserGroupRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public UpdateUserGroupRequest roleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public UpdateUserGroupRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Role identifiers of the Roles that should be assigned to the group. + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + + public UpdateUserGroupRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is REPLACE + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserGroupRequest updateUserGroupRequest = (UpdateUserGroupRequest) o; + return Objects.equals(this.name, updateUserGroupRequest.name) && + Objects.equals(this.defaultLiveboardIdentifiers, updateUserGroupRequest.defaultLiveboardIdentifiers) && + Objects.equals(this.description, updateUserGroupRequest.description) && + Objects.equals(this.displayName, updateUserGroupRequest.displayName) && + Objects.equals(this.privileges, updateUserGroupRequest.privileges) && + Objects.equals(this.subGroupIdentifiers, updateUserGroupRequest.subGroupIdentifiers) && + Objects.equals(this.type, updateUserGroupRequest.type) && + Objects.equals(this.userIdentifiers, updateUserGroupRequest.userIdentifiers) && + Objects.equals(this.visibility, updateUserGroupRequest.visibility) && + Objects.equals(this.roleIdentifiers, updateUserGroupRequest.roleIdentifiers) && + Objects.equals(this.operation, updateUserGroupRequest.operation); + } + + @Override + public int hashCode() { + return Objects.hash(name, defaultLiveboardIdentifiers, description, displayName, privileges, subGroupIdentifiers, type, userIdentifiers, visibility, roleIdentifiers, operation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserGroupRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" defaultLiveboardIdentifiers: ").append(toIndentedString(defaultLiveboardIdentifiers)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ").append(toIndentedString(subGroupIdentifiers)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("display_name"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("role_identifiers"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUserGroupRequest is not found in the empty JSON string", UpdateUserGroupRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateUserGroupRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUserGroupRequest` 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())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null && !jsonObj.get("default_liveboard_identifiers").isJsonNull() && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `default_liveboard_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null && !jsonObj.get("sub_group_identifiers").isJsonNull() && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null && !jsonObj.get("user_identifiers").isJsonNull() && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null && !jsonObj.get("role_identifiers").isJsonNull() && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `role_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("role_identifiers").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateUserGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserGroupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateUserGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserGroupRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserGroupRequest + */ + public static UpdateUserGroupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateUserGroupRequest.class); + } + + /** + * Convert an instance of UpdateUserGroupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java index a80e67e57..514a2f1c8 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java @@ -4,1194 +4,1060 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UpdateUserRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateUserRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nullable - private String displayName; - - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups - * when they try to share an object. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; +import com.thoughtspot.client.JSON; - VisibilityEnum(String value) { - this.value = value; - } +/** + * UpdateUserRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; - public String getValue() { - return value; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; - @Override - public String toString() { - return String.valueOf(value); - } + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } + private String value; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } + VisibilityEnum(String value) { + this.value = value; } - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nullable - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - /** - * Current status of the user account. The `SUSPENDED` user state indicates a - * transitional state applicable to IAMv2 users only. - */ - @JsonAdapter(AccountStatusEnum.Adapter.class) - public enum AccountStatusEnum { - ACTIVE("ACTIVE"), - - INACTIVE("INACTIVE"), - - EXPIRED("EXPIRED"), - - LOCKED("LOCKED"), - - PENDING("PENDING"), - - SUSPENDED("SUSPENDED"); - - private String value; - - AccountStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountStatusEnum fromValue(String value) { - for (AccountStatusEnum b : AccountStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountStatusEnum.fromValue(value); - } + public String getValue() { + return value; } - public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) - @javax.annotation.Nullable - private AccountStatusEnum accountStatus; - - public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; - - @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) - @javax.annotation.Nullable - private Boolean notifyOnShare; - - public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = - "show_onboarding_experience"; - - @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) - @javax.annotation.Nullable - private Boolean showOnboardingExperience; - - public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = - "onboarding_experience_completed"; - - @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) - @javax.annotation.Nullable - private Boolean onboardingExperienceCompleted; - - /** Type of the account. */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - LOCAL_USER("LOCAL_USER"), - - LDAP_USER("LDAP_USER"), - - SAML_USER("SAML_USER"), - - OIDC_USER("OIDC_USER"), - - REMOTE_USER("REMOTE_USER"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountTypeEnum.fromValue(value); - } + @Override + public String toString() { + return String.valueOf(value); } - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - @javax.annotation.Nullable - private AccountTypeEnum accountType; - - public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; - - @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) - @javax.annotation.Nullable - private List groupIdentifiers; - - public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = - "home_liveboard_identifier"; - - @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) - @javax.annotation.Nullable - private String homeLiveboardIdentifier; - - public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; - - @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) - @javax.annotation.Nullable - private List favoriteMetadata; - - public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; - - @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) - @javax.annotation.Nullable - private List orgIdentifiers; - - /** Type of update operation. Default operation type is REPLACE */ - @JsonAdapter(OperationEnum.Adapter.class) - public enum OperationEnum { - ADD("ADD"), - - REMOVE("REMOVE"), - - REPLACE("REPLACE"); - - private String value; - - OperationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OperationEnum fromValue(String value) { - for (OperationEnum b : OperationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OperationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OperationEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OperationEnum.fromValue(value); + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static final String SERIALIZED_NAME_OPERATION = "operation"; - - @SerializedName(SERIALIZED_NAME_OPERATION) - @javax.annotation.Nullable - private OperationEnum operation = OperationEnum.REPLACE; - - /** Locale for the user. */ - @JsonAdapter(PreferredLocaleEnum.Adapter.class) - public enum PreferredLocaleEnum { - EN_CA("en-CA"), - - EN_GB("en-GB"), - - EN_US("en-US"), - - DE_DE("de-DE"), - - JA_JP("ja-JP"), - - ZH_CN("zh-CN"), - - PT_BR("pt-BR"), - - FR_FR("fr-FR"), - - FR_CA("fr-CA"), - - ES_US("es-US"), - - DA_DK("da-DK"), - - ES_ES("es-ES"), - - FI_FI("fi-FI"), - - SV_SE("sv-SE"), - - NB_NO("nb-NO"), - - PT_PT("pt-PT"), - - NL_NL("nl-NL"), + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - IT_IT("it-IT"), - - RU_RU("ru-RU"), - - EN_IN("en-IN"), - - DE_CH("de-CH"), - - EN_NZ("en-NZ"), - - ES_MX("es-MX"), - - EN_AU("en-AU"), - - ZH_HANT("zh-Hant"), - - KO_KR("ko-KR"), - - EN_DE("en-DE"); - - private String value; - - PreferredLocaleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PreferredLocaleEnum fromValue(String value) { - for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PreferredLocaleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PreferredLocaleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; - - @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) - @javax.annotation.Nullable - private PreferredLocaleEnum preferredLocale; - - public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; - - @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) - @javax.annotation.Nullable - private Object extendedProperties; - - public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; - - @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) - @javax.annotation.Nullable - private Object extendedPreferences; - - public UpdateUserRequest() {} - - public UpdateUserRequest name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name of the user. The username string must be unique. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - public UpdateUserRequest displayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - return this; - } - - /** - * A unique display name string for the user account, usually their first and last name - * - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nullable String displayName) { - this.displayName = displayName; - } - - public UpdateUserRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups - * when they try to share an object. - * - * @return visibility - */ - @javax.annotation.Nullable - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { - this.visibility = visibility; - } - - public UpdateUserRequest email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email of the user account - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public UpdateUserRequest accountStatus( - @javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - return this; - } - - /** - * Current status of the user account. The `SUSPENDED` user state indicates a - * transitional state applicable to IAMv2 users only. - * - * @return accountStatus - */ - @javax.annotation.Nullable - public AccountStatusEnum getAccountStatus() { - return accountStatus; - } - - public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - } - - public UpdateUserRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a - * metadata object such as Answer, Liveboard, or Worksheet. - * - * @return notifyOnShare - */ - @javax.annotation.Nullable - public Boolean getNotifyOnShare() { - return notifyOnShare; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); } + } - public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; - public UpdateUserRequest showOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - return this; - } + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; - /** - * The user preference for revisiting the onboarding experience. - * - * @return showOnboardingExperience - */ - @javax.annotation.Nullable - public Boolean getShowOnboardingExperience() { - return showOnboardingExperience; - } + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); - public void setShowOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - } + private String value; - public UpdateUserRequest onboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - return this; + AccountStatusEnum(String value) { + this.value = value; } - /** - * Indicates if the user has completed the onboarding and allows turning off the onboarding - * walkthrough. - * - * @return onboardingExperienceCompleted - */ - @javax.annotation.Nullable - public Boolean getOnboardingExperienceCompleted() { - return onboardingExperienceCompleted; + public String getValue() { + return value; } - public void setOnboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - } - - public UpdateUserRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - return this; - } - - /** - * Type of the account. - * - * @return accountType - */ - @javax.annotation.Nullable - public AccountTypeEnum getAccountType() { - return accountType; + @Override + public String toString() { + return String.valueOf(value); } - public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public UpdateUserRequest groupIdentifiers( - @javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public UpdateUserRequest addGroupIdentifiersItem(String groupIdentifiersItem) { - if (this.groupIdentifiers == null) { - this.groupIdentifiers = new ArrayList<>(); - } - this.groupIdentifiers.add(groupIdentifiersItem); - return this; + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } } - /** - * GUIDs or names of the groups. - * - * @return groupIdentifiers - */ - @javax.annotation.Nullable - public List getGroupIdentifiers() { - return groupIdentifiers; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); } + } - public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { - this.groupIdentifiers = groupIdentifiers; - } + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; - public UpdateUserRequest homeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; - return this; - } + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare; - /** - * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this - * Liveboard on the Home page when the user logs in. - * - * @return homeLiveboardIdentifier - */ - @javax.annotation.Nullable - public String getHomeLiveboardIdentifier() { - return homeLiveboardIdentifier; - } + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = "show_onboarding_experience"; + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; - public void setHomeLiveboardIdentifier( - @javax.annotation.Nullable String homeLiveboardIdentifier) { - this.homeLiveboardIdentifier = homeLiveboardIdentifier; - } + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = "onboarding_experience_completed"; + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; - public UpdateUserRequest favoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - return this; - } + /** + * Type of the account. + */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); - public UpdateUserRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { - if (this.favoriteMetadata == null) { - this.favoriteMetadata = new ArrayList<>(); - } - this.favoriteMetadata.add(favoriteMetadataItem); - return this; - } + private String value; - /** - * Metadata objects to add to the user's favorites list. - * - * @return favoriteMetadata - */ - @javax.annotation.Nullable - public List getFavoriteMetadata() { - return favoriteMetadata; + AccountTypeEnum(String value) { + this.value = value; } - public void setFavoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; + public String getValue() { + return value; } - public UpdateUserRequest orgIdentifiers( - @javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UpdateUserRequest addOrgIdentifiersItem(String orgIdentifiersItem) { - if (this.orgIdentifiers == null) { - this.orgIdentifiers = new ArrayList<>(); + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.orgIdentifiers.add(orgIdentifiersItem); - return this; - } - - /** - * IDs of the Orgs. - * - * @return orgIdentifiers - */ - @javax.annotation.Nullable - public List getOrgIdentifiers() { - return orgIdentifiers; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { - this.orgIdentifiers = orgIdentifiers; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public UpdateUserRequest operation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - return this; + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } } - /** - * Type of update operation. Default operation type is REPLACE - * - * @return operation - */ - @javax.annotation.Nullable - public OperationEnum getOperation() { - return operation; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); } + } - public void setOperation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - } + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; - public UpdateUserRequest preferredLocale( - @javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; - /** - * Locale for the user. - * - * @return preferredLocale - */ - @javax.annotation.Nullable - public PreferredLocaleEnum getPreferredLocale() { - return preferredLocale; - } + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = "home_liveboard_identifier"; + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; - public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { - this.preferredLocale = preferredLocale; - } + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; - public UpdateUserRequest extendedProperties( - @javax.annotation.Nullable Object extendedProperties) { - this.extendedProperties = extendedProperties; - return this; - } + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; - /** - * Properties for the user - * - * @return extendedProperties - */ - @javax.annotation.Nullable - public Object getExtendedProperties() { - return extendedProperties; - } + /** + * Type of update operation. Default operation type is REPLACE + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); - public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { - this.extendedProperties = extendedProperties; - } + private String value; - public UpdateUserRequest extendedPreferences( - @javax.annotation.Nullable Object extendedPreferences) { - this.extendedPreferences = extendedPreferences; - return this; + OperationEnum(String value) { + this.value = value; } - /** - * Preferences for the user - * - * @return extendedPreferences - */ - @javax.annotation.Nullable - public Object getExtendedPreferences() { - return extendedPreferences; + public String getValue() { + return value; } - public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { - this.extendedPreferences = extendedPreferences; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUserRequest updateUserRequest = (UpdateUserRequest) o; - return Objects.equals(this.name, updateUserRequest.name) - && Objects.equals(this.displayName, updateUserRequest.displayName) - && Objects.equals(this.visibility, updateUserRequest.visibility) - && Objects.equals(this.email, updateUserRequest.email) - && Objects.equals(this.accountStatus, updateUserRequest.accountStatus) - && Objects.equals(this.notifyOnShare, updateUserRequest.notifyOnShare) - && Objects.equals( - this.showOnboardingExperience, updateUserRequest.showOnboardingExperience) - && Objects.equals( - this.onboardingExperienceCompleted, - updateUserRequest.onboardingExperienceCompleted) - && Objects.equals(this.accountType, updateUserRequest.accountType) - && Objects.equals(this.groupIdentifiers, updateUserRequest.groupIdentifiers) - && Objects.equals( - this.homeLiveboardIdentifier, updateUserRequest.homeLiveboardIdentifier) - && Objects.equals(this.favoriteMetadata, updateUserRequest.favoriteMetadata) - && Objects.equals(this.orgIdentifiers, updateUserRequest.orgIdentifiers) - && Objects.equals(this.operation, updateUserRequest.operation) - && Objects.equals(this.preferredLocale, updateUserRequest.preferredLocale) - && Objects.equals(this.extendedProperties, updateUserRequest.extendedProperties) - && Objects.equals(this.extendedPreferences, updateUserRequest.extendedPreferences); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - 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())); - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - @Override - public int hashCode() { - return Objects.hash( - name, - displayName, - visibility, - email, - accountStatus, - notifyOnShare, - showOnboardingExperience, - onboardingExperienceCompleted, - accountType, - groupIdentifiers, - homeLiveboardIdentifier, - favoriteMetadata, - orgIdentifiers, - operation, - preferredLocale, - extendedProperties, - extendedPreferences); + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + /** + * Locale for the user. + */ + @JsonAdapter(PreferredLocaleEnum.Adapter.class) + public enum PreferredLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + PreferredLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUserRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); - sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); - sb.append(" showOnboardingExperience: ") - .append(toIndentedString(showOnboardingExperience)) - .append("\n"); - sb.append(" onboardingExperienceCompleted: ") - .append(toIndentedString(onboardingExperienceCompleted)) - .append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); - sb.append(" homeLiveboardIdentifier: ") - .append(toIndentedString(homeLiveboardIdentifier)) - .append("\n"); - sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); - sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); - sb.append(" extendedProperties: ") - .append(toIndentedString(extendedProperties)) - .append("\n"); - sb.append(" extendedPreferences: ") - .append(toIndentedString(extendedPreferences)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static PreferredLocaleEnum fromValue(String value) { + for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("display_name"); - openapiFields.add("visibility"); - openapiFields.add("email"); - openapiFields.add("account_status"); - openapiFields.add("notify_on_share"); - openapiFields.add("show_onboarding_experience"); - openapiFields.add("onboarding_experience_completed"); - openapiFields.add("account_type"); - openapiFields.add("group_identifiers"); - openapiFields.add("home_liveboard_identifier"); - openapiFields.add("favorite_metadata"); - openapiFields.add("org_identifiers"); - openapiFields.add("operation"); - openapiFields.add("preferred_locale"); - openapiFields.add("extended_properties"); - openapiFields.add("extended_preferences"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PreferredLocaleEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateUserRequest - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateUserRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateUserRequest is not found in the" - + " empty JSON string", - UpdateUserRequest.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + PreferredLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private PreferredLocaleEnum preferredLocale; + + public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) + @javax.annotation.Nullable + private Object extendedProperties; + + public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) + @javax.annotation.Nullable + private Object extendedPreferences; + + public UpdateUserRequest() { + } + + public UpdateUserRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the user. The username string must be unique. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateUserRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A unique display name string for the user account, usually their first and last name + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public UpdateUserRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public UpdateUserRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the user account + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public UpdateUserRequest accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + + public UpdateUserRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + + public UpdateUserRequest showOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * The user preference for revisiting the onboarding experience. + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + + public UpdateUserRequest onboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + + public UpdateUserRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the account. + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public UpdateUserRequest groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public UpdateUserRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the groups. + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + + public UpdateUserRequest homeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier(@javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + + public UpdateUserRequest favoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public UpdateUserRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the user's favorites list. + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + + public UpdateUserRequest orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public UpdateUserRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * IDs of the Orgs. + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + + public UpdateUserRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is REPLACE + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + + public UpdateUserRequest preferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. + * @return preferredLocale + */ + @javax.annotation.Nullable + public PreferredLocaleEnum getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + } + + + public UpdateUserRequest extendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Properties for the user + * @return extendedProperties + */ + @javax.annotation.Nullable + public Object getExtendedProperties() { + return extendedProperties; + } + + public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + } + + + public UpdateUserRequest extendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + return this; + } + + /** + * Preferences for the user + * @return extendedPreferences + */ + @javax.annotation.Nullable + public Object getExtendedPreferences() { + return extendedPreferences; + } + + public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserRequest updateUserRequest = (UpdateUserRequest) o; + return Objects.equals(this.name, updateUserRequest.name) && + Objects.equals(this.displayName, updateUserRequest.displayName) && + Objects.equals(this.visibility, updateUserRequest.visibility) && + Objects.equals(this.email, updateUserRequest.email) && + Objects.equals(this.accountStatus, updateUserRequest.accountStatus) && + Objects.equals(this.notifyOnShare, updateUserRequest.notifyOnShare) && + Objects.equals(this.showOnboardingExperience, updateUserRequest.showOnboardingExperience) && + Objects.equals(this.onboardingExperienceCompleted, updateUserRequest.onboardingExperienceCompleted) && + Objects.equals(this.accountType, updateUserRequest.accountType) && + Objects.equals(this.groupIdentifiers, updateUserRequest.groupIdentifiers) && + Objects.equals(this.homeLiveboardIdentifier, updateUserRequest.homeLiveboardIdentifier) && + Objects.equals(this.favoriteMetadata, updateUserRequest.favoriteMetadata) && + Objects.equals(this.orgIdentifiers, updateUserRequest.orgIdentifiers) && + Objects.equals(this.operation, updateUserRequest.operation) && + Objects.equals(this.preferredLocale, updateUserRequest.preferredLocale) && + Objects.equals(this.extendedProperties, updateUserRequest.extendedProperties) && + Objects.equals(this.extendedPreferences, updateUserRequest.extendedPreferences); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, displayName, visibility, email, accountStatus, notifyOnShare, showOnboardingExperience, onboardingExperienceCompleted, accountType, groupIdentifiers, homeLiveboardIdentifier, favoriteMetadata, orgIdentifiers, operation, preferredLocale, extendedProperties, extendedPreferences); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ").append(toIndentedString(showOnboardingExperience)).append("\n"); + sb.append(" onboardingExperienceCompleted: ").append(toIndentedString(onboardingExperienceCompleted)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" homeLiveboardIdentifier: ").append(toIndentedString(homeLiveboardIdentifier)).append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" extendedProperties: ").append(toIndentedString(extendedProperties)).append("\n"); + sb.append(" extendedPreferences: ").append(toIndentedString(extendedPreferences)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("visibility"); + openapiFields.add("email"); + openapiFields.add("account_status"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("account_type"); + openapiFields.add("group_identifiers"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("org_identifiers"); + openapiFields.add("operation"); + openapiFields.add("preferred_locale"); + openapiFields.add("extended_properties"); + openapiFields.add("extended_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUserRequest is not found in the empty JSON string", UpdateUserRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateUserRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateUserRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUserRequest` 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("display_name") != null && !jsonObj.get("display_name").isJsonNull()) - && !jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) - && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the optional field `visibility` - if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) - && !jsonObj.get("account_status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_status` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("account_status").toString())); - } - // validate the optional field `account_status` - if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { - AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); - } - if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) - && !jsonObj.get("account_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_type").toString())); - } - // validate the optional field `account_type` - if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { - AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("group_identifiers") != null - && !jsonObj.get("group_identifiers").isJsonNull() - && !jsonObj.get("group_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `group_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("group_identifiers").toString())); - } - if ((jsonObj.get("home_liveboard_identifier") != null - && !jsonObj.get("home_liveboard_identifier").isJsonNull()) - && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `home_liveboard_identifier` to be a primitive type" - + " in the JSON string but got `%s`", - jsonObj.get("home_liveboard_identifier").toString())); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null && !jsonObj.get("group_identifiers").isJsonNull() && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `group_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("home_liveboard_identifier") != null && !jsonObj.get("home_liveboard_identifier").isJsonNull()) && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `home_liveboard_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `favorite_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + }; } - if (jsonObj.get("favorite_metadata") != null - && !jsonObj.get("favorite_metadata").isJsonNull()) { - JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); - if (jsonArrayfavoriteMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("favorite_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `favorite_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("favorite_metadata").toString())); - } - - // validate the optional field `favorite_metadata` (array) - for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { - FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); - } - ; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("org_identifiers") != null - && !jsonObj.get("org_identifiers").isJsonNull() - && !jsonObj.get("org_identifiers").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `org_identifiers` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("org_identifiers").toString())); - } - if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) - && !jsonObj.get("operation").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `operation` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("operation").toString())); - } - // validate the optional field `operation` - if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { - OperationEnum.validateJsonElement(jsonObj.get("operation")); - } - if ((jsonObj.get("preferred_locale") != null - && !jsonObj.get("preferred_locale").isJsonNull()) - && !jsonObj.get("preferred_locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `preferred_locale` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("preferred_locale").toString())); - } - // validate the optional field `preferred_locale` - if (jsonObj.get("preferred_locale") != null - && !jsonObj.get("preferred_locale").isJsonNull()) { - PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUserRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUserRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateUserRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUserRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUserRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserRequest - */ - public static UpdateUserRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUserRequest.class); - } - - /** - * Convert an instance of UpdateUserRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null && !jsonObj.get("org_identifiers").isJsonNull() && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("org_identifiers").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + if ((jsonObj.get("preferred_locale") != null && !jsonObj.get("preferred_locale").isJsonNull()) && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `preferred_locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("preferred_locale").toString())); + } + // validate the optional field `preferred_locale` + if (jsonObj.get("preferred_locale") != null && !jsonObj.get("preferred_locale").isJsonNull()) { + PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateUserRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserRequest + */ + public static UpdateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateUserRequest.class); + } + + /** + * Convert an instance of UpdateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java index e0da4a43e..e1cf52d5e 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 @@ -4,346 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateVariableRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateVariableRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - 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) { - this.name = name; - return this; - } - - /** - * New name of the variable if we want to rename. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable 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) { - return true; - } - if (o == null || getClass() != o.getClass()) { - 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); - } - - @Override - public int hashCode() { - return Objects.hash(name, operation, values); - } - - @Override - 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(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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("operation"); - openapiFields.add("values"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateVariableRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateVariableRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVariableRequest is not found in" - + " the empty JSON string", - UpdateVariableRequest.openapiRequiredFields.toString())); - } - } +import com.thoughtspot.client.JSON; - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateVariableRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVariableRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } +/** + * UpdateVariableRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateVariableRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public UpdateVariableRequest() { + } + + public UpdateVariableRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * New name of the variable. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateVariableRequest updateVariableRequest = (UpdateVariableRequest) o; + return Objects.equals(this.name, updateVariableRequest.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVariableRequest {\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("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateVariableRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVariableRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateVariableRequest is not found in the empty JSON string", UpdateVariableRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateVariableRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateVariableRequest` properties. JSON: %s", 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()) { - 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())); - } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } - // validate the optional field `values` (array) - for (int i = 0; i < jsonArrayvalues.size(); i++) { - InputVariableValue.validateJsonElement(jsonArrayvalues.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateVariableRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVariableRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVariableRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVariableRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVariableRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVariableRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVariableRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVariableRequest - */ - public static UpdateVariableRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVariableRequest.class); - } - - /** - * Convert an instance of UpdateVariableRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVariableRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVariableRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateVariableRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVariableRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateVariableRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateVariableRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVariableRequest + * @throws IOException if the JSON string is invalid with respect to UpdateVariableRequest + */ + public static UpdateVariableRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVariableRequest.class); + } + + /** + * Convert an instance of UpdateVariableRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java index 3e58aa19a..dd7a0b68d 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 @@ -4,320 +4,270 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.VariableUpdateAssignmentInput; +import com.thoughtspot.client.model.VariableUpdateScopeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** UpdateVariableValuesRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UpdateVariableValuesRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_VARIABLE_UPDATES = "variable_updates"; - - @SerializedName(SERIALIZED_NAME_VARIABLE_UPDATES) - @javax.annotation.Nonnull - private List variableUpdates; - - /** Type of update operation */ - @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); - } - } +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_OPERATION = "operation"; +/** + * UpdateVariableValuesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateVariableValuesRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_OPERATION) - @javax.annotation.Nonnull - private OperationEnum operation; + public static final String SERIALIZED_NAME_VARIABLE_ASSIGNMENT = "variable_assignment"; + @SerializedName(SERIALIZED_NAME_VARIABLE_ASSIGNMENT) + @javax.annotation.Nonnull + private List variableAssignment; - public UpdateVariableValuesRequest() {} + public static final String SERIALIZED_NAME_VARIABLE_VALUE_SCOPE = "variable_value_scope"; + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUE_SCOPE) + @javax.annotation.Nonnull + private List variableValueScope; - public UpdateVariableValuesRequest variableUpdates( - @javax.annotation.Nonnull List variableUpdates) { - this.variableUpdates = variableUpdates; - return this; - } + public UpdateVariableValuesRequest() { + } - public UpdateVariableValuesRequest addVariableUpdatesItem( - VariableValueInput variableUpdatesItem) { - if (this.variableUpdates == null) { - this.variableUpdates = new ArrayList<>(); - } - this.variableUpdates.add(variableUpdatesItem); - return this; - } + public UpdateVariableValuesRequest variableAssignment(@javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + return this; + } - /** - * Variables and values - * - * @return variableUpdates - */ - @javax.annotation.Nonnull - public List getVariableUpdates() { - return variableUpdates; + public UpdateVariableValuesRequest addVariableAssignmentItem(VariableUpdateAssignmentInput variableAssignmentItem) { + if (this.variableAssignment == null) { + this.variableAssignment = new ArrayList<>(); } - - public void setVariableUpdates( - @javax.annotation.Nonnull List variableUpdates) { - this.variableUpdates = variableUpdates; + this.variableAssignment.add(variableAssignmentItem); + return this; + } + + /** + * Variables and values to update + * @return variableAssignment + */ + @javax.annotation.Nonnull + public List getVariableAssignment() { + return variableAssignment; + } + + public void setVariableAssignment(@javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + } + + + public UpdateVariableValuesRequest variableValueScope(@javax.annotation.Nonnull List variableValueScope) { + this.variableValueScope = variableValueScope; + return this; + } + + public UpdateVariableValuesRequest addVariableValueScopeItem(VariableUpdateScopeInput variableValueScopeItem) { + if (this.variableValueScope == null) { + this.variableValueScope = new ArrayList<>(); } + this.variableValueScope.add(variableValueScopeItem); + return this; + } - public UpdateVariableValuesRequest operation( - @javax.annotation.Nonnull OperationEnum operation) { - this.operation = operation; - return this; - } + /** + * Variables and values to update + * @return variableValueScope + */ + @javax.annotation.Nonnull + public List getVariableValueScope() { + return variableValueScope; + } - /** - * Type of update operation - * - * @return operation - */ - @javax.annotation.Nonnull - public OperationEnum getOperation() { - return operation; - } + public void setVariableValueScope(@javax.annotation.Nonnull List variableValueScope) { + this.variableValueScope = variableValueScope; + } - 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; - } - UpdateVariableValuesRequest updateVariableValuesRequest = (UpdateVariableValuesRequest) o; - return Objects.equals(this.variableUpdates, updateVariableValuesRequest.variableUpdates) - && Objects.equals(this.operation, updateVariableValuesRequest.operation); - } - @Override - public int hashCode() { - return Objects.hash(variableUpdates, operation); - } - - @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("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("variable_updates"); - openapiFields.add("operation"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("variable_updates"); - openapiRequiredFields.add("operation"); + UpdateVariableValuesRequest updateVariableValuesRequest = (UpdateVariableValuesRequest) o; + return Objects.equals(this.variableAssignment, updateVariableValuesRequest.variableAssignment) && + Objects.equals(this.variableValueScope, updateVariableValuesRequest.variableValueScope); + } + + @Override + public int hashCode() { + return Objects.hash(variableAssignment, variableValueScope); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVariableValuesRequest {\n"); + sb.append(" variableAssignment: ").append(toIndentedString(variableAssignment)).append("\n"); + sb.append(" variableValueScope: ").append(toIndentedString(variableValueScope)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * UpdateVariableValuesRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateVariableValuesRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UpdateVariableValuesRequest is not" - + " found in the empty JSON string", - UpdateVariableValuesRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("variable_assignment"); + openapiFields.add("variable_value_scope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("variable_assignment"); + openapiRequiredFields.add("variable_value_scope"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateVariableValuesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVariableValuesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateVariableValuesRequest is not found in the empty JSON string", UpdateVariableValuesRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateVariableValuesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UpdateVariableValuesRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateVariableValuesRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateVariableValuesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateVariableValuesRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateVariableValuesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("variable_updates").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `variable_updates` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("variable_updates").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)); - } - ; - 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 (!UpdateVariableValuesRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateVariableValuesRequest' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UpdateVariableValuesRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateVariableValuesRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateVariableValuesRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateVariableValuesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateVariableValuesRequest - * @throws IOException if the JSON string is invalid with respect to UpdateVariableValuesRequest - */ - public static UpdateVariableValuesRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateVariableValuesRequest.class); - } - - /** - * Convert an instance of UpdateVariableValuesRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + // ensure the json data is an array + if (!jsonObj.get("variable_assignment").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `variable_assignment` to be an array in the JSON string but got `%s`", jsonObj.get("variable_assignment").toString())); + } + + JsonArray jsonArrayvariableAssignment = jsonObj.getAsJsonArray("variable_assignment"); + // validate the required field `variable_assignment` (array) + for (int i = 0; i < jsonArrayvariableAssignment.size(); i++) { + VariableUpdateAssignmentInput.validateJsonElement(jsonArrayvariableAssignment.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("variable_value_scope").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `variable_value_scope` to be an array in the JSON string but got `%s`", jsonObj.get("variable_value_scope").toString())); + } + + JsonArray jsonArrayvariableValueScope = jsonObj.getAsJsonArray("variable_value_scope"); + // validate the required field `variable_value_scope` (array) + for (int i = 0; i < jsonArrayvariableValueScope.size(); i++) { + VariableUpdateScopeInput.validateJsonElement(jsonArrayvariableValueScope.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVariableValuesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVariableValuesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateVariableValuesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVariableValuesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateVariableValuesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UpdateVariableValuesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVariableValuesRequest + * @throws IOException if the JSON string is invalid with respect to UpdateVariableValuesRequest + */ + public static UpdateVariableValuesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVariableValuesRequest.class); + } + + /** + * Convert an instance of UpdateVariableValuesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java new file mode 100644 index 000000000..a5045f0d3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java @@ -0,0 +1,442 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthenticationInput; +import com.thoughtspot.client.model.WebhookSignatureVerificationInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..034449298 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 @@ -4,2040 +4,1842 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataItem; +import com.thoughtspot.client.model.ObjectIDAndName; +import com.thoughtspot.client.model.Org; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** User */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class User implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nonnull - private String displayName; - - /** - * Visibility of the users. The `SHARABLE` property makes a user visible to other - * users and group, who can share objects with the user. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nonnull - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_ID) - @javax.annotation.Nullable - private String authorId; - - public static final String SERIALIZED_NAME_CAN_CHANGE_PASSWORD = "can_change_password"; - - @SerializedName(SERIALIZED_NAME_CAN_CHANGE_PASSWORD) - @javax.annotation.Nullable - private Boolean canChangePassword; - - public static final String SERIALIZED_NAME_COMPLETE_DETAIL = "complete_detail"; - - @SerializedName(SERIALIZED_NAME_COMPLETE_DETAIL) - @javax.annotation.Nullable - private Boolean completeDetail; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_CURRENT_ORG = "current_org"; - - @SerializedName(SERIALIZED_NAME_CURRENT_ORG) - @javax.annotation.Nullable - private Org currentOrg; - - public static final String SERIALIZED_NAME_DELETED = "deleted"; - - @SerializedName(SERIALIZED_NAME_DELETED) - @javax.annotation.Nullable - private Boolean deleted; - - public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; - - @SerializedName(SERIALIZED_NAME_DEPRECATED) - @javax.annotation.Nullable - private Boolean deprecated; - - /** Type of the user account. */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - LOCAL_USER("LOCAL_USER"), - - LDAP_USER("LDAP_USER"), - - SAML_USER("SAML_USER"), - - OIDC_USER("OIDC_USER"), - - REMOTE_USER("REMOTE_USER"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - @javax.annotation.Nullable - private AccountTypeEnum accountType; - - /** Status of the user account. */ - @JsonAdapter(AccountStatusEnum.Adapter.class) - public enum AccountStatusEnum { - ACTIVE("ACTIVE"), - - INACTIVE("INACTIVE"), - - EXPIRED("EXPIRED"), - - LOCKED("LOCKED"), - - PENDING("PENDING"), - - SUSPENDED("SUSPENDED"); - - private String value; - - AccountStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountStatusEnum fromValue(String value) { - for (AccountStatusEnum b : AccountStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AccountStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; - - @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) - @javax.annotation.Nullable - private AccountStatusEnum accountStatus; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nullable - private String email; - - public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = - "expiration_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float expirationTimeInMillis; - - public static final String SERIALIZED_NAME_EXTERNAL = "external"; - - @SerializedName(SERIALIZED_NAME_EXTERNAL) - @javax.annotation.Nullable - private Boolean external; - - public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; - - @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) - @javax.annotation.Nullable - private List favoriteMetadata; - - public static final String SERIALIZED_NAME_FIRST_LOGIN_TIME_IN_MILLIS = - "first_login_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_FIRST_LOGIN_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float firstLoginTimeInMillis; - - public static final String SERIALIZED_NAME_GROUP_MASK = "group_mask"; - - @SerializedName(SERIALIZED_NAME_GROUP_MASK) - @javax.annotation.Nullable - private Integer groupMask; - - public static final String SERIALIZED_NAME_HIDDEN = "hidden"; - - @SerializedName(SERIALIZED_NAME_HIDDEN) - @javax.annotation.Nullable - private Boolean hidden; - - public static final String SERIALIZED_NAME_HOME_LIVEBOARD = "home_liveboard"; - - @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD) - @javax.annotation.Nullable - private ObjectIDAndName homeLiveboard; - - public static final String SERIALIZED_NAME_INCOMPLETE_DETAILS = "incomplete_details"; - - @SerializedName(SERIALIZED_NAME_INCOMPLETE_DETAILS) - @javax.annotation.Nullable - private Object incompleteDetails; - - public static final String SERIALIZED_NAME_IS_FIRST_LOGIN = "is_first_login"; - - @SerializedName(SERIALIZED_NAME_IS_FIRST_LOGIN) - @javax.annotation.Nullable - private Boolean isFirstLogin; - - public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = - "modification_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float modificationTimeInMillis; - - public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; - - @SerializedName(SERIALIZED_NAME_MODIFIER_ID) - @javax.annotation.Nullable - private String modifierId; - - public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; - - @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) - @javax.annotation.Nullable - private Boolean notifyOnShare; - - public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = - "onboarding_experience_completed"; - - @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) - @javax.annotation.Nullable - private Boolean onboardingExperienceCompleted; - - public static final String SERIALIZED_NAME_ORGS = "orgs"; - - @SerializedName(SERIALIZED_NAME_ORGS) - @javax.annotation.Nullable - private List orgs; - - public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; - - @SerializedName(SERIALIZED_NAME_OWNER_ID) - @javax.annotation.Nullable - private String ownerId; - - /** Parent type of the user. */ - @JsonAdapter(ParentTypeEnum.Adapter.class) - public enum ParentTypeEnum { - USER("USER"), - - GROUP("GROUP"); - - private String value; - - ParentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ParentTypeEnum fromValue(String value) { - for (ParentTypeEnum b : ParentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ParentTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ParentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ParentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ParentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PARENT_TYPE = "parent_type"; - - @SerializedName(SERIALIZED_NAME_PARENT_TYPE) - @javax.annotation.Nullable - private ParentTypeEnum parentType; - - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = - "show_onboarding_experience"; - - @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) - @javax.annotation.Nullable - private Boolean showOnboardingExperience; - - public static final String SERIALIZED_NAME_SUPER_USER = "super_user"; - - @SerializedName(SERIALIZED_NAME_SUPER_USER) - @javax.annotation.Nullable - private Boolean superUser; - - public static final String SERIALIZED_NAME_SYSTEM_USER = "system_user"; - - @SerializedName(SERIALIZED_NAME_SYSTEM_USER) - @javax.annotation.Nullable - private Boolean systemUser; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - @javax.annotation.Nullable - private List tags; - - public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; - - @SerializedName(SERIALIZED_NAME_TENANT_ID) - @javax.annotation.Nullable - private String tenantId; - - public static final String SERIALIZED_NAME_USER_GROUPS = "user_groups"; - - @SerializedName(SERIALIZED_NAME_USER_GROUPS) - @javax.annotation.Nullable - private List userGroups; - - public static final String SERIALIZED_NAME_USER_INHERITED_GROUPS = "user_inherited_groups"; - - @SerializedName(SERIALIZED_NAME_USER_INHERITED_GROUPS) - @javax.annotation.Nullable - private List userInheritedGroups; - - public static final String SERIALIZED_NAME_WELCOME_EMAIL_SENT = "welcome_email_sent"; - - @SerializedName(SERIALIZED_NAME_WELCOME_EMAIL_SENT) - @javax.annotation.Nullable - private Boolean welcomeEmailSent; - - public static final String SERIALIZED_NAME_ORG_PRIVILEGES = "org_privileges"; - - @SerializedName(SERIALIZED_NAME_ORG_PRIVILEGES) - @javax.annotation.Nullable - private Object orgPrivileges; - - public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; - - @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) - @javax.annotation.Nullable - private String preferredLocale; - - public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; - - @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) - @javax.annotation.Nullable - private Object extendedProperties; - - public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; - - @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) - @javax.annotation.Nullable - private Object extendedPreferences; - - public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; - - @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) - @javax.annotation.Nullable - private Object userParameters; - - public static final String SERIALIZED_NAME_ACCESS_CONTROL_PROPERTIES = - "access_control_properties"; - - @SerializedName(SERIALIZED_NAME_ACCESS_CONTROL_PROPERTIES) - @javax.annotation.Nullable - private Object accessControlProperties; - - public User() {} - - public User id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the user. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public User name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the user. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public User displayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Display name of the user. - * - * @return displayName - */ - @javax.annotation.Nonnull - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - } - - public User visibility(@javax.annotation.Nonnull VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Visibility of the users. The `SHARABLE` property makes a user visible to other - * users and group, who can share objects with the user. - * - * @return visibility - */ - @javax.annotation.Nonnull - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(@javax.annotation.Nonnull VisibilityEnum visibility) { - this.visibility = visibility; - } - - public User authorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - return this; - } - - /** - * Unique identifier of author of the user. - * - * @return authorId - */ - @javax.annotation.Nullable - public String getAuthorId() { - return authorId; - } - - public void setAuthorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - } - - public User canChangePassword(@javax.annotation.Nullable Boolean canChangePassword) { - this.canChangePassword = canChangePassword; - return this; - } - - /** - * Defines whether the user can change their password. - * - * @return canChangePassword - */ - @javax.annotation.Nullable - public Boolean getCanChangePassword() { - return canChangePassword; - } - - public void setCanChangePassword(@javax.annotation.Nullable Boolean canChangePassword) { - this.canChangePassword = canChangePassword; - } - - public User completeDetail(@javax.annotation.Nullable Boolean completeDetail) { - this.completeDetail = completeDetail; - return this; - } - - /** - * Defines whether the response has complete detail of the user. - * - * @return completeDetail - */ - @javax.annotation.Nullable - public Boolean getCompleteDetail() { - return completeDetail; - } - - public void setCompleteDetail(@javax.annotation.Nullable Boolean completeDetail) { - this.completeDetail = completeDetail; - } - - public User creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Creation time of the user in milliseconds. - * - * @return creationTimeInMillis - */ - @javax.annotation.Nullable - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public User currentOrg(@javax.annotation.Nullable Org currentOrg) { - this.currentOrg = currentOrg; - return this; - } - - /** - * Get currentOrg - * - * @return currentOrg - */ - @javax.annotation.Nullable - public Org getCurrentOrg() { - return currentOrg; - } - - public void setCurrentOrg(@javax.annotation.Nullable Org currentOrg) { - this.currentOrg = currentOrg; - } - public User deleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - return this; - } - - /** - * Indicates whether the user is deleted. - * - * @return deleted - */ - @javax.annotation.Nullable - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - } - - public User deprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - return this; - } - - /** - * Indicates whether the user is deprecated. - * - * @return deprecated - */ - @javax.annotation.Nullable - public Boolean getDeprecated() { - return deprecated; - } - - public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - } - - public User accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - return this; - } - - /** - * Type of the user account. - * - * @return accountType - */ - @javax.annotation.Nullable - public AccountTypeEnum getAccountType() { - return accountType; - } - - public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { - this.accountType = accountType; - } - - public User accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - return this; - } - - /** - * Status of the user account. - * - * @return accountStatus - */ - @javax.annotation.Nullable - public AccountStatusEnum getAccountStatus() { - return accountStatus; - } - - public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { - this.accountStatus = accountStatus; - } - - public User email(@javax.annotation.Nullable String email) { - this.email = email; - return this; - } - - /** - * Email of the user. - * - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nullable String email) { - this.email = email; - } - - public User expirationTimeInMillis(@javax.annotation.Nullable Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - return this; - } - - /** - * Expiration time of the user in milliseconds. - * - * @return expirationTimeInMillis - */ - @javax.annotation.Nullable - public Float getExpirationTimeInMillis() { - return expirationTimeInMillis; - } - - public void setExpirationTimeInMillis(@javax.annotation.Nullable Float expirationTimeInMillis) { - this.expirationTimeInMillis = expirationTimeInMillis; - } - - public User external(@javax.annotation.Nullable Boolean external) { - this.external = external; - return this; - } - - /** - * Indicates whether the user is external. - * - * @return external - */ - @javax.annotation.Nullable - public Boolean getExternal() { - return external; - } - - public void setExternal(@javax.annotation.Nullable Boolean external) { - this.external = external; - } - - public User favoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - return this; - } - - public User addFavoriteMetadataItem(FavoriteMetadataItem favoriteMetadataItem) { - if (this.favoriteMetadata == null) { - this.favoriteMetadata = new ArrayList<>(); - } - this.favoriteMetadata.add(favoriteMetadataItem); - return this; - } - - /** - * Metadata objects to add to the users' favorites list. - * - * @return favoriteMetadata - */ - @javax.annotation.Nullable - public List getFavoriteMetadata() { - return favoriteMetadata; - } - - public void setFavoriteMetadata( - @javax.annotation.Nullable List favoriteMetadata) { - this.favoriteMetadata = favoriteMetadata; - } - - public User firstLoginTimeInMillis(@javax.annotation.Nullable Float firstLoginTimeInMillis) { - this.firstLoginTimeInMillis = firstLoginTimeInMillis; - return this; - } - - /** - * Timestamp of the first login session of the user in milliseconds. - * - * @return firstLoginTimeInMillis - */ - @javax.annotation.Nullable - public Float getFirstLoginTimeInMillis() { - return firstLoginTimeInMillis; - } - - public void setFirstLoginTimeInMillis(@javax.annotation.Nullable Float firstLoginTimeInMillis) { - this.firstLoginTimeInMillis = firstLoginTimeInMillis; - } - - public User groupMask(@javax.annotation.Nullable Integer groupMask) { - this.groupMask = groupMask; - return this; - } - - /** - * Group mask of the user. - * - * @return groupMask - */ - @javax.annotation.Nullable - public Integer getGroupMask() { - return groupMask; - } - - public void setGroupMask(@javax.annotation.Nullable Integer groupMask) { - this.groupMask = groupMask; - } - - public User hidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - return this; - } - - /** - * Indicates whether the user is hidden. - * - * @return hidden - */ - @javax.annotation.Nullable - public Boolean getHidden() { - return hidden; - } - - public void setHidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - } - - public User homeLiveboard(@javax.annotation.Nullable ObjectIDAndName homeLiveboard) { - this.homeLiveboard = homeLiveboard; - return this; - } - - /** - * Get homeLiveboard - * - * @return homeLiveboard - */ - @javax.annotation.Nullable - public ObjectIDAndName getHomeLiveboard() { - return homeLiveboard; - } - - public void setHomeLiveboard(@javax.annotation.Nullable ObjectIDAndName homeLiveboard) { - this.homeLiveboard = homeLiveboard; - } - - public User incompleteDetails(@javax.annotation.Nullable Object incompleteDetails) { - this.incompleteDetails = incompleteDetails; - return this; - } - - /** - * Incomplete details of user if any present. - * - * @return incompleteDetails - */ - @javax.annotation.Nullable - public Object getIncompleteDetails() { - return incompleteDetails; - } - - public void setIncompleteDetails(@javax.annotation.Nullable Object incompleteDetails) { - this.incompleteDetails = incompleteDetails; - } - - public User isFirstLogin(@javax.annotation.Nullable Boolean isFirstLogin) { - this.isFirstLogin = isFirstLogin; - return this; - } - - /** - * Indicates whether it is first login of the user. - * - * @return isFirstLogin - */ - @javax.annotation.Nullable - public Boolean getIsFirstLogin() { - return isFirstLogin; - } - - public void setIsFirstLogin(@javax.annotation.Nullable Boolean isFirstLogin) { - this.isFirstLogin = isFirstLogin; - } - - public User modificationTimeInMillis( - @javax.annotation.Nullable Float modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - return this; - } - - /** - * Last modified time of the user in milliseconds. - * - * @return modificationTimeInMillis - */ - @javax.annotation.Nullable - public Float getModificationTimeInMillis() { - return modificationTimeInMillis; - } - - public void setModificationTimeInMillis( - @javax.annotation.Nullable Float modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - } - - public User modifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - return this; - } - - /** - * Unique identifier of modifier of the user. - * - * @return modifierId - */ - @javax.annotation.Nullable - public String getModifierId() { - return modifierId; - } - - public void setModifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - } - - public User notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * User preference for receiving email notifications on shared Answers or Liveboard. - * - * @return notifyOnShare - */ - @javax.annotation.Nullable - public Boolean getNotifyOnShare() { - return notifyOnShare; - } - - public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } - - public User onboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - return this; - } - - /** - * The user preference for turning off the onboarding experience. - * - * @return onboardingExperienceCompleted - */ - @javax.annotation.Nullable - public Boolean getOnboardingExperienceCompleted() { - return onboardingExperienceCompleted; - } - - public void setOnboardingExperienceCompleted( - @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { - this.onboardingExperienceCompleted = onboardingExperienceCompleted; - } - - public User orgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - return this; - } - - public User addOrgsItem(Org orgsItem) { - if (this.orgs == null) { - this.orgs = new ArrayList<>(); - } - this.orgs.add(orgsItem); - return this; - } - - /** - * Orgs to which the user belongs. - * - * @return orgs - */ - @javax.annotation.Nullable - public List getOrgs() { - return orgs; - } - - public void setOrgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - } - - public User ownerId(@javax.annotation.Nullable String ownerId) { - this.ownerId = ownerId; - return this; - } - - /** - * Unique identifier of owner of the user. - * - * @return ownerId - */ - @javax.annotation.Nullable - public String getOwnerId() { - return ownerId; - } - - public void setOwnerId(@javax.annotation.Nullable String ownerId) { - this.ownerId = ownerId; - } - - public User parentType(@javax.annotation.Nullable ParentTypeEnum parentType) { - this.parentType = parentType; - return this; - } - - /** - * Parent type of the user. - * - * @return parentType - */ - @javax.annotation.Nullable - public ParentTypeEnum getParentType() { - return parentType; - } - - public void setParentType(@javax.annotation.Nullable ParentTypeEnum parentType) { - this.parentType = parentType; - } - - public User privileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; - } - - public User addPrivilegesItem(String privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); - } - this.privileges.add(privilegesItem); - return this; - } - - /** - * Privileges which are assigned to the user. - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } - - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; - } - - public User showOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - return this; - } +import com.thoughtspot.client.JSON; - /** - * User's preference to revisit the new user onboarding experience. - * - * @return showOnboardingExperience - */ - @javax.annotation.Nullable - public Boolean getShowOnboardingExperience() { - return showOnboardingExperience; - } +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class User implements Serializable { + private static final long serialVersionUID = 1L; - public void setShowOnboardingExperience( - @javax.annotation.Nullable Boolean showOnboardingExperience) { - this.showOnboardingExperience = showOnboardingExperience; - } + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; - public User superUser(@javax.annotation.Nullable Boolean superUser) { - this.superUser = superUser; - return this; - } + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; - /** - * Indicates whether the user is a super user. - * - * @return superUser - */ - @javax.annotation.Nullable - public Boolean getSuperUser() { - return superUser; - } + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; - public void setSuperUser(@javax.annotation.Nullable Boolean superUser) { - this.superUser = superUser; - } + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - public User systemUser(@javax.annotation.Nullable Boolean systemUser) { - this.systemUser = systemUser; - return this; - } + private String value; - /** - * Indicates whether the user is a system user. - * - * @return systemUser - */ - @javax.annotation.Nullable - public Boolean getSystemUser() { - return systemUser; + VisibilityEnum(String value) { + this.value = value; } - public void setSystemUser(@javax.annotation.Nullable Boolean systemUser) { - this.systemUser = systemUser; + public String getValue() { + return value; } - public User tags(@javax.annotation.Nullable List tags) { - this.tags = tags; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public User addTagsItem(ObjectIDAndName tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.tags.add(tagsItem); - return this; - } - - /** - * Tags associated with the user. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(@javax.annotation.Nullable List tags) { - this.tags = tags; - } - - public User tenantId(@javax.annotation.Nullable String tenantId) { - this.tenantId = tenantId; - return this; + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - /** - * Unique identifier of tenant of the user. - * - * @return tenantId - */ - @javax.annotation.Nullable - public String getTenantId() { - return tenantId; - } - - public void setTenantId(@javax.annotation.Nullable String tenantId) { - this.tenantId = tenantId; - } - - public User userGroups(@javax.annotation.Nullable List userGroups) { - this.userGroups = userGroups; - return this; - } - - public User addUserGroupsItem(ObjectIDAndName userGroupsItem) { - if (this.userGroups == null) { - this.userGroups = new ArrayList<>(); - } - this.userGroups.add(userGroupsItem); - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Groups to which the user is assigned. - * - * @return userGroups - */ - @javax.annotation.Nullable - public List getUserGroups() { - return userGroups; + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - public void setUserGroups(@javax.annotation.Nullable List userGroups) { - this.userGroups = userGroups; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_CAN_CHANGE_PASSWORD = "can_change_password"; + @SerializedName(SERIALIZED_NAME_CAN_CHANGE_PASSWORD) + @javax.annotation.Nullable + private Boolean canChangePassword; + + public static final String SERIALIZED_NAME_COMPLETE_DETAIL = "complete_detail"; + @SerializedName(SERIALIZED_NAME_COMPLETE_DETAIL) + @javax.annotation.Nullable + private Boolean completeDetail; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_CURRENT_ORG = "current_org"; + @SerializedName(SERIALIZED_NAME_CURRENT_ORG) + @javax.annotation.Nullable + private Org currentOrg; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + /** + * Type of the user account. + */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public User userInheritedGroups( - @javax.annotation.Nullable List userInheritedGroups) { - this.userInheritedGroups = userInheritedGroups; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public User addUserInheritedGroupsItem(ObjectIDAndName userInheritedGroupsItem) { - if (this.userInheritedGroups == null) { - this.userInheritedGroups = new ArrayList<>(); + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.userInheritedGroups.add(userInheritedGroupsItem); - return this; - } - - /** - * Inherited User Groups which the user is part of. - * - * @return userInheritedGroups - */ - @javax.annotation.Nullable - public List getUserInheritedGroups() { - return userInheritedGroups; - } - - public void setUserInheritedGroups( - @javax.annotation.Nullable List userInheritedGroups) { - this.userInheritedGroups = userInheritedGroups; - } - - public User welcomeEmailSent(@javax.annotation.Nullable Boolean welcomeEmailSent) { - this.welcomeEmailSent = welcomeEmailSent; - return this; - } - - /** - * Indicates whether welcome email is sent for the user. - * - * @return welcomeEmailSent - */ - @javax.annotation.Nullable - public Boolean getWelcomeEmailSent() { - return welcomeEmailSent; - } - - public void setWelcomeEmailSent(@javax.annotation.Nullable Boolean welcomeEmailSent) { - this.welcomeEmailSent = welcomeEmailSent; - } - - public User orgPrivileges(@javax.annotation.Nullable Object orgPrivileges) { - this.orgPrivileges = orgPrivileges; - return this; - } - - /** - * Privileges which are assigned to the user with org. - * - * @return orgPrivileges - */ - @javax.annotation.Nullable - public Object getOrgPrivileges() { - return orgPrivileges; - } - - public void setOrgPrivileges(@javax.annotation.Nullable Object orgPrivileges) { - this.orgPrivileges = orgPrivileges; - } - - public User preferredLocale(@javax.annotation.Nullable String preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } - - /** - * Locale for the user. - * - * @return preferredLocale - */ - @javax.annotation.Nullable - public String getPreferredLocale() { - return preferredLocale; - } - - public void setPreferredLocale(@javax.annotation.Nullable String preferredLocale) { - this.preferredLocale = preferredLocale; - } - - public User extendedProperties(@javax.annotation.Nullable Object extendedProperties) { - this.extendedProperties = extendedProperties; - return this; - } - - /** - * Properties for the user - * - * @return extendedProperties - */ - @javax.annotation.Nullable - public Object getExtendedProperties() { - return extendedProperties; + } + return null; } - public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { - this.extendedProperties = extendedProperties; - } - - public User extendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { - this.extendedPreferences = extendedPreferences; - return this; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - /** - * Preferences for the user - * - * @return extendedPreferences - */ - @javax.annotation.Nullable - public Object getExtendedPreferences() { - return extendedPreferences; + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } } - public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { - this.extendedPreferences = extendedPreferences; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); } + } - public User userParameters(@javax.annotation.Nullable Object userParameters) { - this.userParameters = userParameters; - return this; - } + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; - /** - * User Parameters which are specified for the user via JWToken - * - * @return userParameters - */ - @javax.annotation.Nullable - public Object getUserParameters() { - return userParameters; - } + /** + * Status of the user account. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); - public void setUserParameters(@javax.annotation.Nullable Object userParameters) { - this.userParameters = userParameters; - } + private String value; - public User accessControlProperties(@javax.annotation.Nullable Object accessControlProperties) { - this.accessControlProperties = accessControlProperties; - return this; + AccountStatusEnum(String value) { + this.value = value; } - /** - * Access Control Properties which are specified for the user via JWToken - * - * @return accessControlProperties - */ - @javax.annotation.Nullable - public Object getAccessControlProperties() { - return accessControlProperties; + public String getValue() { + return value; } - public void setAccessControlProperties( - @javax.annotation.Nullable Object accessControlProperties) { - this.accessControlProperties = accessControlProperties; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) - && Objects.equals(this.name, user.name) - && Objects.equals(this.displayName, user.displayName) - && Objects.equals(this.visibility, user.visibility) - && Objects.equals(this.authorId, user.authorId) - && Objects.equals(this.canChangePassword, user.canChangePassword) - && Objects.equals(this.completeDetail, user.completeDetail) - && Objects.equals(this.creationTimeInMillis, user.creationTimeInMillis) - && Objects.equals(this.currentOrg, user.currentOrg) - && Objects.equals(this.deleted, user.deleted) - && Objects.equals(this.deprecated, user.deprecated) - && Objects.equals(this.accountType, user.accountType) - && Objects.equals(this.accountStatus, user.accountStatus) - && Objects.equals(this.email, user.email) - && Objects.equals(this.expirationTimeInMillis, user.expirationTimeInMillis) - && Objects.equals(this.external, user.external) - && Objects.equals(this.favoriteMetadata, user.favoriteMetadata) - && Objects.equals(this.firstLoginTimeInMillis, user.firstLoginTimeInMillis) - && Objects.equals(this.groupMask, user.groupMask) - && Objects.equals(this.hidden, user.hidden) - && Objects.equals(this.homeLiveboard, user.homeLiveboard) - && Objects.equals(this.incompleteDetails, user.incompleteDetails) - && Objects.equals(this.isFirstLogin, user.isFirstLogin) - && Objects.equals(this.modificationTimeInMillis, user.modificationTimeInMillis) - && Objects.equals(this.modifierId, user.modifierId) - && Objects.equals(this.notifyOnShare, user.notifyOnShare) - && Objects.equals( - this.onboardingExperienceCompleted, user.onboardingExperienceCompleted) - && Objects.equals(this.orgs, user.orgs) - && Objects.equals(this.ownerId, user.ownerId) - && Objects.equals(this.parentType, user.parentType) - && Objects.equals(this.privileges, user.privileges) - && Objects.equals(this.showOnboardingExperience, user.showOnboardingExperience) - && Objects.equals(this.superUser, user.superUser) - && Objects.equals(this.systemUser, user.systemUser) - && Objects.equals(this.tags, user.tags) - && Objects.equals(this.tenantId, user.tenantId) - && Objects.equals(this.userGroups, user.userGroups) - && Objects.equals(this.userInheritedGroups, user.userInheritedGroups) - && Objects.equals(this.welcomeEmailSent, user.welcomeEmailSent) - && Objects.equals(this.orgPrivileges, user.orgPrivileges) - && Objects.equals(this.preferredLocale, user.preferredLocale) - && Objects.equals(this.extendedProperties, user.extendedProperties) - && Objects.equals(this.extendedPreferences, user.extendedPreferences) - && Objects.equals(this.userParameters, user.userParameters) - && Objects.equals(this.accessControlProperties, user.accessControlProperties); + } + return null; } - 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())); - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - @Override - public int hashCode() { - return Objects.hash( - id, - name, - displayName, - visibility, - authorId, - canChangePassword, - completeDetail, - creationTimeInMillis, - currentOrg, - deleted, - deprecated, - accountType, - accountStatus, - email, - expirationTimeInMillis, - external, - favoriteMetadata, - firstLoginTimeInMillis, - groupMask, - hidden, - homeLiveboard, - incompleteDetails, - isFirstLogin, - modificationTimeInMillis, - modifierId, - notifyOnShare, - onboardingExperienceCompleted, - orgs, - ownerId, - parentType, - privileges, - showOnboardingExperience, - superUser, - systemUser, - tags, - tenantId, - userGroups, - userInheritedGroups, - welcomeEmailSent, - orgPrivileges, - preferredLocale, - extendedProperties, - extendedPreferences, - userParameters, - accessControlProperties); + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = "expiration_time_in_millis"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + public static final String SERIALIZED_NAME_FIRST_LOGIN_TIME_IN_MILLIS = "first_login_time_in_millis"; + @SerializedName(SERIALIZED_NAME_FIRST_LOGIN_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float firstLoginTimeInMillis; + + public static final String SERIALIZED_NAME_GROUP_MASK = "group_mask"; + @SerializedName(SERIALIZED_NAME_GROUP_MASK) + @javax.annotation.Nullable + private Integer groupMask; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD = "home_liveboard"; + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD) + @javax.annotation.Nullable + private ObjectIDAndName homeLiveboard; + + public static final String SERIALIZED_NAME_INCOMPLETE_DETAILS = "incomplete_details"; + @SerializedName(SERIALIZED_NAME_INCOMPLETE_DETAILS) + @javax.annotation.Nullable + private Object incompleteDetails; + + public static final String SERIALIZED_NAME_IS_FIRST_LOGIN = "is_first_login"; + @SerializedName(SERIALIZED_NAME_IS_FIRST_LOGIN) + @javax.annotation.Nullable + private Boolean isFirstLogin; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = "modification_time_in_millis"; + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = "onboarding_experience_completed"; + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable + private String ownerId; + + /** + * Parent type of the user. + */ + @JsonAdapter(ParentTypeEnum.Adapter.class) + public enum ParentTypeEnum { + USER("USER"), + + GROUP("GROUP"); + + private String value; + + ParentTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); - sb.append(" canChangePassword: ") - .append(toIndentedString(canChangePassword)) - .append("\n"); - sb.append(" completeDetail: ").append(toIndentedString(completeDetail)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" currentOrg: ").append(toIndentedString(currentOrg)).append("\n"); - sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); - sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" expirationTimeInMillis: ") - .append(toIndentedString(expirationTimeInMillis)) - .append("\n"); - sb.append(" external: ").append(toIndentedString(external)).append("\n"); - sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); - sb.append(" firstLoginTimeInMillis: ") - .append(toIndentedString(firstLoginTimeInMillis)) - .append("\n"); - sb.append(" groupMask: ").append(toIndentedString(groupMask)).append("\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" homeLiveboard: ").append(toIndentedString(homeLiveboard)).append("\n"); - sb.append(" incompleteDetails: ") - .append(toIndentedString(incompleteDetails)) - .append("\n"); - sb.append(" isFirstLogin: ").append(toIndentedString(isFirstLogin)).append("\n"); - sb.append(" modificationTimeInMillis: ") - .append(toIndentedString(modificationTimeInMillis)) - .append("\n"); - sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); - sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); - sb.append(" onboardingExperienceCompleted: ") - .append(toIndentedString(onboardingExperienceCompleted)) - .append("\n"); - sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" parentType: ").append(toIndentedString(parentType)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" showOnboardingExperience: ") - .append(toIndentedString(showOnboardingExperience)) - .append("\n"); - sb.append(" superUser: ").append(toIndentedString(superUser)).append("\n"); - sb.append(" systemUser: ").append(toIndentedString(systemUser)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); - sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); - sb.append(" userInheritedGroups: ") - .append(toIndentedString(userInheritedGroups)) - .append("\n"); - sb.append(" welcomeEmailSent: ").append(toIndentedString(welcomeEmailSent)).append("\n"); - sb.append(" orgPrivileges: ").append(toIndentedString(orgPrivileges)).append("\n"); - sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); - sb.append(" extendedProperties: ") - .append(toIndentedString(extendedProperties)) - .append("\n"); - sb.append(" extendedPreferences: ") - .append(toIndentedString(extendedPreferences)) - .append("\n"); - sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); - sb.append(" accessControlProperties: ") - .append(toIndentedString(accessControlProperties)) - .append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static ParentTypeEnum fromValue(String value) { + for (ParentTypeEnum b : ParentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + return null; } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("display_name"); - openapiFields.add("visibility"); - openapiFields.add("author_id"); - openapiFields.add("can_change_password"); - openapiFields.add("complete_detail"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("current_org"); - openapiFields.add("deleted"); - openapiFields.add("deprecated"); - openapiFields.add("account_type"); - openapiFields.add("account_status"); - openapiFields.add("email"); - openapiFields.add("expiration_time_in_millis"); - openapiFields.add("external"); - openapiFields.add("favorite_metadata"); - openapiFields.add("first_login_time_in_millis"); - openapiFields.add("group_mask"); - openapiFields.add("hidden"); - openapiFields.add("home_liveboard"); - openapiFields.add("incomplete_details"); - openapiFields.add("is_first_login"); - openapiFields.add("modification_time_in_millis"); - openapiFields.add("modifier_id"); - openapiFields.add("notify_on_share"); - openapiFields.add("onboarding_experience_completed"); - openapiFields.add("orgs"); - openapiFields.add("owner_id"); - openapiFields.add("parent_type"); - openapiFields.add("privileges"); - openapiFields.add("show_onboarding_experience"); - openapiFields.add("super_user"); - openapiFields.add("system_user"); - openapiFields.add("tags"); - openapiFields.add("tenant_id"); - openapiFields.add("user_groups"); - openapiFields.add("user_inherited_groups"); - openapiFields.add("welcome_email_sent"); - openapiFields.add("org_privileges"); - openapiFields.add("preferred_locale"); - openapiFields.add("extended_properties"); - openapiFields.add("extended_preferences"); - openapiFields.add("user_parameters"); - openapiFields.add("access_control_properties"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("display_name"); - openapiRequiredFields.add("visibility"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ParentTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ParentTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ParentTypeEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to User - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!User.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in User is not found in the empty JSON" - + " string", - User.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + ParentTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PARENT_TYPE = "parent_type"; + @SerializedName(SERIALIZED_NAME_PARENT_TYPE) + @javax.annotation.Nullable + private ParentTypeEnum parentType; + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = "show_onboarding_experience"; + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_SUPER_USER = "super_user"; + @SerializedName(SERIALIZED_NAME_SUPER_USER) + @javax.annotation.Nullable + private Boolean superUser; + + public static final String SERIALIZED_NAME_SYSTEM_USER = "system_user"; + @SerializedName(SERIALIZED_NAME_SYSTEM_USER) + @javax.annotation.Nullable + private Boolean systemUser; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nullable + private String tenantId; + + public static final String SERIALIZED_NAME_USER_GROUPS = "user_groups"; + @SerializedName(SERIALIZED_NAME_USER_GROUPS) + @javax.annotation.Nullable + private List userGroups; + + public static final String SERIALIZED_NAME_USER_INHERITED_GROUPS = "user_inherited_groups"; + @SerializedName(SERIALIZED_NAME_USER_INHERITED_GROUPS) + @javax.annotation.Nullable + private List userInheritedGroups; + + public static final String SERIALIZED_NAME_WELCOME_EMAIL_SENT = "welcome_email_sent"; + @SerializedName(SERIALIZED_NAME_WELCOME_EMAIL_SENT) + @javax.annotation.Nullable + private Boolean welcomeEmailSent; + + public static final String SERIALIZED_NAME_ORG_PRIVILEGES = "org_privileges"; + @SerializedName(SERIALIZED_NAME_ORG_PRIVILEGES) + @javax.annotation.Nullable + private Object orgPrivileges; + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private String preferredLocale; + + public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) + @javax.annotation.Nullable + private Object extendedProperties; + + public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) + @javax.annotation.Nullable + private Object extendedPreferences; + + public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; + @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) + @javax.annotation.Nullable + private Object userParameters; + + public static final String SERIALIZED_NAME_ACCESS_CONTROL_PROPERTIES = "access_control_properties"; + @SerializedName(SERIALIZED_NAME_ACCESS_CONTROL_PROPERTIES) + @javax.annotation.Nullable + private Object accessControlProperties; + + public static final String SERIALIZED_NAME_VARIABLE_VALUES = "variable_values"; + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUES) + @javax.annotation.Nullable + private Object variableValues; + + public User() { + } + + public User id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the user. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public User name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public User displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the user. + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public User visibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + * @return visibility + */ + @javax.annotation.Nonnull + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public User authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of author of the user. + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public User canChangePassword(@javax.annotation.Nullable Boolean canChangePassword) { + this.canChangePassword = canChangePassword; + return this; + } + + /** + * Defines whether the user can change their password. + * @return canChangePassword + */ + @javax.annotation.Nullable + public Boolean getCanChangePassword() { + return canChangePassword; + } + + public void setCanChangePassword(@javax.annotation.Nullable Boolean canChangePassword) { + this.canChangePassword = canChangePassword; + } + + + public User completeDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + return this; + } + + /** + * Defines whether the response has complete detail of the user. + * @return completeDetail + */ + @javax.annotation.Nullable + public Boolean getCompleteDetail() { + return completeDetail; + } + + public void setCompleteDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + } + + + public User creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the user in milliseconds. + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public User currentOrg(@javax.annotation.Nullable Org currentOrg) { + this.currentOrg = currentOrg; + return this; + } + + /** + * Get currentOrg + * @return currentOrg + */ + @javax.annotation.Nullable + public Org getCurrentOrg() { + return currentOrg; + } + + public void setCurrentOrg(@javax.annotation.Nullable Org currentOrg) { + this.currentOrg = currentOrg; + } + + + public User deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the user is deleted. + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + + public User deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the user is deprecated. + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + + public User accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the user account. + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public User accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Status of the user account. + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + + public User email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the user. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public User expirationTimeInMillis(@javax.annotation.Nullable Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Expiration time of the user in milliseconds. + * @return expirationTimeInMillis + */ + @javax.annotation.Nullable + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nullable Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + + public User external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the user is external. + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + + public User favoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public User addFavoriteMetadataItem(FavoriteMetadataItem favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the users' favorites list. + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata(@javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + + public User firstLoginTimeInMillis(@javax.annotation.Nullable Float firstLoginTimeInMillis) { + this.firstLoginTimeInMillis = firstLoginTimeInMillis; + return this; + } + + /** + * Timestamp of the first login session of the user in milliseconds. + * @return firstLoginTimeInMillis + */ + @javax.annotation.Nullable + public Float getFirstLoginTimeInMillis() { + return firstLoginTimeInMillis; + } + + public void setFirstLoginTimeInMillis(@javax.annotation.Nullable Float firstLoginTimeInMillis) { + this.firstLoginTimeInMillis = firstLoginTimeInMillis; + } + + + public User groupMask(@javax.annotation.Nullable Integer groupMask) { + this.groupMask = groupMask; + return this; + } + + /** + * Group mask of the user. + * @return groupMask + */ + @javax.annotation.Nullable + public Integer getGroupMask() { + return groupMask; + } + + public void setGroupMask(@javax.annotation.Nullable Integer groupMask) { + this.groupMask = groupMask; + } + + + public User hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the user is hidden. + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + public User homeLiveboard(@javax.annotation.Nullable ObjectIDAndName homeLiveboard) { + this.homeLiveboard = homeLiveboard; + return this; + } + + /** + * Get homeLiveboard + * @return homeLiveboard + */ + @javax.annotation.Nullable + public ObjectIDAndName getHomeLiveboard() { + return homeLiveboard; + } + + public void setHomeLiveboard(@javax.annotation.Nullable ObjectIDAndName homeLiveboard) { + this.homeLiveboard = homeLiveboard; + } + + + public User incompleteDetails(@javax.annotation.Nullable Object incompleteDetails) { + this.incompleteDetails = incompleteDetails; + return this; + } + + /** + * Incomplete details of user if any present. + * @return incompleteDetails + */ + @javax.annotation.Nullable + public Object getIncompleteDetails() { + return incompleteDetails; + } + + public void setIncompleteDetails(@javax.annotation.Nullable Object incompleteDetails) { + this.incompleteDetails = incompleteDetails; + } + + + public User isFirstLogin(@javax.annotation.Nullable Boolean isFirstLogin) { + this.isFirstLogin = isFirstLogin; + return this; + } + + /** + * Indicates whether it is first login of the user. + * @return isFirstLogin + */ + @javax.annotation.Nullable + public Boolean getIsFirstLogin() { + return isFirstLogin; + } + + public void setIsFirstLogin(@javax.annotation.Nullable Boolean isFirstLogin) { + this.isFirstLogin = isFirstLogin; + } + + + public User modificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the user in milliseconds. + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + + public User modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Unique identifier of modifier of the user. + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + + public User notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + + public User onboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * The user preference for turning off the onboarding experience. + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted(@javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + + public User orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public User addOrgsItem(Org orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs to which the user belongs. + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + + public User ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * Unique identifier of owner of the user. + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public User parentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + return this; + } + + /** + * Parent type of the user. + * @return parentType + */ + @javax.annotation.Nullable + public ParentTypeEnum getParentType() { + return parentType; + } + + public void setParentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + } + + + public User privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public User addPrivilegesItem(String privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges which are assigned to the user. + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public User showOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * User's preference to revisit the new user onboarding experience. + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience(@javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + + public User superUser(@javax.annotation.Nullable Boolean superUser) { + this.superUser = superUser; + return this; + } + + /** + * Indicates whether the user is a super user. + * @return superUser + */ + @javax.annotation.Nullable + public Boolean getSuperUser() { + return superUser; + } + + public void setSuperUser(@javax.annotation.Nullable Boolean superUser) { + this.superUser = superUser; + } + + + public User systemUser(@javax.annotation.Nullable Boolean systemUser) { + this.systemUser = systemUser; + return this; + } + + /** + * Indicates whether the user is a system user. + * @return systemUser + */ + @javax.annotation.Nullable + public Boolean getSystemUser() { + return systemUser; + } + + public void setSystemUser(@javax.annotation.Nullable Boolean systemUser) { + this.systemUser = systemUser; + } + + + public User tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public User addTagsItem(ObjectIDAndName tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the user. + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public User tenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Unique identifier of tenant of the user. + * @return tenantId + */ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + } + + + public User userGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + return this; + } + + public User addUserGroupsItem(ObjectIDAndName userGroupsItem) { + if (this.userGroups == null) { + this.userGroups = new ArrayList<>(); + } + this.userGroups.add(userGroupsItem); + return this; + } + + /** + * Groups to which the user is assigned. + * @return userGroups + */ + @javax.annotation.Nullable + public List getUserGroups() { + return userGroups; + } + + public void setUserGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + } + + + public User userInheritedGroups(@javax.annotation.Nullable List userInheritedGroups) { + this.userInheritedGroups = userInheritedGroups; + return this; + } + + public User addUserInheritedGroupsItem(ObjectIDAndName userInheritedGroupsItem) { + if (this.userInheritedGroups == null) { + this.userInheritedGroups = new ArrayList<>(); + } + this.userInheritedGroups.add(userInheritedGroupsItem); + return this; + } + + /** + * Inherited User Groups which the user is part of. + * @return userInheritedGroups + */ + @javax.annotation.Nullable + public List getUserInheritedGroups() { + return userInheritedGroups; + } + + public void setUserInheritedGroups(@javax.annotation.Nullable List userInheritedGroups) { + this.userInheritedGroups = userInheritedGroups; + } + + + public User welcomeEmailSent(@javax.annotation.Nullable Boolean welcomeEmailSent) { + this.welcomeEmailSent = welcomeEmailSent; + return this; + } + + /** + * Indicates whether welcome email is sent for the user. + * @return welcomeEmailSent + */ + @javax.annotation.Nullable + public Boolean getWelcomeEmailSent() { + return welcomeEmailSent; + } + + public void setWelcomeEmailSent(@javax.annotation.Nullable Boolean welcomeEmailSent) { + this.welcomeEmailSent = welcomeEmailSent; + } + + + public User orgPrivileges(@javax.annotation.Nullable Object orgPrivileges) { + this.orgPrivileges = orgPrivileges; + return this; + } + + /** + * Privileges which are assigned to the user with org. + * @return orgPrivileges + */ + @javax.annotation.Nullable + public Object getOrgPrivileges() { + return orgPrivileges; + } + + public void setOrgPrivileges(@javax.annotation.Nullable Object orgPrivileges) { + this.orgPrivileges = orgPrivileges; + } + + + public User preferredLocale(@javax.annotation.Nullable String preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. + * @return preferredLocale + */ + @javax.annotation.Nullable + public String getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable String preferredLocale) { + this.preferredLocale = preferredLocale; + } + + + public User extendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Properties for the user + * @return extendedProperties + */ + @javax.annotation.Nullable + public Object getExtendedProperties() { + return extendedProperties; + } + + public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + } + + + public User extendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + return this; + } + + /** + * Preferences for the user + * @return extendedPreferences + */ + @javax.annotation.Nullable + public Object getExtendedPreferences() { + return extendedPreferences; + } + + public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + } + + + public User userParameters(@javax.annotation.Nullable Object userParameters) { + this.userParameters = userParameters; + return this; + } + + /** + * User Parameters which are specified for the user via JWToken + * @return userParameters + */ + @javax.annotation.Nullable + public Object getUserParameters() { + return userParameters; + } + + public void setUserParameters(@javax.annotation.Nullable Object userParameters) { + this.userParameters = userParameters; + } + + + public User accessControlProperties(@javax.annotation.Nullable Object accessControlProperties) { + this.accessControlProperties = accessControlProperties; + return this; + } + + /** + * Access Control Properties which are specified for the user via JWToken + * @return accessControlProperties + */ + @javax.annotation.Nullable + public Object getAccessControlProperties() { + return accessControlProperties; + } + + public void setAccessControlProperties(@javax.annotation.Nullable Object accessControlProperties) { + this.accessControlProperties = accessControlProperties; + } + + + public User variableValues(@javax.annotation.Nullable Object variableValues) { + this.variableValues = variableValues; + return this; + } + + /** + * Formula Variables which are specified for the user via JWToken + * @return variableValues + */ + @javax.annotation.Nullable + public Object getVariableValues() { + return variableValues; + } + + public void setVariableValues(@javax.annotation.Nullable Object variableValues) { + this.variableValues = variableValues; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.name, user.name) && + Objects.equals(this.displayName, user.displayName) && + Objects.equals(this.visibility, user.visibility) && + Objects.equals(this.authorId, user.authorId) && + Objects.equals(this.canChangePassword, user.canChangePassword) && + Objects.equals(this.completeDetail, user.completeDetail) && + Objects.equals(this.creationTimeInMillis, user.creationTimeInMillis) && + Objects.equals(this.currentOrg, user.currentOrg) && + Objects.equals(this.deleted, user.deleted) && + Objects.equals(this.deprecated, user.deprecated) && + Objects.equals(this.accountType, user.accountType) && + Objects.equals(this.accountStatus, user.accountStatus) && + Objects.equals(this.email, user.email) && + Objects.equals(this.expirationTimeInMillis, user.expirationTimeInMillis) && + Objects.equals(this.external, user.external) && + Objects.equals(this.favoriteMetadata, user.favoriteMetadata) && + Objects.equals(this.firstLoginTimeInMillis, user.firstLoginTimeInMillis) && + Objects.equals(this.groupMask, user.groupMask) && + Objects.equals(this.hidden, user.hidden) && + Objects.equals(this.homeLiveboard, user.homeLiveboard) && + Objects.equals(this.incompleteDetails, user.incompleteDetails) && + Objects.equals(this.isFirstLogin, user.isFirstLogin) && + Objects.equals(this.modificationTimeInMillis, user.modificationTimeInMillis) && + Objects.equals(this.modifierId, user.modifierId) && + Objects.equals(this.notifyOnShare, user.notifyOnShare) && + Objects.equals(this.onboardingExperienceCompleted, user.onboardingExperienceCompleted) && + Objects.equals(this.orgs, user.orgs) && + Objects.equals(this.ownerId, user.ownerId) && + Objects.equals(this.parentType, user.parentType) && + Objects.equals(this.privileges, user.privileges) && + Objects.equals(this.showOnboardingExperience, user.showOnboardingExperience) && + Objects.equals(this.superUser, user.superUser) && + Objects.equals(this.systemUser, user.systemUser) && + Objects.equals(this.tags, user.tags) && + Objects.equals(this.tenantId, user.tenantId) && + Objects.equals(this.userGroups, user.userGroups) && + Objects.equals(this.userInheritedGroups, user.userInheritedGroups) && + Objects.equals(this.welcomeEmailSent, user.welcomeEmailSent) && + Objects.equals(this.orgPrivileges, user.orgPrivileges) && + Objects.equals(this.preferredLocale, user.preferredLocale) && + Objects.equals(this.extendedProperties, user.extendedProperties) && + Objects.equals(this.extendedPreferences, user.extendedPreferences) && + Objects.equals(this.userParameters, user.userParameters) && + Objects.equals(this.accessControlProperties, user.accessControlProperties) && + Objects.equals(this.variableValues, user.variableValues); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, displayName, visibility, authorId, canChangePassword, completeDetail, creationTimeInMillis, currentOrg, deleted, deprecated, accountType, accountStatus, email, expirationTimeInMillis, external, favoriteMetadata, firstLoginTimeInMillis, groupMask, hidden, homeLiveboard, incompleteDetails, isFirstLogin, modificationTimeInMillis, modifierId, notifyOnShare, onboardingExperienceCompleted, orgs, ownerId, parentType, privileges, showOnboardingExperience, superUser, systemUser, tags, tenantId, userGroups, userInheritedGroups, welcomeEmailSent, orgPrivileges, preferredLocale, extendedProperties, extendedPreferences, userParameters, accessControlProperties, variableValues); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" canChangePassword: ").append(toIndentedString(canChangePassword)).append("\n"); + sb.append(" completeDetail: ").append(toIndentedString(completeDetail)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" currentOrg: ").append(toIndentedString(currentOrg)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" expirationTimeInMillis: ").append(toIndentedString(expirationTimeInMillis)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" firstLoginTimeInMillis: ").append(toIndentedString(firstLoginTimeInMillis)).append("\n"); + sb.append(" groupMask: ").append(toIndentedString(groupMask)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" homeLiveboard: ").append(toIndentedString(homeLiveboard)).append("\n"); + sb.append(" incompleteDetails: ").append(toIndentedString(incompleteDetails)).append("\n"); + sb.append(" isFirstLogin: ").append(toIndentedString(isFirstLogin)).append("\n"); + sb.append(" modificationTimeInMillis: ").append(toIndentedString(modificationTimeInMillis)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" onboardingExperienceCompleted: ").append(toIndentedString(onboardingExperienceCompleted)).append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" parentType: ").append(toIndentedString(parentType)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" showOnboardingExperience: ").append(toIndentedString(showOnboardingExperience)).append("\n"); + sb.append(" superUser: ").append(toIndentedString(superUser)).append("\n"); + sb.append(" systemUser: ").append(toIndentedString(systemUser)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); + sb.append(" userInheritedGroups: ").append(toIndentedString(userInheritedGroups)).append("\n"); + sb.append(" welcomeEmailSent: ").append(toIndentedString(welcomeEmailSent)).append("\n"); + sb.append(" orgPrivileges: ").append(toIndentedString(orgPrivileges)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" extendedProperties: ").append(toIndentedString(extendedProperties)).append("\n"); + sb.append(" extendedPreferences: ").append(toIndentedString(extendedPreferences)).append("\n"); + sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); + sb.append(" accessControlProperties: ").append(toIndentedString(accessControlProperties)).append("\n"); + sb.append(" variableValues: ").append(toIndentedString(variableValues)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("visibility"); + openapiFields.add("author_id"); + openapiFields.add("can_change_password"); + openapiFields.add("complete_detail"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("current_org"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("email"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("external"); + openapiFields.add("favorite_metadata"); + openapiFields.add("first_login_time_in_millis"); + openapiFields.add("group_mask"); + openapiFields.add("hidden"); + openapiFields.add("home_liveboard"); + openapiFields.add("incomplete_details"); + openapiFields.add("is_first_login"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("modifier_id"); + openapiFields.add("notify_on_share"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("orgs"); + openapiFields.add("owner_id"); + openapiFields.add("parent_type"); + openapiFields.add("privileges"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("super_user"); + openapiFields.add("system_user"); + openapiFields.add("tags"); + openapiFields.add("tenant_id"); + openapiFields.add("user_groups"); + openapiFields.add("user_inherited_groups"); + openapiFields.add("welcome_email_sent"); + openapiFields.add("org_privileges"); + openapiFields.add("preferred_locale"); + openapiFields.add("extended_properties"); + openapiFields.add("extended_preferences"); + openapiFields.add("user_parameters"); + openapiFields.add("access_control_properties"); + openapiFields.add("variable_values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("visibility"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to User + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!User.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the `User`" - + " properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!User.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : User.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : User.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if (!jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); - } - if (!jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the required field `visibility` - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) - && !jsonObj.get("author_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_id").toString())); - } - // validate the optional field `current_org` - if (jsonObj.get("current_org") != null && !jsonObj.get("current_org").isJsonNull()) { - Org.validateJsonElement(jsonObj.get("current_org")); - } - if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) - && !jsonObj.get("account_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("account_type").toString())); - } - // validate the optional field `account_type` - if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { - AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); - } - if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) - && !jsonObj.get("account_status").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `account_status` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("account_status").toString())); - } - // validate the optional field `account_status` - if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { - AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) - && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `email` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("email").toString())); - } - if (jsonObj.get("favorite_metadata") != null - && !jsonObj.get("favorite_metadata").isJsonNull()) { - JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); - if (jsonArrayfavoriteMetadata != null) { - // ensure the json data is an array - if (!jsonObj.get("favorite_metadata").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `favorite_metadata` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("favorite_metadata").toString())); - } - - // validate the optional field `favorite_metadata` (array) - for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { - FavoriteMetadataItem.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); - } - ; - } - } - // validate the optional field `home_liveboard` - if (jsonObj.get("home_liveboard") != null && !jsonObj.get("home_liveboard").isJsonNull()) { - ObjectIDAndName.validateJsonElement(jsonObj.get("home_liveboard")); - } - if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) - && !jsonObj.get("modifier_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modifier_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("modifier_id").toString())); - } - if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { - JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); - if (jsonArrayorgs != null) { - // ensure the json data is an array - if (!jsonObj.get("orgs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orgs` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("orgs").toString())); - } - - // validate the optional field `orgs` (array) - for (int i = 0; i < jsonArrayorgs.size(); i++) { - Org.validateJsonElement(jsonArrayorgs.get(i)); - } - ; - } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the required field `visibility` + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); + } + // validate the optional field `current_org` + if (jsonObj.get("current_org") != null && !jsonObj.get("current_org").isJsonNull()) { + Org.validateJsonElement(jsonObj.get("current_org")); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `account_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (jsonObj.get("favorite_metadata") != null && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `favorite_metadata` to be an array in the JSON string but got `%s`", jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataItem.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + }; } - if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) - && !jsonObj.get("owner_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `owner_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("owner_id").toString())); + } + // validate the optional field `home_liveboard` + if (jsonObj.get("home_liveboard") != null && !jsonObj.get("home_liveboard").isJsonNull()) { + ObjectIDAndName.validateJsonElement(jsonObj.get("home_liveboard")); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifier_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifier_id").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `orgs` to be an array in the JSON string but got `%s`", jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + Org.validateJsonElement(jsonArrayorgs.get(i)); + }; } - if ((jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) - && !jsonObj.get("parent_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parent_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("parent_type").toString())); + } + if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) && !jsonObj.get("owner_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `owner_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_id").toString())); + } + if ((jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) && !jsonObj.get("parent_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parent_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_type").toString())); + } + // validate the optional field `parent_type` + if (jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) { + ParentTypeEnum.validateJsonElement(jsonObj.get("parent_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArraytags.get(i)); + }; } - // validate the optional field `parent_type` - if (jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) { - ParentTypeEnum.validateJsonElement(jsonObj.get("parent_type")); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (jsonObj.get("user_groups") != null && !jsonObj.get("user_groups").isJsonNull()) { + JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("user_groups"); + if (jsonArrayuserGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("user_groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_groups` to be an array in the JSON string but got `%s`", jsonObj.get("user_groups").toString())); + } + + // validate the optional field `user_groups` (array) + for (int i = 0; i < jsonArrayuserGroups.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArrayuserGroups.get(i)); + }; } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); + } + if (jsonObj.get("user_inherited_groups") != null && !jsonObj.get("user_inherited_groups").isJsonNull()) { + JsonArray jsonArrayuserInheritedGroups = jsonObj.getAsJsonArray("user_inherited_groups"); + if (jsonArrayuserInheritedGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("user_inherited_groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `user_inherited_groups` to be an array in the JSON string but got `%s`", jsonObj.get("user_inherited_groups").toString())); + } + + // validate the optional field `user_inherited_groups` (array) + for (int i = 0; i < jsonArrayuserInheritedGroups.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArrayuserInheritedGroups.get(i)); + }; } - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("tags").toString())); - } - - // validate the optional field `tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - ObjectIDAndName.validateJsonElement(jsonArraytags.get(i)); - } - ; - } - } - if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) - && !jsonObj.get("tenant_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tenant_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tenant_id").toString())); - } - if (jsonObj.get("user_groups") != null && !jsonObj.get("user_groups").isJsonNull()) { - JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("user_groups"); - if (jsonArrayuserGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("user_groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_groups` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("user_groups").toString())); - } - - // validate the optional field `user_groups` (array) - for (int i = 0; i < jsonArrayuserGroups.size(); i++) { - ObjectIDAndName.validateJsonElement(jsonArrayuserGroups.get(i)); - } - ; - } - } - if (jsonObj.get("user_inherited_groups") != null - && !jsonObj.get("user_inherited_groups").isJsonNull()) { - JsonArray jsonArrayuserInheritedGroups = - jsonObj.getAsJsonArray("user_inherited_groups"); - if (jsonArrayuserInheritedGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("user_inherited_groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `user_inherited_groups` to be an array in" - + " the JSON string but got `%s`", - jsonObj.get("user_inherited_groups").toString())); - } - - // validate the optional field `user_inherited_groups` (array) - for (int i = 0; i < jsonArrayuserInheritedGroups.size(); i++) { - ObjectIDAndName.validateJsonElement(jsonArrayuserInheritedGroups.get(i)); - } - ; - } - } - if ((jsonObj.get("preferred_locale") != null - && !jsonObj.get("preferred_locale").isJsonNull()) - && !jsonObj.get("preferred_locale").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `preferred_locale` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("preferred_locale").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!User.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'User' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(User.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, User value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public User read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of User given an JSON string - * - * @param jsonString JSON string - * @return An instance of User - * @throws IOException if the JSON string is invalid with respect to User - */ - public static User fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, User.class); - } - - /** - * Convert an instance of User to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + } + if ((jsonObj.get("preferred_locale") != null && !jsonObj.get("preferred_locale").isJsonNull()) && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `preferred_locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("preferred_locale").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!User.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'User' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(User.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, User value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public User read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of User given an JSON string + * + * @param jsonString JSON string + * @return An instance of User + * @throws IOException if the JSON string is invalid with respect to User + */ + public static User fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, User.class); + } + + /** + * Convert an instance of User to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java index 0c4b8a640..3d0864ad2 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java @@ -4,245 +4,239 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UserGroup */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UserGroup implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public UserGroup() {} - - public UserGroup id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public UserGroup name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserGroup userGroup = (UserGroup) o; - return Objects.equals(this.id, userGroup.id) && Objects.equals(this.name, userGroup.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserGroup {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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(); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserGroup - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserGroup.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserGroup is not found in the empty" - + " JSON string", - UserGroup.openapiRequiredFields.toString())); - } +/** + * UserGroup + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserGroup implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public UserGroup() { + } + + public UserGroup id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public UserGroup name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserGroup userGroup = (UserGroup) o; + return Objects.equals(this.id, userGroup.id) && + Objects.equals(this.name, userGroup.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserGroup {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UserGroup is not found in the empty JSON string", UserGroup.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserGroup` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserGroup.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserGroup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserGroup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserGroup.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserGroup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserGroup read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserGroup - * @throws IOException if the JSON string is invalid with respect to UserGroup - */ - public static UserGroup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserGroup.class); - } - - /** - * Convert an instance of UserGroup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UserGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserGroup + * @throws IOException if the JSON string is invalid with respect to UserGroup + */ + public static UserGroup fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserGroup.class); + } + + /** + * Convert an instance of UserGroup to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java index 7cc4106b2..71fd41216 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java @@ -4,1503 +4,1348 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Role; +import com.thoughtspot.client.model.UserGroup; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UserGroupResponse */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UserGroupResponse implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; - - @SerializedName(SERIALIZED_NAME_AUTHOR_ID) - @javax.annotation.Nullable - private String authorId; - - public static final String SERIALIZED_NAME_COMPLETE_DETAIL = "complete_detail"; - - @SerializedName(SERIALIZED_NAME_COMPLETE_DETAIL) - @javax.annotation.Nullable - private Boolean completeDetail; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private Object content; - - public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float creationTimeInMillis; - - public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARDS = "default_liveboards"; - - @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARDS) - @javax.annotation.Nullable - private List defaultLiveboards; - - public static final String SERIALIZED_NAME_DELETED = "deleted"; - - @SerializedName(SERIALIZED_NAME_DELETED) - @javax.annotation.Nullable - private Boolean deleted; - - public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; - - @SerializedName(SERIALIZED_NAME_DEPRECATED) - @javax.annotation.Nullable - private Boolean deprecated; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable - private String description; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - @javax.annotation.Nonnull - private String displayName; - - public static final String SERIALIZED_NAME_EXTERNAL = "external"; - - @SerializedName(SERIALIZED_NAME_EXTERNAL) - @javax.annotation.Nullable - private Boolean external; - - public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; - - @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) - @javax.annotation.Nullable - private Integer generationNumber; - - public static final String SERIALIZED_NAME_HIDDEN = "hidden"; - - @SerializedName(SERIALIZED_NAME_HIDDEN) - @javax.annotation.Nullable - private Boolean hidden; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_INDEX = "index"; - - @SerializedName(SERIALIZED_NAME_INDEX) - @javax.annotation.Nullable - private Integer index; - - public static final String SERIALIZED_NAME_INDEX_VERSION = "index_version"; - - @SerializedName(SERIALIZED_NAME_INDEX_VERSION) - @javax.annotation.Nullable - private Integer indexVersion; - - public static final String SERIALIZED_NAME_METADATA_VERSION = "metadata_version"; - - @SerializedName(SERIALIZED_NAME_METADATA_VERSION) - @javax.annotation.Nullable - private Integer metadataVersion; - - public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = - "modification_time_in_millis"; - - @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) - @javax.annotation.Nullable - private Float modificationTimeInMillis; - - public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; - - @SerializedName(SERIALIZED_NAME_MODIFIER_ID) - @javax.annotation.Nullable - private String modifierId; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ORGS = "orgs"; - - @SerializedName(SERIALIZED_NAME_ORGS) - @javax.annotation.Nullable - private List orgs; - - public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; - - @SerializedName(SERIALIZED_NAME_OWNER_ID) - @javax.annotation.Nullable - private String ownerId; - - /** Parent type of the group. */ - @JsonAdapter(ParentTypeEnum.Adapter.class) - public enum ParentTypeEnum { - USER("USER"), - - GROUP("GROUP"); - - private String value; - - ParentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ParentTypeEnum fromValue(String value) { - for (ParentTypeEnum b : ParentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ParentTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ParentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ParentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ParentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PARENT_TYPE = "parent_type"; - - @SerializedName(SERIALIZED_NAME_PARENT_TYPE) - @javax.annotation.Nullable - private ParentTypeEnum parentType; - public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; - - @SerializedName(SERIALIZED_NAME_PRIVILEGES) - @javax.annotation.Nullable - private List privileges; - - public static final String SERIALIZED_NAME_SUB_GROUPS = "sub_groups"; - - @SerializedName(SERIALIZED_NAME_SUB_GROUPS) - @javax.annotation.Nullable - private List subGroups; - - public static final String SERIALIZED_NAME_SYSTEM_GROUP = "system_group"; - - @SerializedName(SERIALIZED_NAME_SYSTEM_GROUP) - @javax.annotation.Nullable - private Boolean systemGroup; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - - @SerializedName(SERIALIZED_NAME_TAGS) - @javax.annotation.Nullable - private List tags; - - /** Type of the group. */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOCAL_GROUP("LOCAL_GROUP"), - - LDAP_GROUP("LDAP_GROUP"), - - TEAM_GROUP("TEAM_GROUP"), - - TENANT_GROUP("TENANT_GROUP"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_USERS = "users"; - - @SerializedName(SERIALIZED_NAME_USERS) - @javax.annotation.Nullable - private List users; - - /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and - * thus allows them to share objects. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - SHARABLE("SHARABLE"), - - NON_SHARABLE("NON_SHARABLE"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VisibilityEnum fromValue(String value) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VisibilityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VisibilityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; - - @SerializedName(SERIALIZED_NAME_VISIBILITY) - @javax.annotation.Nonnull - private VisibilityEnum visibility; - - public static final String SERIALIZED_NAME_ROLES = "roles"; - - @SerializedName(SERIALIZED_NAME_ROLES) - @javax.annotation.Nullable - private List roles; - - public UserGroupResponse() {} - - public UserGroupResponse authorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - return this; - } - - /** - * The unique identifier of the object - * - * @return authorId - */ - @javax.annotation.Nullable - public String getAuthorId() { - return authorId; - } - - public void setAuthorId(@javax.annotation.Nullable String authorId) { - this.authorId = authorId; - } - - public UserGroupResponse completeDetail(@javax.annotation.Nullable Boolean completeDetail) { - this.completeDetail = completeDetail; - return this; - } - - /** - * Indicates whether the response has complete detail of the group. - * - * @return completeDetail - */ - @javax.annotation.Nullable - public Boolean getCompleteDetail() { - return completeDetail; - } - - public void setCompleteDetail(@javax.annotation.Nullable Boolean completeDetail) { - this.completeDetail = completeDetail; - } - - public UserGroupResponse content(@javax.annotation.Nullable Object content) { - this.content = content; - return this; - } - - /** - * Content details of the group - * - * @return content - */ - @javax.annotation.Nullable - public Object getContent() { - return content; - } - - public void setContent(@javax.annotation.Nullable Object content) { - this.content = content; - } - - public UserGroupResponse creationTimeInMillis( - @javax.annotation.Nullable Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - return this; - } - - /** - * Creation time of the group in milliseconds - * - * @return creationTimeInMillis - */ - @javax.annotation.Nullable - public Float getCreationTimeInMillis() { - return creationTimeInMillis; - } - - public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { - this.creationTimeInMillis = creationTimeInMillis; - } - - public UserGroupResponse defaultLiveboards( - @javax.annotation.Nullable List defaultLiveboards) { - this.defaultLiveboards = defaultLiveboards; - return this; - } - - public UserGroupResponse addDefaultLiveboardsItem(UserGroup defaultLiveboardsItem) { - if (this.defaultLiveboards == null) { - this.defaultLiveboards = new ArrayList<>(); - } - this.defaultLiveboards.add(defaultLiveboardsItem); - return this; - } - - /** - * Liveboards that are assigned as default Liveboards to the group. - * - * @return defaultLiveboards - */ - @javax.annotation.Nullable - public List getDefaultLiveboards() { - return defaultLiveboards; - } - - public void setDefaultLiveboards(@javax.annotation.Nullable List defaultLiveboards) { - this.defaultLiveboards = defaultLiveboards; - } - - public UserGroupResponse deleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - return this; - } - - /** - * Indicates whether the group is deleted - * - * @return deleted - */ - @javax.annotation.Nullable - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(@javax.annotation.Nullable Boolean deleted) { - this.deleted = deleted; - } - - public UserGroupResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - return this; - } - - /** - * Indicates whether the group is deprecated - * - * @return deprecated - */ - @javax.annotation.Nullable - public Boolean getDeprecated() { - return deprecated; - } - - public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { - this.deprecated = deprecated; - } - - public UserGroupResponse description(@javax.annotation.Nullable String description) { - this.description = description; - return this; - } - - /** - * Description of the group - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public void setDescription(@javax.annotation.Nullable String description) { - this.description = description; - } - - public UserGroupResponse displayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Display name of the group. - * - * @return displayName - */ - @javax.annotation.Nonnull - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(@javax.annotation.Nonnull String displayName) { - this.displayName = displayName; - } - - public UserGroupResponse external(@javax.annotation.Nullable Boolean external) { - this.external = external; - return this; - } - - /** - * Indicates whether the group is external - * - * @return external - */ - @javax.annotation.Nullable - public Boolean getExternal() { - return external; - } - - public void setExternal(@javax.annotation.Nullable Boolean external) { - this.external = external; - } - - public UserGroupResponse generationNumber(@javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - return this; - } - - /** - * Generation number of the group - * - * @return generationNumber - */ - @javax.annotation.Nullable - public Integer getGenerationNumber() { - return generationNumber; - } - - public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { - this.generationNumber = generationNumber; - } - - public UserGroupResponse hidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - return this; - } - - /** - * Indicates whether the group is hidden - * - * @return hidden - */ - @javax.annotation.Nullable - public Boolean getHidden() { - return hidden; - } - - public void setHidden(@javax.annotation.Nullable Boolean hidden) { - this.hidden = hidden; - } - - public UserGroupResponse id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the object - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public UserGroupResponse index(@javax.annotation.Nullable Integer index) { - this.index = index; - return this; - } - - /** - * Index number of the group - * - * @return index - */ - @javax.annotation.Nullable - public Integer getIndex() { - return index; - } - - public void setIndex(@javax.annotation.Nullable Integer index) { - this.index = index; - } - - public UserGroupResponse indexVersion(@javax.annotation.Nullable Integer indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Index version number of the group - * - * @return indexVersion - */ - @javax.annotation.Nullable - public Integer getIndexVersion() { - return indexVersion; - } - - public void setIndexVersion(@javax.annotation.Nullable Integer indexVersion) { - this.indexVersion = indexVersion; - } - - public UserGroupResponse metadataVersion(@javax.annotation.Nullable Integer metadataVersion) { - this.metadataVersion = metadataVersion; - return this; - } - - /** - * Metadata version number of the group - * - * @return metadataVersion - */ - @javax.annotation.Nullable - public Integer getMetadataVersion() { - return metadataVersion; - } - - public void setMetadataVersion(@javax.annotation.Nullable Integer metadataVersion) { - this.metadataVersion = metadataVersion; - } - - public UserGroupResponse modificationTimeInMillis( - @javax.annotation.Nullable Float modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - return this; - } - - /** - * Last modified time of the group in milliseconds. - * - * @return modificationTimeInMillis - */ - @javax.annotation.Nullable - public Float getModificationTimeInMillis() { - return modificationTimeInMillis; - } - - public void setModificationTimeInMillis( - @javax.annotation.Nullable Float modificationTimeInMillis) { - this.modificationTimeInMillis = modificationTimeInMillis; - } - - public UserGroupResponse modifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - return this; - } - - /** - * The unique identifier of the object - * - * @return modifierId - */ - @javax.annotation.Nullable - public String getModifierId() { - return modifierId; - } - - public void setModifierId(@javax.annotation.Nullable String modifierId) { - this.modifierId = modifierId; - } - - public UserGroupResponse name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the group. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public UserGroupResponse orgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - return this; - } - - public UserGroupResponse addOrgsItem(UserGroup orgsItem) { - if (this.orgs == null) { - this.orgs = new ArrayList<>(); - } - this.orgs.add(orgsItem); - return this; - } - - /** - * Orgs in which group exists. - * - * @return orgs - */ - @javax.annotation.Nullable - public List getOrgs() { - return orgs; - } - - public void setOrgs(@javax.annotation.Nullable List orgs) { - this.orgs = orgs; - } - - public UserGroupResponse ownerId(@javax.annotation.Nullable String ownerId) { - this.ownerId = ownerId; - return this; - } - - /** - * The unique identifier of the object - * - * @return ownerId - */ - @javax.annotation.Nullable - public String getOwnerId() { - return ownerId; - } - - public void setOwnerId(@javax.annotation.Nullable String ownerId) { - this.ownerId = ownerId; - } - - public UserGroupResponse parentType(@javax.annotation.Nullable ParentTypeEnum parentType) { - this.parentType = parentType; - return this; - } - - /** - * Parent type of the group. - * - * @return parentType - */ - @javax.annotation.Nullable - public ParentTypeEnum getParentType() { - return parentType; - } - - public void setParentType(@javax.annotation.Nullable ParentTypeEnum parentType) { - this.parentType = parentType; - } - - public UserGroupResponse privileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; - return this; - } - - public UserGroupResponse addPrivilegesItem(String privilegesItem) { - if (this.privileges == null) { - this.privileges = new ArrayList<>(); - } - this.privileges.add(privilegesItem); - return this; - } - - /** - * Privileges which are assigned to the group - * - * @return privileges - */ - @javax.annotation.Nullable - public List getPrivileges() { - return privileges; - } +import com.thoughtspot.client.JSON; - public void setPrivileges(@javax.annotation.Nullable List privileges) { - this.privileges = privileges; +/** + * UserGroupResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserGroupResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_COMPLETE_DETAIL = "complete_detail"; + @SerializedName(SERIALIZED_NAME_COMPLETE_DETAIL) + @javax.annotation.Nullable + private Boolean completeDetail; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable + private Object content; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARDS = "default_liveboards"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARDS) + @javax.annotation.Nullable + private List defaultLiveboards; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_INDEX = "index"; + @SerializedName(SERIALIZED_NAME_INDEX) + @javax.annotation.Nullable + private Integer index; + + public static final String SERIALIZED_NAME_INDEX_VERSION = "index_version"; + @SerializedName(SERIALIZED_NAME_INDEX_VERSION) + @javax.annotation.Nullable + private Integer indexVersion; + + public static final String SERIALIZED_NAME_METADATA_VERSION = "metadata_version"; + @SerializedName(SERIALIZED_NAME_METADATA_VERSION) + @javax.annotation.Nullable + private Integer metadataVersion; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = "modification_time_in_millis"; + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable + private String ownerId; + + /** + * Parent type of the group. + */ + @JsonAdapter(ParentTypeEnum.Adapter.class) + public enum ParentTypeEnum { + USER("USER"), + + GROUP("GROUP"); + + private String value; + + ParentTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; } - public UserGroupResponse subGroups(@javax.annotation.Nullable List subGroups) { - this.subGroups = subGroups; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UserGroupResponse addSubGroupsItem(UserGroup subGroupsItem) { - if (this.subGroups == null) { - this.subGroups = new ArrayList<>(); + public static ParentTypeEnum fromValue(String value) { + for (ParentTypeEnum b : ParentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.subGroups.add(subGroupsItem); - return this; + } + return null; } - /** - * Groups who are part of the group - * - * @return subGroups - */ - @javax.annotation.Nullable - public List getSubGroups() { - return subGroups; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ParentTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setSubGroups(@javax.annotation.Nullable List subGroups) { - this.subGroups = subGroups; + @Override + public ParentTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ParentTypeEnum.fromValue(value); + } } - public UserGroupResponse systemGroup(@javax.annotation.Nullable Boolean systemGroup) { - this.systemGroup = systemGroup; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ParentTypeEnum.fromValue(value); } + } - /** - * Indicates whether the group is a system group. - * - * @return systemGroup - */ - @javax.annotation.Nullable - public Boolean getSystemGroup() { - return systemGroup; - } + public static final String SERIALIZED_NAME_PARENT_TYPE = "parent_type"; + @SerializedName(SERIALIZED_NAME_PARENT_TYPE) + @javax.annotation.Nullable + private ParentTypeEnum parentType; - public void setSystemGroup(@javax.annotation.Nullable Boolean systemGroup) { - this.systemGroup = systemGroup; - } + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; - public UserGroupResponse tags(@javax.annotation.Nullable List tags) { - this.tags = tags; - return this; - } + public static final String SERIALIZED_NAME_SUB_GROUPS = "sub_groups"; + @SerializedName(SERIALIZED_NAME_SUB_GROUPS) + @javax.annotation.Nullable + private List subGroups; - public UserGroupResponse addTagsItem(UserGroup tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } + public static final String SERIALIZED_NAME_SYSTEM_GROUP = "system_group"; + @SerializedName(SERIALIZED_NAME_SYSTEM_GROUP) + @javax.annotation.Nullable + private Boolean systemGroup; - /** - * Tags associated with the group. - * - * @return tags - */ - @javax.annotation.Nullable - public List getTags() { - return tags; - } + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags; - public void setTags(@javax.annotation.Nullable List tags) { - this.tags = tags; - } + /** + * Type of the group. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); - public UserGroupResponse type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } + private String value; - /** - * Type of the group. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + TypeEnum(String value) { + this.value = value; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public String getValue() { + return value; } - public UserGroupResponse users(@javax.annotation.Nullable List users) { - this.users = users; - return this; + @Override + public String toString() { + return String.valueOf(value); } - public UserGroupResponse addUsersItem(UserGroup usersItem) { - if (this.users == null) { - this.users = new ArrayList<>(); + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - this.users.add(usersItem); - return this; + } + return null; } - /** - * Users who are part of the group. - * - * @return users - */ - @javax.annotation.Nullable - public List getUsers() { - return users; - } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public void setUsers(@javax.annotation.Nullable List users) { - this.users = users; + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } } - public UserGroupResponse visibility(@javax.annotation.Nonnull VisibilityEnum visibility) { - this.visibility = visibility; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } + } - /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and - * thus allows them to share objects. - * - * @return visibility - */ - @javax.annotation.Nonnull - public VisibilityEnum getVisibility() { - return visibility; - } + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; - public void setVisibility(@javax.annotation.Nonnull VisibilityEnum visibility) { - this.visibility = visibility; - } + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users; - public UserGroupResponse roles(@javax.annotation.Nullable List roles) { - this.roles = roles; - return this; - } + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); - public UserGroupResponse addRolesItem(Role rolesItem) { - if (this.roles == null) { - this.roles = new ArrayList<>(); - } - this.roles.add(rolesItem); - return this; - } + private String value; - /** - * List of roles assgined to the user - * - * @return roles - */ - @javax.annotation.Nullable - public List getRoles() { - return roles; + VisibilityEnum(String value) { + this.value = value; } - public void setRoles(@javax.annotation.Nullable List roles) { - this.roles = roles; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserGroupResponse userGroupResponse = (UserGroupResponse) o; - return Objects.equals(this.authorId, userGroupResponse.authorId) - && Objects.equals(this.completeDetail, userGroupResponse.completeDetail) - && Objects.equals(this.content, userGroupResponse.content) - && Objects.equals(this.creationTimeInMillis, userGroupResponse.creationTimeInMillis) - && Objects.equals(this.defaultLiveboards, userGroupResponse.defaultLiveboards) - && Objects.equals(this.deleted, userGroupResponse.deleted) - && Objects.equals(this.deprecated, userGroupResponse.deprecated) - && Objects.equals(this.description, userGroupResponse.description) - && Objects.equals(this.displayName, userGroupResponse.displayName) - && Objects.equals(this.external, userGroupResponse.external) - && Objects.equals(this.generationNumber, userGroupResponse.generationNumber) - && Objects.equals(this.hidden, userGroupResponse.hidden) - && Objects.equals(this.id, userGroupResponse.id) - && Objects.equals(this.index, userGroupResponse.index) - && Objects.equals(this.indexVersion, userGroupResponse.indexVersion) - && Objects.equals(this.metadataVersion, userGroupResponse.metadataVersion) - && Objects.equals( - this.modificationTimeInMillis, userGroupResponse.modificationTimeInMillis) - && Objects.equals(this.modifierId, userGroupResponse.modifierId) - && Objects.equals(this.name, userGroupResponse.name) - && Objects.equals(this.orgs, userGroupResponse.orgs) - && Objects.equals(this.ownerId, userGroupResponse.ownerId) - && Objects.equals(this.parentType, userGroupResponse.parentType) - && Objects.equals(this.privileges, userGroupResponse.privileges) - && Objects.equals(this.subGroups, userGroupResponse.subGroups) - && Objects.equals(this.systemGroup, userGroupResponse.systemGroup) - && Objects.equals(this.tags, userGroupResponse.tags) - && Objects.equals(this.type, userGroupResponse.type) - && Objects.equals(this.users, userGroupResponse.users) - && Objects.equals(this.visibility, userGroupResponse.visibility) - && Objects.equals(this.roles, userGroupResponse.roles); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash( - authorId, - completeDetail, - content, - creationTimeInMillis, - defaultLiveboards, - deleted, - deprecated, - description, - displayName, - external, - generationNumber, - hidden, - id, - index, - indexVersion, - metadataVersion, - modificationTimeInMillis, - modifierId, - name, - orgs, - ownerId, - parentType, - privileges, - subGroups, - systemGroup, - tags, - type, - users, - visibility, - roles); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + public String getValue() { + return value; } @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserGroupResponse {\n"); - sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); - sb.append(" completeDetail: ").append(toIndentedString(completeDetail)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" creationTimeInMillis: ") - .append(toIndentedString(creationTimeInMillis)) - .append("\n"); - sb.append(" defaultLiveboards: ") - .append(toIndentedString(defaultLiveboards)) - .append("\n"); - sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); - sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" external: ").append(toIndentedString(external)).append("\n"); - sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" indexVersion: ").append(toIndentedString(indexVersion)).append("\n"); - sb.append(" metadataVersion: ").append(toIndentedString(metadataVersion)).append("\n"); - sb.append(" modificationTimeInMillis: ") - .append(toIndentedString(modificationTimeInMillis)) - .append("\n"); - sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); - sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" parentType: ").append(toIndentedString(parentType)).append("\n"); - sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); - sb.append(" subGroups: ").append(toIndentedString(subGroups)).append("\n"); - sb.append(" systemGroup: ").append(toIndentedString(systemGroup)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); - sb.append("}"); - return sb.toString(); + return String.valueOf(value); } - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; } - return o.toString().replace("\n", "\n "); + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("author_id"); - openapiFields.add("complete_detail"); - openapiFields.add("content"); - openapiFields.add("creation_time_in_millis"); - openapiFields.add("default_liveboards"); - openapiFields.add("deleted"); - openapiFields.add("deprecated"); - openapiFields.add("description"); - openapiFields.add("display_name"); - openapiFields.add("external"); - openapiFields.add("generation_number"); - openapiFields.add("hidden"); - openapiFields.add("id"); - openapiFields.add("index"); - openapiFields.add("index_version"); - openapiFields.add("metadata_version"); - openapiFields.add("modification_time_in_millis"); - openapiFields.add("modifier_id"); - openapiFields.add("name"); - openapiFields.add("orgs"); - openapiFields.add("owner_id"); - openapiFields.add("parent_type"); - openapiFields.add("privileges"); - openapiFields.add("sub_groups"); - openapiFields.add("system_group"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("users"); - openapiFields.add("visibility"); - openapiFields.add("roles"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("display_name"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("visibility"); + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserGroupResponse - */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserGroupResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserGroupResponse is not found in the" - + " empty JSON string", - UserGroupResponse.openapiRequiredFields.toString())); - } + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_ROLES = "roles"; + @SerializedName(SERIALIZED_NAME_ROLES) + @javax.annotation.Nullable + private List roles; + + public UserGroupResponse() { + } + + public UserGroupResponse authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * The unique identifier of the object + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public UserGroupResponse completeDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + return this; + } + + /** + * Indicates whether the response has complete detail of the group. + * @return completeDetail + */ + @javax.annotation.Nullable + public Boolean getCompleteDetail() { + return completeDetail; + } + + public void setCompleteDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + } + + + public UserGroupResponse content(@javax.annotation.Nullable Object content) { + this.content = content; + return this; + } + + /** + * Content details of the group + * @return content + */ + @javax.annotation.Nullable + public Object getContent() { + return content; + } + + public void setContent(@javax.annotation.Nullable Object content) { + this.content = content; + } + + + public UserGroupResponse creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the group in milliseconds + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + + public UserGroupResponse defaultLiveboards(@javax.annotation.Nullable List defaultLiveboards) { + this.defaultLiveboards = defaultLiveboards; + return this; + } + + public UserGroupResponse addDefaultLiveboardsItem(UserGroup defaultLiveboardsItem) { + if (this.defaultLiveboards == null) { + this.defaultLiveboards = new ArrayList<>(); + } + this.defaultLiveboards.add(defaultLiveboardsItem); + return this; + } + + /** + * Liveboards that are assigned as default Liveboards to the group. + * @return defaultLiveboards + */ + @javax.annotation.Nullable + public List getDefaultLiveboards() { + return defaultLiveboards; + } + + public void setDefaultLiveboards(@javax.annotation.Nullable List defaultLiveboards) { + this.defaultLiveboards = defaultLiveboards; + } + + + public UserGroupResponse deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the group is deleted + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + + public UserGroupResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the group is deprecated + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + + public UserGroupResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UserGroupResponse displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the group. + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public UserGroupResponse external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the group is external + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + + public UserGroupResponse generationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation number of the group + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + + public UserGroupResponse hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the group is hidden + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + public UserGroupResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public UserGroupResponse index(@javax.annotation.Nullable Integer index) { + this.index = index; + return this; + } + + /** + * Index number of the group + * @return index + */ + @javax.annotation.Nullable + public Integer getIndex() { + return index; + } + + public void setIndex(@javax.annotation.Nullable Integer index) { + this.index = index; + } + + + public UserGroupResponse indexVersion(@javax.annotation.Nullable Integer indexVersion) { + this.indexVersion = indexVersion; + return this; + } + + /** + * Index version number of the group + * @return indexVersion + */ + @javax.annotation.Nullable + public Integer getIndexVersion() { + return indexVersion; + } + + public void setIndexVersion(@javax.annotation.Nullable Integer indexVersion) { + this.indexVersion = indexVersion; + } + + + public UserGroupResponse metadataVersion(@javax.annotation.Nullable Integer metadataVersion) { + this.metadataVersion = metadataVersion; + return this; + } + + /** + * Metadata version number of the group + * @return metadataVersion + */ + @javax.annotation.Nullable + public Integer getMetadataVersion() { + return metadataVersion; + } + + public void setMetadataVersion(@javax.annotation.Nullable Integer metadataVersion) { + this.metadataVersion = metadataVersion; + } + + + public UserGroupResponse modificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the group in milliseconds. + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + + public UserGroupResponse modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * The unique identifier of the object + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + + public UserGroupResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the group. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public UserGroupResponse orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public UserGroupResponse addOrgsItem(UserGroup orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs in which group exists. + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + + public UserGroupResponse ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * The unique identifier of the object + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public UserGroupResponse parentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + return this; + } + + /** + * Parent type of the group. + * @return parentType + */ + @javax.annotation.Nullable + public ParentTypeEnum getParentType() { + return parentType; + } + + public void setParentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + } + + + public UserGroupResponse privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public UserGroupResponse addPrivilegesItem(String privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges which are assigned to the group + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + + public UserGroupResponse subGroups(@javax.annotation.Nullable List subGroups) { + this.subGroups = subGroups; + return this; + } + + public UserGroupResponse addSubGroupsItem(UserGroup subGroupsItem) { + if (this.subGroups == null) { + this.subGroups = new ArrayList<>(); + } + this.subGroups.add(subGroupsItem); + return this; + } + + /** + * Groups who are part of the group + * @return subGroups + */ + @javax.annotation.Nullable + public List getSubGroups() { + return subGroups; + } + + public void setSubGroups(@javax.annotation.Nullable List subGroups) { + this.subGroups = subGroups; + } + + + public UserGroupResponse systemGroup(@javax.annotation.Nullable Boolean systemGroup) { + this.systemGroup = systemGroup; + return this; + } + + /** + * Indicates whether the group is a system group. + * @return systemGroup + */ + @javax.annotation.Nullable + public Boolean getSystemGroup() { + return systemGroup; + } + + public void setSystemGroup(@javax.annotation.Nullable Boolean systemGroup) { + this.systemGroup = systemGroup; + } + + + public UserGroupResponse tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UserGroupResponse addTagsItem(UserGroup tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the group. + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public UserGroupResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the group. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public UserGroupResponse users(@javax.annotation.Nullable List users) { + this.users = users; + return this; + } + + public UserGroupResponse addUsersItem(UserGroup usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Users who are part of the group. + * @return users + */ + @javax.annotation.Nullable + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; + } + + + public UserGroupResponse visibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + * @return visibility + */ + @javax.annotation.Nonnull + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + } + + + public UserGroupResponse roles(@javax.annotation.Nullable List roles) { + this.roles = roles; + return this; + } + + public UserGroupResponse addRolesItem(Role rolesItem) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + /** + * List of roles assgined to the user + * @return roles + */ + @javax.annotation.Nullable + public List getRoles() { + return roles; + } + + public void setRoles(@javax.annotation.Nullable List roles) { + this.roles = roles; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserGroupResponse userGroupResponse = (UserGroupResponse) o; + return Objects.equals(this.authorId, userGroupResponse.authorId) && + Objects.equals(this.completeDetail, userGroupResponse.completeDetail) && + Objects.equals(this.content, userGroupResponse.content) && + Objects.equals(this.creationTimeInMillis, userGroupResponse.creationTimeInMillis) && + Objects.equals(this.defaultLiveboards, userGroupResponse.defaultLiveboards) && + Objects.equals(this.deleted, userGroupResponse.deleted) && + Objects.equals(this.deprecated, userGroupResponse.deprecated) && + Objects.equals(this.description, userGroupResponse.description) && + Objects.equals(this.displayName, userGroupResponse.displayName) && + Objects.equals(this.external, userGroupResponse.external) && + Objects.equals(this.generationNumber, userGroupResponse.generationNumber) && + Objects.equals(this.hidden, userGroupResponse.hidden) && + Objects.equals(this.id, userGroupResponse.id) && + Objects.equals(this.index, userGroupResponse.index) && + Objects.equals(this.indexVersion, userGroupResponse.indexVersion) && + Objects.equals(this.metadataVersion, userGroupResponse.metadataVersion) && + Objects.equals(this.modificationTimeInMillis, userGroupResponse.modificationTimeInMillis) && + Objects.equals(this.modifierId, userGroupResponse.modifierId) && + Objects.equals(this.name, userGroupResponse.name) && + Objects.equals(this.orgs, userGroupResponse.orgs) && + Objects.equals(this.ownerId, userGroupResponse.ownerId) && + Objects.equals(this.parentType, userGroupResponse.parentType) && + Objects.equals(this.privileges, userGroupResponse.privileges) && + Objects.equals(this.subGroups, userGroupResponse.subGroups) && + Objects.equals(this.systemGroup, userGroupResponse.systemGroup) && + Objects.equals(this.tags, userGroupResponse.tags) && + Objects.equals(this.type, userGroupResponse.type) && + Objects.equals(this.users, userGroupResponse.users) && + Objects.equals(this.visibility, userGroupResponse.visibility) && + Objects.equals(this.roles, userGroupResponse.roles); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authorId, completeDetail, content, creationTimeInMillis, defaultLiveboards, deleted, deprecated, description, displayName, external, generationNumber, hidden, id, index, indexVersion, metadataVersion, modificationTimeInMillis, modifierId, name, orgs, ownerId, parentType, privileges, subGroups, systemGroup, tags, type, users, visibility, roles); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserGroupResponse {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" completeDetail: ").append(toIndentedString(completeDetail)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" creationTimeInMillis: ").append(toIndentedString(creationTimeInMillis)).append("\n"); + sb.append(" defaultLiveboards: ").append(toIndentedString(defaultLiveboards)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" indexVersion: ").append(toIndentedString(indexVersion)).append("\n"); + sb.append(" metadataVersion: ").append(toIndentedString(metadataVersion)).append("\n"); + sb.append(" modificationTimeInMillis: ").append(toIndentedString(modificationTimeInMillis)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" parentType: ").append(toIndentedString(parentType)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroups: ").append(toIndentedString(subGroups)).append("\n"); + sb.append(" systemGroup: ").append(toIndentedString(systemGroup)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("author_id"); + openapiFields.add("complete_detail"); + openapiFields.add("content"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("default_liveboards"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("description"); + openapiFields.add("display_name"); + openapiFields.add("external"); + openapiFields.add("generation_number"); + openapiFields.add("hidden"); + openapiFields.add("id"); + openapiFields.add("index"); + openapiFields.add("index_version"); + openapiFields.add("metadata_version"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("modifier_id"); + openapiFields.add("name"); + openapiFields.add("orgs"); + openapiFields.add("owner_id"); + openapiFields.add("parent_type"); + openapiFields.add("privileges"); + openapiFields.add("sub_groups"); + openapiFields.add("system_group"); + openapiFields.add("tags"); + openapiFields.add("type"); + openapiFields.add("users"); + openapiFields.add("visibility"); + openapiFields.add("roles"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("visibility"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserGroupResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserGroupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UserGroupResponse is not found in the empty JSON string", UserGroupResponse.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserGroupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserGroupResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserGroupResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserGroupResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserGroupResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UserGroupResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) - && !jsonObj.get("author_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `author_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("author_id").toString())); - } - if (jsonObj.get("default_liveboards") != null - && !jsonObj.get("default_liveboards").isJsonNull()) { - JsonArray jsonArraydefaultLiveboards = jsonObj.getAsJsonArray("default_liveboards"); - if (jsonArraydefaultLiveboards != null) { - // ensure the json data is an array - if (!jsonObj.get("default_liveboards").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `default_liveboards` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("default_liveboards").toString())); - } - - // validate the optional field `default_liveboards` (array) - for (int i = 0; i < jsonArraydefaultLiveboards.size(); i++) { - UserGroup.validateJsonElement(jsonArraydefaultLiveboards.get(i)); - } - ; - } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); + } + if (jsonObj.get("default_liveboards") != null && !jsonObj.get("default_liveboards").isJsonNull()) { + JsonArray jsonArraydefaultLiveboards = jsonObj.getAsJsonArray("default_liveboards"); + if (jsonArraydefaultLiveboards != null) { + // ensure the json data is an array + if (!jsonObj.get("default_liveboards").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `default_liveboards` to be an array in the JSON string but got `%s`", jsonObj.get("default_liveboards").toString())); + } + + // validate the optional field `default_liveboards` (array) + for (int i = 0; i < jsonArraydefaultLiveboards.size(); i++) { + UserGroup.validateJsonElement(jsonArraydefaultLiveboards.get(i)); + }; } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) - && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `description` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("description").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifier_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifier_id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `orgs` to be an array in the JSON string but got `%s`", jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + UserGroup.validateJsonElement(jsonArrayorgs.get(i)); + }; } - if (!jsonObj.get("display_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `display_name` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) && !jsonObj.get("owner_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `owner_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_id").toString())); + } + if ((jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) && !jsonObj.get("parent_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parent_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_type").toString())); + } + // validate the optional field `parent_type` + if (jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) { + ParentTypeEnum.validateJsonElement(jsonObj.get("parent_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null && !jsonObj.get("privileges").isJsonNull() && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `privileges` to be an array in the JSON string but got `%s`", jsonObj.get("privileges").toString())); + } + if (jsonObj.get("sub_groups") != null && !jsonObj.get("sub_groups").isJsonNull()) { + JsonArray jsonArraysubGroups = jsonObj.getAsJsonArray("sub_groups"); + if (jsonArraysubGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("sub_groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_groups` to be an array in the JSON string but got `%s`", jsonObj.get("sub_groups").toString())); + } + + // validate the optional field `sub_groups` (array) + for (int i = 0; i < jsonArraysubGroups.size(); i++) { + UserGroup.validateJsonElement(jsonArraysubGroups.get(i)); + }; } - if (!jsonObj.get("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("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + UserGroup.validateJsonElement(jsonArraytags.get(i)); + }; } - if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) - && !jsonObj.get("modifier_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `modifier_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("modifier_id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + UserGroup.validateJsonElement(jsonArrayusers.get(i)); + }; } - if (!jsonObj.get("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("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + // validate the required field `visibility` + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) { + JsonArray jsonArrayroles = jsonObj.getAsJsonArray("roles"); + if (jsonArrayroles != null) { + // ensure the json data is an array + if (!jsonObj.get("roles").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); + } + + // validate the optional field `roles` (array) + for (int i = 0; i < jsonArrayroles.size(); i++) { + Role.validateJsonElement(jsonArrayroles.get(i)); + }; } - if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { - JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); - if (jsonArrayorgs != null) { - // ensure the json data is an array - if (!jsonObj.get("orgs").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orgs` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("orgs").toString())); - } - - // validate the optional field `orgs` (array) - for (int i = 0; i < jsonArrayorgs.size(); i++) { - UserGroup.validateJsonElement(jsonArrayorgs.get(i)); - } - ; - } - } - if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) - && !jsonObj.get("owner_id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `owner_id` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("owner_id").toString())); - } - if ((jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) - && !jsonObj.get("parent_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parent_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("parent_type").toString())); - } - // validate the optional field `parent_type` - if (jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) { - ParentTypeEnum.validateJsonElement(jsonObj.get("parent_type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("privileges") != null - && !jsonObj.get("privileges").isJsonNull() - && !jsonObj.get("privileges").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `privileges` to be an array in the JSON string but" - + " got `%s`", - jsonObj.get("privileges").toString())); - } - if (jsonObj.get("sub_groups") != null && !jsonObj.get("sub_groups").isJsonNull()) { - JsonArray jsonArraysubGroups = jsonObj.getAsJsonArray("sub_groups"); - if (jsonArraysubGroups != null) { - // ensure the json data is an array - if (!jsonObj.get("sub_groups").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `sub_groups` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("sub_groups").toString())); - } - - // validate the optional field `sub_groups` (array) - for (int i = 0; i < jsonArraysubGroups.size(); i++) { - UserGroup.validateJsonElement(jsonArraysubGroups.get(i)); - } - ; - } - } - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tags` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("tags").toString())); - } - - // validate the optional field `tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - UserGroup.validateJsonElement(jsonArraytags.get(i)); - } - ; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); - if (jsonArrayusers != null) { - // ensure the json data is an array - if (!jsonObj.get("users").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `users` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("users").toString())); - } - - // validate the optional field `users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - UserGroup.validateJsonElement(jsonArrayusers.get(i)); - } - ; - } - } - if (!jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `visibility` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("visibility").toString())); - } - // validate the required field `visibility` - VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); - if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) { - JsonArray jsonArrayroles = jsonObj.getAsJsonArray("roles"); - if (jsonArrayroles != null) { - // ensure the json data is an array - if (!jsonObj.get("roles").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `roles` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("roles").toString())); - } - - // validate the optional field `roles` (array) - for (int i = 0; i < jsonArrayroles.size(); i++) { - Role.validateJsonElement(jsonArrayroles.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserGroupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserGroupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserGroupResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserGroupResponse value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserGroupResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } + } + } - /** - * Create an instance of UserGroupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserGroupResponse - * @throws IOException if the JSON string is invalid with respect to UserGroupResponse - */ - public static UserGroupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserGroupResponse.class); - } - - /** - * Convert an instance of UserGroupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserGroupResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserGroupResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserGroupResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserGroupResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserGroupResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UserGroupResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserGroupResponse + * @throws IOException if the JSON string is invalid with respect to UserGroupResponse + */ + public static UserGroupResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserGroupResponse.class); + } + + /** + * Convert an instance of UserGroupResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java index a467f15c6..4bd12a0a7 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java @@ -4,255 +4,247 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UserInfo */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UserInfo implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public UserInfo() {} - - public UserInfo id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * Id. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; - } - - public UserInfo name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Name. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserInfo userInfo = (UserInfo) o; - return Objects.equals(this.id, userInfo.id) && Objects.equals(this.name, userInfo.name); - } - - 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); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserInfo {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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"); - } +import com.thoughtspot.client.JSON; - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserInfo.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserInfo is not found in the empty" - + " JSON string", - UserInfo.openapiRequiredFields.toString())); - } +/** + * UserInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public UserInfo() { + } + + public UserInfo id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Id. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public UserInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserInfo userInfo = (UserInfo) o; + return Objects.equals(this.id, userInfo.id) && + Objects.equals(this.name, userInfo.name); + } + + 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); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UserInfo is not found in the empty JSON string", UserInfo.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserInfo` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserInfo.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UserInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserInfo.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserInfo - * @throws IOException if the JSON string is invalid with respect to UserInfo - */ - public static UserInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserInfo.class); - } - - /** - * Convert an instance of UserInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserInfo + * @throws IOException if the JSON string is invalid with respect to UserInfo + */ + public static UserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserInfo.class); + } + + /** + * Convert an instance of UserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java index a80f08bab..33b4778a5 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 @@ -4,318 +4,301 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Objects to apply the User_Object. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UserObject implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * Type of object. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - LOGICAL_TABLE("LOGICAL_TABLE"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nonnull - private String identifier; - - public UserObject() {} +import com.thoughtspot.client.JSON; - public UserObject type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } +/** + * Objects to apply the User_Object. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserObject implements Serializable { + private static final long serialVersionUID = 1L; - /** - * Type of object. Required if the name of the object is set as the identifier. This attribute - * is optional when the object GUID is specified as the identifier. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return 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`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } + private String value; - public UserObject identifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; - return this; + TypeEnum(String value) { + this.value = value; } - /** - * Unique name/id of the object. - * - * @return identifier - */ - @javax.annotation.Nonnull - public String getIdentifier() { - return identifier; + public String getValue() { + return value; } - public void setIdentifier(@javax.annotation.Nonnull String identifier) { - this.identifier = identifier; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserObject userObject = (UserObject) o; - return Objects.equals(this.type, userObject.type) - && Objects.equals(this.identifier, userObject.identifier); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(type, identifier); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public UserObject() { + } + + public UserObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public UserObject identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique name/id of the object. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserObject {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UserObject userObject = (UserObject) o; + return Objects.equals(this.type, userObject.type) && + Objects.equals(this.identifier, userObject.identifier); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("identifier"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("identifier"); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserObject {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserObject.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserObject is not found in the empty" - + " JSON string", - UserObject.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UserObject is not found in the empty JSON string", UserObject.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserObject` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserObject.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UserObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if (!jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserObject.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserObject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserObject - * @throws IOException if the JSON string is invalid with respect to UserObject - */ - public static UserObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserObject.class); - } - - /** - * Convert an instance of UserObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UserObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserObject + * @throws IOException if the JSON string is invalid with respect to UserObject + */ + public static UserObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserObject.class); + } + + /** + * Convert an instance of UserObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java index b18141976..0ae65d4b4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java @@ -4,413 +4,381 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.RuntimeFilters; +import com.thoughtspot.client.model.RuntimeParameters; +import com.thoughtspot.client.model.RuntimeSorts; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; + +import com.thoughtspot.client.JSON; /** - * 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). + * Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class UserParameterOptions implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_OBJECTS = "objects"; - - @SerializedName(SERIALIZED_NAME_OBJECTS) - @javax.annotation.Nullable - private List objects; - - public static final String SERIALIZED_NAME_RUNTIME_FILTERS = "runtime_filters"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_FILTERS) - @javax.annotation.Nullable - private List runtimeFilters; - - public static final String SERIALIZED_NAME_RUNTIME_SORTS = "runtime_sorts"; - - @SerializedName(SERIALIZED_NAME_RUNTIME_SORTS) - @javax.annotation.Nullable - private List runtimeSorts; - - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; - - @SerializedName(SERIALIZED_NAME_PARAMETERS) - @javax.annotation.Nullable - private List parameters; - - public UserParameterOptions() {} - - public UserParameterOptions objects(@javax.annotation.Nullable List objects) { - this.objects = objects; - return this; - } - - public UserParameterOptions addObjectsItem(UserObject objectsItem) { - if (this.objects == null) { - this.objects = new ArrayList<>(); - } - this.objects.add(objectsItem); - return this; - } - - /** - * Get objects - * - * @return objects - */ - @javax.annotation.Nullable - public List getObjects() { - return objects; - } - - public void setObjects(@javax.annotation.Nullable List objects) { - this.objects = objects; - } - - public UserParameterOptions runtimeFilters( - @javax.annotation.Nullable List runtimeFilters) { - this.runtimeFilters = runtimeFilters; - return this; - } - - public UserParameterOptions addRuntimeFiltersItem(RuntimeFilters runtimeFiltersItem) { - if (this.runtimeFilters == null) { - this.runtimeFilters = new ArrayList<>(); - } - this.runtimeFilters.add(runtimeFiltersItem); - return this; - } - - /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : - * ```json { \"column_name\": \"Color\", - * \"operator\": \"EQ\", \"values\": [\"red\"], - * \"persist\": false } ``` - * - * @return runtimeFilters - */ - @javax.annotation.Nullable - public List getRuntimeFilters() { - return runtimeFilters; - } - - public void setRuntimeFilters(@javax.annotation.Nullable List runtimeFilters) { - this.runtimeFilters = runtimeFilters; - } - - public UserParameterOptions runtimeSorts( - @javax.annotation.Nullable List runtimeSorts) { - this.runtimeSorts = runtimeSorts; - return this; - } - - public UserParameterOptions addRuntimeSortsItem(RuntimeSorts runtimeSortsItem) { - if (this.runtimeSorts == null) { - this.runtimeSorts = new ArrayList<>(); - } - this.runtimeSorts.add(runtimeSortsItem); - return this; + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public static final String SERIALIZED_NAME_RUNTIME_FILTERS = "runtime_filters"; + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTERS) + @javax.annotation.Nullable + private List runtimeFilters; + + public static final String SERIALIZED_NAME_RUNTIME_SORTS = "runtime_sorts"; + @SerializedName(SERIALIZED_NAME_RUNTIME_SORTS) + @javax.annotation.Nullable + private List runtimeSorts; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public UserParameterOptions() { + } + + public UserParameterOptions objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public UserParameterOptions addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); } - - /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : - * ```json { \"column_name\": \"Color\", \"order\": - * \"ASC\", \"persist\": false } ``` - * - * @return runtimeSorts - */ - @javax.annotation.Nullable - public List getRuntimeSorts() { - return runtimeSorts; + this.objects.add(objectsItem); + return this; + } + + /** + * Get objects + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + + public UserParameterOptions runtimeFilters(@javax.annotation.Nullable List runtimeFilters) { + this.runtimeFilters = runtimeFilters; + return this; + } + + public UserParameterOptions addRuntimeFiltersItem(RuntimeFilters runtimeFiltersItem) { + if (this.runtimeFilters == null) { + this.runtimeFilters = new ArrayList<>(); } - - public void setRuntimeSorts(@javax.annotation.Nullable List runtimeSorts) { - this.runtimeSorts = runtimeSorts; + this.runtimeFilters.add(runtimeFiltersItem); + return this; + } + + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * @return runtimeFilters + */ + @javax.annotation.Nullable + public List getRuntimeFilters() { + return runtimeFilters; + } + + public void setRuntimeFilters(@javax.annotation.Nullable List runtimeFilters) { + this.runtimeFilters = runtimeFilters; + } + + + public UserParameterOptions runtimeSorts(@javax.annotation.Nullable List runtimeSorts) { + this.runtimeSorts = runtimeSorts; + return this; + } + + public UserParameterOptions addRuntimeSortsItem(RuntimeSorts runtimeSortsItem) { + if (this.runtimeSorts == null) { + this.runtimeSorts = new ArrayList<>(); } - - public UserParameterOptions parameters( - @javax.annotation.Nullable List parameters) { - this.parameters = parameters; - return this; + this.runtimeSorts.add(runtimeSortsItem); + return this; + } + + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * @return runtimeSorts + */ + @javax.annotation.Nullable + public List getRuntimeSorts() { + return runtimeSorts; + } + + public void setRuntimeSorts(@javax.annotation.Nullable List runtimeSorts) { + this.runtimeSorts = runtimeSorts; + } + + + public UserParameterOptions parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public UserParameterOptions addParametersItem(RuntimeParameters parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); } + this.parameters.add(parametersItem); + return this; + } - public UserParameterOptions addParametersItem(RuntimeParameters parametersItem) { - if (this.parameters == null) { - this.parameters = new ArrayList<>(); - } - this.parameters.add(parametersItem); - return this; - } + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } - /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : - * ```json { \"name\": \"Color\", \"values\": - * [\"Blue\"], \"persist\": false } ``` - * - * @return parameters - */ - @javax.annotation.Nullable - public List getParameters() { - return parameters; - } - - public void setParameters(@javax.annotation.Nullable List parameters) { - this.parameters = parameters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserParameterOptions userParameterOptions = (UserParameterOptions) o; - return Objects.equals(this.objects, userParameterOptions.objects) - && Objects.equals(this.runtimeFilters, userParameterOptions.runtimeFilters) - && Objects.equals(this.runtimeSorts, userParameterOptions.runtimeSorts) - && Objects.equals(this.parameters, userParameterOptions.parameters); - } + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - @Override - public int hashCode() { - return Objects.hash(objects, runtimeFilters, runtimeSorts, parameters); - } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserParameterOptions {\n"); - sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); - sb.append(" runtimeFilters: ").append(toIndentedString(runtimeFilters)).append("\n"); - sb.append(" runtimeSorts: ").append(toIndentedString(runtimeSorts)).append("\n"); - sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + UserParameterOptions userParameterOptions = (UserParameterOptions) o; + return Objects.equals(this.objects, userParameterOptions.objects) && + Objects.equals(this.runtimeFilters, userParameterOptions.runtimeFilters) && + Objects.equals(this.runtimeSorts, userParameterOptions.runtimeSorts) && + Objects.equals(this.parameters, userParameterOptions.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(objects, runtimeFilters, runtimeSorts, parameters); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("objects"); - openapiFields.add("runtime_filters"); - openapiFields.add("runtime_sorts"); - openapiFields.add("parameters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserParameterOptions {\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" runtimeFilters: ").append(toIndentedString(runtimeFilters)).append("\n"); + sb.append(" runtimeSorts: ").append(toIndentedString(runtimeSorts)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserParameterOptions - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserParameterOptions.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserParameterOptions is not found in" - + " the empty JSON string", - UserParameterOptions.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("objects"); + openapiFields.add("runtime_filters"); + openapiFields.add("runtime_sorts"); + openapiFields.add("parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserParameterOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserParameterOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UserParameterOptions is not found in the empty JSON string", UserParameterOptions.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserParameterOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserParameterOptions` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserParameterOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserParameterOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { - JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); - if (jsonArrayobjects != null) { - // ensure the json data is an array - if (!jsonObj.get("objects").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `objects` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("objects").toString())); - } - - // validate the optional field `objects` (array) - for (int i = 0; i < jsonArrayobjects.size(); i++) { - UserObject.validateJsonElement(jsonArrayobjects.get(i)); - } - ; - } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `objects` to be an array in the JSON string but got `%s`", jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + }; } - if (jsonObj.get("runtime_filters") != null - && !jsonObj.get("runtime_filters").isJsonNull()) { - JsonArray jsonArrayruntimeFilters = jsonObj.getAsJsonArray("runtime_filters"); - if (jsonArrayruntimeFilters != null) { - // ensure the json data is an array - if (!jsonObj.get("runtime_filters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `runtime_filters` to be an array in the" - + " JSON string but got `%s`", - jsonObj.get("runtime_filters").toString())); - } - - // validate the optional field `runtime_filters` (array) - for (int i = 0; i < jsonArrayruntimeFilters.size(); i++) { - RuntimeFilters.validateJsonElement(jsonArrayruntimeFilters.get(i)); - } - ; - } + } + if (jsonObj.get("runtime_filters") != null && !jsonObj.get("runtime_filters").isJsonNull()) { + JsonArray jsonArrayruntimeFilters = jsonObj.getAsJsonArray("runtime_filters"); + if (jsonArrayruntimeFilters != null) { + // ensure the json data is an array + if (!jsonObj.get("runtime_filters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `runtime_filters` to be an array in the JSON string but got `%s`", jsonObj.get("runtime_filters").toString())); + } + + // validate the optional field `runtime_filters` (array) + for (int i = 0; i < jsonArrayruntimeFilters.size(); i++) { + RuntimeFilters.validateJsonElement(jsonArrayruntimeFilters.get(i)); + }; } - if (jsonObj.get("runtime_sorts") != null && !jsonObj.get("runtime_sorts").isJsonNull()) { - JsonArray jsonArrayruntimeSorts = jsonObj.getAsJsonArray("runtime_sorts"); - if (jsonArrayruntimeSorts != null) { - // ensure the json data is an array - if (!jsonObj.get("runtime_sorts").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `runtime_sorts` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("runtime_sorts").toString())); - } - - // validate the optional field `runtime_sorts` (array) - for (int i = 0; i < jsonArrayruntimeSorts.size(); i++) { - RuntimeSorts.validateJsonElement(jsonArrayruntimeSorts.get(i)); - } - ; - } + } + if (jsonObj.get("runtime_sorts") != null && !jsonObj.get("runtime_sorts").isJsonNull()) { + JsonArray jsonArrayruntimeSorts = jsonObj.getAsJsonArray("runtime_sorts"); + if (jsonArrayruntimeSorts != null) { + // ensure the json data is an array + if (!jsonObj.get("runtime_sorts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `runtime_sorts` to be an array in the JSON string but got `%s`", jsonObj.get("runtime_sorts").toString())); + } + + // validate the optional field `runtime_sorts` (array) + for (int i = 0; i < jsonArrayruntimeSorts.size(); i++) { + RuntimeSorts.validateJsonElement(jsonArrayruntimeSorts.get(i)); + }; } - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); - if (jsonArrayparameters != null) { - // ensure the json data is an array - if (!jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `parameters` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("parameters").toString())); - } - - // validate the optional field `parameters` (array) - for (int i = 0; i < jsonArrayparameters.size(); i++) { - RuntimeParameters.validateJsonElement(jsonArrayparameters.get(i)); - } - ; - } + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + RuntimeParameters.validateJsonElement(jsonArrayparameters.get(i)); + }; } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserParameterOptions.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserParameterOptions' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserParameterOptions.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserParameterOptions value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserParameterOptions read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserParameterOptions given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserParameterOptions - * @throws IOException if the JSON string is invalid with respect to UserParameterOptions - */ - public static UserParameterOptions fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserParameterOptions.class); - } - - /** - * Convert an instance of UserParameterOptions to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserParameterOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserParameterOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserParameterOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserParameterOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserParameterOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UserParameterOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserParameterOptions + * @throws IOException if the JSON string is invalid with respect to UserParameterOptions + */ + public static UserParameterOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserParameterOptions.class); + } + + /** + * Convert an instance of UserParameterOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java index 64971c27b..ea3f18c57 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java @@ -4,282 +4,269 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** UserPrincipal */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class UserPrincipal implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private String type; - - public UserPrincipal() {} - - public UserPrincipal id(@javax.annotation.Nullable String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(@javax.annotation.Nullable String id) { - this.id = id; - } - - public UserPrincipal name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - public UserPrincipal type(@javax.annotation.Nullable String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } +import com.thoughtspot.client.JSON; - public void setType(@javax.annotation.Nullable String type) { - this.type = type; +/** + * UserPrincipal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserPrincipal implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public UserPrincipal() { + } + + public UserPrincipal id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public UserPrincipal name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UserPrincipal type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserPrincipal userPrincipal = (UserPrincipal) o; - return Objects.equals(this.id, userPrincipal.id) - && Objects.equals(this.name, userPrincipal.name) - && Objects.equals(this.type, userPrincipal.type); + if (o == null || getClass() != o.getClass()) { + return false; } - - 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())); + UserPrincipal userPrincipal = (UserPrincipal) o; + return Objects.equals(this.id, userPrincipal.id) && + Objects.equals(this.name, userPrincipal.name) && + Objects.equals(this.type, userPrincipal.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - @Override - public int hashCode() { - return Objects.hash(id, name, type); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserPrincipal {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserPrincipal + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserPrincipal.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UserPrincipal is not found in the empty JSON string", UserPrincipal.openapiRequiredFields.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserPrincipal {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserPrincipal - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserPrincipal.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in UserPrincipal is not found in the" - + " empty JSON string", - UserPrincipal.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UserPrincipal.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `UserPrincipal` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserPrincipal.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserPrincipal` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserPrincipal.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserPrincipal' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(UserPrincipal.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, UserPrincipal value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserPrincipal read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of UserPrincipal given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserPrincipal - * @throws IOException if the JSON string is invalid with respect to UserPrincipal - */ - public static UserPrincipal fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserPrincipal.class); - } - - /** - * Convert an instance of UserPrincipal to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserPrincipal.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserPrincipal' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserPrincipal.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserPrincipal value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserPrincipal read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of UserPrincipal given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserPrincipal + * @throws IOException if the JSON string is invalid with respect to UserPrincipal + */ + public static UserPrincipal fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserPrincipal.class); + } + + /** + * Convert an instance of UserPrincipal to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java index c7e76d13a..fe4f842fc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java @@ -4,241 +4,236 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ValidateMergeRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ValidateMergeRequest implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SOURCE_BRANCH_NAME = "source_branch_name"; - - @SerializedName(SERIALIZED_NAME_SOURCE_BRANCH_NAME) - @javax.annotation.Nonnull - private String sourceBranchName; - - public static final String SERIALIZED_NAME_TARGET_BRANCH_NAME = "target_branch_name"; - - @SerializedName(SERIALIZED_NAME_TARGET_BRANCH_NAME) - @javax.annotation.Nonnull - private String targetBranchName; - - public ValidateMergeRequest() {} - - public ValidateMergeRequest sourceBranchName( - @javax.annotation.Nonnull String sourceBranchName) { - this.sourceBranchName = sourceBranchName; - return this; - } - - /** - * Name of the branch from which changes need to be picked for validation - * - * @return sourceBranchName - */ - @javax.annotation.Nonnull - public String getSourceBranchName() { - return sourceBranchName; - } - - public void setSourceBranchName(@javax.annotation.Nonnull String sourceBranchName) { - this.sourceBranchName = sourceBranchName; - } - - public ValidateMergeRequest targetBranchName( - @javax.annotation.Nonnull String targetBranchName) { - this.targetBranchName = targetBranchName; - return this; - } - - /** - * Name of the branch where files will be merged - * - * @return targetBranchName - */ - @javax.annotation.Nonnull - public String getTargetBranchName() { - return targetBranchName; - } - - public void setTargetBranchName(@javax.annotation.Nonnull String targetBranchName) { - this.targetBranchName = targetBranchName; - } +import com.thoughtspot.client.JSON; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ValidateMergeRequest validateMergeRequest = (ValidateMergeRequest) o; - return Objects.equals(this.sourceBranchName, validateMergeRequest.sourceBranchName) - && Objects.equals(this.targetBranchName, validateMergeRequest.targetBranchName); +/** + * ValidateMergeRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ValidateMergeRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SOURCE_BRANCH_NAME = "source_branch_name"; + @SerializedName(SERIALIZED_NAME_SOURCE_BRANCH_NAME) + @javax.annotation.Nonnull + private String sourceBranchName; + + public static final String SERIALIZED_NAME_TARGET_BRANCH_NAME = "target_branch_name"; + @SerializedName(SERIALIZED_NAME_TARGET_BRANCH_NAME) + @javax.annotation.Nonnull + private String targetBranchName; + + public ValidateMergeRequest() { + } + + public ValidateMergeRequest sourceBranchName(@javax.annotation.Nonnull String sourceBranchName) { + this.sourceBranchName = sourceBranchName; + return this; + } + + /** + * Name of the branch from which changes need to be picked for validation + * @return sourceBranchName + */ + @javax.annotation.Nonnull + public String getSourceBranchName() { + return sourceBranchName; + } + + public void setSourceBranchName(@javax.annotation.Nonnull String sourceBranchName) { + this.sourceBranchName = sourceBranchName; + } + + + public ValidateMergeRequest targetBranchName(@javax.annotation.Nonnull String targetBranchName) { + this.targetBranchName = targetBranchName; + return this; + } + + /** + * Name of the branch where files will be merged + * @return targetBranchName + */ + @javax.annotation.Nonnull + public String getTargetBranchName() { + return targetBranchName; + } + + public void setTargetBranchName(@javax.annotation.Nonnull String targetBranchName) { + this.targetBranchName = targetBranchName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public int hashCode() { - return Objects.hash(sourceBranchName, targetBranchName); + if (o == null || getClass() != o.getClass()) { + return false; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ValidateMergeRequest {\n"); - sb.append(" sourceBranchName: ").append(toIndentedString(sourceBranchName)).append("\n"); - sb.append(" targetBranchName: ").append(toIndentedString(targetBranchName)).append("\n"); - sb.append("}"); - return sb.toString(); + ValidateMergeRequest validateMergeRequest = (ValidateMergeRequest) o; + return Objects.equals(this.sourceBranchName, validateMergeRequest.sourceBranchName) && + Objects.equals(this.targetBranchName, validateMergeRequest.targetBranchName); + } + + @Override + public int hashCode() { + return Objects.hash(sourceBranchName, targetBranchName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateMergeRequest {\n"); + sb.append(" sourceBranchName: ").append(toIndentedString(sourceBranchName)).append("\n"); + sb.append(" targetBranchName: ").append(toIndentedString(targetBranchName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("source_branch_name"); + openapiFields.add("target_branch_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("source_branch_name"); + openapiRequiredFields.add("target_branch_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateMergeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateMergeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidateMergeRequest is not found in the empty JSON string", ValidateMergeRequest.openapiRequiredFields.toString())); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("source_branch_name"); - openapiFields.add("target_branch_name"); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source_branch_name"); - openapiRequiredFields.add("target_branch_name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ValidateMergeRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ValidateMergeRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ValidateMergeRequest is not found in" - + " the empty JSON string", - ValidateMergeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ValidateMergeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ValidateMergeRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidateMergeRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidateMergeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidateMergeRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ValidateMergeRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("source_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `source_branch_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("source_branch_name").toString())); - } - if (!jsonObj.get("target_branch_name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `target_branch_name` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("target_branch_name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ValidateMergeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ValidateMergeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ValidateMergeRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ValidateMergeRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ValidateMergeRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ValidateMergeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ValidateMergeRequest - * @throws IOException if the JSON string is invalid with respect to ValidateMergeRequest - */ - public static ValidateMergeRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ValidateMergeRequest.class); - } - - /** - * Convert an instance of ValidateMergeRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if (!jsonObj.get("source_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `source_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_branch_name").toString())); + } + if (!jsonObj.get("target_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `target_branch_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("target_branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateMergeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateMergeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidateMergeRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateMergeRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidateMergeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ValidateMergeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateMergeRequest + * @throws IOException if the JSON string is invalid with respect to ValidateMergeRequest + */ + public static ValidateMergeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateMergeRequest.class); + } + + /** + * Convert an instance of ValidateMergeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java index 6be4506e6..8801f2f88 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java @@ -4,203 +4,205 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -/** ValidateTokenRequest */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class ValidateTokenRequest implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_TOKEN = "token"; +/** + * ValidateTokenRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ValidateTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; - @SerializedName(SERIALIZED_NAME_TOKEN) - @javax.annotation.Nonnull - private String token; + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; - public ValidateTokenRequest() {} + public ValidateTokenRequest() { + } - public ValidateTokenRequest token(@javax.annotation.Nonnull String token) { - this.token = token; - return this; - } + public ValidateTokenRequest token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } - /** - * Get token - * - * @return token - */ - @javax.annotation.Nonnull - public String getToken() { - return token; - } + /** + * Get token + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } - public void setToken(@javax.annotation.Nonnull String token) { - this.token = token; - } + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ValidateTokenRequest validateTokenRequest = (ValidateTokenRequest) o; - return Objects.equals(this.token, validateTokenRequest.token); - } - @Override - public int hashCode() { - return Objects.hash(token); - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ValidateTokenRequest {\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append("}"); - return sb.toString(); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("token"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); + ValidateTokenRequest validateTokenRequest = (ValidateTokenRequest) o; + return Objects.equals(this.token, validateTokenRequest.token); + } + + @Override + public int hashCode() { + return Objects.hash(token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateTokenRequest {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ValidateTokenRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ValidateTokenRequest.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ValidateTokenRequest is not found in" - + " the empty JSON string", - ValidateTokenRequest.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateTokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidateTokenRequest is not found in the empty JSON string", ValidateTokenRequest.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ValidateTokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ValidateTokenRequest` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidateTokenRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidateTokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidateTokenRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ValidateTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `token` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("token").toString())); - } - } + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ValidateTokenRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ValidateTokenRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ValidateTokenRequest.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ValidateTokenRequest value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ValidateTokenRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of ValidateTokenRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ValidateTokenRequest - * @throws IOException if the JSON string is invalid with respect to ValidateTokenRequest - */ - public static ValidateTokenRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ValidateTokenRequest.class); - } - - /** - * Convert an instance of ValidateTokenRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidateTokenRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateTokenRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidateTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of ValidateTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateTokenRequest + * @throws IOException if the JSON string is invalid with respect to ValidateTokenRequest + */ + public static ValidateTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateTokenRequest.class); + } + + /** + * Convert an instance of ValidateTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java new file mode 100644 index 000000000..81f204b6b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java @@ -0,0 +1,358 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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/Variable.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java index 4b020c749..cde3909a0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java @@ -4,436 +4,415 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.VariableValue; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Variable object */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class Variable implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - /** Type of the variable */ - @JsonAdapter(VariableTypeEnum.Adapter.class) - public enum VariableTypeEnum { - CONNECTION_PROPERTY("CONNECTION_PROPERTY"), - - TABLE_MAPPING("TABLE_MAPPING"), - - CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"); - - private String value; - - VariableTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VariableTypeEnum fromValue(String value) { - for (VariableTypeEnum b : VariableTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VariableTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VariableTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VariableTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VariableTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_VARIABLE_TYPE = "variable_type"; - - @SerializedName(SERIALIZED_NAME_VARIABLE_TYPE) - @javax.annotation.Nullable - private VariableTypeEnum variableType; - - public static final String SERIALIZED_NAME_SENSITIVE = "sensitive"; - - @SerializedName(SERIALIZED_NAME_SENSITIVE) - @javax.annotation.Nullable - private Boolean sensitive; - - public static final String SERIALIZED_NAME_VALUES = "values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nullable - private List values; - - public Variable() {} - public Variable id(@javax.annotation.Nonnull String id) { - this.id = id; - return this; - } +import com.thoughtspot.client.JSON; - /** - * Unique identifier of the variable - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; +/** + * Variable object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Variable implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** + * Type of the variable + */ + @JsonAdapter(VariableTypeEnum.Adapter.class) + public enum VariableTypeEnum { + CONNECTION_PROPERTY("CONNECTION_PROPERTY"), + + TABLE_MAPPING("TABLE_MAPPING"), + + CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"); + + private String value; + + VariableTypeEnum(String value) { + this.value = value; } - public void setId(@javax.annotation.Nonnull String id) { - this.id = id; + public String getValue() { + return value; } - public Variable name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; + @Override + public String toString() { + return String.valueOf(value); } - /** - * Name of the variable - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; + public static VariableTypeEnum fromValue(String value) { + for (VariableTypeEnum b : VariableTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; } - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VariableTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VariableTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VariableTypeEnum.fromValue(value); + } } - public Variable variableType(@javax.annotation.Nullable VariableTypeEnum variableType) { - this.variableType = variableType; - return this; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VariableTypeEnum.fromValue(value); } - - /** - * Type of the variable - * - * @return variableType - */ - @javax.annotation.Nullable - public VariableTypeEnum getVariableType() { - return variableType; + } + + public static final String SERIALIZED_NAME_VARIABLE_TYPE = "variable_type"; + @SerializedName(SERIALIZED_NAME_VARIABLE_TYPE) + @javax.annotation.Nullable + private VariableTypeEnum variableType; + + public static final String SERIALIZED_NAME_SENSITIVE = "sensitive"; + @SerializedName(SERIALIZED_NAME_SENSITIVE) + @javax.annotation.Nullable + private Boolean sensitive; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values; + + public Variable() { + } + + public Variable id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the variable + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Variable name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the variable + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Variable variableType(@javax.annotation.Nullable VariableTypeEnum variableType) { + this.variableType = variableType; + return this; + } + + /** + * Type of the variable + * @return variableType + */ + @javax.annotation.Nullable + public VariableTypeEnum getVariableType() { + return variableType; + } + + public void setVariableType(@javax.annotation.Nullable VariableTypeEnum variableType) { + this.variableType = variableType; + } + + + public Variable sensitive(@javax.annotation.Nullable Boolean sensitive) { + this.sensitive = sensitive; + return this; + } + + /** + * If the variable is sensitive + * @return sensitive + */ + @javax.annotation.Nullable + public Boolean getSensitive() { + return sensitive; + } + + public void setSensitive(@javax.annotation.Nullable Boolean sensitive) { + this.sensitive = sensitive; + } + + + public Variable values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public Variable addValuesItem(VariableValue valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); } + this.values.add(valuesItem); + return this; + } - public void setVariableType(@javax.annotation.Nullable VariableTypeEnum variableType) { - this.variableType = variableType; - } + /** + * Values of the variable + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } - public Variable sensitive(@javax.annotation.Nullable Boolean sensitive) { - this.sensitive = sensitive; - return this; - } + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } - /** - * If the variable is sensitive - * - * @return sensitive - */ - @javax.annotation.Nullable - public Boolean getSensitive() { - return sensitive; - } - public void setSensitive(@javax.annotation.Nullable Boolean sensitive) { - this.sensitive = sensitive; - } - public Variable values(@javax.annotation.Nullable List values) { - this.values = values; - return this; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public Variable addValuesItem(VariableValue valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Values of the variable - * - * @return values - */ - @javax.annotation.Nullable - public List getValues() { - return values; + Variable variable = (Variable) o; + return Objects.equals(this.id, variable.id) && + Objects.equals(this.name, variable.name) && + Objects.equals(this.variableType, variable.variableType) && + Objects.equals(this.sensitive, variable.sensitive) && + Objects.equals(this.values, variable.values); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, variableType, sensitive, values); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public void setValues(@javax.annotation.Nullable List values) { - this.values = values; + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Variable {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" variableType: ").append(toIndentedString(variableType)).append("\n"); + sb.append(" sensitive: ").append(toIndentedString(sensitive)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("variable_type"); + openapiFields.add("sensitive"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Variable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Variable is not found in the empty JSON string", Variable.openapiRequiredFields.toString())); } - Variable variable = (Variable) o; - return Objects.equals(this.id, variable.id) - && Objects.equals(this.name, variable.name) - && Objects.equals(this.variableType, variable.variableType) - && Objects.equals(this.sensitive, variable.sensitive) - && Objects.equals(this.values, variable.values); - } + } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b - || (a != null - && b != null - && a.isPresent() - && b.isPresent() - && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, variableType, sensitive, values); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Variable.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Variable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; - } + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Variable {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" variableType: ").append(toIndentedString(variableType)).append("\n"); - sb.append(" sensitive: ").append(toIndentedString(sensitive)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("variable_type"); - openapiFields.add("sensitive"); - openapiFields.add("values"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Variable - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Variable.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in Variable is not found in the empty" - + " JSON string", - Variable.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Variable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `Variable` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Variable.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Variable.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("variable_type") != null && !jsonObj.get("variable_type").isJsonNull()) - && !jsonObj.get("variable_type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `variable_type` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("variable_type").toString())); - } - // validate the optional field `variable_type` - if (jsonObj.get("variable_type") != null && !jsonObj.get("variable_type").isJsonNull()) { - VariableTypeEnum.validateJsonElement(jsonObj.get("variable_type")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("variable_type") != null && !jsonObj.get("variable_type").isJsonNull()) && !jsonObj.get("variable_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `variable_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variable_type").toString())); + } + // validate the optional field `variable_type` + if (jsonObj.get("variable_type") != null && !jsonObj.get("variable_type").isJsonNull()) { + VariableTypeEnum.validateJsonElement(jsonObj.get("variable_type")); + } + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull()) { + JsonArray jsonArrayvalues = jsonObj.getAsJsonArray("values"); + if (jsonArrayvalues != null) { + // ensure the json data is an array + if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + + // validate the optional field `values` (array) + for (int i = 0; i < jsonArrayvalues.size(); i++) { + VariableValue.validateJsonElement(jsonArrayvalues.get(i)); + }; } - if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull()) { - JsonArray jsonArrayvalues = jsonObj.getAsJsonArray("values"); - if (jsonArrayvalues != null) { - // ensure the json data is an array - if (!jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `values` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("values").toString())); - } - - // validate the optional field `values` (array) - for (int i = 0; i < jsonArrayvalues.size(); i++) { - VariableValue.validateJsonElement(jsonArrayvalues.get(i)); - } - ; - } - } - } + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Variable.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Variable' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(Variable.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, Variable value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Variable read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of Variable given an JSON string - * - * @param jsonString JSON string - * @return An instance of Variable - * @throws IOException if the JSON string is invalid with respect to Variable - */ - public static Variable fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Variable.class); - } - - /** - * Convert an instance of Variable to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Variable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Variable' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Variable.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Variable value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Variable read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of Variable given an JSON string + * + * @param jsonString JSON string + * @return An instance of Variable + * @throws IOException if the JSON string is invalid with respect to Variable + */ + public static Variable fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Variable.class); + } + + /** + * Convert an instance of Variable to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java index 03c4438f4..2098dd04a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java @@ -4,341 +4,327 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; - -/** Input for variable details in search */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class VariableDetailInput implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - - @SerializedName(SERIALIZED_NAME_IDENTIFIER) - @javax.annotation.Nullable - private String identifier; - - /** Type of variable */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CONNECTION_PROPERTY("CONNECTION_PROPERTY"), - - TABLE_MAPPING("TABLE_MAPPING"), - - CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; - - @SerializedName(SERIALIZED_NAME_NAME_PATTERN) - @javax.annotation.Nullable - private String namePattern; - public VariableDetailInput() {} - - public VariableDetailInput identifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Unique ID or name of the variable - * - * @return identifier - */ - @javax.annotation.Nullable - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(@javax.annotation.Nullable String identifier) { - this.identifier = identifier; - } - - public VariableDetailInput type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Type of variable - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } +import com.thoughtspot.client.JSON; - public VariableDetailInput namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; +/** + * Input for variable details in search + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class VariableDetailInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** + * Type of variable + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CONNECTION_PROPERTY("CONNECTION_PROPERTY"), + + TABLE_MAPPING("TABLE_MAPPING"), + + CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"); + + private String value; + + TypeEnum(String value) { + this.value = value; } - /** - * A pattern to match case-insensitive name of the variable. User % for a wildcard match - * - * @return namePattern - */ - @javax.annotation.Nullable - public String getNamePattern() { - return namePattern; + public String getValue() { + return value; } - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - if (o == null || getClass() != o.getClass()) { - return false; - } - VariableDetailInput variableDetailInput = (VariableDetailInput) o; - return Objects.equals(this.identifier, variableDetailInput.identifier) - && Objects.equals(this.type, variableDetailInput.type) - && Objects.equals(this.namePattern, variableDetailInput.namePattern); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(identifier, type, namePattern); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public VariableDetailInput() { + } + + public VariableDetailInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the variable + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + + public VariableDetailInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of variable + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public VariableDetailInput namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VariableDetailInput {\n"); - sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); - sb.append("}"); - return sb.toString(); + if (o == null || getClass() != o.getClass()) { + return false; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + VariableDetailInput variableDetailInput = (VariableDetailInput) o; + return Objects.equals(this.identifier, variableDetailInput.identifier) && + Objects.equals(this.type, variableDetailInput.type) && + Objects.equals(this.namePattern, variableDetailInput.namePattern); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, namePattern); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("identifier"); - openapiFields.add("type"); - openapiFields.add("name_pattern"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableDetailInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VariableDetailInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VariableDetailInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VariableDetailInput is not found in" - + " the empty JSON string", - VariableDetailInput.openapiRequiredFields.toString())); - } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + openapiFields.add("name_pattern"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableDetailInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableDetailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in VariableDetailInput is not found in the empty JSON string", VariableDetailInput.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!VariableDetailInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VariableDetailInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!VariableDetailInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VariableDetailInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) - && !jsonObj.get("identifier").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `identifier` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("identifier").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) - && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `type` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) - && !jsonObj.get("name_pattern").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `name_pattern` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("name_pattern").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VariableDetailInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VariableDetailInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VariableDetailInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VariableDetailInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VariableDetailInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VariableDetailInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VariableDetailInput - * @throws IOException if the JSON string is invalid with respect to VariableDetailInput - */ - public static VariableDetailInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VariableDetailInput.class); - } - - /** - * Convert an instance of VariableDetailInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_pattern").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableDetailInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableDetailInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(VariableDetailInput.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableDetailInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public VariableDetailInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of VariableDetailInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableDetailInput + * @throws IOException if the JSON string is invalid with respect to VariableDetailInput + */ + public static VariableDetailInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableDetailInput.class); + } + + /** + * Convert an instance of VariableDetailInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java new file mode 100644 index 000000000..5d02e0dc3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java @@ -0,0 +1,341 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..8af824ad1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java @@ -0,0 +1,393 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..1001913d9 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 @@ -4,417 +4,431 @@ package com.thoughtspot.client.model; +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonParseException; 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.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.thoughtspot.client.JSON; import java.io.IOException; -import java.io.Serializable; -import java.util.Arrays; + +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullable; -/** VariableValue */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class VariableValue implements Serializable { - private static final long serialVersionUID = 1L; +import com.thoughtspot.client.JSON; - public static final String SERIALIZED_NAME_VALUE = "value"; +/** + * VariableValue + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class VariableValue implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public static final String SERIALIZED_NAME_VALUE_LIST = "value_list"; + @SerializedName(SERIALIZED_NAME_VALUE_LIST) + @javax.annotation.Nullable + private List valueList; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + /** + * Principal type + */ + @JsonAdapter(PrincipalTypeEnum.Adapter.class) + public enum PrincipalTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable private String value; - 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); - } + PrincipalTypeEnum(String value) { + this.value = 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_PRIORITY = "priority"; - - @SerializedName(SERIALIZED_NAME_PRIORITY) - @javax.annotation.Nullable - private Integer priority; - - public VariableValue() {} - - public VariableValue value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * The value of the variable - * - * @return value - */ - @javax.annotation.Nullable public String getValue() { - return value; + return value; } - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - public VariableValue orgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - return this; - } - - /** - * The unique name of the org - * - * @return orgIdentifier - */ - @javax.annotation.Nonnull - public String getOrgIdentifier() { - return orgIdentifier; - } - - public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { - this.orgIdentifier = orgIdentifier; - } - - public VariableValue principalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { - this.principalType = principalType; - return this; - } - - /** - * Principal type - * - * @return principalType - */ - @javax.annotation.Nullable - public PrincipalTypeEnum getPrincipalType() { - return principalType; - } - - public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { - this.principalType = principalType; - } - - public VariableValue principalIdentifier( - @javax.annotation.Nullable String principalIdentifier) { - this.principalIdentifier = principalIdentifier; - return this; - } - - /** - * Unique ID or name of the principal - * - * @return principalIdentifier - */ - @javax.annotation.Nullable - public String getPrincipalIdentifier() { - return principalIdentifier; - } - - public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { - this.principalIdentifier = principalIdentifier; - } - - public VariableValue priority(@javax.annotation.Nullable Integer priority) { - this.priority = priority; - return this; - } - - /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher - * priority will be picked. - * - * @return priority - */ - @javax.annotation.Nullable - public Integer getPriority() { - return priority; - } - - public void setPriority(@javax.annotation.Nullable Integer priority) { - this.priority = priority; + @Override + public String toString() { + return String.valueOf(value); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; + public static PrincipalTypeEnum fromValue(String value) { + for (PrincipalTypeEnum b : PrincipalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; } - VariableValue variableValue = (VariableValue) o; - return Objects.equals(this.value, variableValue.value) - && Objects.equals(this.orgIdentifier, variableValue.orgIdentifier) - && Objects.equals(this.principalType, variableValue.principalType) - && Objects.equals(this.principalIdentifier, variableValue.principalIdentifier) - && Objects.equals(this.priority, variableValue.priority); + } + return null; } - 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())); + 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); + } } - @Override - public int hashCode() { - return Objects.hash(value, orgIdentifier, principalType, principalIdentifier, priority); + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrincipalTypeEnum.fromValue(value); } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + 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_PRIORITY = "priority"; + @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nullable + private Integer priority; + + public VariableValue() { + } + + public VariableValue value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * The value of the variable + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + public VariableValue valueList(@javax.annotation.Nullable List valueList) { + this.valueList = valueList; + return this; + } + + public VariableValue addValueListItem(String valueListItem) { + if (this.valueList == null) { + this.valueList = new ArrayList<>(); } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VariableValue {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); - sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); - sb.append(" principalIdentifier: ") - .append(toIndentedString(principalIdentifier)) - .append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append("}"); - return sb.toString(); + this.valueList.add(valueListItem); + return this; + } + + /** + * The value of the variable if it is a list type + * @return valueList + */ + @javax.annotation.Nullable + public List getValueList() { + return valueList; + } + + public void setValueList(@javax.annotation.Nullable List valueList) { + this.valueList = valueList; + } + + + public VariableValue orgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * The unique name of the org + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + + public VariableValue principalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + return this; + } + + /** + * Principal type + * @return principalType + */ + @javax.annotation.Nullable + public PrincipalTypeEnum getPrincipalType() { + return principalType; + } + + public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + } + + + public VariableValue principalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + return this; + } + + /** + * Unique ID or name of the principal + * @return principalIdentifier + */ + @javax.annotation.Nullable + public String getPrincipalIdentifier() { + return principalIdentifier; + } + + public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + } + + + public VariableValue priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + * @return priority + */ + @javax.annotation.Nullable + public Integer getPriority() { + return priority; + } + + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + if (o == null || getClass() != o.getClass()) { + return false; } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("value"); - openapiFields.add("org_identifier"); - openapiFields.add("principal_type"); - openapiFields.add("principal_identifier"); - openapiFields.add("priority"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("org_identifier"); + VariableValue variableValue = (VariableValue) o; + return Objects.equals(this.value, variableValue.value) && + Objects.equals(this.valueList, variableValue.valueList) && + Objects.equals(this.orgIdentifier, variableValue.orgIdentifier) && + Objects.equals(this.principalType, variableValue.principalType) && + Objects.equals(this.principalIdentifier, variableValue.principalIdentifier) && + Objects.equals(this.priority, variableValue.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(value, valueList, orgIdentifier, principalType, principalIdentifier, priority); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VariableValue - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VariableValue.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VariableValue is not found in the" - + " empty JSON string", - VariableValue.openapiRequiredFields.toString())); - } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableValue {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" valueList: ").append(toIndentedString(valueList)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); + sb.append(" principalIdentifier: ").append(toIndentedString(principalIdentifier)).append("\n"); + sb.append(" 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("value"); + openapiFields.add("value_list"); + openapiFields.add("org_identifier"); + openapiFields.add("principal_type"); + openapiFields.add("principal_identifier"); + openapiFields.add("priority"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableValue + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableValue.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in VariableValue is not found in the empty JSON string", VariableValue.openapiRequiredFields.toString())); } + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!VariableValue.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VariableValue` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!VariableValue.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VariableValue` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VariableValue.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariableValue.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) - && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `value` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("value").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VariableValue.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VariableValue' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VariableValue.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VariableValue value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VariableValue read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VariableValue given an JSON string - * - * @param jsonString JSON string - * @return An instance of VariableValue - * @throws IOException if the JSON string is invalid with respect to VariableValue - */ - public static VariableValue fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VariableValue.class); - } - - /** - * Convert an instance of VariableValue to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("value_list") != null && !jsonObj.get("value_list").isJsonNull() && !jsonObj.get("value_list").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `value_list` to be an array in the JSON string but got `%s`", jsonObj.get("value_list").toString())); + } + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `org_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) && !jsonObj.get("principal_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `principal_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("principal_type").toString())); + } + // validate the optional field `principal_type` + if (jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) { + PrincipalTypeEnum.validateJsonElement(jsonObj.get("principal_type")); + } + if ((jsonObj.get("principal_identifier") != null && !jsonObj.get("principal_identifier").isJsonNull()) && !jsonObj.get("principal_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `principal_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("principal_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableValue.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableValue' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(VariableValue.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableValue value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public VariableValue read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } + } + + /** + * Create an instance of VariableValue given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableValue + * @throws IOException if the JSON string is invalid with respect to VariableValue + */ + public static VariableValue fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableValue.class); + } + + /** + * Convert an instance of VariableValue to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValueInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValueInput.java deleted file mode 100644 index 5c02e9a47..000000000 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValueInput.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * NOTE: This 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; - -/** Input for variable value update */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class VariableValueInput 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; - - public VariableValueInput() {} - - public VariableValueInput 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 VariableValueInput variableValues( - @javax.annotation.Nonnull List variableValues) { - this.variableValues = variableValues; - return this; - } - - public VariableValueInput addVariableValuesItem(InputVariableValue 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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VariableValueInput variableValueInput = (VariableValueInput) o; - return Objects.equals(this.variableIdentifier, variableValueInput.variableIdentifier) - && Objects.equals(this.variableValues, variableValueInput.variableValues); - } - - @Override - public int hashCode() { - return Objects.hash(variableIdentifier, variableValues); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VariableValueInput {\n"); - sb.append(" variableIdentifier: ") - .append(toIndentedString(variableIdentifier)) - .append("\n"); - sb.append(" variableValues: ").append(toIndentedString(variableValues)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\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"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("variable_identifier"); - openapiRequiredFields.add("variable_values"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VariableValueInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VariableValueInput.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in VariableValueInput is not found in" - + " the empty JSON string", - VariableValueInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!VariableValueInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `VariableValueInput` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VariableValueInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - 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 json data is an array - if (!jsonObj.get("variable_values").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `variable_values` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("variable_values").toString())); - } - - JsonArray jsonArrayvariableValues = jsonObj.getAsJsonArray("variable_values"); - // validate the required field `variable_values` (array) - for (int i = 0; i < jsonArrayvariableValues.size(); i++) { - InputVariableValue.validateJsonElement(jsonArrayvariableValues.get(i)); - } - ; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VariableValueInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VariableValueInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(VariableValueInput.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, VariableValueInput value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VariableValueInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of VariableValueInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VariableValueInput - * @throws IOException if the JSON string is invalid with respect to VariableValueInput - */ - public static VariableValueInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VariableValueInput.class); - } - - /** - * Convert an instance of VariableValueInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java new file mode 100644 index 000000000..267996671 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..03d48ad63 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKeyInput.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..fbd902121 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuth.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..7fdaa7c07 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInput.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..829c1f898 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2.java @@ -0,0 +1,270 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..535c68b66 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2Input.java @@ -0,0 +1,270 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..d16a94bb8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthentication.java @@ -0,0 +1,308 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthApiKey; +import com.thoughtspot.client.model.WebhookAuthBasicAuth; +import com.thoughtspot.client.model.WebhookAuthOAuth2; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..64359395a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java @@ -0,0 +1,308 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthApiKeyInput; +import com.thoughtspot.client.model.WebhookAuthBasicAuthInput; +import com.thoughtspot.client.model.WebhookAuthOAuth2Input; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..76e36d379 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java @@ -0,0 +1,270 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..5a0ccfd64 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.java @@ -0,0 +1,329 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookDeleteFailure; +import com.thoughtspot.client.model.WebhookResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..e6a0c3b88 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookOrg.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..84ab7e495 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookPagination.java @@ -0,0 +1,289 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..f997fe8c6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java @@ -0,0 +1,648 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthentication; +import com.thoughtspot.client.model.WebhookOrg; +import com.thoughtspot.client.model.WebhookSignatureVerification; +import com.thoughtspot.client.model.WebhookUser; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..06f9082c2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSearchResponse.java @@ -0,0 +1,257 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookPagination; +import com.thoughtspot.client.model.WebhookResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..3f4701a32 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerification.java @@ -0,0 +1,405 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..4cb86d43e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerificationInput.java @@ -0,0 +1,405 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..71ba664b0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.java @@ -0,0 +1,356 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..f44a9d33b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookUser.java @@ -0,0 +1,239 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thoughtspot.client.JSON; + +/** + * 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..0f29915dc 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 @@ -9,6 +9,7 @@ import com.thoughtspot.client.model.Conversation; import com.thoughtspot.client.model.CreateAgentConversationRequest; import com.thoughtspot.client.model.CreateConversationRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; @@ -16,22 +17,29 @@ 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; import com.thoughtspot.client.model.SingleAnswerRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for AiApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AiApi + */ @Disabled public class AiApiTest { private final AiApi api = new AiApi(); /** - * Version: 10.13.0.cl or later + * Version: 10.13.0.cl or later * * @throws ApiException if the Api call fails */ @@ -43,16 +51,7 @@ public void createAgentConversationTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### 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. + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### 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 */ @@ -64,117 +63,68 @@ public void createConversationTest() throws ApiException { } /** - * Version: 10.13.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @Test public void getDataSourceSuggestionsTest() throws ApiException { GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = null; - EurekaDataSourceSuggestionResponse response = - api.getDataSourceSuggestions(getDataSourceSuggestionsRequest); + EurekaDataSourceSuggestionResponse response = api.getDataSourceSuggestions(getDataSourceSuggestionsRequest); // TODO: test validations } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### 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. + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @Test public void getRelevantQuestionsTest() throws ApiException { GetRelevantQuestionsRequest getRelevantQuestionsRequest = null; - EurekaGetRelevantQuestionsResponse response = - api.getRelevantQuestions(getRelevantQuestionsRequest); + EurekaGetRelevantQuestionsResponse response = api.getRelevantQuestions(getRelevantQuestionsRequest); // TODO: test validations } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later * * @throws ApiException if the Api call fails */ @Test public void queryGetDecomposedQueryTest() throws ApiException { QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = null; - EurekaDecomposeQueryResponse response = - api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest); + EurekaDecomposeQueryResponse response = api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest); + // 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 - * 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 Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) * * @throws ApiException if the Api call fails */ @Test public void sendAgentMessageStreamingTest() throws ApiException { SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = null; - SendAgentMessageResponse response = - api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest); + SendAgentMessageResponse response = api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest); // TODO: test validations } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 */ @@ -182,18 +132,12 @@ public void sendAgentMessageStreamingTest() throws ApiException { public void sendMessageTest() throws ApiException { String conversationIdentifier = null; SendMessageRequest sendMessageRequest = null; - List response = - api.sendMessage(conversationIdentifier, sendMessageRequest); + List response = api.sendMessage(conversationIdentifier, sendMessageRequest); // TODO: test validations } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### 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. + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### 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 */ @@ -203,4 +147,5 @@ public void singleAnswerTest() throws ApiException { ResponseMessage response = api.singleAnswer(singleAnswerRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java index a493a0e0f..87ed6e014 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 @@ -6,6 +6,7 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.AccessToken; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.GetCustomAccessTokenRequest; import com.thoughtspot.client.model.GetFullAccessTokenRequest; import com.thoughtspot.client.model.GetObjectAccessTokenRequest; @@ -19,17 +20,21 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for AuthenticationApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AuthenticationApi + */ @Disabled public class AuthenticationApiTest { private final AuthenticationApi api = new AuthenticationApi(); /** - * Version: 9.0.0.cl or later Retrieves details of the current user session for the token - * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API - * request. The data returned in the API response varies according to user's privilege and - * object access permissions. + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * * @throws ApiException if the Api call fails */ @@ -40,12 +45,7 @@ public void getCurrentUserInfoTest() throws ApiException { } /** - * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer - * token provided in the request header. This API endpoint does not create a new token. Instead, - * it returns details about the token, including the token string, creation time, expiration - * time, and the associated user. Use this endpoint to introspect your current session token, - * debug authentication issues, or when a frontend application needs session token details. Any - * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * * @throws ApiException if the Api call fails */ @@ -56,54 +56,7 @@ public void getCurrentUserTokenTest() throws ApiException { } /** - * 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. * * @throws ApiException if the Api call fails */ @@ -115,36 +68,7 @@ public void getCustomAccessTokenTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in - * ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * * @throws ApiException if the Api call fails */ @@ -156,34 +80,7 @@ public void getFullAccessTokenTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific - * metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - * You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * * @throws ApiException if the Api call fails */ @@ -195,14 +92,7 @@ public void getObjectAccessTokenTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic - * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using - * `username` and `password` attributes. On a multi-tenant cluster with - * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. * * @throws ApiException if the Api call fails */ @@ -214,7 +104,7 @@ public void loginTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Logs out a user from their current session. + * Version: 9.0.0.cl or later Logs out a user from their current session. * * @throws ApiException if the Api call fails */ @@ -225,12 +115,7 @@ public void logoutTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). * * @throws ApiException if the Api call fails */ @@ -242,9 +127,7 @@ public void revokeTokenTest() throws ApiException { } /** - * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. - * If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). * * @throws ApiException if the Api call fails */ @@ -254,4 +137,5 @@ public void validateTokenTest() throws ApiException { TokenValidationResponse response = api.validateToken(validateTokenRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java index a180d269d..f18c434f6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java @@ -9,72 +9,50 @@ import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for ConnectionConfigurationsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ConnectionConfigurationsApi + */ @Disabled public class ConnectionConfigurationsApiTest { private final ConnectionConfigurationsApi api = new ConnectionConfigurationsApi(); /** - * Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * * @throws ApiException if the Api call fails */ @Test public void connectionConfigurationSearchTest() throws ApiException { ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = null; - List response = - api.connectionConfigurationSearch(connectionConfigurationSearchRequest); + List response = api.connectionConfigurationSearch(connectionConfigurationSearchRequest); // TODO: test validations } /** - * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to - * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Usage guidelines * A JSON map of configuration attributes in - * `configuration`. The following example shows the configuration attributes: - * ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. * * @throws ApiException if the Api call fails */ @Test public void createConnectionConfigurationTest() throws ApiException { CreateConnectionConfigurationRequest createConnectionConfigurationRequest = null; - ConnectionConfigurationResponse response = - api.createConnectionConfiguration(createConnectionConfigurationRequest); + ConnectionConfigurationResponse response = api.createConnectionConfiguration(createConnectionConfigurationRequest); // TODO: test validations } /** - * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -86,18 +64,7 @@ public void deleteConnectionConfigurationTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Updates a connection configuration object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * * @throws ApiException if the Api call fails */ @@ -105,8 +72,8 @@ public void deleteConnectionConfigurationTest() throws ApiException { public void updateConnectionConfigurationTest() throws ApiException { String configurationIdentifier = null; UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = null; - api.updateConnectionConfiguration( - configurationIdentifier, updateConnectionConfigurationRequest); + api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java index 8c973cf2c..d2597ec5c 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 @@ -8,62 +8,31 @@ import com.thoughtspot.client.model.CreateConnectionRequest; import com.thoughtspot.client.model.CreateConnectionResponse; import com.thoughtspot.client.model.DeleteConnectionRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchConnectionDiffStatusResponse; +import java.io.File; import com.thoughtspot.client.model.SearchConnectionRequest; import com.thoughtspot.client.model.SearchConnectionResponse; import com.thoughtspot.client.model.UpdateConnectionRequest; import com.thoughtspot.client.model.UpdateConnectionV2Request; -import java.io.File; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for ConnectionsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ConnectionsApi + */ @Disabled public class ConnectionsApiTest { private final ConnectionsApi api = new ConnectionsApi(); /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. * * @throws ApiException if the Api call fails */ @@ -75,16 +44,7 @@ public void createConnectionTest() throws ApiException { } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete - * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your - * connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. * * @throws ApiException if the Api call fails */ @@ -96,13 +56,7 @@ public void deleteConnectionTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has - * dependent objects, make sure you remove its associations before the delete operation. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -114,15 +68,7 @@ public void deleteConnectionV2Test() throws ApiException { } /** - * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and - * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * * @throws ApiException if the Api call fails */ @@ -134,95 +80,19 @@ public void downloadConnectionMetadataChangesTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and - * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * * @throws ApiException if the Api call fails */ @Test public void fetchConnectionDiffStatusTest() throws ApiException { String connectionIdentifier = null; - FetchConnectionDiffStatusResponse response = - api.fetchConnectionDiffStatus(connectionIdentifier); + FetchConnectionDiffStatusResponse response = api.fetchConnectionDiffStatus(connectionIdentifier); // TODO: test validations } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` - * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. * * @throws ApiException if the Api call fails */ @@ -234,20 +104,7 @@ public void searchConnectionTest() throws ApiException { } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update - * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your - * connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. * * @throws ApiException if the Api call fails */ @@ -259,50 +116,7 @@ public void updateConnectionTest() throws ApiException { } /** - * 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\":[ ] } ``` * * @throws ApiException if the Api call fails */ @@ -313,4 +127,5 @@ public void updateConnectionV2Test() throws ApiException { api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java index 63a0ece58..008cdb0de 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java @@ -6,36 +6,28 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateCustomActionRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ResponseCustomAction; import com.thoughtspot.client.model.SearchCustomActionsRequest; import com.thoughtspot.client.model.UpdateCustomActionRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for CustomActionApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for CustomActionApi + */ @Disabled public class CustomActionApiTest { private final CustomActionApi api = new CustomActionApi(); /** - * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved - * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. #### Usage Guidelines The API lets you create the following types of custom - * actions: * URL-based action Allows pushing data to an external URL. * Callback action - * Triggers a callback to the host application and initiates a response payload on an embedded - * ThoughtSpot instance. By default, custom actions are visible to only administrator or - * developer users. To make a custom action available to other users, and specify the groups in - * `group_identifiers`. By default, the custom action is set as a _global_ action on - * all visualizations and saved Answers. To assign a custom action to specific Liveboard - * visualization, saved Answer, or Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * * @throws ApiException if the Api call fails */ @@ -47,11 +39,7 @@ public void createCustomActionTest() throws ApiException { } /** - * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -63,11 +51,7 @@ public void deleteCustomActionTest() throws ApiException { } /** - * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -79,15 +63,7 @@ public void searchCustomActionsTest() throws ApiException { } /** - * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * * @throws ApiException if the Api call fails */ @@ -98,4 +74,5 @@ public void updateCustomActionTest() throws ApiException { api.updateCustomAction(customActionIdentifier, updateCustomActionRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java index 515e792a6..9685ffc23 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java @@ -7,71 +7,28 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CalendarResponse; import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.GenerateCSVRequest; import com.thoughtspot.client.model.SearchCalendarsRequest; import com.thoughtspot.client.model.UpdateCalendarRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for CustomCalendarsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for CustomCalendarsApi + */ @Disabled public class CustomCalendarsApiTest { private final CustomCalendarsApi api = new CustomCalendarsApi(); /** - * Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * * @throws ApiException if the Api call fails */ @@ -83,14 +40,7 @@ public void createCalendarTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * * @throws ApiException if the Api call fails */ @@ -102,17 +52,7 @@ public void deleteCalendarTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. * * @throws ApiException if the Api call fails */ @@ -124,18 +64,7 @@ public void generateCSVTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. * * @throws ApiException if the Api call fails */ @@ -147,41 +76,7 @@ public void searchCalendarsTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * * @throws ApiException if the Api call fails */ @@ -192,4 +87,5 @@ public void updateCalendarTest() throws ApiException { api.updateCalendar(calendarIdentifier, updateCalendarRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java index 79ff0e7ee..cf95528e6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java @@ -6,6 +6,7 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.AnswerDataResponse; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchAnswerDataRequest; import com.thoughtspot.client.model.FetchLiveboardDataRequest; import com.thoughtspot.client.model.LiveboardDataResponse; @@ -14,18 +15,21 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for DataApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DataApi + */ @Disabled public class DataApiTest { private final DataApi api = new DataApi(); /** - * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to - * the saved Answer. The `record_size` attribute determines the number of records to - * retrieve in an API call. For more information about pagination, record size, and maximum row - * limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). * * @throws ApiException if the Api call fails */ @@ -37,17 +41,7 @@ public void fetchAnswerDataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires - * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the - * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or - * names of the visualizations in the API request. To include unsaved changes in the report, - * pass the `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes. If the new Liveboard - * experience mode, the transient content includes ad hoc changes to visualizations such as - * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard - * data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). * * @throws ApiException if the Api call fails */ @@ -59,20 +53,7 @@ public void fetchLiveboardDataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least - * view access to the data source object (Worksheet or View). #### Usage guidelines To search - * data, specify the data source GUID in `logical_table_identifier`. The data source - * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the - * `query_string` attribute in the API request as shown in the following example: - * ``` { \"query_string\": \"[sales] by [store]\", - * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } - * ``` For more information about the `query_string` format and data - * source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). * * @throws ApiException if the Api call fails */ @@ -82,4 +63,5 @@ public void searchDataTest() throws ApiException { SearchDataResponse response = api.searchData(searchDataRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java index 3d250f153..6028d52d4 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 @@ -6,31 +6,26 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.DbtSearchResponse; +import com.thoughtspot.client.model.ErrorResponse; import java.io.File; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for DbtApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DbtApi + */ @Disabled public class DbtApiTest { private final DbtApi api = new DbtApi(); /** - * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * * @throws ApiException if the Api call fails */ @@ -46,32 +41,12 @@ public void dbtConnectionTest() throws ApiException { String dbtEnvId = null; String projectName = null; File fileContent = null; - Object response = - api.dbtConnection( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + Object response = api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); // TODO: test validations } /** - * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s - * and import them to Thoughtspot based on the DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * * @throws ApiException if the Api call fails */ @@ -84,49 +59,23 @@ public void dbtGenerateSyncTmlTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * * @throws ApiException if the Api call fails */ @Test public void dbtGenerateTmlTest() throws ApiException { String dbtConnectionIdentifier = null; - String importWorksheets = null; String modelTables = null; + String importWorksheets = null; String worksheets = null; File fileContent = null; - Object response = - api.dbtGenerateTml( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent); + Object response = api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent); // TODO: test validations } /** - * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, - * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * * @throws ApiException if the Api call fails */ @@ -137,14 +86,7 @@ public void dbtSearchTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * * @throws ApiException if the Api call fails */ @@ -156,19 +98,7 @@ public void deleteDbtConnectionTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * * @throws ApiException if the Api call fails */ @@ -185,19 +115,8 @@ public void updateDbtConnectionTest() throws ApiException { String dbtEnvId = null; String projectName = null; File fileContent = null; - Object response = - api.updateDbtConnection( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + Object response = api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomisationApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomisationApiTest.java deleted file mode 100644 index 4bb545976..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomisationApiTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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.CreateEmailCustomisationRequest; -import com.thoughtspot.client.model.CreateEmailCustomisationResponse; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** API tests for EmailCustomisationApi */ -@Disabled -public class EmailCustomisationApiTest { - - private final EmailCustomisationApi api = new EmailCustomisationApi(); - - /** - * Version: 10.10.0.cl or later Creates a custom configuration for the email customisation #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines To create a custom confuguration: 1. Pass these parameters in - * your API request. - A JSON map of configuration attributes `template_properties`. - * The following example shows the configuration attribures for a csutom configuration: - * ``` { { \"logoUrl\": \"<logo_url>\", - * \"homeUrl\": \"<home_url>\", \"productName\": - * \"<Company Name in the Mail>\", \"footerAddress\": - * \"<address to be visible in the footer>\", \"ctaButtonBgColor\": - * \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", - * \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": - * <true/false>, \"hideTsVocabularyDefinitions\": <true/false>e, - * \"hideProductName\": <true/false>, \"hideFooterPhone\": - * <true/false>, \"hideFooterAddress\": <true/false>, - * \"hidePrivacyPolicy\": <true/false>, \"hideManageNotification\": - * <true/false>, \"fontfamily\": \"<to maintain a single font in the - * entire email>\" } } ``` - * - * @throws ApiException if the Api call fails - */ - @Test - public void createEmailCustomisationTest() throws ApiException { - CreateEmailCustomisationRequest createEmailCustomisationRequest = null; - CreateEmailCustomisationResponse response = - api.createEmailCustomisation(createEmailCustomisationRequest); - // TODO: test validations - } - - /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customisation. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `_Has developer privilege` privilege is required. Coms should be enabled on the - * cluster. #### Usage guidelines Deletes the configuration available for the cluster/org. Pass - * the `template_identifier` in the API request. Note: `template_identifier` - * can be fetched from search API request. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteEmailCustomisationTest() throws ApiException { - String templateIdentifier = null; - api.deleteEmailCustomisation(templateIdentifier); - // TODO: test validations - } - - /** - * Version: 10.10.0.cl or later Search the email customisation configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. #### Usage guidelines To get the list of configurations set in the - * cluster/org. - * - * @throws ApiException if the Api call fails - */ - @Test - public void searchEmailCustomisationTest() throws ApiException { - List response = api.searchEmailCustomisation(); - // TODO: test validations - } - - /** - * Version: 10.10.0.cl or later Validates the email customisation configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `_Has developer privilege` privilege is required. Coms should - * be enabled on the cluster. - * - * @throws ApiException if the Api call fails - */ - @Test - public void validateEmailCustomisationTest() throws ApiException { - api.validateEmailCustomisation(); - // TODO: test validations - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java index cc95df589..3c4da3607 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java @@ -8,65 +8,39 @@ import com.thoughtspot.client.model.CreateEmailCustomizationRequest; import com.thoughtspot.client.model.CreateEmailCustomizationResponse; import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.SearchEmailCustomizationRequest; import com.thoughtspot.client.model.UpdateEmailCustomizationRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for EmailCustomizationApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for EmailCustomizationApi + */ @Disabled public class EmailCustomizationApiTest { private final EmailCustomizationApi api = new EmailCustomizationApi(); /** - * Version: 10.10.0.cl or later Creates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To create a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` * * @throws ApiException if the Api call fails */ @Test public void createEmailCustomizationTest() throws ApiException { CreateEmailCustomizationRequest createEmailCustomizationRequest = null; - CreateEmailCustomizationResponse response = - api.createEmailCustomization(createEmailCustomizationRequest); + CreateEmailCustomizationResponse response = api.createEmailCustomization(createEmailCustomizationRequest); // TODO: test validations } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * * @throws ApiException if the Api call fails */ @@ -78,14 +52,7 @@ public void deleteEmailCustomizationTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` - * from the response. - Use that `org_identifier` as a parameter in this API request. + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. * * @throws ApiException if the Api call fails */ @@ -97,50 +64,19 @@ public void deleteOrgEmailCustomizationTest() throws ApiException { } /** - * Version: 10.10.0.cl or later Search the email customization configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * * @throws ApiException if the Api call fails */ @Test public void searchEmailCustomizationTest() throws ApiException { SearchEmailCustomizationRequest searchEmailCustomizationRequest = null; - List response = - api.searchEmailCustomization(searchEmailCustomizationRequest); + List response = api.searchEmailCustomization(searchEmailCustomizationRequest); // TODO: test validations } /** - * Version: 10.12.0.cl or later Updates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To update a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` * * @throws ApiException if the Api call fails */ @@ -152,13 +88,7 @@ public void updateEmailCustomizationTest() throws ApiException { } /** - * Version: 10.10.0.cl or later Validates the email customization configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * * @throws ApiException if the Api call fails */ @@ -167,4 +97,5 @@ public void validateEmailCustomizationTest() throws ApiException { api.validateEmailCustomization(); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java index 6a0fad065..a219a6997 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java @@ -6,32 +6,30 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateUserGroupRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ImportUserGroupsRequest; import com.thoughtspot.client.model.ImportUserGroupsResponse; import com.thoughtspot.client.model.SearchUserGroupsRequest; import com.thoughtspot.client.model.UpdateUserGroupRequest; import com.thoughtspot.client.model.UserGroupResponse; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for GroupsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for GroupsApi + */ @Disabled public class GroupsApiTest { private final GroupsApi api = new GroupsApi(); /** - * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard * * @throws ApiException if the Api call fails */ @@ -43,11 +41,7 @@ public void createUserGroupTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -59,17 +53,7 @@ public void deleteUserGroupTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. During the import operation: * If the specified group is not available in - * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is - * set to `true`, the groups not specified in the API request, excluding administrator - * and system user groups, are deleted. * If the specified groups are already available in - * ThoughtSpot, the object properties of these groups are modified and synchronized as per the - * input data in the API request. A successful API call returns the object that represents the - * changes made in the ThoughtSpot system. + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. * * @throws ApiException if the Api call fails */ @@ -81,16 +65,7 @@ public void importUserGroupsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To - * get details of a specific user group, specify the user group GUID or name. You can also - * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, - * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. - * Available to all users. Users with `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If - * you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. * * @throws ApiException if the Api call fails */ @@ -102,15 +77,7 @@ public void searchUserGroupsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * Supported operations This API endpoint lets you perform the following operations in a single - * API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * * @throws ApiException if the Api call fails */ @@ -121,4 +88,5 @@ public void updateUserGroupTest() throws ApiException { api.updateUserGroup(groupIdentifier, updateUserGroupRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java index 206348ad8..695e1c6fc 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java @@ -5,30 +5,27 @@ package com.thoughtspot.client.api; import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchLogsRequest; import com.thoughtspot.client.model.LogResponse; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for LogApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for LogApi + */ @Disabled public class LogApiTest { private final LogApi api = new LogApi(); /** - * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin - * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are - * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You - * can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). * * @throws ApiException if the Api call fails */ @@ -38,4 +35,5 @@ public void fetchLogsTest() throws ApiException { List response = api.fetchLogs(fetchLogsRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java index db0e788a1..45fa12ac0 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 @@ -8,6 +8,7 @@ import com.thoughtspot.client.model.ConvertWorksheetToModelRequest; import com.thoughtspot.client.model.CopyObjectRequest; import com.thoughtspot.client.model.DeleteMetadataRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest; import com.thoughtspot.client.model.ExportMetadataTMLRequest; import com.thoughtspot.client.model.FetchAnswerSqlQueryRequest; @@ -26,67 +27,36 @@ import com.thoughtspot.client.model.UnparameterizeMetadataRequest; import com.thoughtspot.client.model.UpdateMetadataHeaderRequest; import com.thoughtspot.client.model.UpdateMetadataObjIdRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for MetadataApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for MetadataApi + */ @Disabled public class MetadataApiTest { private final MetadataApi api = new MetadataApi(); /** - * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges - * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can - * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage - * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of - * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - - * Used only when `convert_all` is set to `false`. - Leave empty or omit - * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - - * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from - * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and - * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the - * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the - * system, except those specified in `exclude_worksheet_ids`. - `false`: - * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - - * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a - * preview before applying any changes.Used for validation of conversion. - **Options:** - - * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: - * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## - * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before - * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion - * process by setting `convert_all` to `false` and specifying a small number - * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such - * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` * * @throws ApiException if the Api call fails */ @Test public void convertWorksheetToModelTest() throws ApiException { ConvertWorksheetToModelRequest convertWorksheetToModelRequest = null; - ResponseWorksheetToModelConversion response = - api.convertWorksheetToModel(convertWorksheetToModelRequest); + ResponseWorksheetToModelConversion response = api.convertWorksheetToModel(convertWorksheetToModelRequest); // TODO: test validations } /** - * 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. * * @throws ApiException if the Api call fails */ @@ -98,8 +68,7 @@ public void copyObjectTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. - * Requires edit access to the metadata object. + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. * * @throws ApiException if the Api call fails */ @@ -111,30 +80,7 @@ public void deleteMetadataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. Requires - * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata - * object. #### Usage guidelines * You can export one or several objects by passing metadata - * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard - * or Answer object, you can set `export_associated` to `true` to retrieve - * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object - * within the headers. When `export_associated` is set to `true`, consider - * retrieving one metadata object at a time. * Set `export_fqns` to `true` - * to add FQNs of the referenced objects in the TML content. For example, if you send an API - * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML - * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if - * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when - * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the - * referenced objects manually during the import operation. * To export only the TML of - * feedbacks associated with an object, set the GUID of the object as `identifier`, - * and set the `type` as `FEEDBACK` in the `metadata` array. * To - * export the TML of an object along with the feedbacks associated with it, set the GUID of the - * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). * * @throws ApiException if the Api call fails */ @@ -146,20 +92,7 @@ public void exportMetadataTMLTest() throws ApiException { } /** - * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. ### **Permissions Required** - * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` - * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for - * `USER`, `GROUP`, and `ROLES` metadata types. - - * `batch_offset` Indicates the starting position within the complete dataset from - * which the API should begin returning objects. Useful for paginating results efficiently. - - * `batch_size` Specifies the number of objects or items to retrieve in a single - * request. Helps control response size for better performance. - `edoc_format` - * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - - * `export_dependent` Specifies whether to include dependent metadata objects in the - * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` - * Indicates whether the export operation applies across all organizations. Useful for - * multi-tenant environments where cross-org exports are required. + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. * * @throws ApiException if the Api call fails */ @@ -171,32 +104,7 @@ public void exportMetadataTMLBatchedTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. - * Requires at least view access to the Answer object. Upon successful execution, the API - * returns the SQL queries for the specified object as shown in this example: ``` - * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` * * @throws ApiException if the Api call fails */ @@ -208,50 +116,19 @@ public void fetchAnswerSqlQueryTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Gets information about the status of the TML async import task - * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch - * the task details, specify the ID of the TML async import task. Requires access to the task - * ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. * * @throws ApiException if the Api call fails */ @Test public void fetchAsyncImportTaskStatusTest() throws ApiException { FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = null; - GetAsyncImportStatusResponse response = - api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest); + GetAsyncImportStatusResponse response = api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and - * its visualizations. Requires at least view access to the Liveboard object. To get SQL query - * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of - * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon - * successful execution, the API returns the SQL queries for the specified object as shown in - * this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` * * @throws ApiException if the Api call fails */ @@ -263,28 +140,7 @@ public void fetchLiveboardSqlQueryTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files - * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). * * @throws ApiException if the Api call fails */ @@ -296,42 +152,19 @@ public void importMetadataTMLTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. * * @throws ApiException if the Api call fails */ @Test public void importMetadataTMLAsyncTest() throws ApiException { ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = null; - ImportEPackAsyncTaskStatus response = - api.importMetadataTMLAsync(importMetadataTMLAsyncRequest); + ImportEPackAsyncTaskStatus response = api.importMetadataTMLAsync(importMetadataTMLAsyncRequest); // TODO: test validations } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. * * @throws ApiException if the Api call fails */ @@ -343,34 +176,7 @@ public void parameterizeMetadataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot - * system. This API endpoint is available to all users who have view access to the object. Users - * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for - * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata - * objects, send the API request without any attributes. - To get metadata objects of a specific - * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as - * `LOGICAL_TABLE`. - To filter metadata objects within type - * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * * @throws ApiException if the Api call fails */ @@ -382,14 +188,7 @@ public void searchMetadataTest() throws ApiException { } /** - * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows - * removing parameterization from fields in metadata objects in ThoughtSpot. Requires - * appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. * * @throws ApiException if the Api call fails */ @@ -401,42 +200,7 @@ public void unparameterizeMetadataTest() throws ApiException { } /** - * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **headers_update** - **Description:** List of header objects with their - * attributes to be updated. Each object contains a list of attributes to be updated in the - * header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` * * @throws ApiException if the Api call fails */ @@ -448,37 +212,7 @@ public void updateMetadataHeaderTest() throws ApiException { } /** - * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` * * @throws ApiException if the Api call fails */ @@ -488,4 +222,5 @@ public void updateMetadataObjIdTest() throws ApiException { api.updateMetadataObjId(updateMetadataObjIdRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java index 18817fb3f..2b5fe0ad2 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java @@ -6,26 +6,28 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateOrgRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.OrgResponse; import com.thoughtspot.client.model.SearchOrgsRequest; import com.thoughtspot.client.model.UpdateOrgRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for OrgsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrgsApi + */ @Disabled public class OrgsApiTest { private final OrgsApi api = new OrgsApi(); /** - * Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -37,13 +39,7 @@ public void createOrgTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires - * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete - * an Org, all its users and objects created in that Org context are removed. However, if the - * users in the deleted Org also exists in other Orgs, they are removed only from the deleted - * Org. + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * * @throws ApiException if the Api call fails */ @@ -55,12 +51,7 @@ public void deleteOrgTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get - * details of a specific Org, specify the Org ID or name. You can also pass parameters such as - * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster - * administration (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -72,11 +63,7 @@ public void searchOrgsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, - * description, and user associations. Requires cluster administration (**Can administer Org**) - * privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -87,4 +74,5 @@ public void updateOrgTest() throws ApiException { api.updateOrg(orgIdentifier, updateOrgRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java index 24d6712b1..8cf01d6e9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java @@ -5,28 +5,28 @@ package com.thoughtspot.client.api; import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ExportAnswerReportRequest; import com.thoughtspot.client.model.ExportLiveboardReportRequest; import java.io.File; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for ReportsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ReportsApi + */ @Disabled public class ReportsApiTest { private final ReportsApi api = new ReportsApi(); /** - * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the - * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. - * #### Usage guidelines In the request body, the GUID or name of the Answer and set - * `file_format`. The default file format is CSV. **NOTE**: * The downloadable file - * returned in API response file is extensionless. Please rename the downloaded file by typing - * in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with - * tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * * @throws ApiException if the Api call fails */ @@ -38,27 +38,7 @@ public void exportAnswerReportTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file - * format. Requires at least view access to the Liveboard. #### Usage guidelines In the request - * body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific - * visualizations, add GUIDs or names of the visualizations. The default `file_format` - * is PDF. For PDF downloads, you can specify additional parameters to customize the page - * orientation and include or exclude the cover page, logo, footer text, and page numbers. - * Similar customization options are also available for PNG output. **NOTE**: The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * * @throws ApiException if the Api call fails */ @@ -68,4 +48,5 @@ public void exportLiveboardReportTest() throws ApiException { File response = api.exportLiveboardReport(exportLiveboardReportRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java index 6708ddf0f..e0803177b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java @@ -6,25 +6,29 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateRoleRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.RoleResponse; import com.thoughtspot.client.model.SearchRoleResponse; import com.thoughtspot.client.model.SearchRolesRequest; import com.thoughtspot.client.model.UpdateRoleRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for RolesApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for RolesApi + */ @Disabled public class RolesApiTest { private final RolesApi api = new RolesApi(); /** - * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -36,10 +40,7 @@ public void createRoleTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -51,12 +52,7 @@ public void deleteRoleTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can - * manage roles**) privilege is required. To get details of a specific Role object, specify the - * GUID or name. You can also filter the API response based on user group and Org identifiers, - * privileges assigned to the Role, and deprecation status. + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. * * @throws ApiException if the Api call fails */ @@ -68,10 +64,7 @@ public void searchRolesTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -82,4 +75,5 @@ public void updateRoleTest() throws ApiException { RoleResponse response = api.updateRole(roleIdentifier, updateRoleRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java index ff20b6d65..d61483c86 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java @@ -6,43 +6,28 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateScheduleRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ResponseSchedule; import com.thoughtspot.client.model.SearchSchedulesRequest; import com.thoughtspot.client.model.UpdateScheduleRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for SchedulesApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SchedulesApi + */ @Disabled public class SchedulesApiTest { private final SchedulesApi api = new SchedulesApi(); /** - * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at - * least edit access to Liveboards. To create a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). * * @throws ApiException if the Api call fails */ @@ -54,11 +39,7 @@ public void createScheduleTest() throws ApiException { } /** - * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. - * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer - * Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -70,11 +51,7 @@ public void deleteScheduleTest() throws ApiException { } /** - * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a - * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the - * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering - * schedules by parameters other than `metadata`, set `record_size` to - * `-1` and `record_offset` to `0` for accurate results. + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. * * @throws ApiException if the Api call fails */ @@ -86,15 +63,7 @@ public void searchSchedulesTest() throws ApiException { } /** - * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at - * least edit access to Liveboards. To update a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * * @throws ApiException if the Api call fails */ @@ -105,4 +74,5 @@ public void updateScheduleTest() throws ApiException { api.updateSchedule(scheduleIdentifier, updateScheduleRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java index 11a439969..e1d5aad9d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java @@ -7,6 +7,7 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.AssignChangeAuthorRequest; import com.thoughtspot.client.model.ColumnSecurityRuleResponse; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.FetchColumnSecurityRulesRequest; import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; @@ -16,22 +17,24 @@ import com.thoughtspot.client.model.ShareMetadataRequest; import com.thoughtspot.client.model.UnpublishMetadataRequest; import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for SecurityApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SecurityApi + */ @Disabled public class SecurityApiTest { private final SecurityApi api = new SecurityApi(); /** - * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to - * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and - * edit access to the objects are required. + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. * * @throws ApiException if the Api call fails */ @@ -43,85 +46,43 @@ public void assignChangeAuthorTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API - * endpoint retrieves column-level security rules configured for tables. It returns information - * about which columns are secured and which groups have access to those columns. #### Usage - * guidelines - Provide an array of table identifiers using either `identifier` (GUID - * or name) or `obj_identifier` (object ID) - At least one of `identifier` - * or `obj_identifier` must be provided for each table - The API returns column - * security rules for all specified tables - Users must have appropriate permissions to access - * security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` * * @throws ApiException if the Api call fails */ @Test public void fetchColumnSecurityRulesTest() throws ApiException { FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = null; - List response = - api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest); + List response = api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Fetches object permission details for a given principal object - * such as a user and group. Requires view access to the metadata object. #### Usage guidelines - * * To get a list of all metadata objects that a user or group can access, specify the - * `type` and GUID or name of the principal. * To get permission details for a - * specific object, add the `type` and GUID or name of the metadata object to your API - * request. Upon successful execution, the API returns a list of metadata objects and permission - * details for each object. + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. * * @throws ApiException if the Api call fails */ @Test public void fetchPermissionsOfPrincipalsTest() throws ApiException { FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = null; - PermissionOfPrincipalsResponse response = - api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest); + PermissionOfPrincipalsResponse response = api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires - * view access to the metadata object. #### Usage guidelines * To fetch a list of users and - * groups for a metadata object, specify `type` and GUID or name of the metadata - * object. * To get permission details for a specific user or group, add `type` and - * GUID or name of the principal object to your API request. Upon successful execution, the API - * returns permission details and principal information for the object specified in the API - * request. + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. * * @throws ApiException if the Api call fails */ @Test public void fetchPermissionsOnMetadataTest() throws ApiException { FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = null; - PermissionOfMetadataResponse response = - api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest); + PermissionOfMetadataResponse response = api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest); // TODO: test validations } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. * * @throws ApiException if the Api call fails */ @@ -133,15 +94,7 @@ public void publishMetadataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and - * groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows - * sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers - * * Worksheets * Views * Connections You can provide `READ_ONLY` or - * `MODIFY` access when sharing an object with another user or group. With - * `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. * * @throws ApiException if the Api call fails */ @@ -153,13 +106,7 @@ public void shareMetadataTest() throws ApiException { } /** - * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations * * @throws ApiException if the Api call fails */ @@ -171,51 +118,7 @@ public void unpublishMetadataTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified - * tables. This API endpoint allows you to create, update, or delete column-level security rules - * on columns of a table. The operation follows an \"all or none\" policy: if defining - * security rules for any of the provided columns fails, the entire operation will be rolled - * back, and no rules will be created. #### Usage guidelines - Provide table identifier using - * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use - * `clear_csr: true` to remove all column security rules from the table - For each - * column, specify the security rule using `column_security_rules` array - Use - * `is_unsecured: true` to mark a specific column as unprotected - Use - * `group_access` operations to manage group associations: - `ADD`: Add - * groups to the column's access list - `REMOVE`: Remove groups from the - * column's access list - `REPLACE`: Replace all existing groups with the - * specified groups #### Required permissions - `ADMINISTRATION` - Can administer - * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if - * RBAC is enabled) #### Example request ```json { \"identifier\": - * \"table-guid\", \"obj_identifier\": \"table-object-id\", - * \"clear_csr\": false, \"column_security_rules\": [ { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": false, \"group_access\": [ { \"operation\": - * \"ADD\", \"group_identifiers\": [\"hr_group_id\", - * \"hr_group_name\", \"finance_group_id\"] } ] }, { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups * * @throws ApiException if the Api call fails */ @@ -225,4 +128,5 @@ public void updateColumnSecurityRulesTest() throws ApiException { api.updateColumnSecurityRules(updateColumnSecurityRulesRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java index 0873ed8be..73f9971ae 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,10 @@ 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.ErrorResponse; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.SystemConfig; import com.thoughtspot.client.model.SystemInfo; import com.thoughtspot.client.model.SystemOverrideInfo; @@ -12,20 +16,33 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for SystemApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SystemApi + */ @Disabled public class SystemApiTest { private final SystemApi api = new SystemApi(); /** - * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the - * request is successful, the API returns a list configuration settings applied on the cluster. - * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these - * complete configuration settings of the cluster. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. + * 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. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * * @throws ApiException if the Api call fails */ @@ -36,12 +53,7 @@ public void getSystemConfigTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time - * zone, deployment environment, date format, and date time format of the cluster. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * * @throws ApiException if the Api call fails */ @@ -52,12 +64,7 @@ public void getSystemInformationTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application - * settings**) privilege is required. This API does not require any parameters to be passed in - * the request. + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * * @throws ApiException if the Api call fails */ @@ -68,12 +75,19 @@ public void getSystemOverrideInfoTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send - * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. + * 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 ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -83,4 +97,5 @@ public void updateSystemConfigTest() throws ApiException { api.updateSystemConfig(updateSystemConfigRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java index 7dc87ad64..8d1210ce9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java @@ -7,22 +7,28 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.AssignTagRequest; import com.thoughtspot.client.model.CreateTagRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.SearchTagsRequest; import com.thoughtspot.client.model.Tag; import com.thoughtspot.client.model.UpdateTagRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for TagsApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for TagsApi + */ @Disabled public class TagsApiTest { private final TagsApi api = new TagsApi(); /** - * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. - * Requires edit access to the metadata object. + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. * * @throws ApiException if the Api call fails */ @@ -34,13 +40,7 @@ public void assignTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata - * object. For example, you can create a tag to designate subject areas, such as sales, HR, - * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * * @throws ApiException if the Api call fails */ @@ -52,11 +52,7 @@ public void createTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * * @throws ApiException if the Api call fails */ @@ -68,9 +64,7 @@ public void deleteTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To - * get details of a specific tag object, specify the GUID or name. Any authenticated user can - * search for tag objects. + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. * * @throws ApiException if the Api call fails */ @@ -82,8 +76,7 @@ public void searchTagsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or - * Worksheet. Requires edit access to the metadata object. + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. * * @throws ApiException if the Api call fails */ @@ -95,12 +88,7 @@ public void unassignTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and - * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * * @throws ApiException if the Api call fails */ @@ -111,4 +99,5 @@ public void updateTagTest() throws ApiException { api.updateTag(tagIdentifier, updateTagRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java index 7edde0897..c93d6ed95 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,8 +49,10 @@ 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.ErrorResponse; import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; @@ -65,6 +70,7 @@ import com.thoughtspot.client.model.FetchLogsRequest; import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; +import java.io.File; import com.thoughtspot.client.model.ForceLogoutUsersRequest; import com.thoughtspot.client.model.GenerateCSVRequest; import com.thoughtspot.client.model.GetAsyncImportStatusResponse; @@ -105,6 +111,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 +128,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,31 +163,33 @@ 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 java.io.File; -import java.util.List; +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 ThoughtSpotRestApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ThoughtSpotRestApi + */ @Disabled public class ThoughtSpotRestApiTest { private final ThoughtSpotRestApi api = new ThoughtSpotRestApi(); /** - * Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. * * @throws ApiException if the Api call fails */ @@ -190,11 +201,7 @@ public void activateUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to - * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and - * edit access to the objects are required. + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. * * @throws ApiException if the Api call fails */ @@ -206,8 +213,7 @@ public void assignChangeAuthorTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. - * Requires edit access to the metadata object. + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. * * @throws ApiException if the Api call fails */ @@ -219,10 +225,7 @@ public void assignTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates the current password of the user. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -234,12 +237,7 @@ public void changeUserPasswordTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured - * on your instance. Requires at least edit access to objects used in the commit operation. - * Before using this endpoint to push your commits: * Enable Git integration on your instance. * - * Make sure the Git repository and branch details are configured on your instance. For more - * information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * * @throws ApiException if the Api call fails */ @@ -251,77 +249,43 @@ public void commitBranchTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Gets connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Usage guidelines * To get a list of all - * configurations available in the ThoughtSpot system, send the API request with only the - * connection name or GUID in the request body. * To fetch details of a configuration object, - * specify the configuration object name or GUID. + * 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 object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * * @throws ApiException if the Api call fails */ @Test public void connectionConfigurationSearchTest() throws ApiException { ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = null; - List response = - api.connectionConfigurationSearch(connectionConfigurationSearchRequest); - // TODO: test validations - } - - /** - * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges - * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can - * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage - * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of - * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - - * Used only when `convert_all` is set to `false`. - Leave empty or omit - * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - - * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from - * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and - * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the - * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the - * system, except those specified in `exclude_worksheet_ids`. - `false`: - * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - - * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a - * preview before applying any changes.Used for validation of conversion. - **Options:** - - * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: - * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## - * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before - * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion - * process by setting `convert_all` to `false` and specifying a small number - * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such - * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use - * `apply_changes: false` to preview the impact of the conversion before applying - * changes. --- ## Examples ### Convert Specific Worksheets ```json { - * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], - * \"exclude_worksheet_ids\": [], \"convert_all\": false, - * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets - * ```json { \"worksheet_ids\": [], - * \"exclude_worksheet_ids\": [], \"convert_all\": true, - * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While - * Converting All Accessible Worksheets ```json { \"worksheet_ids\": - * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": - * true, \"apply_changes\": true } ``` + List response = api.connectionConfigurationSearch(connectionConfigurationSearchRequest); + // TODO: test validations + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` * * @throws ApiException if the Api call fails */ @Test public void convertWorksheetToModelTest() throws ApiException { ConvertWorksheetToModelRequest convertWorksheetToModelRequest = null; - ResponseWorksheetToModelConversion response = - api.convertWorksheetToModel(convertWorksheetToModelRequest); + ResponseWorksheetToModelConversion response = api.convertWorksheetToModel(convertWorksheetToModelRequest); // TODO: test validations } /** - * 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. * * @throws ApiException if the Api call fails */ @@ -333,7 +297,7 @@ public void copyObjectTest() throws ApiException { } /** - * Version: 10.13.0.cl or later + * Version: 10.13.0.cl or later * * @throws ApiException if the Api call fails */ @@ -345,57 +309,7 @@ public void createAgentConversationTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Creates a new [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or - * an existing Table in ThoughtSpot. For both methods of calendar creation, the following - * parameters are required: * Name of the custom calendar. * Calendar creation method. To create - * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - - * Creates calendar from the table reference provided in the API request. - - * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API - * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud - * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` - * attributes are required. However, the attribute requirements are conditional and vary based - * on the connector type and its metadata structure. For example, for connectors such as - * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, - * the `schema_name` is required, whereas the `database_name` attribute is - * not. Similarly, connectors such as ClickHouse require you to specify the - * `database_name` and the schema specification in such cases is optional. **NOTE**: - * If you are creating a calendar from an existing table, ensure that the referenced table - * matches the required DDL for custom calendars. If the schema does not match, the API returns - * an error. ##### Calendar type The API allows you to create the following types of calendars: - * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is - * offset by a few months from the standard calendar months (January to December) and the year - * begins with the month defined in the request. For example, if the `month_offset` - * value is set as `April`, the calendar year begins in April. * `4-4-5`. - * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * - * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week - * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two - * 4-week months. To start and end the calendar on a specific date, specify the dates in the - * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the - * `start_date` matches the month specified in the `month_offset` attribute. - * You can also set the starting day of the week and customize the prefixes for year and quarter - * labels. #### Examples To create a calendar from an existing table: ``` { - * \"name\": \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To - * create a calendar from scratch: ``` { \"name\": - * \"MyCustomCalendar1\", \"table_reference\": { - * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", - * \"table_name\": \"MyCalendarTable\", \"database_name\": - * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, - * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": - * \"MONTH_OFFSET\", \"month_offset\": \"April\", - * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": - * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": - * \"04/01/2025\", \"end_date\": \"04/31/2025\" } - * ``` + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * * @throws ApiException if the Api call fails */ @@ -407,22 +321,7 @@ public void createCalendarTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot - * development and production environments to the development and production branches of a Git - * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git - * repository, check the following prerequisites: * You have a Git repository. If you are using - * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to - * GitHub. For information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * * @throws ApiException if the Api call fails */ @@ -434,45 +333,7 @@ public void createConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Create a connection without tables To create a connection without tables: 1. - * Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes in - * `data_warehouse_config`. The following example shows the configuration attributes - * for a SnowFlake connection: ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", - * \"user\":\"tsadmin\", \"password\":\"TestConn123\", - * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, - * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", - * \"isAutoCreated\":false, \"schemas\":[ { - * \"name\":\"alldatatypes\", \"tables\":[ { - * \"name\":\"allDatatypes\", \"type\":\"TABLE\", - * \"description\":\"\", \"selected\":true, - * \"linked\":true, \"columns\":[ { - * \"name\":\"CNUMBER\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" }, { - * \"name\":\"CDECIMAL\", \"type\":\"INT64\", - * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, - * \"isImported\":false, \"tableName\":\"allDatatypes\", - * \"schemaName\":\"alldatatypes\", - * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. * * @throws ApiException if the Api call fails */ @@ -484,43 +345,19 @@ public void createConnectionTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to - * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. #### Usage guidelines * A JSON map of configuration attributes in - * `configuration`. The following example shows the configuration attributes: - * ``` { \"user\":\"DEV_USER\", - * \"password\":\"TestConn123\", \"role\":\"DEV\", - * \"warehouse\":\"DEV_WH\" } ``` * If the - * `policy_type` is `PRINCIPALS`, then `policy_principals` is a - * required field. * If the `policy_type` is `PROCESSES`, then - * `policy_processes` is a required field. * If the `policy_type` is - * `NO_POLICY`, then `policy_principals` and `policy_processes` - * are not required fields. + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. * * @throws ApiException if the Api call fails */ @Test public void createConnectionConfigurationTest() throws ApiException { CreateConnectionConfigurationRequest createConnectionConfigurationRequest = null; - ConnectionConfigurationResponse response = - api.createConnectionConfiguration(createConnectionConfigurationRequest); + ConnectionConfigurationResponse response = api.createConnectionConfiguration(createConnectionConfigurationRequest); // TODO: test validations } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### 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. + * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### 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 */ @@ -532,22 +369,7 @@ public void createConversationTest() throws ApiException { } /** - * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved - * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. #### Usage Guidelines The API lets you create the following types of custom - * actions: * URL-based action Allows pushing data to an external URL. * Callback action - * Triggers a callback to the host application and initiates a response payload on an embedded - * ThoughtSpot instance. By default, custom actions are visible to only administrator or - * developer users. To make a custom action available to other users, and specify the groups in - * `group_identifiers`. By default, the custom action is set as a _global_ action on - * all visualizations and saved Answers. To assign a custom action to specific Liveboard - * visualization, saved Answer, or Worksheet, set `visibility` to `false` in - * `default_action_config` property and specify the GUID or name of the object in - * `associate_metadata`. For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * * @throws ApiException if the Api call fails */ @@ -559,49 +381,19 @@ public void createCustomActionTest() throws ApiException { } /** - * Version: 10.10.0.cl or later Creates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To create a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` * * @throws ApiException if the Api call fails */ @Test public void createEmailCustomizationTest() throws ApiException { CreateEmailCustomizationRequest createEmailCustomizationRequest = null; - CreateEmailCustomizationResponse response = - api.createEmailCustomization(createEmailCustomizationRequest); + CreateEmailCustomizationResponse response = api.createEmailCustomization(createEmailCustomizationRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Creates an Org object. To use this API, the - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in - * your cluster. Requires cluster administration (**Can administer Org**) privileges. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is - * required. + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -613,10 +405,7 @@ public void createOrgTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -628,29 +417,7 @@ public void createRoleTest() throws ApiException { } /** - * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at - * least edit access to Liveboards. To create a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage - * guidelines * The description text is mandatory. The description text appears as - * **Description: <your content>** in the Liveboard schedule email notifications. * For - * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS - * formats. Schedules created in CSV formats for such Liveboards will fail to run. If - * `PDF` is set as the `file_format`, enable `pdf_options` to get - * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To - * include only specific visualizations, specify the visualization GUIDs in the - * `visualization_identifiers` array. * You can schedule a Liveboard job to run - * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, - * monthly or every n minutes or hours. The scheduled job can also be configured to run at a - * specific time of the day or on specific days of the week or month. Please ensure that when - * setting the schedule frequency for _minute of the object_, only values that are multiples of - * 5 are included. * If the `frequency` parameters are defined, you can set the time - * zone to a value that matches your server's time zone. For example, - * `US/Central`, `Etc/UTC`, `CET`. The default time zone is - * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot - * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). * * @throws ApiException if the Api call fails */ @@ -662,13 +429,7 @@ public void createScheduleTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata - * object. For example, you can create a tag to designate subject areas, such as sales, HR, - * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * * @throws ApiException if the Api call fails */ @@ -680,16 +441,7 @@ public void createTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to - * configure several user properties such as email address, account status, share notification - * preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -701,16 +453,7 @@ public void createUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * About groups Groups in ThoughtSpot are used by the administrators to define privileges and - * organize users based on their roles and access requirements. To know more about groups and - * privileges, see [ThoughtSpot Product - * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported - * operations The API endpoint lets you perform the following operations: * Assign privileges * - * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard * * @throws ApiException if the Api call fails */ @@ -722,17 +465,7 @@ 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 */ @@ -744,19 +477,19 @@ public void createVariableTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create - * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials - * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, - * DBT account identifier, DBT project identifier, DBT access token and environment details (or) - * embrace connection, embrace database name, import type, file_content to create a connection - * object. To know more about DBT, see ThoughtSpot Product Documentation. + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createWebhookConfigurationTest() throws ApiException { + CreateWebhookConfigurationRequest createWebhookConfigurationRequest = null; + WebhookResponse response = api.createWebhookConfiguration(createWebhookConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * * @throws ApiException if the Api call fails */ @@ -772,32 +505,12 @@ public void dbtConnectionTest() throws ApiException { String dbtEnvId = null; String projectName = null; File fileContent = null; - Object response = - api.dbtConnection( - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); + Object response = api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); // TODO: test validations } /** - * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s - * and import them to Thoughtspot based on the DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * * @throws ApiException if the Api call fails */ @@ -810,49 +523,23 @@ public void dbtGenerateSyncTmlTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT - * connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About - * generate TML Models and Worksheets to be imported can be selected by the user as part of the - * API. + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * * @throws ApiException if the Api call fails */ @Test public void dbtGenerateTmlTest() throws ApiException { String dbtConnectionIdentifier = null; - String importWorksheets = null; String modelTables = null; + String importWorksheets = null; String worksheets = null; File fileContent = null; - Object response = - api.dbtGenerateTml( - dbtConnectionIdentifier, - importWorksheets, - modelTables, - worksheets, - fileContent); + Object response = api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent); // TODO: test validations } /** - * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, - * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search - * DBT connection To get details of a specific DBT connection identifier, database connection - * identifier, database connection name, database name, project name, project identifier, - * environment identifier , import type and author. + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. * * @throws ApiException if the Api call fails */ @@ -863,15 +550,7 @@ public void dbtSearchTest() throws ApiException { } /** - * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` - * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a - * user account, the API request body must include the following information: - Username or the - * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is - * successful, ThoughtSpot returns the activation URL in the response. The activation URL is - * valid for 14 days and can be used to re-activate the account and reset the password of the - * deactivated account. + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. * * @throws ApiException if the Api call fails */ @@ -883,14 +562,7 @@ public void deactivateUserTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Deletes a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines To delete a custom calendar, specify the - * calendar ID as a path parameter in the request URL. + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. * * @throws ApiException if the Api call fails */ @@ -902,11 +574,7 @@ public void deleteCalendarTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * * @throws ApiException if the Api call fails */ @@ -918,16 +586,7 @@ public void deleteConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete - * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your - * connection objects. #### Usage guidelines Deletes a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. **Note**: If a connection has dependent objects, make - * sure you remove its associations before the delete operation. + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. * * @throws ApiException if the Api call fails */ @@ -939,12 +598,7 @@ public void deleteConnectionTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -956,13 +610,7 @@ public void deleteConnectionConfigurationTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has - * dependent objects, make sure you remove its associations before the delete operation. - * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the - * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -974,11 +622,7 @@ public void deleteConnectionV2Test() throws ApiException { } /** - * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -990,14 +634,7 @@ public void deleteCustomActionTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) * * @throws ApiException if the Api call fails */ @@ -1009,15 +646,7 @@ public void deleteDbtConnectionTest() throws ApiException { } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the - * `template_identifier` from the response. - Use that `template_identifier` - * as a parameter in this API request. + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. * * @throws ApiException if the Api call fails */ @@ -1029,8 +658,7 @@ public void deleteEmailCustomizationTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. - * Requires edit access to the metadata object. + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. * * @throws ApiException if the Api call fails */ @@ -1042,13 +670,7 @@ public void deleteMetadataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires - * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete - * an Org, all its users and objects created in that Org context are removed. However, if the - * users in the deleted Org also exists in other Orgs, they are removed only from the deleted - * Org. + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. * * @throws ApiException if the Api call fails */ @@ -1060,14 +682,7 @@ public void deleteOrgTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### - * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` - * from the response. - Use that `org_identifier` as a parameter in this API request. + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. * * @throws ApiException if the Api call fails */ @@ -1079,10 +694,7 @@ public void deleteOrgEmailCustomizationTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -1094,11 +706,7 @@ public void deleteRoleTest() throws ApiException { } /** - * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. - * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer - * Org**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -1110,11 +718,7 @@ public void deleteScheduleTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, - * and delete tags. + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * * @throws ApiException if the Api call fails */ @@ -1126,14 +730,7 @@ public void deleteTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove - * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping - * properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -1145,11 +742,7 @@ public void deleteUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -1161,10 +754,7 @@ 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 */ @@ -1176,12 +766,19 @@ public void deleteVariableTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your - * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy - * operation. The API deploys the head of the branch unless a `commit_id` is specified - * in the API request. If the branch name is not defined in the request, the default branch is - * considered for deploying commits. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteWebhookConfigurationsTest() throws ApiException { + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest = null; + WebhookDeleteResponse response = api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * * @throws ApiException if the Api call fails */ @@ -1193,15 +790,7 @@ public void deployCommitTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and - * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the - * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as - * `connection_identifier` in the API request. + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. * * @throws ApiException if the Api call fails */ @@ -1213,15 +802,7 @@ public void downloadConnectionMetadataChangesTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the - * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. - * #### Usage guidelines In the request body, the GUID or name of the Answer and set - * `file_format`. The default file format is CSV. **NOTE**: * The downloadable file - * returned in API response file is extensionless. Please rename the downloaded file by typing - * in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with - * tables. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, the GUID or name of the Answer and set `file_format`. The default file format is CSV. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * * @throws ApiException if the Api call fails */ @@ -1233,27 +814,7 @@ public void exportAnswerReportTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file - * format. Requires at least view access to the Liveboard. #### Usage guidelines In the request - * body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific - * visualizations, add GUIDs or names of the visualizations. The default `file_format` - * is PDF. For PDF downloads, you can specify additional parameters to customize the page - * orientation and include or exclude the cover page, logo, footer text, and page numbers. - * Similar customization options are also available for PNG output. **NOTE**: The downloadable - * file returned in API response file is extensionless. Please rename the downloaded file by - * typing in the relevant extension. Optionally, you can define [runtime - * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) - * to apply to the Answer data. To include unsaved changes in the report, pass the - * `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes, including ad hoc - * changes to visualizations. For more information, see [Liveboard Report - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). - * **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in - * the PNG format in the resolution of your choice. To enable this on your instance, contact - * ThoughtSpot support. When this feature is enabled, the options - * `include_cover_page`,`include_filter_page` within the - * `png_options` will not be available for PNG exports. + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF or PNG file format. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. The default `file_format` is PDF. For PDF downloads, you can specify additional parameters to customize the page orientation and include or exclude the cover page, logo, footer text, and page numbers. Similar customization options are also available for PNG output. **NOTE**: The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). **NOTE**: Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * * @throws ApiException if the Api call fails */ @@ -1265,30 +826,7 @@ public void exportLiveboardReportTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. Requires - * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata - * object. #### Usage guidelines * You can export one or several objects by passing metadata - * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard - * or Answer object, you can set `export_associated` to `true` to retrieve - * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object - * within the headers. When `export_associated` is set to `true`, consider - * retrieving one metadata object at a time. * Set `export_fqns` to `true` - * to add FQNs of the referenced objects in the TML content. For example, if you send an API - * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML - * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if - * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when - * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the - * referenced objects manually during the import operation. * To export only the TML of - * feedbacks associated with an object, set the GUID of the object as `identifier`, - * and set the `type` as `FEEDBACK` in the `metadata` array. * To - * export the TML of an object along with the feedbacks associated with it, set the GUID of the - * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the - * `metadata` array, and set `export_with_associated_feedbacks` in - * `export_options` to true. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more - * information on feedbacks, see [Feedback - * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). * * @throws ApiException if the Api call fails */ @@ -1300,20 +838,7 @@ public void exportMetadataTMLTest() throws ApiException { } /** - * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) - * representation of metadata objects in JSON or YAML format. ### **Permissions Required** - * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` - * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for - * `USER`, `GROUP`, and `ROLES` metadata types. - - * `batch_offset` Indicates the starting position within the complete dataset from - * which the API should begin returning objects. Useful for paginating results efficiently. - - * `batch_size` Specifies the number of objects or items to retrieve in a single - * request. Helps control response size for better performance. - `edoc_format` - * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - - * `export_dependent` Specifies whether to include dependent metadata objects in the - * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` - * Indicates whether the export operation applies across all organizations. Useful for - * multi-tenant environments where cross-org exports are required. + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. * * @throws ApiException if the Api call fails */ @@ -1325,11 +850,7 @@ public void exportMetadataTMLBatchedTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to - * the saved Answer. The `record_size` attribute determines the number of records to - * retrieve in an API call. For more information about pagination, record size, and maximum row - * limit, see [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). * * @throws ApiException if the Api call fails */ @@ -1341,32 +862,7 @@ public void fetchAnswerDataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. - * Requires at least view access to the Answer object. Upon successful execution, the API - * returns the SQL queries for the specified object as shown in this example: ``` - * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales\", - * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { - * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", - * \"metadata_name\":\"Total sales -test\", - * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" - * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" - * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" - * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_4\\\", \\n CASE\\n WHEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_5\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_3\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" - * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = - * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n - * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` * * @throws ApiException if the Api call fails */ @@ -1378,96 +874,43 @@ public void fetchAnswerSqlQueryTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Gets information about the status of the TML async import task - * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch - * the task details, specify the ID of the TML async import task. Requires access to the task - * ID. The API allows users who initiated the asynchronous TML import via - * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users - * with administration privilege can view the status of all import tasks initiated by the users - * in their Org. #### Usage guidelines See [TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) - * for usage guidelines. + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. * * @throws ApiException if the Api call fails */ @Test public void fetchAsyncImportTaskStatusTest() throws ApiException { FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = null; - GetAsyncImportStatusResponse response = - api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest); + GetAsyncImportStatusResponse response = api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest); // TODO: test validations } /** - * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API - * endpoint retrieves column-level security rules configured for tables. It returns information - * about which columns are secured and which groups have access to those columns. #### Usage - * guidelines - Provide an array of table identifiers using either `identifier` (GUID - * or name) or `obj_identifier` (object ID) - At least one of `identifier` - * or `obj_identifier` must be provided for each table - The API returns column - * security rules for all specified tables - Users must have appropriate permissions to access - * security rules for the specified tables #### Required permissions - - * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can - * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and - * tables #### Example request ```json { \"tables\": [ { - * \"identifier\": \"table-guid\", \"obj_identifier\": - * \"table-object-id\" } ] } ``` #### Response format The API returns - * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` - * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID - * and object ID) - Array of column security rules with column details, group access, and source - * table information #### Example response ```json { \"data\": [ { - * \"guid\": \"table-guid\", \"objId\": - * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { - * \"id\": \"col_123\", \"name\": \"Salary\" }, - * \"groups\": [ { \"id\": \"group_1\", \"name\": - * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": - * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } - * ``` + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` * * @throws ApiException if the Api call fails */ @Test public void fetchColumnSecurityRulesTest() throws ApiException { FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = null; - List response = - api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest); + List response = api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest); // TODO: test validations } /** - * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and - * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the following Data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean - * indicating whether there is any difference between the connection metadata at ThoughtSpot and - * CDW. To get the connection metadata difference status, pass the connection GUID as - * `connection_identifier` in the API request. + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. * * @throws ApiException if the Api call fails */ @Test public void fetchConnectionDiffStatusTest() throws ApiException { String connectionIdentifier = null; - FetchConnectionDiffStatusResponse response = - api.fetchConnectionDiffStatus(connectionIdentifier); + FetchConnectionDiffStatusResponse response = api.fetchConnectionDiffStatus(connectionIdentifier); // TODO: test validations } /** - * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires - * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the - * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or - * names of the visualizations in the API request. To include unsaved changes in the report, - * pass the `transient_pinboard_content` script generated from the - * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon - * successful execution, the API returns the report with unsaved changes. If the new Liveboard - * experience mode, the transient content includes ad hoc changes to visualizations such as - * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard - * data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). * * @throws ApiException if the Api call fails */ @@ -1479,29 +922,7 @@ public void fetchLiveboardDataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and - * its visualizations. Requires at least view access to the Liveboard object. To get SQL query - * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of - * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon - * successful execution, the API returns the SQL queries for the specified object as shown in - * this example: ``` { \"metadata_id\": - * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total - * Sales\", \"metadata_type\": \"LIVEBOARD\", - * \"sql_queries\": [ { \"metadata_id\": - * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total - * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n - * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN - * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END - * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") - * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END - * \\\"ca_3\\\"\\nFROM - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" - * \\\"ta_2\\\"\\n JOIN - * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" - * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = - * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] - * } ``` + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` * * @throws ApiException if the Api call fails */ @@ -1513,17 +934,7 @@ public void fetchLiveboardSqlQueryTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin - * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are - * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You - * can set a custom duration in EPOCH time. Make sure the log duration specified in your API - * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the - * duration and make multiple sequential API requests. Upon successful execution, the API - * returns logs with the following information: * timestamp of the event * event ID * event type - * * name and GUID of the user * IP address of ThoughtSpot instance For more information see - * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). * * @throws ApiException if the Api call fails */ @@ -1535,51 +946,31 @@ public void fetchLogsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Fetches object permission details for a given principal object - * such as a user and group. Requires view access to the metadata object. #### Usage guidelines - * * To get a list of all metadata objects that a user or group can access, specify the - * `type` and GUID or name of the principal. * To get permission details for a - * specific object, add the `type` and GUID or name of the metadata object to your API - * request. Upon successful execution, the API returns a list of metadata objects and permission - * details for each object. + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. * * @throws ApiException if the Api call fails */ @Test public void fetchPermissionsOfPrincipalsTest() throws ApiException { FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = null; - PermissionOfPrincipalsResponse response = - api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest); + PermissionOfPrincipalsResponse response = api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires - * view access to the metadata object. #### Usage guidelines * To fetch a list of users and - * groups for a metadata object, specify `type` and GUID or name of the metadata - * object. * To get permission details for a specific user or group, add `type` and - * GUID or name of the principal object to your API request. Upon successful execution, the API - * returns permission details and principal information for the object specified in the API - * request. + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. * * @throws ApiException if the Api call fails */ @Test public void fetchPermissionsOnMetadataTest() throws ApiException { FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = null; - PermissionOfMetadataResponse response = - api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest); + PermissionOfMetadataResponse response = api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with - * caution as it may invalidate active user sessions and force users to re-login. Make sure you - * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on - * your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -1591,17 +982,7 @@ public void forceLogoutUsersTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Exports a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. - * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines Use this API to download a custom calendar in - * the CSV file format. In your API request, specify the following parameters. * Start and end - * date of the calendar. For \"month offset\" calendars, the start date must match the - * month defined in the `month_offset` attribute. You can also specify optional - * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. * * @throws ApiException if the Api call fails */ @@ -1613,10 +994,7 @@ public void generateCSVTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Retrieves details of the current user session for the token - * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API - * request. The data returned in the API response varies according to user's privilege and - * object access permissions. + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. * * @throws ApiException if the Api call fails */ @@ -1627,12 +1005,7 @@ public void getCurrentUserInfoTest() throws ApiException { } /** - * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer - * token provided in the request header. This API endpoint does not create a new token. Instead, - * it returns details about the token, including the token string, creation time, expiration - * time, and the associated user. Use this endpoint to introspect your current session token, - * debug authentication issues, or when a frontend application needs session token details. Any - * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request * * @throws ApiException if the Api call fails */ @@ -1643,54 +1016,7 @@ public void getCurrentUserTokenTest() throws ApiException { } /** - * 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. * * @throws ApiException if the Api call fails */ @@ -1702,61 +1028,19 @@ public void getCustomAccessTokenTest() throws ApiException { } /** - * Version: 10.13.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @Test public void getDataSourceSuggestionsTest() throws ApiException { GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = null; - EurekaDataSourceSuggestionResponse response = - api.getDataSourceSuggestions(getDataSourceSuggestionsRequest); - // TODO: test validations - } - - /** - * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in - * ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid - * for 5 mins. You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret_key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** in the **Develop** > **Customizations** > **Security Settings** page. - * For more information, see [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). - * **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. + EurekaDataSourceSuggestionResponse response = api.getDataSourceSuggestions(getDataSourceSuggestionsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * * @throws ApiException if the Api call fails */ @@ -1768,34 +1052,7 @@ public void getFullAccessTokenTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific - * metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - * You can generate the token for a user by providing a `username` and - * `password`, or by using the cluster’s `secret key` (for [Trusted - * authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). - * To generate a `secret_key` on your cluster, the administrator must enable **Trusted - * authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, - * define the following attributes: * `auto_create` * `username` * - * `display_name` * `email` * `group_identifiers` Set - * `auto_create` to `True` if the user is not available in ThoughtSpot. If - * the user already exists in ThoughtSpot and the `auto_create` parameter is set to - * `true`, the API call will update user properties like display name, email and group - * assignment. For more information, see [Just-in-time - * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a - * new user and assign privileges, 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 - * is required. #### Important point to note All options in the token creation APIs changing 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. + * Version: 9.0.0.cl or later Gets an authentication token that provides access to a specific metadata object. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** 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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * * @throws ApiException if the Api call fails */ @@ -1807,45 +1064,19 @@ public void getObjectAccessTokenTest() throws ApiException { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### 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. + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @Test public void getRelevantQuestionsTest() throws ApiException { GetRelevantQuestionsRequest getRelevantQuestionsRequest = null; - EurekaGetRelevantQuestionsResponse response = - api.getRelevantQuestions(getRelevantQuestionsRequest); + EurekaGetRelevantQuestionsResponse response = api.getRelevantQuestions(getRelevantQuestionsRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the - * request is successful, the API returns a list configuration settings applied on the cluster. - * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these - * complete configuration settings of the cluster. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * * @throws ApiException if the Api call fails */ @@ -1856,12 +1087,7 @@ public void getSystemConfigTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time - * zone, deployment environment, date format, and date time format of the cluster. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is - * required. This API does not require any parameters to be passed in the request. + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * * @throws ApiException if the Api call fails */ @@ -1872,12 +1098,7 @@ public void getSystemInformationTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application - * settings**) privilege is required. This API does not require any parameters to be passed in - * the request. + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. * * @throws ApiException if the Api call fails */ @@ -1888,28 +1109,7 @@ public void getSystemOverrideInfoTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files - * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines * Import all related objects in a single TML Import API call. For example, Tables - * that use the same Connection object and Worksheets connected to these Tables. * Include the - * `fqn` property to distinguish objects that have the same name. For example, if you - * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection - * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may - * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a - * Table from another with the same name. We recommend [exporting TML with - * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import - * operation. * You can upload multiple TML files at a time. If you import a Worksheet along - * with Liveboards, Answers, and other dependent objects in a single API call, the imported - * objects will be immediately available for use. When you import only a Worksheet object, it - * may take some time for the Worksheet to become available in the ThoughtSpot system. Please - * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly - * imported Worksheet. For more information, see [TML - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). * * @throws ApiException if the Api call fails */ @@ -1921,45 +1121,19 @@ public void importMetadataTMLTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Schedules a task to import - * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this - * API endpoint to process TML objects asynchronously when importing TMLs of large and complex - * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API - * processes TML data in the background and returns a task ID, which can be used to check the - * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API - * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or - * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to - * the TML objects. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following Data control privileges may be required: - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage - * guidelines See [Async TML API - * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) - * for usage guidelines. + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. * * @throws ApiException if the Api call fails */ @Test public void importMetadataTMLAsyncTest() throws ApiException { ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = null; - ImportEPackAsyncTaskStatus response = - api.importMetadataTMLAsync(importMetadataTMLAsyncRequest); + ImportEPackAsyncTaskStatus response = api.importMetadataTMLAsync(importMetadataTMLAsyncRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is - * required. During the import operation: * If the specified group is not available in - * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is - * set to `true`, the groups not specified in the API request, excluding administrator - * and system user groups, are deleted. * If the specified groups are already available in - * ThoughtSpot, the object properties of these groups are modified and synchronized as per the - * input data in the API request. A successful API call returns the object that represents the - * changes made in the ThoughtSpot system. + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. * * @throws ApiException if the Api call fails */ @@ -1971,19 +1145,7 @@ public void importUserGroupsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During - * the user import operation: * If the specified users are not available in ThoughtSpot, the - * users are created and assigned a default password. Defining a `default_password` in - * the API request is optional. * If `delete_unspecified_users` is set to - * `true`, the users not specified in the API request, excluding the - * `tsadmin`, `guest`, `system` and `su` users, are - * deleted. * If the specified user objects are already available in ThoughtSpot, the object - * properties are updated and synchronized as per the input data in the API request. A - * successful API call returns the object that represents the changes made in the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -1995,14 +1157,7 @@ public void importUsersTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic - * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using - * `username` and `password` attributes. On a multi-tenant cluster with - * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org - * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API - * login request with basic authentication (`username` and `password` ) - * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a - * session cookie that can be used in your subsequent API requests. + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. * * @throws ApiException if the Api call fails */ @@ -2014,7 +1169,7 @@ public void loginTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Logs out a user from their current session. + * Version: 9.0.0.cl or later Logs out a user from their current session. * * @throws ApiException if the Api call fails */ @@ -2025,14 +1180,7 @@ public void logoutTest() throws ApiException { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections For a Logical Table the field type must be - * `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName - * For a Connection the field type is always `CONNECTION_PROPERTY`. We use the - * field_name in this case to specify the exact property of a connection which needs to be - * parameterized. + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be parameterized. * * @throws ApiException if the Api call fails */ @@ -2044,11 +1192,7 @@ public void parameterizeMetadataTest() throws ApiException { } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. * * @throws ApiException if the Api call fails */ @@ -2060,24 +1204,19 @@ public void publishMetadataTest() throws ApiException { } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later * * @throws ApiException if the Api call fails */ @Test public void queryGetDecomposedQueryTest() throws ApiException { QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = null; - EurekaDecomposeQueryResponse response = - api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest); + EurekaDecomposeQueryResponse response = api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -2089,13 +1228,7 @@ public void resetUserPasswordTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * * @throws ApiException if the Api call fails */ @@ -2108,12 +1241,7 @@ public void revertCommitTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). * * @throws ApiException if the Api call fails */ @@ -2125,18 +1253,7 @@ public void revokeTokenTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. * * @throws ApiException if the Api call fails */ @@ -2148,11 +1265,7 @@ public void searchCalendarsTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * * @throws ApiException if the Api call fails */ @@ -2164,11 +1277,19 @@ public void searchCommitsTest() throws ApiException { } /** - * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCommunicationChannelPreferencesTest() throws ApiException { + SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest = null; + CommunicationChannelPreferencesResponse response = api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * * @throws ApiException if the Api call fails */ @@ -2180,73 +1301,7 @@ public void searchConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` - * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. - To get a list of all connections available in the ThoughtSpot system, send the - * API request without any attributes in the request body. - To get the connection objects for a - * specific type of data warehouse, specify the type in `data_warehouse_types`. - To - * fetch details of a connection object, specify the connection object GUID or name. The - * `name_pattern` attribute allows passing partial text with `%` for a - * wildcard match. - To get details of the database, schemas, tables, or columns from a data - * connection object, specify `data_warehouse_object_type`. - To get a specific - * database, schema, table, or column from a connection object, define the object type in - * `data_warehouse_object_type` and object properties in the - * `data_warehouse_objects` array. For example, to search for a column, you must pass - * the database, schema, and table names in the API request. Note that in the following example, - * object properties are set in a hierarchical order (`database` > - * `schema` > `table` > `column`). ``` { - * \"connections\": [ { \"identifier\": - * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { - * \"database\": \"NEBULADEV\", \"schema\": - * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", - * \"column\": \"ROLE_NAME\" } ] } ], - * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To - * fetch data by `configuration`, specify `data_warehouse_object_type`. For - * example, to fetch columns from the `DEVELOPMENT` database, specify the - * `data_warehouse_object_type` as `DATABASE` and define the - * `configuration` string as - * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a - * specific table, specify the table, for - * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - * - To query connections by `authentication_type`, specify - * `data_warehouse_object_type`. Supported values for `authentication_type` - * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For - * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and - * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth - * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This - * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: - * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with - * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ - * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data - * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - - * `KEY_PAIR`: For connections that require Key Pair account credentials to - * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that - * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and - * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo - * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External - * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch - * data. This authentication type is supported on Snowflake connections only. - - * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: - * For connections that require OAuth With Service Principal account credentials to authenticate - * to the Cloud Data Warehouse and fetch data. This authentication type is supported on - * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that - * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse - * and fetch data. This authentication type is supported on Databricks connections only. - - * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials - * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is - * supported on Snowflake connections only. - To include more details about connection objects - * in the API response, set `include_details` to `true`. - You can also sort - * the output by field names and filter connections by tags. **NOTE**: When filtering connection - * records by parameters other than `data_warehouse_types` or - * `tag_identifiers`, ensure that you set `record_size` to `-1` - * and `record_offset` to `0` for precise results. + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. * * @throws ApiException if the Api call fails */ @@ -2258,11 +1313,7 @@ public void searchConnectionTest() throws ApiException { } /** - * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires - * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -2274,20 +1325,7 @@ public void searchCustomActionsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least - * view access to the data source object (Worksheet or View). #### Usage guidelines To search - * data, specify the data source GUID in `logical_table_identifier`. The data source - * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the - * `query_string` attribute in the API request as shown in the following example: - * ``` { \"query_string\": \"[sales] by [store]\", - * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } - * ``` For more information about the `query_string` format and data - * source attribute, see [Search data - * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). - * The `record_size` attribute determines the number of records to retrieve in an API - * call. For more information about pagination, record size, and maximum row limit, see - * [Pagination and record size - * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). * * @throws ApiException if the Api call fails */ @@ -2299,53 +1337,19 @@ public void searchDataTest() throws ApiException { } /** - * Version: 10.10.0.cl or later Search the email customization configuration if any set for the - * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * * @throws ApiException if the Api call fails */ @Test public void searchEmailCustomizationTest() throws ApiException { SearchEmailCustomizationRequest searchEmailCustomizationRequest = null; - List response = - api.searchEmailCustomization(searchEmailCustomizationRequest); - // TODO: test validations - } - - /** - * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot - * system. This API endpoint is available to all users who have view access to the object. Users - * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for - * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata - * objects, send the API request without any attributes. - To get metadata objects of a specific - * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as - * `LOGICAL_TABLE`. - To filter metadata objects within type - * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a - * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as - * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To - * customize your search and filter the API response, you can use several parameters. You can - * search for objects created or modified by specific users, by tags applied to the objects, or - * by using the include parameters like `include_auto_created_objects`, - * `include_dependent_objects`, `include_headers`, - * `include_incomplete_objects`, and so on. You can also define sorting options to - * sort the data retrieved in the API response. - To get discoverable objects when linientmodel - * is enabled you can use `include_discoverable_objects` as true else false. Default - * value is true. - For liveboard metadata type, to get the newer format, set the - * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects - * that are published, set the `include_only_published_objects` as true. Default value - * is false. **NOTE**: The following parameters support pagination of metadata records: - - * `tag_identifiers` - `type` - `subtypes` - - * `created_by_user_identifiers` - `modified_by_user_identifiers` - - * `owned_by_user_identifiers` - `exclude_objects` - - * `include_auto_created_objects` - `favorite_object_options` - - * `include_only_published_objects` If you are using other parameters to search - * metadata, set `record_size` to `-1` and `record_offset` to - * `0`. + List response = api.searchEmailCustomization(searchEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * * @throws ApiException if the Api call fails */ @@ -2357,12 +1361,7 @@ public void searchMetadataTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get - * details of a specific Org, specify the Org ID or name. You can also pass parameters such as - * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster - * administration (**Can administer Org**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -2374,12 +1373,7 @@ public void searchOrgsTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available - * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can - * manage roles**) privilege is required. To get details of a specific Role object, specify the - * GUID or name. You can also filter the API response based on user group and Org identifiers, - * privileges assigned to the Role, and deprecation status. + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. * * @throws ApiException if the Api call fails */ @@ -2391,11 +1385,7 @@ public void searchRolesTest() throws ApiException { } /** - * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a - * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the - * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering - * schedules by parameters other than `metadata`, set `record_size` to - * `-1` and `record_offset` to `0` for accurate results. + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. * * @throws ApiException if the Api call fails */ @@ -2407,9 +1397,7 @@ public void searchSchedulesTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To - * get details of a specific tag object, specify the GUID or name. Any authenticated user can - * search for tag objects. + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. * * @throws ApiException if the Api call fails */ @@ -2421,16 +1409,7 @@ public void searchTagsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To - * get details of a specific user group, specify the user group GUID or name. You can also - * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, - * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. - * Available to all users. Users with `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If - * you do not get precise results, try setting `record_size` to `-1` and - * `record_offset` to `0`. + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. * * @throws ApiException if the Api call fails */ @@ -2442,17 +1421,7 @@ public void searchUserGroupsTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get - * details of a specific user, specify the user GUID or name. You can also filter the API - * response based on groups, Org ID, user visibility, account status, user type, and user - * preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. * * @throws ApiException if the Api call fails */ @@ -2464,13 +1433,7 @@ 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 */ @@ -2482,47 +1445,44 @@ public void searchVariablesTest() throws ApiException { } /** - * 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 Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * 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 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) * * @throws ApiException if the Api call fails */ @Test public void sendAgentMessageStreamingTest() throws ApiException { SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = null; - SendAgentMessageResponse response = - api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest); + SendAgentMessageResponse response = api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest); // TODO: test validations } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization 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. + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 */ @@ -2530,21 +1490,12 @@ public void sendAgentMessageStreamingTest() throws ApiException { public void sendMessageTest() throws ApiException { String conversationIdentifier = null; SendMessageRequest sendMessageRequest = null; - List response = - api.sendMessage(conversationIdentifier, sendMessageRequest); + List response = api.sendMessage(conversationIdentifier, sendMessageRequest); // TODO: test validations } /** - * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and - * groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows - * sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers - * * Worksheets * Views * Connections You can provide `READ_ONLY` or - * `MODIFY` access when sharing an object with another user or group. With - * `READ_ONLY` access grants view access to the shared object, whereas - * `MODIFY` provides edit access. To prevent a user or group from accessing the shared - * object, specify the GUID or name of the principal and set `shareMode` to - * `NO_ACCESS`. + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. The API endpoint allows sharing only the following types of metadata objects: * Liveboards * Visualizations * Answers * Worksheets * Views * Connections You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. With `READ_ONLY` access grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. * * @throws ApiException if the Api call fails */ @@ -2556,12 +1507,7 @@ public void shareMetadataTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### 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. + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### 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 */ @@ -2573,8 +1519,7 @@ public void singleAnswerTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or - * Worksheet. Requires edit access to the metadata object. + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. * * @throws ApiException if the Api call fails */ @@ -2586,14 +1531,7 @@ public void unassignTagTest() throws ApiException { } /** - * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows - * removing parameterization from fields in metadata objects in ThoughtSpot. Requires - * appropriate permissions to modify the metadata object. The API endpoint allows - * unparameterizing the following types of metadata objects: * Logical Tables * Connections For - * a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * - * databaseName * schemaName * tableName For a Connection the field type is always - * `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact - * property of a connection which needs to be unparameterized. + * Remove parameterization from fields in metadata objects. Version: 10.9.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection the field type is always `CONNECTION_PROPERTY`. We use the field_name in this case to specify the exact property of a connection which needs to be unparameterized. * * @throws ApiException if the Api call fails */ @@ -2605,13 +1543,7 @@ public void unparameterizeMetadataTest() throws ApiException { } /** - * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * When unpublishing objects, you can: * Include dependencies by setting - * `include_dependencies` to true - this will unpublish all dependent objects if no - * other published object is using them * Force unpublish by setting `force` to true - - * this will break all dependent objects in the unpublished organizations + * Version: 10.9.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations * * @throws ApiException if the Api call fails */ @@ -2623,41 +1555,7 @@ public void unpublishMetadataTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` * * @throws ApiException if the Api call fails */ @@ -2670,51 +1568,7 @@ public void updateCalendarTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified - * tables. This API endpoint allows you to create, update, or delete column-level security rules - * on columns of a table. The operation follows an \"all or none\" policy: if defining - * security rules for any of the provided columns fails, the entire operation will be rolled - * back, and no rules will be created. #### Usage guidelines - Provide table identifier using - * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use - * `clear_csr: true` to remove all column security rules from the table - For each - * column, specify the security rule using `column_security_rules` array - Use - * `is_unsecured: true` to mark a specific column as unprotected - Use - * `group_access` operations to manage group associations: - `ADD`: Add - * groups to the column's access list - `REMOVE`: Remove groups from the - * column's access list - `REPLACE`: Replace all existing groups with the - * specified groups #### Required permissions - `ADMINISTRATION` - Can administer - * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if - * RBAC is enabled) #### Example request ```json { \"identifier\": - * \"table-guid\", \"obj_identifier\": \"table-object-id\", - * \"clear_csr\": false, \"column_security_rules\": [ { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": false, \"group_access\": [ { \"operation\": - * \"ADD\", \"group_identifiers\": [\"hr_group_id\", - * \"hr_group_name\", \"finance_group_id\"] } ] }, { - * \"column_identifier\": \"col id or col name\", - * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col - * name\", \"is_unsecured\": false, \"group_access\": [ { - * \"operation\": \"REPLACE\", \"group_identifiers\": - * [\"management_group_id\", \"management_group_name\"] } ] } ] } - * ``` #### Request Body Schema - `identifier` (string, optional): GUID - * or name of the table for which we want to create column security rules - - * `obj_identifier` (string, optional): The object ID of the table - - * `clear_csr` (boolean, optional): If true, then all the secured columns will be - * marked as unprotected, and all the group associations will be removed - - * `column_security_rules` (array of objects, required): An array where each object - * defines the security rule for a specific column Each column security rule object contains: - - * `column_identifier` (string, required): Column identifier (col_id or name) - - * `is_unsecured` (boolean, optional): If true, the column will be marked as - * unprotected and all groups associated with it will be removed - `group_access` - * (array of objects, optional): Array of group operation objects Each group operation object - * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or - * REPLACE - `group_identifiers` (array of strings, required): Array of group - * identifiers (name or GUID) on which the operation will be performed #### Response This API - * does not return any response body. A successful operation returns HTTP 200 status code. #### - * Operation Types - **ADD**: Adds the specified groups to the column's access list - - * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: - * Replaces all existing groups with the specified groups + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups * * @throws ApiException if the Api call fails */ @@ -2726,11 +1580,7 @@ public void updateColumnSecurityRulesTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * * @throws ApiException if the Api call fails */ @@ -2742,20 +1592,7 @@ public void updateConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed - * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update - * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your - * connection objects. #### Usage guidelines Updates a connection object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. To update a connection object, pass these parameters in - * your API request: 1. GUID of the connection object. 2. If you are updating tables or database - * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, - * and tables in `data_warehouse_config`. b. Set `validate` to - * `true`. 3. If you are updating a configuration attribute, connection name, or - * description, you can set `validate` to `false`. + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. * * @throws ApiException if the Api call fails */ @@ -2767,18 +1604,7 @@ public void updateConnectionTest() throws ApiException { } /** - * Version: 10.12.0.cl or later Updates a connection configuration object. Requires - * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection - * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit - * Connections**) privilege is required. #### Supported operations This API endpoint lets you - * perform the following operations in a single API request: * Edit the name or description of - * the configuration * Edit the configuration properties * Edit the `policy_type` * - * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a - * configuration where `disabled` is `true`, you must reset - * `disabled` to `true` in your update request payload. If not explicitly - * set again, the API will default `disabled` to `false`. + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. * * @throws ApiException if the Api call fails */ @@ -2786,56 +1612,12 @@ public void updateConnectionTest() throws ApiException { public void updateConnectionConfigurationTest() throws ApiException { String configurationIdentifier = null; UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = null; - api.updateConnectionConfiguration( - configurationIdentifier, updateConnectionConfigurationRequest); - // TODO: test validations - } - - /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` - * (**Can manage data**) and edit permissions to the connection object, or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is - * required. To update a connection object, pass these parameters in your API request: 1. GUID - * of the connection object. 2. If you are updating tables or database schema of a connection - * object: a. Add the updated JSON map of metadata with database, schema, and tables in - * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** - * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must - * explicitly provide the authenticationType property in the payload. If you do not specify - * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A - * JSON map of configuration attributes, database details, and table properties in - * `data_warehouse_config` as shown in the following example: ``` { - * \"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\":[ ] } ``` + api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` * * @throws ApiException if the Api call fails */ @@ -2848,15 +1630,7 @@ public void updateConnectionV2Test() throws ApiException { } /** - * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has - * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage - * Guidelines The API allows you to modify the following properties: * Name of the custom action - * * Action availability to groups * Association to metadata objects * Authentication settings - * for a URL-based action For more information, see [Custom - * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). * * @throws ApiException if the Api call fails */ @@ -2869,19 +1643,7 @@ public void updateCustomActionTest() throws ApiException { } /** - * Version: 9.9.0.cl or later Updates a DBT connection object. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or - * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an - * existing DBT connection. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * following data control privileges may be required: - - * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - - * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - - * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update - * DBT connection You can modify DBT connection object properties such as embrace connection - * name, embrace database name, import type, account identifier, access token, project - * identifier and environment (or) embrace connection, embrace database name, import type, - * file_content settings. + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. * * @throws ApiException if the Api call fails */ @@ -2898,48 +1660,12 @@ public void updateDbtConnectionTest() throws ApiException { String dbtEnvId = null; String projectName = null; File fileContent = null; - Object response = - api.updateDbtConnection( - dbtConnectionIdentifier, - connectionName, - databaseName, - importType, - accessToken, - dbtUrl, - accountId, - projectId, - dbtEnvId, - projectName, - fileContent); - // TODO: test validations - } - - /** - * Version: 10.12.0.cl or later Updates a customization configuration for the notification - * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This - * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. - * #### Usage guidelines To update a custom configuration pass these parameters in your API - * request: - A JSON map of configuration attributes `template_properties`. The - * following example shows a sample set of customization configuration: ``` { { - * \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": - * \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", - * \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", - * \"hideProductName\" : false, \"hideFooterPhone\" : false, - * \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, - * \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": - * false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, - * \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, - * \"textTransform\": \"\", \"replacementValueForLiveboard\": - * \"LB dashboard\", \"replacementValueForAnswer\": \"Answer - * dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", - * \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", - * \"footerPhone\":\"(800) 508-7008\", - * \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", - * \"companyWebsiteUrl\":\"\", - * \"companyPrivacyPolicyUrl\":\"\" } } ``` + Object response = api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": false, \"fontFamily\" : \"\", \"hideProductName\" : false, \"hideFooterPhone\" : false, \"hideFooterAddress\" : false, \"hidePrivacyPolicy\" : false, \"hideManageNotification\" : false, \"hideTsVocabularyDefinitions\": false, \"hideNotificationStatus\" : false, \"hideErrorMessage\": false, \"hideUnsubscribeLink\" : false, \"hideModifyAlert\": false, \"textTransform\": \"\", \"replacementValueForLiveboard\": \"LB dashboard\", \"replacementValueForAnswer\": \"Answer dashboard\", \"replacementValueForSpotIQ\": \"SpotIQ dashboard\", \"logoUrl\":\"\", \"productName\":\"ThoughtSpot\", \"footerPhone\":\"(800) 508-7008\", \"footerAddress\":\"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"companyWebsiteUrl\":\"\", \"companyPrivacyPolicyUrl\":\"\" } } ``` * * @throws ApiException if the Api call fails */ @@ -2951,42 +1677,7 @@ public void updateEmailCustomizationTest() throws ApiException { } /** - * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## - * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **headers_update** - **Description:** List of header objects with their - * attributes to be updated. Each object contains a list of attributes to be updated in the - * header. - **Usage:** - You must provide either `identifier` or - * `obj_identifier`, but not both. Both fields cannot be empty. - When - * `org_identifier` is set to `-1`, only the `identifier` value is - * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** - * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this - * field empty assumes that the changes should be applied to the current organization - Provide - * `org_guid` or `org_name` to uniquely identify the organization where - * changes need to be applied. . - Provide `-1` if changes have to be applied across - * all the org. --- ## Note Currently, this API is enabled only for updating the - * `obj_identifier` attribute. Only `text` will be allowed in - * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export - * metadata as a backup before initiating the update process --- ## Examples ### Only - * `identifier` is given ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", - * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only - * `obj_identifier` is given ```json { \"headers_update\": [ - * { \"obj_identifier\": \"custom_object_id\", \"type\": - * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", - * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": - * \"orgName\" } ``` ### Executing update for all org `-1` - * ```json { \"headers_update\": [ { \"identifier\": - * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` - * is not provided ```json { \"headers_update\": [ { - * \"identifier\": \"guid_1\", \"attributes\": [ { - * \"name\": \"obj_id\", \"value\": \"custom_object_id\" - * } ] } ], \"org_identifier\": -1 } ``` + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` * * @throws ApiException if the Api call fails */ @@ -2998,37 +1689,7 @@ public void updateMetadataHeaderTest() throws ApiException { } /** - * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - - * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or - * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC - * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines - * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their - * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use - * `metadata_identifier` with `type` (when needed). - When using - * `metadata_identifier`, the `type` field is required if using a name - * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This - * API is specifically designed for updating object IDs of metadata objects. It internally uses - * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before - * Update:** Always export metadata as a backup before initiating the update process. 2. - * **Validation:** - When using `current_obj_id`, ensure it matches the existing - * object ID exactly. - When using `metadata_identifier` with a name, ensure the - * `type` is specified correctly. - Verify that the `new_obj_id` follows - * your naming conventions and is unique within your system. --- ## Examples ### Using - * current_obj_id ```json { \"metadata\": [ { - * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID - * ```json { \"metadata\": [ { \"metadata_identifier\": - * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": - * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name - * and type ```json { \"metadata\": [ { - * \"metadata_identifier\": \"My Answer\", \"type\": - * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } - * ``` ### Multiple objects update ```json { - * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", - * \"new_obj_id\": \"new_object_id_1\" }, { - * \"metadata_identifier\": \"My Worksheet\", \"type\": - * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } - * ``` + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` * * @throws ApiException if the Api call fails */ @@ -3040,11 +1701,7 @@ public void updateMetadataObjIdTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, - * description, and user associations. Requires cluster administration (**Can administer Org**) - * privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -3057,10 +1714,7 @@ public void updateOrgTest() throws ApiException { } /** - * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage - * roles**) privilege is required. + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -3073,15 +1727,7 @@ public void updateRoleTest() throws ApiException { } /** - * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at - * least edit access to Liveboards. To update a schedule on behalf of another user, you need - * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can - * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API - * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also - * edit the recipients list, frequency of the job, format of the file to send to the recipients - * in email notifications, PDF options, and time zone setting. + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. * * @throws ApiException if the Api call fails */ @@ -3094,12 +1740,7 @@ public void updateScheduleTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send - * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is - * required. + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -3111,12 +1752,7 @@ public void updateSystemConfigTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and - * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and - * delete tags. + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. * * @throws ApiException if the Api call fails */ @@ -3129,13 +1765,7 @@ public void updateTagTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user - * properties such as username, email, and share notification settings. You can also assign new - * groups and Orgs, remove the user from a group or Org, reset password, and modify user - * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) - * privilege is required. + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -3148,15 +1778,7 @@ public void updateUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### - * Supported operations This API endpoint lets you perform the following operations in a single - * API request: * Edit - * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) - * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * - * Assign a default Liveboard or update the existing settings + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings * * @throws ApiException if the Api call fails */ @@ -3169,9 +1791,7 @@ 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 +1804,7 @@ 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 */ @@ -3205,13 +1816,20 @@ public void updateVariableValuesTest() throws ApiException { } /** - * Version: 10.10.0.cl or later Validates the email customization configuration if any set for - * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer - * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is - * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable - * this on your instance. + * 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 privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * * @throws ApiException if the Api call fails */ @@ -3222,14 +1840,7 @@ public void validateEmailCustomizationTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in - * your destination environment. Before merging content from your source branch to the - * destination branch, run this API operation from your destination environment and ensure that - * the changes from the source branch function in the destination environment. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * * @throws ApiException if the Api call fails */ @@ -3241,9 +1852,7 @@ public void validateMergeTest() throws ApiException { } /** - * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. - * If your token is not valid, [Get a new - * token](#/http/api-endpoints/authentication/get-full-access-token). + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). * * @throws ApiException if the Api call fails */ @@ -3253,4 +1862,5 @@ public void validateTokenTest() throws ApiException { TokenValidationResponse response = api.validateToken(validateTokenRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java index 4c4fd804c..fb05de451 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java @@ -9,6 +9,7 @@ import com.thoughtspot.client.model.ChangeUserPasswordRequest; import com.thoughtspot.client.model.CreateUserRequest; import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.ForceLogoutUsersRequest; import com.thoughtspot.client.model.ImportUsersRequest; import com.thoughtspot.client.model.ImportUsersResponse; @@ -17,25 +18,24 @@ import com.thoughtspot.client.model.SearchUsersRequest; import com.thoughtspot.client.model.UpdateUserRequest; import com.thoughtspot.client.model.User; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for UsersApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UsersApi + */ @Disabled public class UsersApiTest { private final UsersApi api = new UsersApi(); /** - * Version: 9.7.0.cl or later Activates a deactivated user account. Requires - * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate - * an inactive user account, the API request body must include the following information: - - * Username or the GUID of the user account. - Auth token generated for the deactivated user. - * The auth token is sent in the API response when a user is deactivated. - Password for the - * user account. + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. * * @throws ApiException if the Api call fails */ @@ -47,10 +47,7 @@ public void activateUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates the current password of the user. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -62,16 +59,7 @@ public void changeUserPasswordTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to - * configure several user properties such as email address, account status, share notification - * preferences, and sharing visibility. You can provision the user to - * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and - * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, - * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for - * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -83,15 +71,7 @@ public void createUserTest() throws ApiException { } /** - * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` - * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a - * user account, the API request body must include the following information: - Username or the - * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is - * successful, ThoughtSpot returns the activation URL in the response. The activation URL is - * valid for 14 days and can be used to re-activate the account and reset the password of the - * deactivated account. + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. * * @throws ApiException if the Api call fails */ @@ -103,14 +83,7 @@ public void deactivateUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove - * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping - * properties of the user object via a POST API call to the - * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) - * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -122,13 +95,7 @@ public void deleteUserTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with - * caution as it may invalidate active user sessions and force users to re-login. Make sure you - * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on - * your cluster become invalid, and the users are forced to re-login. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, - * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -140,19 +107,7 @@ public void forceLogoutUsersTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During - * the user import operation: * If the specified users are not available in ThoughtSpot, the - * users are created and assigned a default password. Defining a `default_password` in - * the API request is optional. * If `delete_unspecified_users` is set to - * `true`, the users not specified in the API request, excluding the - * `tsadmin`, `guest`, `system` and `su` users, are - * deleted. * If the specified user objects are already available in ThoughtSpot, the object - * properties are updated and synchronized as per the input data in the API request. A - * successful API call returns the object that represents the changes made in the ThoughtSpot - * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is - * required. + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -164,11 +119,7 @@ public void importUsersTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -180,17 +131,7 @@ public void resetUserPasswordTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get - * details of a specific user, specify the user GUID or name. You can also filter the API - * response based on groups, Org ID, user visibility, account status, user type, and user - * preference settings and favorites. Available to all users. Users with - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users - * properties. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If - * the API returns an empty list, consider increasing the value of the `record_size` - * parameter. To search across all available users, set `record_size` to - * `-1`. + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. * * @throws ApiException if the Api call fails */ @@ -202,13 +143,7 @@ public void searchUsersTest() throws ApiException { } /** - * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user - * properties such as username, email, and share notification settings. You can also assign new - * groups and Orgs, remove the user from a group or Org, reset password, and modify user - * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. - * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is - * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) - * privilege is required. + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. * * @throws ApiException if the Api call fails */ @@ -219,4 +154,5 @@ public void updateUserTest() throws ApiException { api.updateUser(userIdentifier, updateUserRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java index 18528740a..b9175ae6d 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 @@ -6,32 +6,29 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.SearchVariablesRequest; import com.thoughtspot.client.model.UpdateVariableRequest; import com.thoughtspot.client.model.UpdateVariableValuesRequest; import com.thoughtspot.client.model.Variable; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for VariableApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for VariableApi + */ @Disabled public class VariableApiTest { private final VariableApi api = new VariableApi(); /** - * Create a variable which can be used for parameterizing metadata objects Version: 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 +40,7 @@ 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 +52,7 @@ 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 +64,7 @@ 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 +77,7 @@ 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 */ @@ -110,4 +87,5 @@ public void updateVariableValuesTest() throws ApiException { api.updateVariableValues(updateVariableValuesRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java index c31d7ad12..64d43b087 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java @@ -12,6 +12,7 @@ import com.thoughtspot.client.model.DeleteConfigRequest; import com.thoughtspot.client.model.DeployCommitRequest; import com.thoughtspot.client.model.DeployResponse; +import com.thoughtspot.client.model.ErrorResponse; import com.thoughtspot.client.model.RepoConfigObject; import com.thoughtspot.client.model.RevertCommitRequest; import com.thoughtspot.client.model.RevertResponse; @@ -19,23 +20,24 @@ import com.thoughtspot.client.model.SearchConfigRequest; import com.thoughtspot.client.model.UpdateConfigRequest; import com.thoughtspot.client.model.ValidateMergeRequest; -import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** API tests for VersionControlApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for VersionControlApi + */ @Disabled public class VersionControlApiTest { private final VersionControlApi api = new VersionControlApi(); /** - * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured - * on your instance. Requires at least edit access to objects used in the commit operation. - * Before using this endpoint to push your commits: * Enable Git integration on your instance. * - * Make sure the Git repository and branch details are configured on your instance. For more - * information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * * @throws ApiException if the Api call fails */ @@ -47,22 +49,7 @@ public void commitBranchTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot - * development and production environments to the development and production branches of a Git - * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git - * repository, check the following prerequisites: * You have a Git repository. If you are using - * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to - * GitHub. For information about generating a token, see [GitHub - * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). - * * Your access token has `repo` scope that grants full access to public and private - * repositories. * Your Git repository has a branch that can be configured as a default branch - * in ThoughtSpot. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). - * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * * @throws ApiException if the Api call fails */ @@ -74,11 +61,7 @@ public void createConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * * @throws ApiException if the Api call fails */ @@ -90,12 +73,7 @@ public void deleteConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your - * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy - * operation. The API deploys the head of the branch unless a `commit_id` is specified - * in the API request. If the branch name is not defined in the request, the default branch is - * considered for deploying commits. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * * @throws ApiException if the Api call fails */ @@ -107,13 +85,7 @@ public void deployCommitTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * * @throws ApiException if the Api call fails */ @@ -126,11 +98,7 @@ public void revertCommitTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * * @throws ApiException if the Api call fails */ @@ -142,11 +110,7 @@ public void searchCommitsTest() throws ApiException { } /** - * 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: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * * @throws ApiException if the Api call fails */ @@ -158,11 +122,7 @@ public void searchConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires - * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access - * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on - * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * * @throws ApiException if the Api call fails */ @@ -174,14 +134,7 @@ public void updateConfigTest() throws ApiException { } /** - * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in - * your destination environment. Before merging content from your source branch to the - * destination branch, run this API operation from your destination environment and ensure that - * the changes from the source branch function in the destination environment. Requires - * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) - * privilege and edit access to the metadata objects. + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * * @throws ApiException if the Api call fails */ @@ -191,4 +144,5 @@ public void validateMergeTest() throws ApiException { List response = api.validateMerge(validateMergeRequest); // TODO: test validations } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java new file mode 100644 index 000000000..b30334253 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java @@ -0,0 +1,81 @@ +/* + * 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.ErrorResponse; +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; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for WebhooksApi + */ +@Disabled +public class WebhooksApiTest { + + private final WebhooksApi api = new WebhooksApi(); + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createWebhookConfigurationTest() throws ApiException { + CreateWebhookConfigurationRequest createWebhookConfigurationRequest = null; + WebhookResponse response = api.createWebhookConfiguration(createWebhookConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteWebhookConfigurationsTest() throws ApiException { + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest = null; + WebhookDeleteResponse response = api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchWebhookConfigurationsTest() throws ApiException { + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest = null; + WebhookSearchResponse response = api.searchWebhookConfigurations(searchWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateWebhookConfigurationTest() throws ApiException { + String webhookIdentifier = null; + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest = null; + api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest); + // TODO: test validations + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java index 91d1c6b9b..f4e76a5cd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java @@ -4,27 +4,47 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AIContext */ +/** + * Model tests for AIContext + */ public class AIContextTest { private final AIContext model = new AIContext(); - /** Model tests for AIContext */ + /** + * Model tests for AIContext + */ @Test public void testAIContext() { // TODO: test AIContext } - /** Test the property 'instructions' */ + /** + * Test the property 'instructions' + */ @Test public void instructionsTest() { // TODO: test instructions } - /** Test the property 'content' */ + /** + * Test the property 'content' + */ @Test public void contentTest() { // TODO: test content } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java index b9c493d2d..869ba99da 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for APIKeyInput */ +/** + * Model tests for APIKeyInput + */ public class APIKeyInputTest { private final APIKeyInput model = new APIKeyInput(); - /** Model tests for APIKeyInput */ + /** + * Model tests for APIKeyInput + */ @Test public void testAPIKeyInput() { // TODO: test APIKeyInput } - /** Test the property 'key' */ + /** + * Test the property 'key' + */ @Test public void keyTest() { // TODO: test key } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java index 1763dc712..decf7a60a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for APIKey */ +/** + * Model tests for APIKey + */ public class APIKeyTest { private final APIKey model = new APIKey(); - /** Model tests for APIKey */ + /** + * Model tests for APIKey + */ @Test public void testAPIKey() { // TODO: test APIKey } - /** Test the property 'key' */ + /** + * Test the property 'key' + */ @Test public void keyTest() { // TODO: test key } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java index 8d59cab11..e99e5866a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java @@ -4,51 +4,79 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.OrgInfo; +import com.thoughtspot.client.model.UserInfo; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AccessToken */ +/** + * Model tests for AccessToken + */ public class AccessTokenTest { private final AccessToken model = new AccessToken(); - /** Model tests for AccessToken */ + /** + * Model tests for AccessToken + */ @Test public void testAccessToken() { // TODO: test AccessToken } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'token' */ + /** + * Test the property 'token' + */ @Test public void tokenTest() { // TODO: test token } - /** Test the property 'org' */ + /** + * Test the property 'org' + */ @Test public void orgTest() { // TODO: test org } - /** Test the property 'user' */ + /** + * Test the property 'user' + */ @Test public void userTest() { // TODO: test user } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'expirationTimeInMillis' */ + /** + * Test the property 'expirationTimeInMillis' + */ @Test public void expirationTimeInMillisTest() { // TODO: test expirationTimeInMillis } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java index 12f3f40aa..c1286af3d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActionConfigInputCreate */ +/** + * Model tests for ActionConfigInputCreate + */ public class ActionConfigInputCreateTest { private final ActionConfigInputCreate model = new ActionConfigInputCreate(); - /** Model tests for ActionConfigInputCreate */ + /** + * Model tests for ActionConfigInputCreate + */ @Test public void testActionConfigInputCreate() { // TODO: test ActionConfigInputCreate } - /** Test the property 'position' */ + /** + * Test the property 'position' + */ @Test public void positionTest() { // TODO: test position } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java index eeb1f62cf..c46e2e2b9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActionConfigInput */ +/** + * Model tests for ActionConfigInput + */ public class ActionConfigInputTest { private final ActionConfigInput model = new ActionConfigInput(); - /** Model tests for ActionConfigInput */ + /** + * Model tests for ActionConfigInput + */ @Test public void testActionConfigInput() { // TODO: test ActionConfigInput } - /** Test the property 'position' */ + /** + * Test the property 'position' + */ @Test public void positionTest() { // TODO: test position } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java index c01f68ec2..874a9008d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActionConfig */ +/** + * Model tests for ActionConfig + */ public class ActionConfigTest { private final ActionConfig model = new ActionConfig(); - /** Model tests for ActionConfig */ + /** + * Model tests for ActionConfig + */ @Test public void testActionConfig() { // TODO: test ActionConfig } - /** Test the property 'position' */ + /** + * Test the property 'position' + */ @Test public void positionTest() { // TODO: test position } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java index f96268812..12672e392 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CALLBACKInputMandatory; +import com.thoughtspot.client.model.URLInputMandatory; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActionDetailsInputCreate */ +/** + * Model tests for ActionDetailsInputCreate + */ public class ActionDetailsInputCreateTest { private final ActionDetailsInputCreate model = new ActionDetailsInputCreate(); - /** Model tests for ActionDetailsInputCreate */ + /** + * Model tests for ActionDetailsInputCreate + */ @Test public void testActionDetailsInputCreate() { // TODO: test ActionDetailsInputCreate } - /** Test the property 'CALLBACK' */ + /** + * Test the property 'CALLBACK' + */ @Test public void CALLBACKTest() { // TODO: test CALLBACK } - /** Test the property 'URL' */ + /** + * Test the property 'URL' + */ @Test public void URLTest() { // TODO: test URL } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java index cf2607194..a7a5de97b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CALLBACKInput; +import com.thoughtspot.client.model.URLInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActionDetailsInput */ +/** + * Model tests for ActionDetailsInput + */ public class ActionDetailsInputTest { private final ActionDetailsInput model = new ActionDetailsInput(); - /** Model tests for ActionDetailsInput */ + /** + * Model tests for ActionDetailsInput + */ @Test public void testActionDetailsInput() { // TODO: test ActionDetailsInput } - /** Test the property 'CALLBACK' */ + /** + * Test the property 'CALLBACK' + */ @Test public void CALLBACKTest() { // TODO: test CALLBACK } - /** Test the property 'URL' */ + /** + * Test the property 'URL' + */ @Test public void URLTest() { // TODO: test URL } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java index f5d7bcb77..349c17e38 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CALLBACK; +import com.thoughtspot.client.model.URL; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActionDetails */ +/** + * Model tests for ActionDetails + */ public class ActionDetailsTest { private final ActionDetails model = new ActionDetails(); - /** Model tests for ActionDetails */ + /** + * Model tests for ActionDetails + */ @Test public void testActionDetails() { // TODO: test ActionDetails } - /** Test the property 'callback' */ + /** + * Test the property 'callback' + */ @Test public void callbackTest() { // TODO: test callback } - /** Test the property 'url' */ + /** + * Test the property 'url' + */ @Test public void urlTest() { // TODO: test url } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java index 39f242168..2e233e4e1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java @@ -4,39 +4,60 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ActivateUserRequest */ +/** + * Model tests for ActivateUserRequest + */ public class ActivateUserRequestTest { private final ActivateUserRequest model = new ActivateUserRequest(); - /** Model tests for ActivateUserRequest */ + /** + * Model tests for ActivateUserRequest + */ @Test public void testActivateUserRequest() { // TODO: test ActivateUserRequest } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } - /** Test the property 'authToken' */ + /** + * Test the property 'authToken' + */ @Test public void authTokenTest() { // TODO: test authToken } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'properties' */ + /** + * Test the property 'properties' + */ @Test public void propertiesTest() { // TODO: test properties } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java index 6fc8af4a6..e7331861b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AgentConversation */ +/** + * Model tests for AgentConversation + */ public class AgentConversationTest { private final AgentConversation model = new AgentConversation(); - /** Model tests for AgentConversation */ + /** + * Model tests for AgentConversation + */ @Test public void testAgentConversation() { // TODO: test AgentConversation } - /** Test the property 'conversationId' */ + /** + * Test the property 'conversationId' + */ @Test public void conversationIdTest() { // TODO: test conversationId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java index 55f0bc2aa..b42b2f600 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java @@ -4,57 +4,86 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AnswerContent */ +/** + * Model tests for AnswerContent + */ public class AnswerContentTest { private final AnswerContent model = new AnswerContent(); - /** Model tests for AnswerContent */ + /** + * Model tests for AnswerContent + */ @Test public void testAnswerContent() { // TODO: test AnswerContent } - /** Test the property 'availableDataRowCount' */ + /** + * Test the property 'availableDataRowCount' + */ @Test public void availableDataRowCountTest() { // TODO: test availableDataRowCount } - /** Test the property 'columnNames' */ + /** + * Test the property 'columnNames' + */ @Test public void columnNamesTest() { // TODO: test columnNames } - /** Test the property 'dataRows' */ + /** + * Test the property 'dataRows' + */ @Test public void dataRowsTest() { // TODO: test dataRows } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'returnedDataRowCount' */ + /** + * Test the property 'returnedDataRowCount' + */ @Test public void returnedDataRowCountTest() { // TODO: test returnedDataRowCount } - /** Test the property 'samplingRatio' */ + /** + * Test the property 'samplingRatio' + */ @Test public void samplingRatioTest() { // TODO: test samplingRatio } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContextInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContextInputTest.java index b156e328b..4358b9af9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContextInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContextInputTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AnswerContextInput */ +/** + * Model tests for AnswerContextInput + */ public class AnswerContextInputTest { private final AnswerContextInput model = new AnswerContextInput(); - /** Model tests for AnswerContextInput */ + /** + * Model tests for AnswerContextInput + */ @Test public void testAnswerContextInput() { // TODO: test AnswerContextInput } - /** Test the property 'sessionIdentifier' */ + /** + * Test the property 'sessionIdentifier' + */ @Test public void sessionIdentifierTest() { // TODO: test sessionIdentifier } - /** Test the property 'generationNumber' */ + /** + * Test the property 'generationNumber' + */ @Test public void generationNumberTest() { // TODO: test generationNumber } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java index 979133b9d..e8932dc6d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java @@ -4,33 +4,55 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AnswerContent; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AnswerDataResponse */ +/** + * Model tests for AnswerDataResponse + */ public class AnswerDataResponseTest { private final AnswerDataResponse model = new AnswerDataResponse(); - /** Model tests for AnswerDataResponse */ + /** + * Model tests for AnswerDataResponse + */ @Test public void testAnswerDataResponse() { // TODO: test AnswerDataResponse } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'contents' */ + /** + * Test the property 'contents' + */ @Test public void contentsTest() { // TODO: test contents } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java index ec7f6a722..a2445c43d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java @@ -4,33 +4,55 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorMetadataTypeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AssignChangeAuthorRequest */ +/** + * Model tests for AssignChangeAuthorRequest + */ public class AssignChangeAuthorRequestTest { private final AssignChangeAuthorRequest model = new AssignChangeAuthorRequest(); - /** Model tests for AssignChangeAuthorRequest */ + /** + * Model tests for AssignChangeAuthorRequest + */ @Test public void testAssignChangeAuthorRequest() { // TODO: test AssignChangeAuthorRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } - /** Test the property 'currentOwnerIdentifier' */ + /** + * Test the property 'currentOwnerIdentifier' + */ @Test public void currentOwnerIdentifierTest() { // TODO: test currentOwnerIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java index 678e2f46f..87b776eea 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java @@ -4,27 +4,47 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.TagMetadataTypeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AssignTagRequest */ +/** + * Model tests for AssignTagRequest + */ public class AssignTagRequestTest { private final AssignTagRequest model = new AssignTagRequest(); - /** Model tests for AssignTagRequest */ + /** + * Model tests for AssignTagRequest + */ @Test public void testAssignTagRequest() { // TODO: test AssignTagRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'tagIdentifiers' */ + /** + * Test the property 'tagIdentifiers' + */ @Test public void tagIdentifiersTest() { // TODO: test tagIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java index 647512716..5ebda229c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java @@ -4,33 +4,54 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionConfigInputCreate; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AssociateMetadataInputCreate */ +/** + * Model tests for AssociateMetadataInputCreate + */ public class AssociateMetadataInputCreateTest { private final AssociateMetadataInputCreate model = new AssociateMetadataInputCreate(); - /** Model tests for AssociateMetadataInputCreate */ + /** + * Model tests for AssociateMetadataInputCreate + */ @Test public void testAssociateMetadataInputCreate() { // TODO: test AssociateMetadataInputCreate } - /** Test the property 'actionConfig' */ + /** + * Test the property 'actionConfig' + */ @Test public void actionConfigTest() { // TODO: test actionConfig } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java index c55d611c6..e9c845833 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java @@ -4,33 +4,54 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionConfigInput; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AssociateMetadataInput */ +/** + * Model tests for AssociateMetadataInput + */ public class AssociateMetadataInputTest { private final AssociateMetadataInput model = new AssociateMetadataInput(); - /** Model tests for AssociateMetadataInput */ + /** + * Model tests for AssociateMetadataInput + */ @Test public void testAssociateMetadataInput() { // TODO: test AssociateMetadataInput } - /** Test the property 'actionConfig' */ + /** + * Test the property 'actionConfig' + */ @Test public void actionConfigTest() { // TODO: test actionConfig } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java index 23f4bb251..3091ec2c2 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.APIKeyInput; +import com.thoughtspot.client.model.BasicAuthInput; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AuthenticationInput */ +/** + * Model tests for AuthenticationInput + */ public class AuthenticationInputTest { private final AuthenticationInput model = new AuthenticationInput(); - /** Model tests for AuthenticationInput */ + /** + * Model tests for AuthenticationInput + */ @Test public void testAuthenticationInput() { // TODO: test AuthenticationInput } - /** Test the property 'apIKey' */ + /** + * Test the property 'apIKey' + */ @Test public void apIKeyTest() { // TODO: test apIKey } - /** Test the property 'basicAuth' */ + /** + * Test the property 'basicAuth' + */ @Test public void basicAuthTest() { // TODO: test basicAuth } - /** Test the property 'bearerToken' */ + /** + * Test the property 'bearerToken' + */ @Test public void bearerTokenTest() { // TODO: test bearerToken } - /** Test the property 'noAuth' */ + /** + * Test the property 'noAuth' + */ @Test public void noAuthTest() { // TODO: test noAuth } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java index e84b3f56d..d17a9cabe 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.APIKey; +import com.thoughtspot.client.model.BasicAuth; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Authentication */ +/** + * Model tests for Authentication + */ public class AuthenticationTest { private final Authentication model = new Authentication(); - /** Model tests for Authentication */ + /** + * Model tests for Authentication + */ @Test public void testAuthentication() { // TODO: test Authentication } - /** Test the property 'apIKey' */ + /** + * Test the property 'apIKey' + */ @Test public void apIKeyTest() { // TODO: test apIKey } - /** Test the property 'basicAuth' */ + /** + * Test the property 'basicAuth' + */ @Test public void basicAuthTest() { // TODO: test basicAuth } - /** Test the property 'bearerToken' */ + /** + * Test the property 'bearerToken' + */ @Test public void bearerTokenTest() { // TODO: test bearerToken } - /** Test the property 'noAuth' */ + /** + * Test the property 'noAuth' + */ @Test public void noAuthTest() { // TODO: test noAuth } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java index bc936bf54..0d35cc9e3 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AuthorMetadataTypeInput */ +/** + * Model tests for AuthorMetadataTypeInput + */ public class AuthorMetadataTypeInputTest { private final AuthorMetadataTypeInput model = new AuthorMetadataTypeInput(); - /** Model tests for AuthorMetadataTypeInput */ + /** + * Model tests for AuthorMetadataTypeInput + */ @Test public void testAuthorMetadataTypeInput() { // TODO: test AuthorMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java index 3ed91ca5f..9b2104b8c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Author */ +/** + * Model tests for Author + */ public class AuthorTest { private final Author model = new Author(); - /** Model tests for Author */ + /** + * Model tests for Author + */ @Test public void testAuthor() { // TODO: test Author } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java index c0e1d74d3..f1ac96e04 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for AuthorType */ +/** + * Model tests for AuthorType + */ public class AuthorTypeTest { private final AuthorType model = new AuthorType(); - /** Model tests for AuthorType */ + /** + * Model tests for AuthorType + */ @Test public void testAuthorType() { // TODO: test AuthorType } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java index f50864339..8fc05edea 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for BasicAuthInput */ +/** + * Model tests for BasicAuthInput + */ public class BasicAuthInputTest { private final BasicAuthInput model = new BasicAuthInput(); - /** Model tests for BasicAuthInput */ + /** + * Model tests for BasicAuthInput + */ @Test public void testBasicAuthInput() { // TODO: test BasicAuthInput } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java index 0fa5a390c..51c009b95 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for BasicAuth */ +/** + * Model tests for BasicAuth + */ public class BasicAuthTest { private final BasicAuth model = new BasicAuth(); - /** Model tests for BasicAuth */ + /** + * Model tests for BasicAuth + */ @Test public void testBasicAuth() { // TODO: test BasicAuth } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java index 941a5379e..91d6f9451 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CALLBACKInputMandatory */ +/** + * Model tests for CALLBACKInputMandatory + */ public class CALLBACKInputMandatoryTest { private final CALLBACKInputMandatory model = new CALLBACKInputMandatory(); - /** Model tests for CALLBACKInputMandatory */ + /** + * Model tests for CALLBACKInputMandatory + */ @Test public void testCALLBACKInputMandatory() { // TODO: test CALLBACKInputMandatory } - /** Test the property 'reference' */ + /** + * Test the property 'reference' + */ @Test public void referenceTest() { // TODO: test reference } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java index 03b57974b..3217ba58b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CALLBACKInput */ +/** + * Model tests for CALLBACKInput + */ public class CALLBACKInputTest { private final CALLBACKInput model = new CALLBACKInput(); - /** Model tests for CALLBACKInput */ + /** + * Model tests for CALLBACKInput + */ @Test public void testCALLBACKInput() { // TODO: test CALLBACKInput } - /** Test the property 'reference' */ + /** + * Test the property 'reference' + */ @Test public void referenceTest() { // TODO: test reference } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java index 7f0071acc..aea07a427 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CALLBACK */ +/** + * Model tests for CALLBACK + */ public class CALLBACKTest { private final CALLBACK model = new CALLBACK(); - /** Model tests for CALLBACK */ + /** + * Model tests for CALLBACK + */ @Test public void testCALLBACK() { // TODO: test CALLBACK } - /** Test the property 'reference' */ + /** + * Test the property 'reference' + */ @Test public void referenceTest() { // TODO: test reference } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java index 3b96fbf22..cbdcf9553 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java @@ -4,57 +4,85 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CalendarResponse */ +/** + * Model tests for CalendarResponse + */ public class CalendarResponseTest { private final CalendarResponse model = new CalendarResponse(); - /** Model tests for CalendarResponse */ + /** + * Model tests for CalendarResponse + */ @Test public void testCalendarResponse() { // TODO: test CalendarResponse } - /** Test the property 'calendarName' */ + /** + * Test the property 'calendarName' + */ @Test public void calendarNameTest() { // TODO: test calendarName } - /** Test the property 'connectionName' */ + /** + * Test the property 'connectionName' + */ @Test public void connectionNameTest() { // TODO: test connectionName } - /** Test the property 'dataWarehouseType' */ + /** + * Test the property 'dataWarehouseType' + */ @Test public void dataWarehouseTypeTest() { // TODO: test dataWarehouseType } - /** Test the property 'modificationTimeInMillis' */ + /** + * Test the property 'modificationTimeInMillis' + */ @Test public void modificationTimeInMillisTest() { // TODO: test modificationTimeInMillis } - /** Test the property 'authorName' */ + /** + * Test the property 'authorName' + */ @Test public void authorNameTest() { // TODO: test authorName } - /** Test the property 'connectionId' */ + /** + * Test the property 'connectionId' + */ @Test public void connectionIdTest() { // TODO: test connectionId } - /** Test the property 'calendarId' */ + /** + * Test the property 'calendarId' + */ @Test public void calendarIdTest() { // TODO: test calendarId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java index 8609b6a35..b603efb5d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ChangeUserPasswordRequest */ +/** + * Model tests for ChangeUserPasswordRequest + */ public class ChangeUserPasswordRequestTest { private final ChangeUserPasswordRequest model = new ChangeUserPasswordRequest(); - /** Model tests for ChangeUserPasswordRequest */ + /** + * Model tests for ChangeUserPasswordRequest + */ @Test public void testChangeUserPasswordRequest() { // TODO: test ChangeUserPasswordRequest } - /** Test the property 'currentPassword' */ + /** + * Test the property 'currentPassword' + */ @Test public void currentPasswordTest() { // TODO: test currentPassword } - /** Test the property 'newPassword' */ + /** + * Test the property 'newPassword' + */ @Test public void newPasswordTest() { // TODO: test newPassword } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java index f1c66b528..23e1d22b8 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleColumn */ +/** + * Model tests for ColumnSecurityRuleColumn + */ public class ColumnSecurityRuleColumnTest { private final ColumnSecurityRuleColumn model = new ColumnSecurityRuleColumn(); - /** Model tests for ColumnSecurityRuleColumn */ + /** + * Model tests for ColumnSecurityRuleColumn + */ @Test public void testColumnSecurityRuleColumn() { // TODO: test ColumnSecurityRuleColumn } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java index 4dc95df88..8db9cf6b9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleGroupOperation */ +/** + * Model tests for ColumnSecurityRuleGroupOperation + */ public class ColumnSecurityRuleGroupOperationTest { private final ColumnSecurityRuleGroupOperation model = new ColumnSecurityRuleGroupOperation(); - /** Model tests for ColumnSecurityRuleGroupOperation */ + /** + * Model tests for ColumnSecurityRuleGroupOperation + */ @Test public void testColumnSecurityRuleGroupOperation() { // TODO: test ColumnSecurityRuleGroupOperation } - /** Test the property 'operation' */ + /** + * Test the property 'operation' + */ @Test public void operationTest() { // TODO: test operation } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java index 930a225e3..aa9c0ece1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleGroup */ +/** + * Model tests for ColumnSecurityRuleGroup + */ public class ColumnSecurityRuleGroupTest { private final ColumnSecurityRuleGroup model = new ColumnSecurityRuleGroup(); - /** Model tests for ColumnSecurityRuleGroup */ + /** + * Model tests for ColumnSecurityRuleGroup + */ @Test public void testColumnSecurityRuleGroup() { // TODO: test ColumnSecurityRuleGroup } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java index 60300674e..866fa026b 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 @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRule; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleResponse */ +/** + * Model tests for ColumnSecurityRuleResponse + */ public class ColumnSecurityRuleResponseTest { private final ColumnSecurityRuleResponse model = new ColumnSecurityRuleResponse(); - /** Model tests for ColumnSecurityRuleResponse */ + /** + * Model tests for ColumnSecurityRuleResponse + */ @Test 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' */ + /** + * Test the property 'objId' + */ @Test public void objIdTest() { // TODO: test objId } - /** Test the property 'columnSecurityRules' */ + /** + * Test the property 'columnSecurityRules' + */ @Test public void columnSecurityRulesTest() { // TODO: test columnSecurityRules } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java index b10953354..ce26eede6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleSourceTable */ +/** + * Model tests for ColumnSecurityRuleSourceTable + */ public class ColumnSecurityRuleSourceTableTest { private final ColumnSecurityRuleSourceTable model = new ColumnSecurityRuleSourceTable(); - /** Model tests for ColumnSecurityRuleSourceTable */ + /** + * Model tests for ColumnSecurityRuleSourceTable + */ @Test public void testColumnSecurityRuleSourceTable() { // TODO: test ColumnSecurityRuleSourceTable } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java index efaf08449..4d6e828c0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleTableInput */ +/** + * Model tests for ColumnSecurityRuleTableInput + */ public class ColumnSecurityRuleTableInputTest { private final ColumnSecurityRuleTableInput model = new ColumnSecurityRuleTableInput(); - /** Model tests for ColumnSecurityRuleTableInput */ + /** + * Model tests for ColumnSecurityRuleTableInput + */ @Test public void testColumnSecurityRuleTableInput() { // TODO: test ColumnSecurityRuleTableInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'objIdentifier' */ + /** + * Test the property 'objIdentifier' + */ @Test public void objIdentifierTest() { // TODO: test objIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java index 1af11b541..015e16060 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java @@ -4,33 +4,58 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleColumn; +import com.thoughtspot.client.model.ColumnSecurityRuleGroup; +import com.thoughtspot.client.model.ColumnSecurityRuleSourceTable; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRule */ +/** + * Model tests for ColumnSecurityRule + */ public class ColumnSecurityRuleTest { private final ColumnSecurityRule model = new ColumnSecurityRule(); - /** Model tests for ColumnSecurityRule */ + /** + * Model tests for ColumnSecurityRule + */ @Test public void testColumnSecurityRule() { // TODO: test ColumnSecurityRule } - /** Test the property 'column' */ + /** + * Test the property 'column' + */ @Test public void columnTest() { // TODO: test column } - /** Test the property 'groups' */ + /** + * Test the property 'groups' + */ @Test public void groupsTest() { // TODO: test groups } - /** Test the property 'sourceTableDetails' */ + /** + * Test the property 'sourceTableDetails' + */ @Test public void sourceTableDetailsTest() { // TODO: test sourceTableDetails } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java index d27a2b59f..8c370018f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleGroupOperation; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ColumnSecurityRuleUpdate */ +/** + * Model tests for ColumnSecurityRuleUpdate + */ public class ColumnSecurityRuleUpdateTest { private final ColumnSecurityRuleUpdate model = new ColumnSecurityRuleUpdate(); - /** Model tests for ColumnSecurityRuleUpdate */ + /** + * Model tests for ColumnSecurityRuleUpdate + */ @Test public void testColumnSecurityRuleUpdate() { // TODO: test ColumnSecurityRuleUpdate } - /** Test the property 'columnIdentifier' */ + /** + * Test the property 'columnIdentifier' + */ @Test public void columnIdentifierTest() { // TODO: test columnIdentifier } - /** Test the property 'isUnsecured' */ + /** + * Test the property 'isUnsecured' + */ @Test public void isUnsecuredTest() { // TODO: test isUnsecured } - /** Test the property 'groupAccess' */ + /** + * Test the property 'groupAccess' + */ @Test public void groupAccessTest() { // TODO: test groupAccess } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java index 0a949d2bc..7d9500581 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java @@ -4,51 +4,77 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Column */ +/** + * Model tests for Column + */ public class ColumnTest { private final Column model = new Column(); - /** Model tests for Column */ + /** + * Model tests for Column + */ @Test public void testColumn() { // TODO: test Column } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'dataType' */ + /** + * Test the property 'dataType' + */ @Test public void dataTypeTest() { // TODO: test dataType } - /** Test the property 'isAggregate' */ + /** + * Test the property 'isAggregate' + */ @Test public void isAggregateTest() { // TODO: test isAggregate } - /** Test the property 'canImport' */ + /** + * Test the property 'canImport' + */ @Test public void canImportTest() { // TODO: test canImport } - /** Test the property 'selected' */ + /** + * Test the property 'selected' + */ @Test public void selectedTest() { // TODO: test selected } - /** Test the property 'isLinkedActive' */ + /** + * Test the property 'isLinkedActive' + */ @Test public void isLinkedActiveTest() { // TODO: test isLinkedActive } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java index ac9858e78..efe8faacf 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.MetadataObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CommitBranchRequest */ +/** + * Model tests for CommitBranchRequest + */ public class CommitBranchRequestTest { private final CommitBranchRequest model = new CommitBranchRequest(); - /** Model tests for CommitBranchRequest */ + /** + * Model tests for CommitBranchRequest + */ @Test public void testCommitBranchRequest() { // TODO: test CommitBranchRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'deleteAware' */ + /** + * Test the property 'deleteAware' + */ @Test public void deleteAwareTest() { // TODO: test deleteAware } - /** Test the property 'branchName' */ + /** + * Test the property 'branchName' + */ @Test public void branchNameTest() { // TODO: test branchName } - /** Test the property 'comment' */ + /** + * Test the property 'comment' + */ @Test public void commentTest() { // TODO: test comment } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java index 6ac2db6b2..e5f4dfc9e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CommitFileType */ +/** + * Model tests for CommitFileType + */ public class CommitFileTypeTest { private final CommitFileType model = new CommitFileType(); - /** Model tests for CommitFileType */ + /** + * Model tests for CommitFileType + */ @Test public void testCommitFileType() { // TODO: test CommitFileType } - /** Test the property 'fileName' */ + /** + * Test the property 'fileName' + */ @Test public void fileNameTest() { // TODO: test fileName } - /** Test the property 'statusCode' */ + /** + * Test the property 'statusCode' + */ @Test public void statusCodeTest() { // TODO: test statusCode } - /** Test the property 'statusMessage' */ + /** + * Test the property 'statusMessage' + */ @Test public void statusMessageTest() { // TODO: test statusMessage } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java index 7f1cf0050..fd4a9fe48 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java @@ -4,51 +4,78 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorType; +import com.thoughtspot.client.model.CommiterType; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CommitHistoryResponse */ +/** + * Model tests for CommitHistoryResponse + */ public class CommitHistoryResponseTest { private final CommitHistoryResponse model = new CommitHistoryResponse(); - /** Model tests for CommitHistoryResponse */ + /** + * Model tests for CommitHistoryResponse + */ @Test public void testCommitHistoryResponse() { // TODO: test CommitHistoryResponse } - /** Test the property 'committer' */ + /** + * Test the property 'committer' + */ @Test public void committerTest() { // TODO: test committer } - /** Test the property 'author' */ + /** + * Test the property 'author' + */ @Test public void authorTest() { // TODO: test author } - /** Test the property 'comment' */ + /** + * Test the property 'comment' + */ @Test public void commentTest() { // TODO: test comment } - /** Test the property 'commitTime' */ + /** + * Test the property 'commitTime' + */ @Test public void commitTimeTest() { // TODO: test commitTime } - /** Test the property 'commitId' */ + /** + * Test the property 'commitId' + */ @Test public void commitIdTest() { // TODO: test commitId } - /** Test the property 'branch' */ + /** + * Test the property 'branch' + */ @Test public void branchTest() { // TODO: test branch } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java index 23e3bf399..6389f566f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java @@ -4,57 +4,90 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorType; +import com.thoughtspot.client.model.CommitFileType; +import com.thoughtspot.client.model.CommiterType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CommitResponse */ +/** + * Model tests for CommitResponse + */ public class CommitResponseTest { private final CommitResponse model = new CommitResponse(); - /** Model tests for CommitResponse */ + /** + * Model tests for CommitResponse + */ @Test public void testCommitResponse() { // TODO: test CommitResponse } - /** Test the property 'committer' */ + /** + * Test the property 'committer' + */ @Test public void committerTest() { // TODO: test committer } - /** Test the property 'author' */ + /** + * Test the property 'author' + */ @Test public void authorTest() { // TODO: test author } - /** Test the property 'comment' */ + /** + * Test the property 'comment' + */ @Test public void commentTest() { // TODO: test comment } - /** Test the property 'commitTime' */ + /** + * Test the property 'commitTime' + */ @Test public void commitTimeTest() { // TODO: test commitTime } - /** Test the property 'commitId' */ + /** + * Test the property 'commitId' + */ @Test public void commitIdTest() { // TODO: test commitId } - /** Test the property 'branch' */ + /** + * Test the property 'branch' + */ @Test public void branchTest() { // TODO: test branch } - /** Test the property 'committedFiles' */ + /** + * Test the property 'committedFiles' + */ @Test public void committedFilesTest() { // TODO: test committedFiles } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java index c3ba217d2..368793472 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CommiterType */ +/** + * Model tests for CommiterType + */ public class CommiterTypeTest { private final CommiterType model = new CommiterType(); - /** Model tests for CommiterType */ + /** + * Model tests for CommiterType + */ @Test public void testCommiterType() { // TODO: test CommiterType } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java new file mode 100644 index 000000000..3e98fbb08 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java @@ -0,0 +1,52 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfig; +import com.thoughtspot.client.model.OrgChannelConfigResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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..79783ee60 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequestTest.java @@ -0,0 +1,51 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfigInput; +import com.thoughtspot.client.model.OrgChannelConfigInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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/ConnectionConfigurationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java index b44ea39a3..3bb9cb926 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java @@ -4,69 +4,104 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserPrincipal; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ConnectionConfigurationResponse */ +/** + * Model tests for ConnectionConfigurationResponse + */ public class ConnectionConfigurationResponseTest { private final ConnectionConfigurationResponse model = new ConnectionConfigurationResponse(); - /** Model tests for ConnectionConfigurationResponse */ + /** + * Model tests for ConnectionConfigurationResponse + */ @Test public void testConnectionConfigurationResponse() { // TODO: test ConnectionConfigurationResponse } - /** Test the property 'configurationIdentifier' */ + /** + * Test the property 'configurationIdentifier' + */ @Test public void configurationIdentifierTest() { // TODO: test configurationIdentifier } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property '_configuration' */ + /** + * Test the property '_configuration' + */ @Test public void _configurationTest() { // TODO: test _configuration } - /** Test the property 'policyPrincipals' */ + /** + * Test the property 'policyPrincipals' + */ @Test public void policyPrincipalsTest() { // TODO: test policyPrincipals } - /** Test the property 'policyProcesses' */ + /** + * Test the property 'policyProcesses' + */ @Test public void policyProcessesTest() { // TODO: test policyProcesses } - /** Test the property 'disabled' */ + /** + * Test the property 'disabled' + */ @Test public void disabledTest() { // TODO: test disabled } - /** Test the property 'dataWarehouseType' */ + /** + * Test the property 'dataWarehouseType' + */ @Test public void dataWarehouseTypeTest() { // TODO: test dataWarehouseType } - /** Test the property 'policyType' */ + /** + * Test the property 'policyType' + */ @Test public void policyTypeTest() { // TODO: test policyType } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java index ff0245fa2..1d6619d00 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java @@ -4,34 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ConnectionConfigurationSearchRequest */ +/** + * Model tests for ConnectionConfigurationSearchRequest + */ public class ConnectionConfigurationSearchRequestTest { - private final ConnectionConfigurationSearchRequest model = - new ConnectionConfigurationSearchRequest(); + private final ConnectionConfigurationSearchRequest model = new ConnectionConfigurationSearchRequest(); - /** Model tests for ConnectionConfigurationSearchRequest */ + /** + * Model tests for ConnectionConfigurationSearchRequest + */ @Test public void testConnectionConfigurationSearchRequest() { // TODO: test ConnectionConfigurationSearchRequest } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } - /** Test the property 'configurationIdentifier' */ + /** + * Test the property 'configurationIdentifier' + */ @Test public void configurationIdentifierTest() { // TODO: test configurationIdentifier } - /** Test the property 'policyType' */ + /** + * Test the property 'policyType' + */ @Test public void policyTypeTest() { // TODO: test policyType } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java index 3601a9b50..0e432be0d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DataWarehouseObjectInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ConnectionInput */ +/** + * Model tests for ConnectionInput + */ public class ConnectionInputTest { private final ConnectionInput model = new ConnectionInput(); - /** Model tests for ConnectionInput */ + /** + * Model tests for ConnectionInput + */ @Test public void testConnectionInput() { // TODO: test ConnectionInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'dataWarehouseObjects' */ + /** + * Test the property 'dataWarehouseObjects' + */ @Test public void dataWarehouseObjectsTest() { // TODO: test dataWarehouseObjects } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java index 5d9fc1443..eb7183d49 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AnswerContextInput; +import com.thoughtspot.client.model.DataSourceContextInput; +import com.thoughtspot.client.model.LBContextInput; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ContextPayloadV2Input */ +/** + * Model tests for ContextPayloadV2Input + */ public class ContextPayloadV2InputTest { private final ContextPayloadV2Input model = new ContextPayloadV2Input(); - /** Model tests for ContextPayloadV2Input */ + /** + * Model tests for ContextPayloadV2Input + */ @Test public void testContextPayloadV2Input() { // TODO: test ContextPayloadV2Input } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'answerContext' */ + /** + * Test the property 'answerContext' + */ @Test public void answerContextTest() { // TODO: test answerContext } - /** Test the property 'liveboardContext' */ + /** + * Test the property 'liveboardContext' + */ @Test public void liveboardContextTest() { // TODO: test liveboardContext } - /** Test the property 'dataSourceContext' */ + /** + * Test the property 'dataSourceContext' + */ @Test public void dataSourceContextTest() { // TODO: test dataSourceContext } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java index 1b23e0a90..1faa775a9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ConversationSettingsInput */ +/** + * Model tests for ConversationSettingsInput + */ public class ConversationSettingsInputTest { private final ConversationSettingsInput model = new ConversationSettingsInput(); - /** Model tests for ConversationSettingsInput */ + /** + * Model tests for ConversationSettingsInput + */ @Test public void testConversationSettingsInput() { // TODO: test ConversationSettingsInput } - /** Test the property 'enableContextualChangeAnalysis' */ + /** + * Test the property 'enableContextualChangeAnalysis' + */ @Test public void enableContextualChangeAnalysisTest() { // TODO: test enableContextualChangeAnalysis } - /** Test the property 'enableNaturalLanguageAnswerGeneration' */ + /** + * Test the property 'enableNaturalLanguageAnswerGeneration' + */ @Test public void enableNaturalLanguageAnswerGenerationTest() { // TODO: test enableNaturalLanguageAnswerGeneration } - /** Test the property 'enableReasoning' */ + /** + * Test the property 'enableReasoning' + */ @Test public void enableReasoningTest() { // TODO: test enableReasoning } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java index ef7f5eb7f..d754ddedb 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Conversation */ +/** + * Model tests for Conversation + */ public class ConversationTest { private final Conversation model = new Conversation(); - /** Model tests for Conversation */ + /** + * Model tests for Conversation + */ @Test public void testConversation() { // TODO: test Conversation } - /** Test the property 'conversationIdentifier' */ + /** + * Test the property 'conversationIdentifier' + */ @Test public void conversationIdentifierTest() { // TODO: test conversationIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java index 9c75901c2..a4184dce8 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ConvertWorksheetToModelRequest */ +/** + * Model tests for ConvertWorksheetToModelRequest + */ public class ConvertWorksheetToModelRequestTest { private final ConvertWorksheetToModelRequest model = new ConvertWorksheetToModelRequest(); - /** Model tests for ConvertWorksheetToModelRequest */ + /** + * Model tests for ConvertWorksheetToModelRequest + */ @Test public void testConvertWorksheetToModelRequest() { // TODO: test ConvertWorksheetToModelRequest } - /** Test the property 'worksheetIds' */ + /** + * Test the property 'worksheetIds' + */ @Test public void worksheetIdsTest() { // TODO: test worksheetIds } - /** Test the property 'excludeWorksheetIds' */ + /** + * Test the property 'excludeWorksheetIds' + */ @Test public void excludeWorksheetIdsTest() { // TODO: test excludeWorksheetIds } - /** Test the property 'convertAll' */ + /** + * Test the property 'convertAll' + */ @Test public void convertAllTest() { // TODO: test convertAll } - /** Test the property 'applyChanges' */ + /** + * Test the property 'applyChanges' + */ @Test public void applyChangesTest() { // TODO: test applyChanges } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java index 778ef5a6d..6380762e6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java @@ -4,39 +4,60 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CopyObjectRequest */ +/** + * Model tests for CopyObjectRequest + */ public class CopyObjectRequestTest { private final CopyObjectRequest model = new CopyObjectRequest(); - /** Model tests for CopyObjectRequest */ + /** + * Model tests for CopyObjectRequest + */ @Test public void testCopyObjectRequest() { // TODO: test CopyObjectRequest } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'title' */ + /** + * Test the property 'title' + */ @Test public void titleTest() { // TODO: test title } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java index dd219f64b..31495122a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ContextPayloadV2Input; +import com.thoughtspot.client.model.ConversationSettingsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateAgentConversationRequest */ +/** + * Model tests for CreateAgentConversationRequest + */ public class CreateAgentConversationRequestTest { private final CreateAgentConversationRequest model = new CreateAgentConversationRequest(); - /** Model tests for CreateAgentConversationRequest */ + /** + * Model tests for CreateAgentConversationRequest + */ @Test public void testCreateAgentConversationRequest() { // TODO: test CreateAgentConversationRequest } - /** Test the property 'metadataContext' */ + /** + * Test the property 'metadataContext' + */ @Test public void metadataContextTest() { // TODO: test metadataContext } - /** Test the property 'conversationSettings' */ + /** + * Test the property 'conversationSettings' + */ @Test public void conversationSettingsTest() { // TODO: test conversationSettings } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java index 705ff0237..18b61d8a1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java @@ -4,75 +4,109 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExternalTableInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateCalendarRequest */ +/** + * Model tests for CreateCalendarRequest + */ public class CreateCalendarRequestTest { private final CreateCalendarRequest model = new CreateCalendarRequest(); - /** Model tests for CreateCalendarRequest */ + /** + * Model tests for CreateCalendarRequest + */ @Test public void testCreateCalendarRequest() { // TODO: test CreateCalendarRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'creationMethod' */ + /** + * Test the property 'creationMethod' + */ @Test public void creationMethodTest() { // TODO: test creationMethod } - /** Test the property 'tableReference' */ + /** + * Test the property 'tableReference' + */ @Test public void tableReferenceTest() { // TODO: test tableReference } - /** Test the property 'startDate' */ + /** + * Test the property 'startDate' + */ @Test public void startDateTest() { // TODO: test startDate } - /** Test the property 'endDate' */ + /** + * Test the property 'endDate' + */ @Test public void endDateTest() { // TODO: test endDate } - /** Test the property 'calendarType' */ + /** + * Test the property 'calendarType' + */ @Test public void calendarTypeTest() { // TODO: test calendarType } - /** Test the property 'monthOffset' */ + /** + * Test the property 'monthOffset' + */ @Test public void monthOffsetTest() { // TODO: test monthOffset } - /** Test the property 'startDayOfWeek' */ + /** + * Test the property 'startDayOfWeek' + */ @Test public void startDayOfWeekTest() { // TODO: test startDayOfWeek } - /** Test the property 'quarterNamePrefix' */ + /** + * Test the property 'quarterNamePrefix' + */ @Test public void quarterNamePrefixTest() { // TODO: test quarterNamePrefix } - /** Test the property 'yearNamePrefix' */ + /** + * Test the property 'yearNamePrefix' + */ @Test public void yearNamePrefixTest() { // TODO: test yearNamePrefix } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java index 66ece3eac..a86d363d3 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java @@ -4,63 +4,95 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateConfigRequest */ +/** + * Model tests for CreateConfigRequest + */ public class CreateConfigRequestTest { private final CreateConfigRequest model = new CreateConfigRequest(); - /** Model tests for CreateConfigRequest */ + /** + * Model tests for CreateConfigRequest + */ @Test public void testCreateConfigRequest() { // TODO: test CreateConfigRequest } - /** Test the property 'repositoryUrl' */ + /** + * Test the property 'repositoryUrl' + */ @Test public void repositoryUrlTest() { // TODO: test repositoryUrl } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'accessToken' */ + /** + * Test the property 'accessToken' + */ @Test public void accessTokenTest() { // TODO: test accessToken } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } - /** Test the property 'branchNames' */ + /** + * Test the property 'branchNames' + */ @Test public void branchNamesTest() { // TODO: test branchNames } - /** Test the property 'commitBranchName' */ + /** + * Test the property 'commitBranchName' + */ @Test public void commitBranchNameTest() { // TODO: test commitBranchName } - /** Test the property 'enableGuidMapping' */ + /** + * Test the property 'enableGuidMapping' + */ @Test public void enableGuidMappingTest() { // TODO: test enableGuidMapping } - /** Test the property 'configurationBranchName' */ + /** + * Test the property 'configurationBranchName' + */ @Test public void configurationBranchNameTest() { // TODO: test configurationBranchName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java index ee6a5d45c..28eb9476b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java @@ -4,64 +4,94 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateConnectionConfigurationRequest */ +/** + * Model tests for CreateConnectionConfigurationRequest + */ public class CreateConnectionConfigurationRequestTest { - private final CreateConnectionConfigurationRequest model = - new CreateConnectionConfigurationRequest(); + private final CreateConnectionConfigurationRequest model = new CreateConnectionConfigurationRequest(); - /** Model tests for CreateConnectionConfigurationRequest */ + /** + * Model tests for CreateConnectionConfigurationRequest + */ @Test public void testCreateConnectionConfigurationRequest() { // TODO: test CreateConnectionConfigurationRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } - /** Test the property 'authenticationType' */ + /** + * Test the property 'authenticationType' + */ @Test public void authenticationTypeTest() { // TODO: test authenticationType } - /** Test the property '_configuration' */ + /** + * Test the property '_configuration' + */ @Test public void _configurationTest() { // TODO: test _configuration } - /** Test the property 'policyType' */ + /** + * Test the property 'policyType' + */ @Test public void policyTypeTest() { // TODO: test policyType } - /** Test the property 'policyPrincipals' */ + /** + * Test the property 'policyPrincipals' + */ @Test public void policyPrincipalsTest() { // TODO: test policyPrincipals } - /** Test the property 'policyProcesses' */ + /** + * Test the property 'policyProcesses' + */ @Test public void policyProcessesTest() { // TODO: test policyProcesses } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java index 254966ddb..1564f2ed6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateConnectionRequest */ +/** + * Model tests for CreateConnectionRequest + */ public class CreateConnectionRequestTest { private final CreateConnectionRequest model = new CreateConnectionRequest(); - /** Model tests for CreateConnectionRequest */ + /** + * Model tests for CreateConnectionRequest + */ @Test public void testCreateConnectionRequest() { // TODO: test CreateConnectionRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'dataWarehouseType' */ + /** + * Test the property 'dataWarehouseType' + */ @Test public void dataWarehouseTypeTest() { // TODO: test dataWarehouseType } - /** Test the property 'dataWarehouseConfig' */ + /** + * Test the property 'dataWarehouseConfig' + */ @Test public void dataWarehouseConfigTest() { // TODO: test dataWarehouseConfig } - /** Test the property 'validate' */ + /** + * Test the property 'validate' + */ @Test public void validateTest() { // TODO: test validate } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java index 7b5a6c155..92c8643ca 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateConnectionResponse */ +/** + * Model tests for CreateConnectionResponse + */ public class CreateConnectionResponseTest { private final CreateConnectionResponse model = new CreateConnectionResponse(); - /** Model tests for CreateConnectionResponse */ + /** + * Model tests for CreateConnectionResponse + */ @Test public void testCreateConnectionResponse() { // TODO: test CreateConnectionResponse } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'dataWarehouseType' */ + /** + * Test the property 'dataWarehouseType' + */ @Test public void dataWarehouseTypeTest() { // TODO: test dataWarehouseType } - /** Test the property 'details' */ + /** + * Test the property 'details' + */ @Test public void detailsTest() { // TODO: test details } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java index aff3e99d5..f4e5ca731 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateConversationRequest */ +/** + * Model tests for CreateConversationRequest + */ public class CreateConversationRequestTest { private final CreateConversationRequest model = new CreateConversationRequest(); - /** Model tests for CreateConversationRequest */ + /** + * Model tests for CreateConversationRequest + */ @Test public void testCreateConversationRequest() { // TODO: test CreateConversationRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'tokens' */ + /** + * Test the property 'tokens' + */ @Test public void tokensTest() { // TODO: test tokens } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java index 191380d9b..3c7cd7b42 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java @@ -4,45 +4,73 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionDetailsInputCreate; +import com.thoughtspot.client.model.AssociateMetadataInputCreate; +import com.thoughtspot.client.model.DefaultActionConfigInputCreate; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateCustomActionRequest */ +/** + * Model tests for CreateCustomActionRequest + */ public class CreateCustomActionRequestTest { private final CreateCustomActionRequest model = new CreateCustomActionRequest(); - /** Model tests for CreateCustomActionRequest */ + /** + * Model tests for CreateCustomActionRequest + */ @Test public void testCreateCustomActionRequest() { // TODO: test CreateCustomActionRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'actionDetails' */ + /** + * Test the property 'actionDetails' + */ @Test public void actionDetailsTest() { // TODO: test actionDetails } - /** Test the property 'associateMetadata' */ + /** + * Test the property 'associateMetadata' + */ @Test public void associateMetadataTest() { // TODO: test associateMetadata } - /** Test the property 'defaultActionConfig' */ + /** + * Test the property 'defaultActionConfig' + */ @Test public void defaultActionConfigTest() { // TODO: test defaultActionConfig } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomisationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomisationRequestTest.java deleted file mode 100644 index c7d304dbe..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomisationRequestTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateEmailCustomisationRequest */ -public class CreateEmailCustomisationRequestTest { - private final CreateEmailCustomisationRequest model = new CreateEmailCustomisationRequest(); - - /** Model tests for CreateEmailCustomisationRequest */ - @Test - public void testCreateEmailCustomisationRequest() { - // TODO: test CreateEmailCustomisationRequest - } - - /** Test the property 'templateProperties' */ - @Test - public void templatePropertiesTest() { - // TODO: test templateProperties - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomisationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomisationResponseTest.java deleted file mode 100644 index b1067e78d..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomisationResponseTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for CreateEmailCustomisationResponse */ -public class CreateEmailCustomisationResponseTest { - private final CreateEmailCustomisationResponse model = new CreateEmailCustomisationResponse(); - - /** Model tests for CreateEmailCustomisationResponse */ - @Test - public void testCreateEmailCustomisationResponse() { - // TODO: test CreateEmailCustomisationResponse - } - - /** Test the property 'tenantId' */ - @Test - public void tenantIdTest() { - // TODO: test tenantId - } - - /** Test the property 'org' */ - @Test - public void orgTest() { - // TODO: test org - } - - /** Test the property 'name' */ - @Test - public void nameTest() { - // TODO: test name - } - - /** Test the property 'templateProperties' */ - @Test - public void templatePropertiesTest() { - // TODO: test templateProperties - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java index f727b96f5..2d5e28348 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.TemplatePropertiesInputCreate; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateEmailCustomizationRequest */ +/** + * Model tests for CreateEmailCustomizationRequest + */ public class CreateEmailCustomizationRequestTest { private final CreateEmailCustomizationRequest model = new CreateEmailCustomizationRequest(); - /** Model tests for CreateEmailCustomizationRequest */ + /** + * Model tests for CreateEmailCustomizationRequest + */ @Test public void testCreateEmailCustomizationRequest() { // TODO: test CreateEmailCustomizationRequest } - /** Test the property 'templateProperties' */ + /** + * Test the property 'templateProperties' + */ @Test public void templatePropertiesTest() { // TODO: test templateProperties } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java index f1168b4d5..ae8d3e5ba 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.OrgType; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateEmailCustomizationResponse */ +/** + * Model tests for CreateEmailCustomizationResponse + */ public class CreateEmailCustomizationResponseTest { private final CreateEmailCustomizationResponse model = new CreateEmailCustomizationResponse(); - /** Model tests for CreateEmailCustomizationResponse */ + /** + * Model tests for CreateEmailCustomizationResponse + */ @Test public void testCreateEmailCustomizationResponse() { // TODO: test CreateEmailCustomizationResponse } - /** Test the property 'tenantId' */ + /** + * Test the property 'tenantId' + */ @Test public void tenantIdTest() { // TODO: test tenantId } - /** Test the property 'org' */ + /** + * Test the property 'org' + */ @Test public void orgTest() { // TODO: test org } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'templateProperties' */ + /** + * Test the property 'templateProperties' + */ @Test public void templatePropertiesTest() { // TODO: test templateProperties } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java index 1323406fd..ef3f24e96 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateOrgRequest */ +/** + * Model tests for CreateOrgRequest + */ public class CreateOrgRequestTest { private final CreateOrgRequest model = new CreateOrgRequest(); - /** Model tests for CreateOrgRequest */ + /** + * Model tests for CreateOrgRequest + */ @Test public void testCreateOrgRequest() { // TODO: test CreateOrgRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java index d2452a478..cd9ccccca 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateRoleRequest */ +/** + * Model tests for CreateRoleRequest + */ public class CreateRoleRequestTest { private final CreateRoleRequest model = new CreateRoleRequest(); - /** Model tests for CreateRoleRequest */ + /** + * Model tests for CreateRoleRequest + */ @Test public void testCreateRoleRequest() { // TODO: test CreateRoleRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'readOnly' */ + /** + * Test the property 'readOnly' + */ @Test public void readOnlyTest() { // TODO: test readOnly } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java index 6c2d8ac47..06df7d968 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java @@ -4,81 +4,120 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FrequencyInput; +import com.thoughtspot.client.model.LiveboardOptionsInput; +import com.thoughtspot.client.model.RecipientDetailsInput; +import com.thoughtspot.client.model.SchedulesPdfOptionsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateScheduleRequest */ +/** + * Model tests for CreateScheduleRequest + */ public class CreateScheduleRequestTest { private final CreateScheduleRequest model = new CreateScheduleRequest(); - /** Model tests for CreateScheduleRequest */ + /** + * Model tests for CreateScheduleRequest + */ @Test public void testCreateScheduleRequest() { // TODO: test CreateScheduleRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'fileFormat' */ + /** + * Test the property 'fileFormat' + */ @Test public void fileFormatTest() { // TODO: test fileFormat } - /** Test the property 'liveboardOptions' */ + /** + * Test the property 'liveboardOptions' + */ @Test public void liveboardOptionsTest() { // TODO: test liveboardOptions } - /** Test the property 'pdfOptions' */ + /** + * Test the property 'pdfOptions' + */ @Test public void pdfOptionsTest() { // TODO: test pdfOptions } - /** Test the property 'timeZone' */ + /** + * Test the property 'timeZone' + */ @Test public void timeZoneTest() { // TODO: test timeZone } - /** Test the property 'frequency' */ + /** + * Test the property 'frequency' + */ @Test public void frequencyTest() { // TODO: test frequency } - /** Test the property 'recipientDetails' */ + /** + * Test the property 'recipientDetails' + */ @Test public void recipientDetailsTest() { // TODO: test recipientDetails } - /** Test the property 'personalisedViewId' */ + /** + * Test the property 'personalisedViewId' + */ @Test public void personalisedViewIdTest() { // TODO: test personalisedViewId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java index 69b9a22b3..378c0f834 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateTagRequest */ +/** + * Model tests for CreateTagRequest + */ public class CreateTagRequestTest { private final CreateTagRequest model = new CreateTagRequest(); - /** Model tests for CreateTagRequest */ + /** + * Model tests for CreateTagRequest + */ @Test public void testCreateTagRequest() { // TODO: test CreateTagRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'color' */ + /** + * Test the property 'color' + */ @Test public void colorTest() { // TODO: test color } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java index 48a4680be..ff7e91388 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java @@ -4,75 +4,110 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateUserGroupRequest */ +/** + * Model tests for CreateUserGroupRequest + */ public class CreateUserGroupRequestTest { private final CreateUserGroupRequest model = new CreateUserGroupRequest(); - /** Model tests for CreateUserGroupRequest */ + /** + * Model tests for CreateUserGroupRequest + */ @Test public void testCreateUserGroupRequest() { // TODO: test CreateUserGroupRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'defaultLiveboardIdentifiers' */ + /** + * Test the property 'defaultLiveboardIdentifiers' + */ @Test public void defaultLiveboardIdentifiersTest() { // TODO: test defaultLiveboardIdentifiers } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'subGroupIdentifiers' */ + /** + * Test the property 'subGroupIdentifiers' + */ @Test public void subGroupIdentifiersTest() { // TODO: test subGroupIdentifiers } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'roleIdentifiers' */ + /** + * Test the property 'roleIdentifiers' + */ @Test public void roleIdentifiersTest() { // TODO: test roleIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java index b106fe0b5..ea1360e4a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java @@ -4,129 +4,184 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateUserRequest */ +/** + * Model tests for CreateUserRequest + */ public class CreateUserRequestTest { private final CreateUserRequest model = new CreateUserRequest(); - /** Model tests for CreateUserRequest */ + /** + * Model tests for CreateUserRequest + */ @Test public void testCreateUserRequest() { // TODO: test CreateUserRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'accountType' */ + /** + * Test the property 'accountType' + */ @Test public void accountTypeTest() { // TODO: test accountType } - /** Test the property 'accountStatus' */ + /** + * Test the property 'accountStatus' + */ @Test public void accountStatusTest() { // TODO: test accountStatus } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'notifyOnShare' */ + /** + * Test the property 'notifyOnShare' + */ @Test public void notifyOnShareTest() { // TODO: test notifyOnShare } - /** Test the property 'showOnboardingExperience' */ + /** + * Test the property 'showOnboardingExperience' + */ @Test public void showOnboardingExperienceTest() { // TODO: test showOnboardingExperience } - /** Test the property 'onboardingExperienceCompleted' */ + /** + * Test the property 'onboardingExperienceCompleted' + */ @Test public void onboardingExperienceCompletedTest() { // TODO: test onboardingExperienceCompleted } - /** Test the property 'homeLiveboardIdentifier' */ + /** + * Test the property 'homeLiveboardIdentifier' + */ @Test public void homeLiveboardIdentifierTest() { // TODO: test homeLiveboardIdentifier } - /** Test the property 'favoriteMetadata' */ + /** + * Test the property 'favoriteMetadata' + */ @Test public void favoriteMetadataTest() { // TODO: test favoriteMetadata } - /** Test the property 'preferredLocale' */ + /** + * Test the property 'preferredLocale' + */ @Test public void preferredLocaleTest() { // TODO: test preferredLocale } - /** Test the property 'extendedProperties' */ + /** + * Test the property 'extendedProperties' + */ @Test public void extendedPropertiesTest() { // TODO: test extendedProperties } - /** Test the property 'extendedPreferences' */ + /** + * Test the property 'extendedPreferences' + */ @Test public void extendedPreferencesTest() { // TODO: test extendedPreferences } - /** Test the property 'triggerWelcomeEmail' */ + /** + * Test the property 'triggerWelcomeEmail' + */ @Test public void triggerWelcomeEmailTest() { // TODO: test triggerWelcomeEmail } - /** Test the property 'triggerActivationEmail' */ + /** + * Test the property 'triggerActivationEmail' + */ @Test public void triggerActivationEmailTest() { // TODO: test triggerActivationEmail } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java index 8378b84b6..9fa94e532 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 @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CreateVariableRequest */ +/** + * Model tests for CreateVariableRequest + */ public class CreateVariableRequestTest { private final CreateVariableRequest model = new CreateVariableRequest(); - /** Model tests for CreateVariableRequest */ + /** + * Model tests for CreateVariableRequest + */ @Test public void testCreateVariableRequest() { // TODO: test CreateVariableRequest } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test 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..e4d3945b6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java @@ -0,0 +1,91 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthenticationInput; +import com.thoughtspot.client.model.WebhookSignatureVerificationInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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/CronExpressionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java index dc572b7f9..62ff99468 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java @@ -4,51 +4,76 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CronExpressionInput */ +/** + * Model tests for CronExpressionInput + */ public class CronExpressionInputTest { private final CronExpressionInput model = new CronExpressionInput(); - /** Model tests for CronExpressionInput */ + /** + * Model tests for CronExpressionInput + */ @Test public void testCronExpressionInput() { // TODO: test CronExpressionInput } - /** Test the property 'dayOfMonth' */ + /** + * Test the property 'dayOfMonth' + */ @Test public void dayOfMonthTest() { // TODO: test dayOfMonth } - /** Test the property 'dayOfWeek' */ + /** + * Test the property 'dayOfWeek' + */ @Test public void dayOfWeekTest() { // TODO: test dayOfWeek } - /** Test the property 'hour' */ + /** + * Test the property 'hour' + */ @Test public void hourTest() { // TODO: test hour } - /** Test the property 'minute' */ + /** + * Test the property 'minute' + */ @Test public void minuteTest() { // TODO: test minute } - /** Test the property 'month' */ + /** + * Test the property 'month' + */ @Test public void monthTest() { // TODO: test month } - /** Test the property 'second' */ + /** + * Test the property 'second' + */ @Test public void secondTest() { // TODO: test second } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java index 960be0b55..30c529eb0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java @@ -4,51 +4,76 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CronExpression */ +/** + * Model tests for CronExpression + */ public class CronExpressionTest { private final CronExpression model = new CronExpression(); - /** Model tests for CronExpression */ + /** + * Model tests for CronExpression + */ @Test public void testCronExpression() { // TODO: test CronExpression } - /** Test the property 'dayOfMonth' */ + /** + * Test the property 'dayOfMonth' + */ @Test public void dayOfMonthTest() { // TODO: test dayOfMonth } - /** Test the property 'dayOfWeek' */ + /** + * Test the property 'dayOfWeek' + */ @Test public void dayOfWeekTest() { // TODO: test dayOfWeek } - /** Test the property 'hour' */ + /** + * Test the property 'hour' + */ @Test public void hourTest() { // TODO: test hour } - /** Test the property 'minute' */ + /** + * Test the property 'minute' + */ @Test public void minuteTest() { // TODO: test minute } - /** Test the property 'month' */ + /** + * Test the property 'month' + */ @Test public void monthTest() { // TODO: test month } - /** Test the property 'second' */ + /** + * Test the property 'second' + */ @Test public void secondTest() { // TODO: test second } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java index 3f78750a4..0b215609d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for CustomActionMetadataTypeInput */ +/** + * Model tests for CustomActionMetadataTypeInput + */ public class CustomActionMetadataTypeInputTest { private final CustomActionMetadataTypeInput model = new CustomActionMetadataTypeInput(); - /** Model tests for CustomActionMetadataTypeInput */ + /** + * Model tests for CustomActionMetadataTypeInput + */ @Test public void testCustomActionMetadataTypeInput() { // TODO: test CustomActionMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java index 98058e2ef..5e7670395 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DataSourceContextInput */ +/** + * Model tests for DataSourceContextInput + */ public class DataSourceContextInputTest { private final DataSourceContextInput model = new DataSourceContextInput(); - /** Model tests for DataSourceContextInput */ + /** + * Model tests for DataSourceContextInput + */ @Test public void testDataSourceContextInput() { // TODO: test DataSourceContextInput } - /** Test the property 'guid' */ + /** + * Test the property 'guid' + */ @Test public void guidTest() { // TODO: test guid } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java index 28166c243..5e685ac4f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java @@ -4,33 +4,54 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EntityHeader; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DataSource */ +/** + * Model tests for DataSource + */ public class DataSourceTest { private final DataSource model = new DataSource(); - /** Model tests for DataSource */ + /** + * Model tests for DataSource + */ @Test public void testDataSource() { // TODO: test DataSource } - /** Test the property 'confidence' */ + /** + * Test the property 'confidence' + */ @Test public void confidenceTest() { // TODO: test confidence } - /** Test the property 'details' */ + /** + * Test the property 'details' + */ @Test public void detailsTest() { // TODO: test details } - /** Test the property 'reasoning' */ + /** + * Test the property 'reasoning' + */ @Test public void reasoningTest() { // TODO: test reasoning } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java index df75ab457..94391db0a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DataWarehouseObjectInput */ +/** + * Model tests for DataWarehouseObjectInput + */ public class DataWarehouseObjectInputTest { private final DataWarehouseObjectInput model = new DataWarehouseObjectInput(); - /** Model tests for DataWarehouseObjectInput */ + /** + * Model tests for DataWarehouseObjectInput + */ @Test public void testDataWarehouseObjectInput() { // TODO: test DataWarehouseObjectInput } - /** Test the property 'database' */ + /** + * Test the property 'database' + */ @Test public void databaseTest() { // TODO: test database } - /** Test the property 'schema' */ + /** + * Test the property 'schema' + */ @Test public void schemaTest() { // TODO: test schema } - /** Test the property 'table' */ + /** + * Test the property 'table' + */ @Test public void tableTest() { // TODO: test table } - /** Test the property 'column' */ + /** + * Test the property 'column' + */ @Test public void columnTest() { // TODO: test column } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java index aee05c28f..0cc94781d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Database; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DataWarehouseObjects */ +/** + * Model tests for DataWarehouseObjects + */ public class DataWarehouseObjectsTest { private final DataWarehouseObjects model = new DataWarehouseObjects(); - /** Model tests for DataWarehouseObjects */ + /** + * Model tests for DataWarehouseObjects + */ @Test public void testDataWarehouseObjects() { // TODO: test DataWarehouseObjects } - /** Test the property 'databases' */ + /** + * Test the property 'databases' + */ @Test public void databasesTest() { // TODO: test databases } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java index f28763ba1..7b0003b07 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SchemaObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Database */ +/** + * Model tests for Database + */ public class DatabaseTest { private final Database model = new Database(); - /** Model tests for Database */ + /** + * Model tests for Database + */ @Test public void testDatabase() { // TODO: test Database } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'schemas' */ + /** + * Test the property 'schemas' + */ @Test public void schemasTest() { // TODO: test schemas } - /** Test the property 'autoCreated' */ + /** + * Test the property 'autoCreated' + */ @Test public void autoCreatedTest() { // TODO: test autoCreated } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtConnectionRequestTest.java deleted file mode 100644 index d95d5ce0f..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtConnectionRequestTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DbtConnectionRequest */ -public class DbtConnectionRequestTest { - private final DbtConnectionRequest model = new DbtConnectionRequest(); - - /** Model tests for DbtConnectionRequest */ - @Test - public void testDbtConnectionRequest() { - // TODO: test DbtConnectionRequest - } - - /** Test the property 'connectionName' */ - @Test - public void connectionNameTest() { - // TODO: test connectionName - } - - /** Test the property 'databaseName' */ - @Test - public void databaseNameTest() { - // TODO: test databaseName - } - - /** Test the property 'importType' */ - @Test - public void importTypeTest() { - // TODO: test importType - } - - /** Test the property 'accessToken' */ - @Test - public void accessTokenTest() { - // TODO: test accessToken - } - - /** Test the property 'dbtUrl' */ - @Test - public void dbtUrlTest() { - // TODO: test dbtUrl - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'projectId' */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** Test the property 'dbtEnvId' */ - @Test - public void dbtEnvIdTest() { - // TODO: test dbtEnvId - } - - /** Test the property 'projectName' */ - @Test - public void projectNameTest() { - // TODO: test projectName - } - - /** Test the property 'fileContent' */ - @Test - public void fileContentTest() { - // TODO: test fileContent - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtGenerateSyncTmlRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtGenerateSyncTmlRequestTest.java deleted file mode 100644 index 160c0e625..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtGenerateSyncTmlRequestTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DbtGenerateSyncTmlRequest */ -public class DbtGenerateSyncTmlRequestTest { - private final DbtGenerateSyncTmlRequest model = new DbtGenerateSyncTmlRequest(); - - /** Model tests for DbtGenerateSyncTmlRequest */ - @Test - public void testDbtGenerateSyncTmlRequest() { - // TODO: test DbtGenerateSyncTmlRequest - } - - /** Test the property 'dbtConnectionIdentifier' */ - @Test - public void dbtConnectionIdentifierTest() { - // TODO: test dbtConnectionIdentifier - } - - /** Test the property 'fileContent' */ - @Test - public void fileContentTest() { - // TODO: test fileContent - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtGenerateTmlRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtGenerateTmlRequestTest.java deleted file mode 100644 index ba9e00dcf..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtGenerateTmlRequestTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for DbtGenerateTmlRequest */ -public class DbtGenerateTmlRequestTest { - private final DbtGenerateTmlRequest model = new DbtGenerateTmlRequest(); - - /** Model tests for DbtGenerateTmlRequest */ - @Test - public void testDbtGenerateTmlRequest() { - // TODO: test DbtGenerateTmlRequest - } - - /** Test the property 'dbtConnectionIdentifier' */ - @Test - public void dbtConnectionIdentifierTest() { - // TODO: test dbtConnectionIdentifier - } - - /** Test the property 'modelTables' */ - @Test - public void modelTablesTest() { - // TODO: test modelTables - } - - /** Test the property 'importWorksheets' */ - @Test - public void importWorksheetsTest() { - // TODO: test importWorksheets - } - - /** Test the property 'worksheets' */ - @Test - public void worksheetsTest() { - // TODO: test worksheets - } - - /** Test the property 'fileContent' */ - @Test - public void fileContentTest() { - // TODO: test fileContent - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java index 6d84865d5..23927818a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java @@ -4,57 +4,85 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DbtSearchResponse */ +/** + * Model tests for DbtSearchResponse + */ public class DbtSearchResponseTest { private final DbtSearchResponse model = new DbtSearchResponse(); - /** Model tests for DbtSearchResponse */ + /** + * Model tests for DbtSearchResponse + */ @Test public void testDbtSearchResponse() { // TODO: test DbtSearchResponse } - /** Test the property 'dbtConnectionIdentifier' */ + /** + * Test the property 'dbtConnectionIdentifier' + */ @Test public void dbtConnectionIdentifierTest() { // TODO: test dbtConnectionIdentifier } - /** Test the property 'projectName' */ + /** + * Test the property 'projectName' + */ @Test public void projectNameTest() { // TODO: test projectName } - /** Test the property 'connectionId' */ + /** + * Test the property 'connectionId' + */ @Test public void connectionIdTest() { // TODO: test connectionId } - /** Test the property 'connectionName' */ + /** + * Test the property 'connectionName' + */ @Test public void connectionNameTest() { // TODO: test connectionName } - /** Test the property 'cdwDatabase' */ + /** + * Test the property 'cdwDatabase' + */ @Test public void cdwDatabaseTest() { // TODO: test cdwDatabase } - /** Test the property 'importType' */ + /** + * Test the property 'importType' + */ @Test public void importTypeTest() { // TODO: test importType } - /** Test the property 'authorName' */ + /** + * Test the property 'authorName' + */ @Test public void authorNameTest() { // TODO: test authorName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java index 737aeb32e..59428f9aa 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeactivateUserRequest */ +/** + * Model tests for DeactivateUserRequest + */ public class DeactivateUserRequestTest { private final DeactivateUserRequest model = new DeactivateUserRequest(); - /** Model tests for DeactivateUserRequest */ + /** + * Model tests for DeactivateUserRequest + */ @Test public void testDeactivateUserRequest() { // TODO: test DeactivateUserRequest } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } - /** Test the property 'baseUrl' */ + /** + * Test the property 'baseUrl' + */ @Test public void baseUrlTest() { // TODO: test baseUrl } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java index a43f59f6a..47ff8c1f4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DefaultActionConfigInputCreate */ +/** + * Model tests for DefaultActionConfigInputCreate + */ public class DefaultActionConfigInputCreateTest { private final DefaultActionConfigInputCreate model = new DefaultActionConfigInputCreate(); - /** Model tests for DefaultActionConfigInputCreate */ + /** + * Model tests for DefaultActionConfigInputCreate + */ @Test public void testDefaultActionConfigInputCreate() { // TODO: test DefaultActionConfigInputCreate } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java index eca39f3e3..debe45e69 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DefaultActionConfigInput */ +/** + * Model tests for DefaultActionConfigInput + */ public class DefaultActionConfigInputTest { private final DefaultActionConfigInput model = new DefaultActionConfigInput(); - /** Model tests for DefaultActionConfigInput */ + /** + * Model tests for DefaultActionConfigInput + */ @Test public void testDefaultActionConfigInput() { // TODO: test DefaultActionConfigInput } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java index 94c5c9aa2..31306114f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DefaultActionConfigSearchInput */ +/** + * Model tests for DefaultActionConfigSearchInput + */ public class DefaultActionConfigSearchInputTest { private final DefaultActionConfigSearchInput model = new DefaultActionConfigSearchInput(); - /** Model tests for DefaultActionConfigSearchInput */ + /** + * Model tests for DefaultActionConfigSearchInput + */ @Test public void testDefaultActionConfigSearchInput() { // TODO: test DefaultActionConfigSearchInput } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java index 17588e7fd..db4db8c2c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DefaultActionConfig */ +/** + * Model tests for DefaultActionConfig + */ public class DefaultActionConfigTest { private final DefaultActionConfig model = new DefaultActionConfig(); - /** Model tests for DefaultActionConfig */ + /** + * Model tests for DefaultActionConfig + */ @Test public void testDefaultActionConfig() { // TODO: test DefaultActionConfig } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java index 6300f8599..ecd386775 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeleteConfigRequest */ +/** + * Model tests for DeleteConfigRequest + */ public class DeleteConfigRequestTest { private final DeleteConfigRequest model = new DeleteConfigRequest(); - /** Model tests for DeleteConfigRequest */ + /** + * Model tests for DeleteConfigRequest + */ @Test public void testDeleteConfigRequest() { // TODO: test DeleteConfigRequest } - /** Test the property 'clusterLevel' */ + /** + * Test the property 'clusterLevel' + */ @Test public void clusterLevelTest() { // TODO: test clusterLevel } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java index 60778ca94..2d33246c7 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java @@ -4,28 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeleteConnectionConfigurationRequest */ +/** + * Model tests for DeleteConnectionConfigurationRequest + */ public class DeleteConnectionConfigurationRequestTest { - private final DeleteConnectionConfigurationRequest model = - new DeleteConnectionConfigurationRequest(); + private final DeleteConnectionConfigurationRequest model = new DeleteConnectionConfigurationRequest(); - /** Model tests for DeleteConnectionConfigurationRequest */ + /** + * Model tests for DeleteConnectionConfigurationRequest + */ @Test public void testDeleteConnectionConfigurationRequest() { // TODO: test DeleteConnectionConfigurationRequest } - /** Test the property 'configurationIdentifier' */ + /** + * Test the property 'configurationIdentifier' + */ @Test public void configurationIdentifierTest() { // TODO: test configurationIdentifier } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java index 6f410af68..9765ab0ff 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeleteConnectionRequest */ +/** + * Model tests for DeleteConnectionRequest + */ public class DeleteConnectionRequestTest { private final DeleteConnectionRequest model = new DeleteConnectionRequest(); - /** Model tests for DeleteConnectionRequest */ + /** + * Model tests for DeleteConnectionRequest + */ @Test public void testDeleteConnectionRequest() { // TODO: test DeleteConnectionRequest } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java index a94df3385..0c7f43788 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DeleteMetadataTypeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeleteMetadataRequest */ +/** + * Model tests for DeleteMetadataRequest + */ public class DeleteMetadataRequestTest { private final DeleteMetadataRequest model = new DeleteMetadataRequest(); - /** Model tests for DeleteMetadataRequest */ + /** + * Model tests for DeleteMetadataRequest + */ @Test public void testDeleteMetadataRequest() { // TODO: test DeleteMetadataRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'deleteDisabledObjects' */ + /** + * Test the property 'deleteDisabledObjects' + */ @Test public void deleteDisabledObjectsTest() { // TODO: test deleteDisabledObjects } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java index dac043d9d..bdddd964d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeleteMetadataTypeInput */ +/** + * Model tests for DeleteMetadataTypeInput + */ public class DeleteMetadataTypeInputTest { private final DeleteMetadataTypeInput model = new DeleteMetadataTypeInput(); - /** Model tests for DeleteMetadataTypeInput */ + /** + * Model tests for DeleteMetadataTypeInput + */ @Test public void testDeleteMetadataTypeInput() { // TODO: test DeleteMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java index 6564034dd..d97be7339 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java @@ -4,22 +4,38 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeleteOrgEmailCustomizationRequest */ +/** + * Model tests for DeleteOrgEmailCustomizationRequest + */ public class DeleteOrgEmailCustomizationRequestTest { - private final DeleteOrgEmailCustomizationRequest model = - new DeleteOrgEmailCustomizationRequest(); + private final DeleteOrgEmailCustomizationRequest model = new DeleteOrgEmailCustomizationRequest(); - /** Model tests for DeleteOrgEmailCustomizationRequest */ + /** + * Model tests for DeleteOrgEmailCustomizationRequest + */ @Test public void testDeleteOrgEmailCustomizationRequest() { // TODO: test DeleteOrgEmailCustomizationRequest } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } + } 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..6282684a4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequestTest.java @@ -0,0 +1,41 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeleteWebhookConfigurationsRequest + */ +public class DeleteWebhookConfigurationsRequestTest { + private final DeleteWebhookConfigurationsRequest model = new DeleteWebhookConfigurationsRequest(); + + /** + * Model tests for DeleteWebhookConfigurationsRequest + */ + @Test + public void testDeleteWebhookConfigurationsRequest() { + // TODO: test DeleteWebhookConfigurationsRequest + } + + /** + * Test the property 'webhookIdentifiers' + */ + @Test + public void webhookIdentifiersTest() { + // TODO: test webhookIdentifiers + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java index 2f7846e8a..1cabe9530 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java @@ -4,39 +4,60 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeployCommitRequest */ +/** + * Model tests for DeployCommitRequest + */ public class DeployCommitRequestTest { private final DeployCommitRequest model = new DeployCommitRequest(); - /** Model tests for DeployCommitRequest */ + /** + * Model tests for DeployCommitRequest + */ @Test public void testDeployCommitRequest() { // TODO: test DeployCommitRequest } - /** Test the property 'commitId' */ + /** + * Test the property 'commitId' + */ @Test public void commitIdTest() { // TODO: test commitId } - /** Test the property 'branchName' */ + /** + * Test the property 'branchName' + */ @Test public void branchNameTest() { // TODO: test branchName } - /** Test the property 'deployType' */ + /** + * Test the property 'deployType' + */ @Test public void deployTypeTest() { // TODO: test deployType } - /** Test the property 'deployPolicy' */ + /** + * Test the property 'deployPolicy' + */ @Test public void deployPolicyTest() { // TODO: test deployPolicy } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java index 5bea96810..8b1784ceb 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for DeployResponse */ +/** + * Model tests for DeployResponse + */ public class DeployResponseTest { private final DeployResponse model = new DeployResponse(); - /** Model tests for DeployResponse */ + /** + * Model tests for DeployResponse + */ @Test public void testDeployResponse() { // TODO: test DeployResponse } - /** Test the property 'fileName' */ + /** + * Test the property 'fileName' + */ @Test public void fileNameTest() { // TODO: test fileName } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'statusCode' */ + /** + * Test the property 'statusCode' + */ @Test public void statusCodeTest() { // TODO: test statusCode } - /** Test the property 'statusMessage' */ + /** + * Test the property 'statusMessage' + */ @Test public void statusMessageTest() { // TODO: test statusMessage } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java index 212689539..6e9cc8ae0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EntityHeader */ +/** + * Model tests for EntityHeader + */ public class EntityHeaderTest { private final EntityHeader model = new EntityHeader(); - /** Model tests for EntityHeader */ + /** + * Model tests for EntityHeader + */ @Test public void testEntityHeader() { // TODO: test EntityHeader } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'dataSourceName' */ + /** + * Test the property 'dataSourceName' + */ @Test public void dataSourceNameTest() { // TODO: test dataSourceName } - /** Test the property 'dataSourceIdentifier' */ + /** + * Test the property 'dataSourceIdentifier' + */ @Test public void dataSourceIdentifierTest() { // TODO: test dataSourceIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java index 2709eceb8..19e643c23 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ErrorResponse */ +/** + * Model tests for ErrorResponse + */ public class ErrorResponseTest { private final ErrorResponse model = new ErrorResponse(); - /** Model tests for ErrorResponse */ + /** + * Model tests for ErrorResponse + */ @Test public void testErrorResponse() { // TODO: test ErrorResponse } - /** Test the property 'error' */ + /** + * Test the property 'error' + */ @Test public void errorTest() { // TODO: test error } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java index 2ce83268c..c21bc1915 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java @@ -4,22 +4,40 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DataSource; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EurekaDataSourceSuggestionResponse */ +/** + * Model tests for EurekaDataSourceSuggestionResponse + */ public class EurekaDataSourceSuggestionResponseTest { - private final EurekaDataSourceSuggestionResponse model = - new EurekaDataSourceSuggestionResponse(); + private final EurekaDataSourceSuggestionResponse model = new EurekaDataSourceSuggestionResponse(); - /** Model tests for EurekaDataSourceSuggestionResponse */ + /** + * Model tests for EurekaDataSourceSuggestionResponse + */ @Test public void testEurekaDataSourceSuggestionResponse() { // TODO: test EurekaDataSourceSuggestionResponse } - /** Test the property 'dataSources' */ + /** + * Test the property 'dataSources' + */ @Test public void dataSourcesTest() { // TODO: test dataSources } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java index 015c40391..42159d00d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EurekaLLMDecomposeQueryResponse; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EurekaDecomposeQueryResponse */ +/** + * Model tests for EurekaDecomposeQueryResponse + */ public class EurekaDecomposeQueryResponseTest { private final EurekaDecomposeQueryResponse model = new EurekaDecomposeQueryResponse(); - /** Model tests for EurekaDecomposeQueryResponse */ + /** + * Model tests for EurekaDecomposeQueryResponse + */ @Test public void testEurekaDecomposeQueryResponse() { // TODO: test EurekaDecomposeQueryResponse } - /** Test the property 'decomposedQueryResponse' */ + /** + * Test the property 'decomposedQueryResponse' + */ @Test public void decomposedQueryResponseTest() { // TODO: test decomposedQueryResponse } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java index b8928780b..39ffebea5 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java @@ -4,22 +4,40 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EurekaRelevantQuestion; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EurekaGetRelevantQuestionsResponse */ +/** + * Model tests for EurekaGetRelevantQuestionsResponse + */ public class EurekaGetRelevantQuestionsResponseTest { - private final EurekaGetRelevantQuestionsResponse model = - new EurekaGetRelevantQuestionsResponse(); + private final EurekaGetRelevantQuestionsResponse model = new EurekaGetRelevantQuestionsResponse(); - /** Model tests for EurekaGetRelevantQuestionsResponse */ + /** + * Model tests for EurekaGetRelevantQuestionsResponse + */ @Test public void testEurekaGetRelevantQuestionsResponse() { // TODO: test EurekaGetRelevantQuestionsResponse } - /** Test the property 'relevantQuestions' */ + /** + * Test the property 'relevantQuestions' + */ @Test public void relevantQuestionsTest() { // TODO: test relevantQuestions } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java index 33bf26361..9b5d922ef 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java @@ -4,21 +4,40 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EurekaLLMSuggestedQuery; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EurekaLLMDecomposeQueryResponse */ +/** + * Model tests for EurekaLLMDecomposeQueryResponse + */ public class EurekaLLMDecomposeQueryResponseTest { private final EurekaLLMDecomposeQueryResponse model = new EurekaLLMDecomposeQueryResponse(); - /** Model tests for EurekaLLMDecomposeQueryResponse */ + /** + * Model tests for EurekaLLMDecomposeQueryResponse + */ @Test public void testEurekaLLMDecomposeQueryResponse() { // TODO: test EurekaLLMDecomposeQueryResponse } - /** Test the property 'decomposedQueries' */ + /** + * Test the property 'decomposedQueries' + */ @Test public void decomposedQueriesTest() { // TODO: test decomposedQueries } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java index 1062f9869..146ca7e7b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EurekaLLMSuggestedQuery */ +/** + * Model tests for EurekaLLMSuggestedQuery + */ public class EurekaLLMSuggestedQueryTest { private final EurekaLLMSuggestedQuery model = new EurekaLLMSuggestedQuery(); - /** Model tests for EurekaLLMSuggestedQuery */ + /** + * Model tests for EurekaLLMSuggestedQuery + */ @Test public void testEurekaLLMSuggestedQuery() { // TODO: test EurekaLLMSuggestedQuery } - /** Test the property 'query' */ + /** + * Test the property 'query' + */ @Test public void queryTest() { // TODO: test query } - /** Test the property 'worksheetId' */ + /** + * Test the property 'worksheetId' + */ @Test public void worksheetIdTest() { // TODO: test worksheetId } - /** Test the property 'worksheetName' */ + /** + * Test the property 'worksheetName' + */ @Test public void worksheetNameTest() { // TODO: test worksheetName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java index b07cdc44b..5fee8e675 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for EurekaRelevantQuestion */ +/** + * Model tests for EurekaRelevantQuestion + */ public class EurekaRelevantQuestionTest { private final EurekaRelevantQuestion model = new EurekaRelevantQuestion(); - /** Model tests for EurekaRelevantQuestion */ + /** + * Model tests for EurekaRelevantQuestion + */ @Test public void testEurekaRelevantQuestion() { // TODO: test EurekaRelevantQuestion } - /** Test the property 'query' */ + /** + * Test the property 'query' + */ @Test public void queryTest() { // TODO: test query } - /** Test the property 'dataSourceIdentifier' */ + /** + * Test the property 'dataSourceIdentifier' + */ @Test public void dataSourceIdentifierTest() { // TODO: test dataSourceIdentifier } - /** Test the property 'dataSourceName' */ + /** + * Test the property 'dataSourceName' + */ @Test public void dataSourceNameTest() { // TODO: test dataSourceName } + } 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..991e10bbf --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigInputTest.java @@ -0,0 +1,49 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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..e61a1987f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigTest.java @@ -0,0 +1,49 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EventChannelConfig + */ +public class EventChannelConfigTest { + private final EventChannelConfig model = new EventChannelConfig(); + + /** + * Model tests for EventChannelConfig + */ + @Test + public void testEventChannelConfig() { + // TODO: test EventChannelConfig + } + + /** + * Test the property 'eventType' + */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** + * Test the property 'channels' + */ + @Test + public void channelsTest() { + // TODO: test channels + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java index d8674285c..8e1af1a8e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExcludeMetadataListItemInput */ +/** + * Model tests for ExcludeMetadataListItemInput + */ public class ExcludeMetadataListItemInputTest { private final ExcludeMetadataListItemInput model = new ExcludeMetadataListItemInput(); - /** Model tests for ExcludeMetadataListItemInput */ + /** + * Model tests for ExcludeMetadataListItemInput + */ @Test public void testExcludeMetadataListItemInput() { // TODO: test ExcludeMetadataListItemInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java index c6da75c99..6974cef46 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java @@ -4,63 +4,93 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.RegionalSettingsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExportAnswerReportRequest */ +/** + * Model tests for ExportAnswerReportRequest + */ public class ExportAnswerReportRequestTest { private final ExportAnswerReportRequest model = new ExportAnswerReportRequest(); - /** Model tests for ExportAnswerReportRequest */ + /** + * Model tests for ExportAnswerReportRequest + */ @Test public void testExportAnswerReportRequest() { // TODO: test ExportAnswerReportRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'sessionIdentifier' */ + /** + * Test the property 'sessionIdentifier' + */ @Test public void sessionIdentifierTest() { // TODO: test sessionIdentifier } - /** Test the property 'generationNumber' */ + /** + * Test the property 'generationNumber' + */ @Test public void generationNumberTest() { // TODO: test generationNumber } - /** Test the property 'fileFormat' */ + /** + * Test the property 'fileFormat' + */ @Test public void fileFormatTest() { // TODO: test fileFormat } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } - /** Test the property 'regionalSettings' */ + /** + * Test the property 'regionalSettings' + */ @Test public void regionalSettingsTest() { // TODO: test regionalSettings } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java index 905e18137..da115a6db 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java @@ -4,93 +4,137 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PdfOptionsInput; +import com.thoughtspot.client.model.PngOptionsInput; +import com.thoughtspot.client.model.RegionalSettingsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExportLiveboardReportRequest */ +/** + * Model tests for ExportLiveboardReportRequest + */ public class ExportLiveboardReportRequestTest { private final ExportLiveboardReportRequest model = new ExportLiveboardReportRequest(); - /** Model tests for ExportLiveboardReportRequest */ + /** + * Model tests for ExportLiveboardReportRequest + */ @Test public void testExportLiveboardReportRequest() { // TODO: test ExportLiveboardReportRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'tabIdentifiers' */ + /** + * Test the property 'tabIdentifiers' + */ @Test public void tabIdentifiersTest() { // TODO: test tabIdentifiers } - /** Test the property 'personalisedViewIdentifier' */ + /** + * Test the property 'personalisedViewIdentifier' + */ @Test public void personalisedViewIdentifierTest() { // TODO: test personalisedViewIdentifier } - /** Test the property 'visualizationIdentifiers' */ + /** + * Test the property 'visualizationIdentifiers' + */ @Test public void visualizationIdentifiersTest() { // TODO: test visualizationIdentifiers } - /** Test the property 'transientContent' */ + /** + * Test the property 'transientContent' + */ @Test public void transientContentTest() { // TODO: test transientContent } - /** Test the property 'fileFormat' */ + /** + * Test the property 'fileFormat' + */ @Test public void fileFormatTest() { // TODO: test fileFormat } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } - /** Test the property 'overrideFilters' */ + /** + * Test the property 'overrideFilters' + */ @Test public void overrideFiltersTest() { // TODO: test overrideFilters } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } - /** Test the property 'pdfOptions' */ + /** + * Test the property 'pdfOptions' + */ @Test public void pdfOptionsTest() { // TODO: test pdfOptions } - /** Test the property 'pngOptions' */ + /** + * Test the property 'pngOptions' + */ @Test public void pngOptionsTest() { // TODO: test pngOptions } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } - /** Test the property 'regionalSettings' */ + /** + * Test the property 'regionalSettings' + */ @Test public void regionalSettingsTest() { // TODO: test regionalSettings } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java index 40108c659..92f01f81d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java @@ -4,51 +4,77 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExportMetadataTMLBatchedRequest */ +/** + * Model tests for ExportMetadataTMLBatchedRequest + */ public class ExportMetadataTMLBatchedRequestTest { private final ExportMetadataTMLBatchedRequest model = new ExportMetadataTMLBatchedRequest(); - /** Model tests for ExportMetadataTMLBatchedRequest */ + /** + * Model tests for ExportMetadataTMLBatchedRequest + */ @Test public void testExportMetadataTMLBatchedRequest() { // TODO: test ExportMetadataTMLBatchedRequest } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'batchOffset' */ + /** + * Test the property 'batchOffset' + */ @Test public void batchOffsetTest() { // TODO: test batchOffset } - /** Test the property 'batchSize' */ + /** + * Test the property 'batchSize' + */ @Test public void batchSizeTest() { // TODO: test batchSize } - /** Test the property 'edocFormat' */ + /** + * Test the property 'edocFormat' + */ @Test public void edocFormatTest() { // TODO: test edocFormat } - /** Test the property 'exportDependent' */ + /** + * Test the property 'exportDependent' + */ @Test public void exportDependentTest() { // TODO: test exportDependent } - /** Test the property 'allOrgsOverride' */ + /** + * Test the property 'allOrgsOverride' + */ @Test public void allOrgsOverrideTest() { // TODO: test allOrgsOverride } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java index 5cfb8623c..4389a024c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java @@ -4,69 +4,105 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExportMetadataTypeInput; +import com.thoughtspot.client.model.ExportOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExportMetadataTMLRequest */ +/** + * Model tests for ExportMetadataTMLRequest + */ public class ExportMetadataTMLRequestTest { private final ExportMetadataTMLRequest model = new ExportMetadataTMLRequest(); - /** Model tests for ExportMetadataTMLRequest */ + /** + * Model tests for ExportMetadataTMLRequest + */ @Test public void testExportMetadataTMLRequest() { // TODO: test ExportMetadataTMLRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'exportAssociated' */ + /** + * Test the property 'exportAssociated' + */ @Test public void exportAssociatedTest() { // TODO: test exportAssociated } - /** Test the property 'exportFqn' */ + /** + * Test the property 'exportFqn' + */ @Test public void exportFqnTest() { // TODO: test exportFqn } - /** Test the property 'edocFormat' */ + /** + * Test the property 'edocFormat' + */ @Test public void edocFormatTest() { // TODO: test edocFormat } - /** Test the property 'exportSchemaVersion' */ + /** + * Test the property 'exportSchemaVersion' + */ @Test public void exportSchemaVersionTest() { // TODO: test exportSchemaVersion } - /** Test the property 'exportDependent' */ + /** + * Test the property 'exportDependent' + */ @Test public void exportDependentTest() { // TODO: test exportDependent } - /** Test the property 'exportConnectionAsDependent' */ + /** + * Test the property 'exportConnectionAsDependent' + */ @Test public void exportConnectionAsDependentTest() { // TODO: test exportConnectionAsDependent } - /** Test the property 'allOrgsOverride' */ + /** + * Test the property 'allOrgsOverride' + */ @Test public void allOrgsOverrideTest() { // TODO: test allOrgsOverride } - /** Test the property 'exportOptions' */ + /** + * Test the property 'exportOptions' + */ @Test public void exportOptionsTest() { // TODO: test exportOptions } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java index bccfb9a6c..729ee3347 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExportMetadataTypeInput */ +/** + * Model tests for ExportMetadataTypeInput + */ public class ExportMetadataTypeInputTest { private final ExportMetadataTypeInput model = new ExportMetadataTypeInput(); - /** Model tests for ExportMetadataTypeInput */ + /** + * Model tests for ExportMetadataTypeInput + */ @Test public void testExportMetadataTypeInput() { // TODO: test ExportMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'sessionIdentifier' */ + /** + * Test the property 'sessionIdentifier' + */ @Test public void sessionIdentifierTest() { // TODO: test sessionIdentifier } - /** Test the property 'generationNumber' */ + /** + * Test the property 'generationNumber' + */ @Test public void generationNumberTest() { // TODO: test generationNumber } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java index 057af2d7f..109648126 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 @@ -4,45 +4,77 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExportOptions */ +/** + * Model tests for ExportOptions + */ public class ExportOptionsTest { private final ExportOptions model = new ExportOptions(); - /** Model tests for ExportOptions */ + /** + * Model tests for ExportOptions + */ @Test public void testExportOptions() { // TODO: test ExportOptions } - /** Test the property 'includeObjIdRef' */ + /** + * Test the property 'includeObjIdRef' + */ @Test public void includeObjIdRefTest() { // TODO: test includeObjIdRef } - /** Test the property 'includeGuid' */ + /** + * Test the property 'includeGuid' + */ @Test public void includeGuidTest() { // TODO: test includeGuid } - /** Test the property 'includeObjId' */ + /** + * Test the property 'includeObjId' + */ @Test public void includeObjIdTest() { // TODO: test includeObjId } - /** Test the property 'exportWithAssociatedFeedbacks' */ + /** + * Test the property 'exportWithAssociatedFeedbacks' + */ @Test public void exportWithAssociatedFeedbacksTest() { // TODO: test exportWithAssociatedFeedbacks } - /** Test the property 'exportColumnSecurityRules' */ + /** + * Test the property 'exportColumnSecurityRules' + */ @Test public void exportColumnSecurityRulesTest() { // TODO: test exportColumnSecurityRules } + + /** + * Test the property 'exportWithColumnAliases' + */ + @Test + public void exportWithColumnAliasesTest() { + // TODO: test exportWithColumnAliases + } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java index 3dcc3e11a..d8337c0cd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ExternalTableInput */ +/** + * Model tests for ExternalTableInput + */ public class ExternalTableInputTest { private final ExternalTableInput model = new ExternalTableInput(); - /** Model tests for ExternalTableInput */ + /** + * Model tests for ExternalTableInput + */ @Test public void testExternalTableInput() { // TODO: test ExternalTableInput } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } - /** Test the property 'databaseName' */ + /** + * Test the property 'databaseName' + */ @Test public void databaseNameTest() { // TODO: test databaseName } - /** Test the property 'schemaName' */ + /** + * Test the property 'schemaName' + */ @Test public void schemaNameTest() { // TODO: test schemaName } - /** Test the property 'tableName' */ + /** + * Test the property 'tableName' + */ @Test public void tableNameTest() { // TODO: test tableName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java index 4d6f71eb9..017c428ba 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FavoriteMetadataInput */ +/** + * Model tests for FavoriteMetadataInput + */ public class FavoriteMetadataInputTest { private final FavoriteMetadataInput model = new FavoriteMetadataInput(); - /** Model tests for FavoriteMetadataInput */ + /** + * Model tests for FavoriteMetadataInput + */ @Test public void testFavoriteMetadataInput() { // TODO: test FavoriteMetadataInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java index 965735592..2d3a17a31 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FavoriteMetadataItem */ +/** + * Model tests for FavoriteMetadataItem + */ public class FavoriteMetadataItemTest { private final FavoriteMetadataItem model = new FavoriteMetadataItem(); - /** Model tests for FavoriteMetadataItem */ + /** + * Model tests for FavoriteMetadataItem + */ @Test public void testFavoriteMetadataItem() { // TODO: test FavoriteMetadataItem } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java index 8b6ae8dbf..d1bd616f6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java @@ -4,27 +4,47 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FavoriteObjectOptionsInput */ +/** + * Model tests for FavoriteObjectOptionsInput + */ public class FavoriteObjectOptionsInputTest { private final FavoriteObjectOptionsInput model = new FavoriteObjectOptionsInput(); - /** Model tests for FavoriteObjectOptionsInput */ + /** + * Model tests for FavoriteObjectOptionsInput + */ @Test public void testFavoriteObjectOptionsInput() { // TODO: test FavoriteObjectOptionsInput } - /** Test the property 'include' */ + /** + * Test the property 'include' + */ @Test public void includeTest() { // TODO: test include } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java index 3456c8439..d4bb61303 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java @@ -4,57 +4,84 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchAnswerDataRequest */ +/** + * Model tests for FetchAnswerDataRequest + */ public class FetchAnswerDataRequestTest { private final FetchAnswerDataRequest model = new FetchAnswerDataRequest(); - /** Model tests for FetchAnswerDataRequest */ + /** + * Model tests for FetchAnswerDataRequest + */ @Test public void testFetchAnswerDataRequest() { // TODO: test FetchAnswerDataRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'dataFormat' */ + /** + * Test the property 'dataFormat' + */ @Test public void dataFormatTest() { // TODO: test dataFormat } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java index ce5368b9b..f0c49f627 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchAnswerSqlQueryRequest */ +/** + * Model tests for FetchAnswerSqlQueryRequest + */ public class FetchAnswerSqlQueryRequestTest { private final FetchAnswerSqlQueryRequest model = new FetchAnswerSqlQueryRequest(); - /** Model tests for FetchAnswerSqlQueryRequest */ + /** + * Model tests for FetchAnswerSqlQueryRequest + */ @Test public void testFetchAnswerSqlQueryRequest() { // TODO: test FetchAnswerSqlQueryRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java index 50e4eceeb..9d1e7c548 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java @@ -4,51 +4,79 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchAsyncImportTaskStatusRequest */ +/** + * Model tests for FetchAsyncImportTaskStatusRequest + */ public class FetchAsyncImportTaskStatusRequestTest { private final FetchAsyncImportTaskStatusRequest model = new FetchAsyncImportTaskStatusRequest(); - /** Model tests for FetchAsyncImportTaskStatusRequest */ + /** + * Model tests for FetchAsyncImportTaskStatusRequest + */ @Test public void testFetchAsyncImportTaskStatusRequest() { // TODO: test FetchAsyncImportTaskStatusRequest } - /** Test the property 'taskIds' */ + /** + * Test the property 'taskIds' + */ @Test public void taskIdsTest() { // TODO: test taskIds } - /** Test the property 'taskStatus' */ + /** + * Test the property 'taskStatus' + */ @Test public void taskStatusTest() { // TODO: test taskStatus } - /** Test the property 'authorIdentifier' */ + /** + * Test the property 'authorIdentifier' + */ @Test public void authorIdentifierTest() { // TODO: test authorIdentifier } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'includeImportResponse' */ + /** + * Test the property 'includeImportResponse' + */ @Test public void includeImportResponseTest() { // TODO: test includeImportResponse } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java index 395eeaf1d..78160be23 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleTableInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchColumnSecurityRulesRequest */ +/** + * Model tests for FetchColumnSecurityRulesRequest + */ public class FetchColumnSecurityRulesRequestTest { private final FetchColumnSecurityRulesRequest model = new FetchColumnSecurityRulesRequest(); - /** Model tests for FetchColumnSecurityRulesRequest */ + /** + * Model tests for FetchColumnSecurityRulesRequest + */ @Test public void testFetchColumnSecurityRulesRequest() { // TODO: test FetchColumnSecurityRulesRequest } - /** Test the property 'tables' */ + /** + * Test the property 'tables' + */ @Test public void tablesTest() { // TODO: test tables } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java index b64f58e4e..311a698e0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchConnectionDiffStatusResponse */ +/** + * Model tests for FetchConnectionDiffStatusResponse + */ public class FetchConnectionDiffStatusResponseTest { private final FetchConnectionDiffStatusResponse model = new FetchConnectionDiffStatusResponse(); - /** Model tests for FetchConnectionDiffStatusResponse */ + /** + * Model tests for FetchConnectionDiffStatusResponse + */ @Test public void testFetchConnectionDiffStatusResponse() { // TODO: test FetchConnectionDiffStatusResponse } - /** Test the property 'status' */ + /** + * Test the property 'status' + */ @Test public void statusTest() { // TODO: test status } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java index 1a9536954..2f933c937 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java @@ -4,69 +4,102 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchLiveboardDataRequest */ +/** + * Model tests for FetchLiveboardDataRequest + */ public class FetchLiveboardDataRequestTest { private final FetchLiveboardDataRequest model = new FetchLiveboardDataRequest(); - /** Model tests for FetchLiveboardDataRequest */ + /** + * Model tests for FetchLiveboardDataRequest + */ @Test public void testFetchLiveboardDataRequest() { // TODO: test FetchLiveboardDataRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'visualizationIdentifiers' */ + /** + * Test the property 'visualizationIdentifiers' + */ @Test public void visualizationIdentifiersTest() { // TODO: test visualizationIdentifiers } - /** Test the property 'transientContent' */ + /** + * Test the property 'transientContent' + */ @Test public void transientContentTest() { // TODO: test transientContent } - /** Test the property 'dataFormat' */ + /** + * Test the property 'dataFormat' + */ @Test public void dataFormatTest() { // TODO: test dataFormat } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java index d3f7df868..2dcc26422 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchLiveboardSqlQueryRequest */ +/** + * Model tests for FetchLiveboardSqlQueryRequest + */ public class FetchLiveboardSqlQueryRequestTest { private final FetchLiveboardSqlQueryRequest model = new FetchLiveboardSqlQueryRequest(); - /** Model tests for FetchLiveboardSqlQueryRequest */ + /** + * Model tests for FetchLiveboardSqlQueryRequest + */ @Test public void testFetchLiveboardSqlQueryRequest() { // TODO: test FetchLiveboardSqlQueryRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'visualizationIdentifiers' */ + /** + * Test the property 'visualizationIdentifiers' + */ @Test public void visualizationIdentifiersTest() { // TODO: test visualizationIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java index 6400f5de0..468486e17 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchLogsRequest */ +/** + * Model tests for FetchLogsRequest + */ public class FetchLogsRequestTest { private final FetchLogsRequest model = new FetchLogsRequest(); - /** Model tests for FetchLogsRequest */ + /** + * Model tests for FetchLogsRequest + */ @Test public void testFetchLogsRequest() { // TODO: test FetchLogsRequest } - /** Test the property 'logType' */ + /** + * Test the property 'logType' + */ @Test public void logTypeTest() { // TODO: test logType } - /** Test the property 'startEpochTimeInMillis' */ + /** + * Test the property 'startEpochTimeInMillis' + */ @Test public void startEpochTimeInMillisTest() { // TODO: test startEpochTimeInMillis } - /** Test the property 'endEpochTimeInMillis' */ + /** + * Test the property 'endEpochTimeInMillis' + */ @Test public void endEpochTimeInMillisTest() { // TODO: test endEpochTimeInMillis } - /** Test the property 'getAllLogs' */ + /** + * Test the property 'getAllLogs' + */ @Test public void getAllLogsTest() { // TODO: test getAllLogs } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java index 4961abdd4..e54c7c961 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java @@ -4,46 +4,72 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PermissionsMetadataTypeInput; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchPermissionsOfPrincipalsRequest */ +/** + * Model tests for FetchPermissionsOfPrincipalsRequest + */ public class FetchPermissionsOfPrincipalsRequestTest { - private final FetchPermissionsOfPrincipalsRequest model = - new FetchPermissionsOfPrincipalsRequest(); + private final FetchPermissionsOfPrincipalsRequest model = new FetchPermissionsOfPrincipalsRequest(); - /** Model tests for FetchPermissionsOfPrincipalsRequest */ + /** + * Model tests for FetchPermissionsOfPrincipalsRequest + */ @Test public void testFetchPermissionsOfPrincipalsRequest() { // TODO: test FetchPermissionsOfPrincipalsRequest } - /** Test the property 'principals' */ + /** + * Test the property 'principals' + */ @Test public void principalsTest() { // TODO: test principals } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'defaultMetadataType' */ + /** + * Test the property 'defaultMetadataType' + */ @Test public void defaultMetadataTypeTest() { // TODO: test defaultMetadataType } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java index 3daf0ac3b..87b9783d0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java @@ -4,51 +4,81 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PermissionsMetadataTypeInput; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FetchPermissionsOnMetadataRequest */ +/** + * Model tests for FetchPermissionsOnMetadataRequest + */ public class FetchPermissionsOnMetadataRequestTest { private final FetchPermissionsOnMetadataRequest model = new FetchPermissionsOnMetadataRequest(); - /** Model tests for FetchPermissionsOnMetadataRequest */ + /** + * Model tests for FetchPermissionsOnMetadataRequest + */ @Test public void testFetchPermissionsOnMetadataRequest() { // TODO: test FetchPermissionsOnMetadataRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'principals' */ + /** + * Test the property 'principals' + */ @Test public void principalsTest() { // TODO: test principals } - /** Test the property 'includeDependentObjects' */ + /** + * Test the property 'includeDependentObjects' + */ @Test public void includeDependentObjectsTest() { // TODO: test includeDependentObjects } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'permissionType' */ + /** + * Test the property 'permissionType' + */ @Test public void permissionTypeTest() { // TODO: test permissionType } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java index 6af9c9d9a..c126ed604 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java @@ -4,33 +4,54 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FilterRules */ +/** + * Model tests for FilterRules + */ public class FilterRulesTest { private final FilterRules model = new FilterRules(); - /** Model tests for FilterRules */ + /** + * Model tests for FilterRules + */ @Test public void testFilterRules() { // TODO: test FilterRules } - /** Test the property 'columnName' */ + /** + * Test the property 'columnName' + */ @Test public void columnNameTest() { // TODO: test columnName } - /** Test the property 'operator' */ + /** + * Test the property 'operator' + */ @Test public void operatorTest() { // TODO: test operator } - /** Test the property 'values' */ + /** + * Test the property 'values' + */ @Test public void valuesTest() { // TODO: test values } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java index 4f5a110f2..dfd779bc1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java @@ -4,21 +4,38 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ForceLogoutUsersRequest */ +/** + * Model tests for ForceLogoutUsersRequest + */ public class ForceLogoutUsersRequestTest { private final ForceLogoutUsersRequest model = new ForceLogoutUsersRequest(); - /** Model tests for ForceLogoutUsersRequest */ + /** + * Model tests for ForceLogoutUsersRequest + */ @Test public void testForceLogoutUsersRequest() { // TODO: test ForceLogoutUsersRequest } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java index dc9e51eb8..418d9f657 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CronExpressionInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for FrequencyInput */ +/** + * Model tests for FrequencyInput + */ public class FrequencyInputTest { private final FrequencyInput model = new FrequencyInput(); - /** Model tests for FrequencyInput */ + /** + * Model tests for FrequencyInput + */ @Test public void testFrequencyInput() { // TODO: test FrequencyInput } - /** Test the property 'cronExpression' */ + /** + * Test the property 'cronExpression' + */ @Test public void cronExpressionTest() { // TODO: test cronExpression } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java index d4e891fcb..9532585ee 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CronExpression; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Frequency */ +/** + * Model tests for Frequency + */ public class FrequencyTest { private final Frequency model = new Frequency(); - /** Model tests for Frequency */ + /** + * Model tests for Frequency + */ @Test public void testFrequency() { // TODO: test Frequency } - /** Test the property 'cronExpression' */ + /** + * Test the property 'cronExpression' + */ @Test public void cronExpressionTest() { // TODO: test cronExpression } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java index e23b5511b..02130d61d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java @@ -4,57 +4,84 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GenerateCSVRequest */ +/** + * Model tests for GenerateCSVRequest + */ public class GenerateCSVRequestTest { private final GenerateCSVRequest model = new GenerateCSVRequest(); - /** Model tests for GenerateCSVRequest */ + /** + * Model tests for GenerateCSVRequest + */ @Test public void testGenerateCSVRequest() { // TODO: test GenerateCSVRequest } - /** Test the property 'startDate' */ + /** + * Test the property 'startDate' + */ @Test public void startDateTest() { // TODO: test startDate } - /** Test the property 'endDate' */ + /** + * Test the property 'endDate' + */ @Test public void endDateTest() { // TODO: test endDate } - /** Test the property 'calendarType' */ + /** + * Test the property 'calendarType' + */ @Test public void calendarTypeTest() { // TODO: test calendarType } - /** Test the property 'monthOffset' */ + /** + * Test the property 'monthOffset' + */ @Test public void monthOffsetTest() { // TODO: test monthOffset } - /** Test the property 'startDayOfWeek' */ + /** + * Test the property 'startDayOfWeek' + */ @Test public void startDayOfWeekTest() { // TODO: test startDayOfWeek } - /** Test the property 'quarterNamePrefix' */ + /** + * Test the property 'quarterNamePrefix' + */ @Test public void quarterNamePrefixTest() { // TODO: test quarterNamePrefix } - /** Test the property 'yearNamePrefix' */ + /** + * Test the property 'yearNamePrefix' + */ @Test public void yearNamePrefixTest() { // TODO: test yearNamePrefix } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java index 1a9956782..3fd1dd18b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GenericInfo */ +/** + * Model tests for GenericInfo + */ public class GenericInfoTest { private final GenericInfo model = new GenericInfo(); - /** Model tests for GenericInfo */ + /** + * Model tests for GenericInfo + */ @Test public void testGenericInfo() { // TODO: test GenericInfo } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java index a85e81b9d..d3cfae9ff 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ImportEPackAsyncTaskStatus; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetAsyncImportStatusResponse */ +/** + * Model tests for GetAsyncImportStatusResponse + */ public class GetAsyncImportStatusResponseTest { private final GetAsyncImportStatusResponse model = new GetAsyncImportStatusResponse(); - /** Model tests for GetAsyncImportStatusResponse */ + /** + * Model tests for GetAsyncImportStatusResponse + */ @Test public void testGetAsyncImportStatusResponse() { // TODO: test GetAsyncImportStatusResponse } - /** Test the property 'statusList' */ + /** + * Test the property 'statusList' + */ @Test public void statusListTest() { // TODO: test statusList } - /** Test the property 'lastBatch' */ + /** + * Test the property 'lastBatch' + */ @Test public void lastBatchTest() { // TODO: test lastBatch } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java index 3754a0258..88b516bfb 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java @@ -4,93 +4,139 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FilterRules; +import com.thoughtspot.client.model.GroupObject; +import com.thoughtspot.client.model.ParameterValues; +import com.thoughtspot.client.model.TokenAccessScopeObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetCustomAccessTokenRequest */ +/** + * Model tests for GetCustomAccessTokenRequest + */ public class GetCustomAccessTokenRequestTest { private final GetCustomAccessTokenRequest model = new GetCustomAccessTokenRequest(); - /** Model tests for GetCustomAccessTokenRequest */ + /** + * Model tests for GetCustomAccessTokenRequest + */ @Test public void testGetCustomAccessTokenRequest() { // TODO: test GetCustomAccessTokenRequest } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'secretKey' */ + /** + * Test the property 'secretKey' + */ @Test public void secretKeyTest() { // TODO: test secretKey } - /** Test the property 'validityTimeInSec' */ + /** + * Test the property 'validityTimeInSec' + */ @Test public void validityTimeInSecTest() { // TODO: test validityTimeInSec } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } - /** Test the property 'persistOption' */ + /** + * Test the property 'persistOption' + */ @Test public void persistOptionTest() { // TODO: test persistOption } - /** Test the property 'filterRules' */ + /** + * Test the property 'filterRules' + */ @Test public void filterRulesTest() { // TODO: test filterRules } - /** Test the property 'parameterValues' */ + /** + * Test the property 'parameterValues' + */ @Test public void parameterValuesTest() { // TODO: test parameterValues } - /** Test the property 'objects' */ + /** + * Test the property 'objects' + */ @Test public void objectsTest() { // TODO: test objects } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'groups' */ + /** + * Test the property 'groups' + */ @Test public void groupsTest() { // TODO: test groups } - /** Test the property 'autoCreate' */ + /** + * Test the property 'autoCreate' + */ @Test public void autoCreateTest() { // TODO: test autoCreate } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java index 22412d2a1..a0ce1989a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetDataSourceSuggestionsRequest */ +/** + * Model tests for GetDataSourceSuggestionsRequest + */ public class GetDataSourceSuggestionsRequestTest { private final GetDataSourceSuggestionsRequest model = new GetDataSourceSuggestionsRequest(); - /** Model tests for GetDataSourceSuggestionsRequest */ + /** + * Model tests for GetDataSourceSuggestionsRequest + */ @Test public void testGetDataSourceSuggestionsRequest() { // TODO: test GetDataSourceSuggestionsRequest } - /** Test the property 'query' */ + /** + * Test the property 'query' + */ @Test public void queryTest() { // TODO: test query } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java index 75ef7b4f6..66dc96377 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 @@ -4,69 +4,112 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserParameterOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetFullAccessTokenRequest */ +/** + * Model tests for GetFullAccessTokenRequest + */ public class GetFullAccessTokenRequestTest { private final GetFullAccessTokenRequest model = new GetFullAccessTokenRequest(); - /** Model tests for GetFullAccessTokenRequest */ + /** + * Model tests for GetFullAccessTokenRequest + */ @Test public void testGetFullAccessTokenRequest() { // TODO: test GetFullAccessTokenRequest } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'secretKey' */ + /** + * Test the property 'secretKey' + */ @Test public void secretKeyTest() { // TODO: test secretKey } - /** Test the property 'validityTimeInSec' */ + /** + * Test the property 'validityTimeInSec' + */ @Test public void validityTimeInSecTest() { // TODO: test validityTimeInSec } - /** Test the property 'orgId' */ + /** + * Test the property 'orgId' + */ @Test public void orgIdTest() { // TODO: test orgId } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'autoCreate' */ + /** + * Test the property 'autoCreate' + */ @Test public void autoCreateTest() { // TODO: test autoCreate } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } + + /** + * Test the property 'userParameters' + */ + @Test + public void userParametersTest() { + // TODO: test userParameters + } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java index 6618c81f0..35b464e41 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 @@ -4,75 +4,120 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserParameterOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetObjectAccessTokenRequest */ +/** + * Model tests for GetObjectAccessTokenRequest + */ public class GetObjectAccessTokenRequestTest { private final GetObjectAccessTokenRequest model = new GetObjectAccessTokenRequest(); - /** Model tests for GetObjectAccessTokenRequest */ + /** + * Model tests for GetObjectAccessTokenRequest + */ @Test public void testGetObjectAccessTokenRequest() { // TODO: test GetObjectAccessTokenRequest } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'objectId' */ + /** + * Test the property 'objectId' + */ @Test public void objectIdTest() { // TODO: test objectId } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'secretKey' */ + /** + * Test the property 'secretKey' + */ @Test public void secretKeyTest() { // TODO: test secretKey } - /** Test the property 'validityTimeInSec' */ + /** + * Test the property 'validityTimeInSec' + */ @Test public void validityTimeInSecTest() { // TODO: test validityTimeInSec } - /** Test the property 'orgId' */ + /** + * Test the property 'orgId' + */ @Test public void orgIdTest() { // TODO: test orgId } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'autoCreate' */ + /** + * Test the property 'autoCreate' + */ @Test public void autoCreateTest() { // TODO: test autoCreate } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } + + /** + * Test the property 'userParameters' + */ + @Test + public void userParametersTest() { + // TODO: test userParameters + } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java index 01feb96dc..06f97ebef 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java @@ -4,45 +4,71 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AIContext; +import com.thoughtspot.client.model.MetadataContext; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetRelevantQuestionsRequest */ +/** + * Model tests for GetRelevantQuestionsRequest + */ public class GetRelevantQuestionsRequestTest { private final GetRelevantQuestionsRequest model = new GetRelevantQuestionsRequest(); - /** Model tests for GetRelevantQuestionsRequest */ + /** + * Model tests for GetRelevantQuestionsRequest + */ @Test public void testGetRelevantQuestionsRequest() { // TODO: test GetRelevantQuestionsRequest } - /** Test the property 'metadataContext' */ + /** + * Test the property 'metadataContext' + */ @Test public void metadataContextTest() { // TODO: test metadataContext } - /** Test the property 'limitRelevantQuestions' */ + /** + * Test the property 'limitRelevantQuestions' + */ @Test public void limitRelevantQuestionsTest() { // TODO: test limitRelevantQuestions } - /** Test the property 'bypassCache' */ + /** + * Test the property 'bypassCache' + */ @Test public void bypassCacheTest() { // TODO: test bypassCache } - /** Test the property 'query' */ + /** + * Test the property 'query' + */ @Test public void queryTest() { // TODO: test query } - /** Test the property 'aiContext' */ + /** + * Test the property 'aiContext' + */ @Test public void aiContextTest() { // TODO: test aiContext } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java index 6e571bae9..5878ed12c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java @@ -4,45 +4,68 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GetTokenResponse */ +/** + * Model tests for GetTokenResponse + */ public class GetTokenResponseTest { private final GetTokenResponse model = new GetTokenResponse(); - /** Model tests for GetTokenResponse */ + /** + * Model tests for GetTokenResponse + */ @Test public void testGetTokenResponse() { // TODO: test GetTokenResponse } - /** Test the property 'token' */ + /** + * Test the property 'token' + */ @Test public void tokenTest() { // TODO: test token } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'expirationTimeInMillis' */ + /** + * Test the property 'expirationTimeInMillis' + */ @Test public void expirationTimeInMillisTest() { // TODO: test expirationTimeInMillis } - /** Test the property 'validForUserId' */ + /** + * Test the property 'validForUserId' + */ @Test public void validForUserIdTest() { // TODO: test validForUserId } - /** Test the property 'validForUsername' */ + /** + * Test the property 'validForUsername' + */ @Test public void validForUsernameTest() { // TODO: test validForUsername } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java index bcb2eb26d..0dd52b753 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GroupObject */ +/** + * Model tests for GroupObject + */ public class GroupObjectTest { private final GroupObject model = new GroupObject(); - /** Model tests for GroupObject */ + /** + * Model tests for GroupObject + */ @Test public void testGroupObject() { // TODO: test GroupObject } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java index 0d789c0b8..d17292694 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java @@ -4,69 +4,103 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for GroupsImportListInput */ +/** + * Model tests for GroupsImportListInput + */ public class GroupsImportListInputTest { private final GroupsImportListInput model = new GroupsImportListInput(); - /** Model tests for GroupsImportListInput */ + /** + * Model tests for GroupsImportListInput + */ @Test public void testGroupsImportListInput() { // TODO: test GroupsImportListInput } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'groupIdentifier' */ + /** + * Test the property 'groupIdentifier' + */ @Test public void groupIdentifierTest() { // TODO: test groupIdentifier } - /** Test the property 'defaultLiveboardIdentifiers' */ + /** + * Test the property 'defaultLiveboardIdentifiers' + */ @Test public void defaultLiveboardIdentifiersTest() { // TODO: test defaultLiveboardIdentifiers } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'subGroupIdentifiers' */ + /** + * Test the property 'subGroupIdentifiers' + */ @Test public void subGroupIdentifiersTest() { // TODO: test subGroupIdentifiers } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java index a162e76ec..56dc83eca 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for HeaderAttributeInput */ +/** + * Model tests for HeaderAttributeInput + */ public class HeaderAttributeInputTest { private final HeaderAttributeInput model = new HeaderAttributeInput(); - /** Model tests for HeaderAttributeInput */ + /** + * Model tests for HeaderAttributeInput + */ @Test public void testHeaderAttributeInput() { // TODO: test HeaderAttributeInput } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java index 874f145e5..61ebd8544 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.HeaderAttributeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for HeaderUpdateInput */ +/** + * Model tests for HeaderUpdateInput + */ public class HeaderUpdateInputTest { private final HeaderUpdateInput model = new HeaderUpdateInput(); - /** Model tests for HeaderUpdateInput */ + /** + * Model tests for HeaderUpdateInput + */ @Test public void testHeaderUpdateInput() { // TODO: test HeaderUpdateInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'objIdentifier' */ + /** + * Test the property 'objIdentifier' + */ @Test public void objIdentifierTest() { // TODO: test objIdentifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'attributes' */ + /** + * Test the property 'attributes' + */ @Test public void attributesTest() { // TODO: test attributes } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java index 509c09bcd..6bf809d8f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java @@ -4,105 +4,149 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportEPackAsyncTaskStatus */ +/** + * Model tests for ImportEPackAsyncTaskStatus + */ public class ImportEPackAsyncTaskStatusTest { private final ImportEPackAsyncTaskStatus model = new ImportEPackAsyncTaskStatus(); - /** Model tests for ImportEPackAsyncTaskStatus */ + /** + * Model tests for ImportEPackAsyncTaskStatus + */ @Test public void testImportEPackAsyncTaskStatus() { // TODO: test ImportEPackAsyncTaskStatus } - /** Test the property 'tenantId' */ + /** + * Test the property 'tenantId' + */ @Test public void tenantIdTest() { // TODO: test tenantId } - /** Test the property 'orgId' */ + /** + * Test the property 'orgId' + */ @Test public void orgIdTest() { // TODO: test orgId } - /** Test the property 'taskId' */ + /** + * Test the property 'taskId' + */ @Test public void taskIdTest() { // TODO: test taskId } - /** Test the property 'taskName' */ + /** + * Test the property 'taskName' + */ @Test public void taskNameTest() { // TODO: test taskName } - /** Test the property 'importResponse' */ + /** + * Test the property 'importResponse' + */ @Test public void importResponseTest() { // TODO: test importResponse } - /** Test the property 'taskStatus' */ + /** + * Test the property 'taskStatus' + */ @Test public void taskStatusTest() { // TODO: test taskStatus } - /** Test the property 'authorId' */ + /** + * Test the property 'authorId' + */ @Test public void authorIdTest() { // TODO: test authorId } - /** Test the property 'importPolicy' */ + /** + * Test the property 'importPolicy' + */ @Test public void importPolicyTest() { // TODO: test importPolicy } - /** Test the property 'createdAt' */ + /** + * Test the property 'createdAt' + */ @Test public void createdAtTest() { // TODO: test createdAt } - /** Test the property 'inProgressAt' */ + /** + * Test the property 'inProgressAt' + */ @Test public void inProgressAtTest() { // TODO: test inProgressAt } - /** Test the property 'completedAt' */ + /** + * Test the property 'completedAt' + */ @Test public void completedAtTest() { // TODO: test completedAt } - /** Test the property 'totalObjectCount' */ + /** + * Test the property 'totalObjectCount' + */ @Test public void totalObjectCountTest() { // TODO: test totalObjectCount } - /** Test the property 'objectProcessedCount' */ + /** + * Test the property 'objectProcessedCount' + */ @Test public void objectProcessedCountTest() { // TODO: test objectProcessedCount } - /** Test the property 'modifiedAt' */ + /** + * Test the property 'modifiedAt' + */ @Test public void modifiedAtTest() { // TODO: test modifiedAt } - /** Test the property 'authorDisplayName' */ + /** + * Test the property 'authorDisplayName' + */ @Test public void authorDisplayNameTest() { // TODO: test authorDisplayName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java index beff677e5..45501d5de 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java @@ -4,51 +4,79 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportMetadataTMLAsyncRequest */ +/** + * Model tests for ImportMetadataTMLAsyncRequest + */ public class ImportMetadataTMLAsyncRequestTest { private final ImportMetadataTMLAsyncRequest model = new ImportMetadataTMLAsyncRequest(); - /** Model tests for ImportMetadataTMLAsyncRequest */ + /** + * Model tests for ImportMetadataTMLAsyncRequest + */ @Test public void testImportMetadataTMLAsyncRequest() { // TODO: test ImportMetadataTMLAsyncRequest } - /** Test the property 'metadataTmls' */ + /** + * Test the property 'metadataTmls' + */ @Test public void metadataTmlsTest() { // TODO: test metadataTmls } - /** Test the property 'createNew' */ + /** + * Test the property 'createNew' + */ @Test public void createNewTest() { // TODO: test createNew } - /** Test the property 'allOrgsOverride' */ + /** + * Test the property 'allOrgsOverride' + */ @Test public void allOrgsOverrideTest() { // TODO: test allOrgsOverride } - /** Test the property 'importPolicy' */ + /** + * Test the property 'importPolicy' + */ @Test public void importPolicyTest() { // TODO: test importPolicy } - /** Test the property 'skipDiffCheck' */ + /** + * Test the property 'skipDiffCheck' + */ @Test public void skipDiffCheckTest() { // TODO: test skipDiffCheck } - /** Test the property 'enableLargeMetadataValidation' */ + /** + * Test the property 'enableLargeMetadataValidation' + */ @Test public void enableLargeMetadataValidationTest() { // TODO: test enableLargeMetadataValidation } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java index 6bfb52bc3..b774c40de 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java @@ -4,51 +4,79 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportMetadataTMLRequest */ +/** + * Model tests for ImportMetadataTMLRequest + */ public class ImportMetadataTMLRequestTest { private final ImportMetadataTMLRequest model = new ImportMetadataTMLRequest(); - /** Model tests for ImportMetadataTMLRequest */ + /** + * Model tests for ImportMetadataTMLRequest + */ @Test public void testImportMetadataTMLRequest() { // TODO: test ImportMetadataTMLRequest } - /** Test the property 'metadataTmls' */ + /** + * Test the property 'metadataTmls' + */ @Test public void metadataTmlsTest() { // TODO: test metadataTmls } - /** Test the property 'importPolicy' */ + /** + * Test the property 'importPolicy' + */ @Test public void importPolicyTest() { // TODO: test importPolicy } - /** Test the property 'createNew' */ + /** + * Test the property 'createNew' + */ @Test public void createNewTest() { // TODO: test createNew } - /** Test the property 'allOrgsOverride' */ + /** + * Test the property 'allOrgsOverride' + */ @Test public void allOrgsOverrideTest() { // TODO: test allOrgsOverride } - /** Test the property 'skipDiffCheck' */ + /** + * Test the property 'skipDiffCheck' + */ @Test public void skipDiffCheckTest() { // TODO: test skipDiffCheck } - /** Test the property 'enableLargeMetadataValidation' */ + /** + * Test the property 'enableLargeMetadataValidation' + */ @Test public void enableLargeMetadataValidationTest() { // TODO: test enableLargeMetadataValidation } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java index a65847900..d3502332a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.GroupsImportListInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportUserGroupsRequest */ +/** + * Model tests for ImportUserGroupsRequest + */ public class ImportUserGroupsRequestTest { private final ImportUserGroupsRequest model = new ImportUserGroupsRequest(); - /** Model tests for ImportUserGroupsRequest */ + /** + * Model tests for ImportUserGroupsRequest + */ @Test public void testImportUserGroupsRequest() { // TODO: test ImportUserGroupsRequest } - /** Test the property 'groups' */ + /** + * Test the property 'groups' + */ @Test public void groupsTest() { // TODO: test groups } - /** Test the property 'deleteUnspecifiedGroups' */ + /** + * Test the property 'deleteUnspecifiedGroups' + */ @Test public void deleteUnspecifiedGroupsTest() { // TODO: test deleteUnspecifiedGroups } - /** Test the property 'dryRun' */ + /** + * Test the property 'dryRun' + */ @Test public void dryRunTest() { // TODO: test dryRun } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java index 91741137e..1dd8aac31 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java @@ -4,33 +4,55 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserGroup; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportUserGroupsResponse */ +/** + * Model tests for ImportUserGroupsResponse + */ public class ImportUserGroupsResponseTest { private final ImportUserGroupsResponse model = new ImportUserGroupsResponse(); - /** Model tests for ImportUserGroupsResponse */ + /** + * Model tests for ImportUserGroupsResponse + */ @Test public void testImportUserGroupsResponse() { // TODO: test ImportUserGroupsResponse } - /** Test the property 'groupsAdded' */ + /** + * Test the property 'groupsAdded' + */ @Test public void groupsAddedTest() { // TODO: test groupsAdded } - /** Test the property 'groupsDeleted' */ + /** + * Test the property 'groupsDeleted' + */ @Test public void groupsDeletedTest() { // TODO: test groupsDeleted } - /** Test the property 'groupsUpdated' */ + /** + * Test the property 'groupsUpdated' + */ @Test public void groupsUpdatedTest() { // TODO: test groupsUpdated } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java index a28d70c2b..1bda8b0e0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java @@ -4,99 +4,144 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportUser */ +/** + * Model tests for ImportUser + */ public class ImportUserTest { private final ImportUser model = new ImportUser(); - /** Model tests for ImportUser */ + /** + * Model tests for ImportUser + */ @Test public void testImportUser() { // TODO: test ImportUser } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'accountType' */ + /** + * Test the property 'accountType' + */ @Test public void accountTypeTest() { // TODO: test accountType } - /** Test the property 'accountStatus' */ + /** + * Test the property 'accountStatus' + */ @Test public void accountStatusTest() { // TODO: test accountStatus } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'notifyOnShare' */ + /** + * Test the property 'notifyOnShare' + */ @Test public void notifyOnShareTest() { // TODO: test notifyOnShare } - /** Test the property 'showOnboardingExperience' */ + /** + * Test the property 'showOnboardingExperience' + */ @Test public void showOnboardingExperienceTest() { // TODO: test showOnboardingExperience } - /** Test the property 'onboardingExperienceCompleted' */ + /** + * Test the property 'onboardingExperienceCompleted' + */ @Test public void onboardingExperienceCompletedTest() { // TODO: test onboardingExperienceCompleted } - /** Test the property 'homeLiveboardIdentifier' */ + /** + * Test the property 'homeLiveboardIdentifier' + */ @Test public void homeLiveboardIdentifierTest() { // TODO: test homeLiveboardIdentifier } - /** Test the property 'favoriteMetadata' */ + /** + * Test the property 'favoriteMetadata' + */ @Test public void favoriteMetadataTest() { // TODO: test favoriteMetadata } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java index 68f1801ec..232209cfe 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportUserType */ +/** + * Model tests for ImportUserType + */ public class ImportUserTypeTest { private final ImportUserType model = new ImportUserType(); - /** Model tests for ImportUserType */ + /** + * Model tests for ImportUserType + */ @Test public void testImportUserType() { // TODO: test ImportUserType } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java index 38899f874..55b443ab6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ImportUser; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportUsersRequest */ +/** + * Model tests for ImportUsersRequest + */ public class ImportUsersRequestTest { private final ImportUsersRequest model = new ImportUsersRequest(); - /** Model tests for ImportUsersRequest */ + /** + * Model tests for ImportUsersRequest + */ @Test public void testImportUsersRequest() { // TODO: test ImportUsersRequest } - /** Test the property 'users' */ + /** + * Test the property 'users' + */ @Test public void usersTest() { // TODO: test users } - /** Test the property 'defaultPassword' */ + /** + * Test the property 'defaultPassword' + */ @Test public void defaultPasswordTest() { // TODO: test defaultPassword } - /** Test the property 'dryRun' */ + /** + * Test the property 'dryRun' + */ @Test public void dryRunTest() { // TODO: test dryRun } - /** Test the property 'deleteUnspecifiedUsers' */ + /** + * Test the property 'deleteUnspecifiedUsers' + */ @Test public void deleteUnspecifiedUsersTest() { // TODO: test deleteUnspecifiedUsers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java index cbf7722f6..cc8ddc5ad 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ImportUserType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ImportUsersResponse */ +/** + * Model tests for ImportUsersResponse + */ public class ImportUsersResponseTest { private final ImportUsersResponse model = new ImportUsersResponse(); - /** Model tests for ImportUsersResponse */ + /** + * Model tests for ImportUsersResponse + */ @Test public void testImportUsersResponse() { // TODO: test ImportUsersResponse } - /** Test the property 'usersAdded' */ + /** + * Test the property 'usersAdded' + */ @Test public void usersAddedTest() { // TODO: test usersAdded } - /** Test the property 'usersUpdated' */ + /** + * Test the property 'usersUpdated' + */ @Test public void usersUpdatedTest() { // TODO: test usersUpdated } - /** Test the property 'usersDeleted' */ + /** + * Test the property 'usersDeleted' + */ @Test public void usersDeletedTest() { // TODO: test usersDeleted } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java index 8fe177e19..98145ae06 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for InputEurekaNLSRequest */ +/** + * Model tests for InputEurekaNLSRequest + */ public class InputEurekaNLSRequestTest { private final InputEurekaNLSRequest model = new InputEurekaNLSRequest(); - /** Model tests for InputEurekaNLSRequest */ + /** + * Model tests for InputEurekaNLSRequest + */ @Test public void testInputEurekaNLSRequest() { // TODO: test InputEurekaNLSRequest } - /** Test the property 'agentVersion' */ + /** + * Test the property 'agentVersion' + */ @Test public void agentVersionTest() { // TODO: test agentVersion } - /** Test the property 'bypassCache' */ + /** + * Test the property 'bypassCache' + */ @Test public void bypassCacheTest() { // TODO: test bypassCache } - /** Test the property 'instructions' */ + /** + * Test the property 'instructions' + */ @Test public void instructionsTest() { // TODO: test instructions } - /** Test the property 'query' */ + /** + * Test the property 'query' + */ @Test public void queryTest() { // TODO: test query } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/InputVariableValueTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/InputVariableValueTest.java deleted file mode 100644 index 1079c5418..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/InputVariableValueTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for InputVariableValue */ -public class InputVariableValueTest { - private final InputVariableValue model = new InputVariableValue(); - - /** Model tests for InputVariableValue */ - @Test - public void testInputVariableValue() { - // TODO: test InputVariableValue - } - - /** Test the property 'value' */ - @Test - public void valueTest() { - // TODO: test value - } - - /** 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 'priority' */ - @Test - public void priorityTest() { - // TODO: test priority - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java index 8b3046281..085566fe5 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for JWTMetadataObject */ +/** + * Model tests for JWTMetadataObject + */ public class JWTMetadataObjectTest { private final JWTMetadataObject model = new JWTMetadataObject(); - /** Model tests for JWTMetadataObject */ + /** + * Model tests for JWTMetadataObject + */ @Test public void testJWTMetadataObject() { // TODO: test JWTMetadataObject } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java index 94534a930..b072de0ef 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for JWTParameter */ +/** + * Model tests for JWTParameter + */ public class JWTParameterTest { private final JWTParameter model = new JWTParameter(); - /** Model tests for JWTParameter */ + /** + * Model tests for JWTParameter + */ @Test public void testJWTParameter() { // TODO: test JWTParameter } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java index aa550d338..8bab423ac 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java @@ -4,21 +4,40 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.JWTParameter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for JWTUserOptionsFull */ +/** + * Model tests for JWTUserOptionsFull + */ public class JWTUserOptionsFullTest { private final JWTUserOptionsFull model = new JWTUserOptionsFull(); - /** Model tests for JWTUserOptionsFull */ + /** + * Model tests for JWTUserOptionsFull + */ @Test public void testJWTUserOptionsFull() { // TODO: test JWTUserOptionsFull } - /** Test the property 'parameters' */ + /** + * Test the property 'parameters' + */ @Test public void parametersTest() { // TODO: test parameters } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java index 773400431..e8f93fb87 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.JWTMetadataObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for JWTUserOptions */ +/** + * Model tests for JWTUserOptions + */ public class JWTUserOptionsTest { private final JWTUserOptions model = new JWTUserOptions(); - /** Model tests for JWTUserOptions */ + /** + * Model tests for JWTUserOptions + */ @Test public void testJWTUserOptions() { // TODO: test JWTUserOptions } - /** Test the property 'parameters' */ + /** + * Test the property 'parameters' + */ @Test public void parametersTest() { // TODO: test parameters } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LBContextInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LBContextInputTest.java index e1fa9a77e..d9b8b3d8e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LBContextInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LBContextInputTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LBContextInput */ +/** + * Model tests for LBContextInput + */ public class LBContextInputTest { private final LBContextInput model = new LBContextInput(); - /** Model tests for LBContextInput */ + /** + * Model tests for LBContextInput + */ @Test public void testLBContextInput() { // TODO: test LBContextInput } - /** Test the property 'liveboardIdentifier' */ + /** + * Test the property 'liveboardIdentifier' + */ @Test public void liveboardIdentifierTest() { // TODO: test liveboardIdentifier } - /** Test the property 'visualizationIdentifier' */ + /** + * Test the property 'visualizationIdentifier' + */ @Test public void visualizationIdentifierTest() { // TODO: test visualizationIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java index 7aa309a3e..d5415d146 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java @@ -4,69 +4,103 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LiveboardContent */ +/** + * Model tests for LiveboardContent + */ public class LiveboardContentTest { private final LiveboardContent model = new LiveboardContent(); - /** Model tests for LiveboardContent */ + /** + * Model tests for LiveboardContent + */ @Test public void testLiveboardContent() { // TODO: test LiveboardContent } - /** Test the property 'availableDataRowCount' */ + /** + * Test the property 'availableDataRowCount' + */ @Test public void availableDataRowCountTest() { // TODO: test availableDataRowCount } - /** Test the property 'columnNames' */ + /** + * Test the property 'columnNames' + */ @Test public void columnNamesTest() { // TODO: test columnNames } - /** Test the property 'dataRows' */ + /** + * Test the property 'dataRows' + */ @Test public void dataRowsTest() { // TODO: test dataRows } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'returnedDataRowCount' */ + /** + * Test the property 'returnedDataRowCount' + */ @Test public void returnedDataRowCountTest() { // TODO: test returnedDataRowCount } - /** Test the property 'samplingRatio' */ + /** + * Test the property 'samplingRatio' + */ @Test public void samplingRatioTest() { // TODO: test samplingRatio } - /** Test the property 'visualizationId' */ + /** + * Test the property 'visualizationId' + */ @Test public void visualizationIdTest() { // TODO: test visualizationId } - /** Test the property 'visualizationName' */ + /** + * Test the property 'visualizationName' + */ @Test public void visualizationNameTest() { // TODO: test visualizationName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java index c3a40b86b..873afaf24 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java @@ -4,33 +4,55 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.LiveboardContent; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LiveboardDataResponse */ +/** + * Model tests for LiveboardDataResponse + */ public class LiveboardDataResponseTest { private final LiveboardDataResponse model = new LiveboardDataResponse(); - /** Model tests for LiveboardDataResponse */ + /** + * Model tests for LiveboardDataResponse + */ @Test public void testLiveboardDataResponse() { // TODO: test LiveboardDataResponse } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'contents' */ + /** + * Test the property 'contents' + */ @Test public void contentsTest() { // TODO: test contents } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java index ab1feb183..967edcf13 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java @@ -4,21 +4,38 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LiveboardOptionsInput */ +/** + * Model tests for LiveboardOptionsInput + */ public class LiveboardOptionsInputTest { private final LiveboardOptionsInput model = new LiveboardOptionsInput(); - /** Model tests for LiveboardOptionsInput */ + /** + * Model tests for LiveboardOptionsInput + */ @Test public void testLiveboardOptionsInput() { // TODO: test LiveboardOptionsInput } - /** Test the property 'visualizationIdentifiers' */ + /** + * Test the property 'visualizationIdentifiers' + */ @Test public void visualizationIdentifiersTest() { // TODO: test visualizationIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java index 25d2576fa..0d42e4421 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java @@ -4,21 +4,38 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LiveboardOptions */ +/** + * Model tests for LiveboardOptions + */ public class LiveboardOptionsTest { private final LiveboardOptions model = new LiveboardOptions(); - /** Model tests for LiveboardOptions */ + /** + * Model tests for LiveboardOptions + */ @Test public void testLiveboardOptions() { // TODO: test LiveboardOptions } - /** Test the property 'visualizationIdentifiers' */ + /** + * Test the property 'visualizationIdentifiers' + */ @Test public void visualizationIdentifiersTest() { // TODO: test visualizationIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java index 5aa7ccaf5..3d2663ded 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LogResponse */ +/** + * Model tests for LogResponse + */ public class LogResponseTest { private final LogResponse model = new LogResponse(); - /** Model tests for LogResponse */ + /** + * Model tests for LogResponse + */ @Test public void testLogResponse() { // TODO: test LogResponse } - /** Test the property 'date' */ + /** + * Test the property 'date' + */ @Test public void dateTest() { // TODO: test date } - /** Test the property 'log' */ + /** + * Test the property 'log' + */ @Test public void logTest() { // TODO: test log } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java index 3b1fa5e34..e18310890 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for LoginRequest */ +/** + * Model tests for LoginRequest + */ public class LoginRequestTest { private final LoginRequest model = new LoginRequest(); - /** Model tests for LoginRequest */ + /** + * Model tests for LoginRequest + */ @Test public void testLoginRequest() { // TODO: test LoginRequest } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'password' */ + /** + * Test the property 'password' + */ @Test public void passwordTest() { // TODO: test password } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } - /** Test the property 'rememberMe' */ + /** + * Test the property 'rememberMe' + */ @Test public void rememberMeTest() { // TODO: test rememberMe } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java index 1a1bcea50..f3e0a7963 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionConfig; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataAssociationItem */ +/** + * Model tests for MetadataAssociationItem + */ public class MetadataAssociationItemTest { private final MetadataAssociationItem model = new MetadataAssociationItem(); - /** Model tests for MetadataAssociationItem */ + /** + * Model tests for MetadataAssociationItem + */ @Test public void testMetadataAssociationItem() { // TODO: test MetadataAssociationItem } - /** Test the property 'actionConfig' */ + /** + * Test the property 'actionConfig' + */ @Test public void actionConfigTest() { // TODO: test actionConfig } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java index e322a7fae..c8c80a483 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataContext */ +/** + * Model tests for MetadataContext + */ public class MetadataContextTest { private final MetadataContext model = new MetadataContext(); - /** Model tests for MetadataContext */ + /** + * Model tests for MetadataContext + */ @Test public void testMetadataContext() { // TODO: test MetadataContext } - /** Test the property 'dataSourceIdentifiers' */ + /** + * Test the property 'dataSourceIdentifiers' + */ @Test public void dataSourceIdentifiersTest() { // TODO: test dataSourceIdentifiers } - /** Test the property 'answerIdentifiers' */ + /** + * Test the property 'answerIdentifiers' + */ @Test public void answerIdentifiersTest() { // TODO: test answerIdentifiers } - /** Test the property 'conversationIdentifier' */ + /** + * Test the property 'conversationIdentifier' + */ @Test public void conversationIdentifierTest() { // TODO: test conversationIdentifier } - /** Test the property 'liveboardIdentifiers' */ + /** + * Test the property 'liveboardIdentifiers' + */ @Test public void liveboardIdentifiersTest() { // TODO: test liveboardIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java index 514f9d64a..3f3821afa 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataInput */ +/** + * Model tests for MetadataInput + */ public class MetadataInputTest { private final MetadataInput model = new MetadataInput(); - /** Model tests for MetadataInput */ + /** + * Model tests for MetadataInput + */ @Test public void testMetadataInput() { // TODO: test MetadataInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java index 12230bcd9..7475feac9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java @@ -4,45 +4,71 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataListItemInput */ +/** + * Model tests for MetadataListItemInput + */ public class MetadataListItemInputTest { private final MetadataListItemInput model = new MetadataListItemInput(); - /** Model tests for MetadataListItemInput */ + /** + * Model tests for MetadataListItemInput + */ @Test public void testMetadataListItemInput() { // TODO: test MetadataListItemInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'objIdentifier' */ + /** + * Test the property 'objIdentifier' + */ @Test public void objIdentifierTest() { // TODO: test objIdentifier } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'subtypes' */ + /** + * Test the property 'subtypes' + */ @Test public void subtypesTest() { // TODO: test subtypes } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java index e5fd2a285..08e45d1ed 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataObject */ +/** + * Model tests for MetadataObject + */ public class MetadataObjectTest { private final MetadataObject model = new MetadataObject(); - /** Model tests for MetadataObject */ + /** + * Model tests for MetadataObject + */ @Test public void testMetadataObject() { // TODO: test MetadataObject } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java index 7dcd919b1..956eb8d43 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataResponse */ +/** + * Model tests for MetadataResponse + */ public class MetadataResponseTest { private final MetadataResponse model = new MetadataResponse(); - /** Model tests for MetadataResponse */ + /** + * Model tests for MetadataResponse + */ @Test public void testMetadataResponse() { // TODO: test MetadataResponse } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java index ac9d909bd..69cb01f7e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java @@ -4,75 +4,111 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataSearchResponse */ +/** + * Model tests for MetadataSearchResponse + */ public class MetadataSearchResponseTest { private final MetadataSearchResponse model = new MetadataSearchResponse(); - /** Model tests for MetadataSearchResponse */ + /** + * Model tests for MetadataSearchResponse + */ @Test public void testMetadataSearchResponse() { // TODO: test MetadataSearchResponse } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'metadataObjId' */ + /** + * Test the property 'metadataObjId' + */ @Test public void metadataObjIdTest() { // TODO: test metadataObjId } - /** Test the property 'dependentObjects' */ + /** + * Test the property 'dependentObjects' + */ @Test public void dependentObjectsTest() { // TODO: test dependentObjects } - /** Test the property 'incompleteObjects' */ + /** + * Test the property 'incompleteObjects' + */ @Test public void incompleteObjectsTest() { // TODO: test incompleteObjects } - /** Test the property 'metadataDetail' */ + /** + * Test the property 'metadataDetail' + */ @Test public void metadataDetailTest() { // TODO: test metadataDetail } - /** Test the property 'metadataHeader' */ + /** + * Test the property 'metadataHeader' + */ @Test public void metadataHeaderTest() { // TODO: test metadataHeader } - /** Test the property 'visualizationHeaders' */ + /** + * Test the property 'visualizationHeaders' + */ @Test public void visualizationHeadersTest() { // TODO: test visualizationHeaders } - /** Test the property 'stats' */ + /** + * Test the property 'stats' + */ @Test public void statsTest() { // TODO: test stats } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java index 84fb004ff..29550e9d8 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for MetadataSearchSortOptions */ +/** + * Model tests for MetadataSearchSortOptions + */ public class MetadataSearchSortOptionsTest { private final MetadataSearchSortOptions model = new MetadataSearchSortOptions(); - /** Model tests for MetadataSearchSortOptions */ + /** + * Model tests for MetadataSearchSortOptions + */ @Test public void testMetadataSearchSortOptions() { // TODO: test MetadataSearchSortOptions } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'order' */ + /** + * Test the property 'order' + */ @Test public void orderTest() { // TODO: test order } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java index 501e35c7f..bed79373b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java @@ -4,33 +4,55 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ModelTableList */ +/** + * Model tests for ModelTableList + */ public class ModelTableListTest { private final ModelTableList model = new ModelTableList(); - /** Model tests for ModelTableList */ + /** + * Model tests for ModelTableList + */ @Test public void testModelTableList() { // TODO: test ModelTableList } - /** Test the property 'modelName' */ + /** + * Test the property 'modelName' + */ @Test public void modelNameTest() { // TODO: test modelName } - /** Test the property 'modelPath' */ + /** + * Test the property 'modelPath' + */ @Test public void modelPathTest() { // TODO: test modelPath } - /** Test the property 'tables' */ + /** + * Test the property 'tables' + */ @Test public void tablesTest() { // TODO: test tables } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java index b145056b0..4caab088c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ObjectIDAndName */ +/** + * Model tests for ObjectIDAndName + */ public class ObjectIDAndNameTest { private final ObjectIDAndName model = new ObjectIDAndName(); - /** Model tests for ObjectIDAndName */ + /** + * Model tests for ObjectIDAndName + */ @Test public void testObjectIDAndName() { // TODO: test ObjectIDAndName } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } 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..8cfd1a703 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigInputTest.java @@ -0,0 +1,67 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfigInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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..8dafe07b7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigResponseTest.java @@ -0,0 +1,51 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.EventChannelConfig; +import com.thoughtspot.client.model.OrgDetails; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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..afe1bd83f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgDetailsTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrgDetails + */ +public class OrgDetailsTest { + private final OrgDetails model = new OrgDetails(); + + /** + * Model tests for OrgDetails + */ + @Test + public void testOrgDetails() { + // TODO: test OrgDetails + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java index 503978c0a..4ccbf355d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for OrgInfo */ +/** + * Model tests for OrgInfo + */ public class OrgInfoTest { private final OrgInfo model = new OrgInfo(); - /** Model tests for OrgInfo */ + /** + * Model tests for OrgInfo + */ @Test public void testOrgInfo() { // TODO: test OrgInfo } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * 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..e5aad3d8e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInputTest.java @@ -0,0 +1,50 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrgPreferenceSearchCriteriaInput + */ +public class OrgPreferenceSearchCriteriaInputTest { + private final OrgPreferenceSearchCriteriaInput model = new OrgPreferenceSearchCriteriaInput(); + + /** + * Model tests for OrgPreferenceSearchCriteriaInput + */ + @Test + public void testOrgPreferenceSearchCriteriaInput() { + // TODO: test OrgPreferenceSearchCriteriaInput + } + + /** + * Test the property 'orgIdentifier' + */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** + * Test the property 'eventTypes' + */ + @Test + public void eventTypesTest() { + // TODO: test eventTypes + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java index d5527113a..ad6fbe4a5 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for OrgResponse */ +/** + * Model tests for OrgResponse + */ public class OrgResponseTest { private final OrgResponse model = new OrgResponse(); - /** Model tests for OrgResponse */ + /** + * Model tests for OrgResponse + */ @Test public void testOrgResponse() { // TODO: test OrgResponse } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'status' */ + /** + * Test the property 'status' + */ @Test public void statusTest() { // TODO: test status } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java index e7a229fa9..eeaf94754 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Org */ +/** + * Model tests for Org + */ public class OrgTest { private final Org model = new Org(); - /** Model tests for Org */ + /** + * Model tests for Org + */ @Test public void testOrg() { // TODO: test Org } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java index 0d6b78a6f..b4add4a34 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for OrgType */ +/** + * Model tests for OrgType + */ public class OrgTypeTest { private final OrgType model = new OrgType(); - /** Model tests for OrgType */ + /** + * Model tests for OrgType + */ @Test public void testOrgType() { // TODO: test OrgType } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java index 75fc1360e..233948662 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ParameterValues */ +/** + * Model tests for ParameterValues + */ public class ParameterValuesTest { private final ParameterValues model = new ParameterValues(); - /** Model tests for ParameterValues */ + /** + * Model tests for ParameterValues + */ @Test public void testParameterValues() { // TODO: test ParameterValues } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'values' */ + /** + * Test the property 'values' + */ @Test public void valuesTest() { // TODO: test values } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java index bec446a54..205fda3e3 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java @@ -4,45 +4,68 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ParameterizeMetadataRequest */ +/** + * Model tests for ParameterizeMetadataRequest + */ public class ParameterizeMetadataRequestTest { private final ParameterizeMetadataRequest model = new ParameterizeMetadataRequest(); - /** Model tests for ParameterizeMetadataRequest */ + /** + * Model tests for ParameterizeMetadataRequest + */ @Test public void testParameterizeMetadataRequest() { // TODO: test ParameterizeMetadataRequest } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'fieldType' */ + /** + * Test the property 'fieldType' + */ @Test public void fieldTypeTest() { // TODO: test fieldType } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'variableIdentifier' */ + /** + * Test the property 'variableIdentifier' + */ @Test public void variableIdentifierTest() { // TODO: test variableIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java index a265bbe86..e25930c43 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ParametersListItemInput */ +/** + * Model tests for ParametersListItemInput + */ public class ParametersListItemInputTest { private final ParametersListItemInput model = new ParametersListItemInput(); - /** Model tests for ParametersListItemInput */ + /** + * Model tests for ParametersListItemInput + */ @Test public void testParametersListItemInput() { // TODO: test ParametersListItemInput } - /** Test the property 'key' */ + /** + * Test the property 'key' + */ @Test public void keyTest() { // TODO: test key } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java index ef7f001d9..1c07d20d6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ParametersListItem */ +/** + * Model tests for ParametersListItem + */ public class ParametersListItemTest { private final ParametersListItem model = new ParametersListItem(); - /** Model tests for ParametersListItem */ + /** + * Model tests for ParametersListItem + */ @Test public void testParametersListItem() { // TODO: test ParametersListItem } - /** Test the property 'key' */ + /** + * Test the property 'key' + */ @Test public void keyTest() { // TODO: test key } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java index ddd0d9e5b..e48365ea3 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java @@ -4,57 +4,85 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PdfOptionsInput */ +/** + * Model tests for PdfOptionsInput + */ public class PdfOptionsInputTest { private final PdfOptionsInput model = new PdfOptionsInput(); - /** Model tests for PdfOptionsInput */ + /** + * Model tests for PdfOptionsInput + */ @Test public void testPdfOptionsInput() { // TODO: test PdfOptionsInput } - /** Test the property 'includeCoverPage' */ + /** + * Test the property 'includeCoverPage' + */ @Test public void includeCoverPageTest() { // TODO: test includeCoverPage } - /** Test the property 'includeCustomLogo' */ + /** + * Test the property 'includeCustomLogo' + */ @Test public void includeCustomLogoTest() { // TODO: test includeCustomLogo } - /** Test the property 'includeFilterPage' */ + /** + * Test the property 'includeFilterPage' + */ @Test public void includeFilterPageTest() { // TODO: test includeFilterPage } - /** Test the property 'includePageNumber' */ + /** + * Test the property 'includePageNumber' + */ @Test public void includePageNumberTest() { // TODO: test includePageNumber } - /** Test the property 'pageOrientation' */ + /** + * Test the property 'pageOrientation' + */ @Test public void pageOrientationTest() { // TODO: test pageOrientation } - /** Test the property 'truncateTable' */ + /** + * Test the property 'truncateTable' + */ @Test public void truncateTableTest() { // TODO: test truncateTable } - /** Test the property 'pageFooterText' */ + /** + * Test the property 'pageFooterText' + */ @Test public void pageFooterTextTest() { // TODO: test pageFooterText } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java index 302bc2792..5f940de6b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java @@ -4,69 +4,101 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PdfOptions */ +/** + * Model tests for PdfOptions + */ public class PdfOptionsTest { private final PdfOptions model = new PdfOptions(); - /** Model tests for PdfOptions */ + /** + * Model tests for PdfOptions + */ @Test public void testPdfOptions() { // TODO: test PdfOptions } - /** Test the property 'completeLiveboard' */ + /** + * Test the property 'completeLiveboard' + */ @Test public void completeLiveboardTest() { // TODO: test completeLiveboard } - /** Test the property 'includeCoverPage' */ + /** + * Test the property 'includeCoverPage' + */ @Test public void includeCoverPageTest() { // TODO: test includeCoverPage } - /** Test the property 'includeCustomLogo' */ + /** + * Test the property 'includeCustomLogo' + */ @Test public void includeCustomLogoTest() { // TODO: test includeCustomLogo } - /** Test the property 'includeFilterPage' */ + /** + * Test the property 'includeFilterPage' + */ @Test public void includeFilterPageTest() { // TODO: test includeFilterPage } - /** Test the property 'includePageNumber' */ + /** + * Test the property 'includePageNumber' + */ @Test public void includePageNumberTest() { // TODO: test includePageNumber } - /** Test the property 'pageFooterText' */ + /** + * Test the property 'pageFooterText' + */ @Test public void pageFooterTextTest() { // TODO: test pageFooterText } - /** Test the property 'pageOrientation' */ + /** + * Test the property 'pageOrientation' + */ @Test public void pageOrientationTest() { // TODO: test pageOrientation } - /** Test the property 'pageSize' */ + /** + * Test the property 'pageSize' + */ @Test public void pageSizeTest() { // TODO: test pageSize } - /** Test the property 'truncateTable' */ + /** + * Test the property 'truncateTable' + */ @Test public void truncateTableTest() { // TODO: test truncateTable } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java index fe005f61f..cbf59dfcd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PermissionInput */ +/** + * Model tests for PermissionInput + */ public class PermissionInputTest { private final PermissionInput model = new PermissionInput(); - /** Model tests for PermissionInput */ + /** + * Model tests for PermissionInput + */ @Test public void testPermissionInput() { // TODO: test PermissionInput } - /** Test the property 'principal' */ + /** + * Test the property 'principal' + */ @Test public void principalTest() { // TODO: test principal } - /** Test the property 'shareMode' */ + /** + * Test the property 'shareMode' + */ @Test public void shareModeTest() { // TODO: test shareMode } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java index eaa01f310..a169e5cd1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PermissionOfMetadataResponse */ +/** + * Model tests for PermissionOfMetadataResponse + */ public class PermissionOfMetadataResponseTest { private final PermissionOfMetadataResponse model = new PermissionOfMetadataResponse(); - /** Model tests for PermissionOfMetadataResponse */ + /** + * Model tests for PermissionOfMetadataResponse + */ @Test public void testPermissionOfMetadataResponse() { // TODO: test PermissionOfMetadataResponse } - /** Test the property 'metadataPermissionDetails' */ + /** + * Test the property 'metadataPermissionDetails' + */ @Test public void metadataPermissionDetailsTest() { // TODO: test metadataPermissionDetails } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java index a98e12641..84b0ea139 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PermissionOfPrincipalsResponse */ +/** + * Model tests for PermissionOfPrincipalsResponse + */ public class PermissionOfPrincipalsResponseTest { private final PermissionOfPrincipalsResponse model = new PermissionOfPrincipalsResponse(); - /** Model tests for PermissionOfPrincipalsResponse */ + /** + * Model tests for PermissionOfPrincipalsResponse + */ @Test public void testPermissionOfPrincipalsResponse() { // TODO: test PermissionOfPrincipalsResponse } - /** Test the property 'principalPermissionDetails' */ + /** + * Test the property 'principalPermissionDetails' + */ @Test public void principalPermissionDetailsTest() { // TODO: test principalPermissionDetails } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java index f73a14cdb..437c96d35 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PermissionsMetadataTypeInput */ +/** + * Model tests for PermissionsMetadataTypeInput + */ public class PermissionsMetadataTypeInputTest { private final PermissionsMetadataTypeInput model = new PermissionsMetadataTypeInput(); - /** Model tests for PermissionsMetadataTypeInput */ + /** + * Model tests for PermissionsMetadataTypeInput + */ @Test public void testPermissionsMetadataTypeInput() { // TODO: test PermissionsMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java index 64f6ff489..10f0fa9f9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java @@ -4,51 +4,77 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PngOptionsInput */ +/** + * Model tests for PngOptionsInput + */ public class PngOptionsInputTest { private final PngOptionsInput model = new PngOptionsInput(); - /** Model tests for PngOptionsInput */ + /** + * Model tests for PngOptionsInput + */ @Test public void testPngOptionsInput() { // TODO: test PngOptionsInput } - /** Test the property 'includeCoverPage' */ + /** + * Test the property 'includeCoverPage' + */ @Test public void includeCoverPageTest() { // TODO: test includeCoverPage } - /** Test the property 'includeFilterPage' */ + /** + * Test the property 'includeFilterPage' + */ @Test public void includeFilterPageTest() { // TODO: test includeFilterPage } - /** Test the property 'personalisedViewId' */ + /** + * Test the property 'personalisedViewId' + */ @Test public void personalisedViewIdTest() { // TODO: test personalisedViewId } - /** Test the property 'imageResolution' */ + /** + * Test the property 'imageResolution' + */ @Test public void imageResolutionTest() { // TODO: test imageResolution } - /** Test the property 'imageScale' */ + /** + * Test the property 'imageScale' + */ @Test public void imageScaleTest() { // TODO: test imageScale } - /** Test the property 'includeHeader' */ + /** + * Test the property 'includeHeader' + */ @Test public void includeHeaderTest() { // TODO: test includeHeader } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java index fa7f31552..50f564cf6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PrincipalsInput */ +/** + * Model tests for PrincipalsInput + */ public class PrincipalsInputTest { private final PrincipalsInput model = new PrincipalsInput(); - /** Model tests for PrincipalsInput */ + /** + * Model tests for PrincipalsInput + */ @Test public void testPrincipalsInput() { // TODO: test PrincipalsInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java index 78f82d4b1..8effb3e25 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PrincipalsListItemInput */ +/** + * Model tests for PrincipalsListItemInput + */ public class PrincipalsListItemInputTest { private final PrincipalsListItemInput model = new PrincipalsListItemInput(); - /** Model tests for PrincipalsListItemInput */ + /** + * Model tests for PrincipalsListItemInput + */ @Test public void testPrincipalsListItemInput() { // TODO: test PrincipalsListItemInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java index 1fe4e310f..bc12950fe 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PrincipalsListItem */ +/** + * Model tests for PrincipalsListItem + */ public class PrincipalsListItemTest { private final PrincipalsListItem model = new PrincipalsListItem(); - /** Model tests for PrincipalsListItem */ + /** + * Model tests for PrincipalsListItem + */ @Test public void testPrincipalsListItem() { // TODO: test PrincipalsListItem } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java index d74e3c36f..7540b1d21 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PublishMetadataListItem */ +/** + * Model tests for PublishMetadataListItem + */ public class PublishMetadataListItemTest { private final PublishMetadataListItem model = new PublishMetadataListItem(); - /** Model tests for PublishMetadataListItem */ + /** + * Model tests for PublishMetadataListItem + */ @Test public void testPublishMetadataListItem() { // TODO: test PublishMetadataListItem } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java index 8be9f8da3..dc89a3e6e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java @@ -4,33 +4,56 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PublishMetadataListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for PublishMetadataRequest */ +/** + * Model tests for PublishMetadataRequest + */ public class PublishMetadataRequestTest { private final PublishMetadataRequest model = new PublishMetadataRequest(); - /** Model tests for PublishMetadataRequest */ + /** + * Model tests for PublishMetadataRequest + */ @Test public void testPublishMetadataRequest() { // TODO: test PublishMetadataRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'skipValidation' */ + /** + * Test the property 'skipValidation' + */ @Test public void skipValidationTest() { // TODO: test skipValidation } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java index 066322234..c9c4e9d4a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java @@ -4,57 +4,87 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.InputEurekaNLSRequest; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for QueryGetDecomposedQueryRequest */ +/** + * Model tests for QueryGetDecomposedQueryRequest + */ public class QueryGetDecomposedQueryRequestTest { private final QueryGetDecomposedQueryRequest model = new QueryGetDecomposedQueryRequest(); - /** Model tests for QueryGetDecomposedQueryRequest */ + /** + * Model tests for QueryGetDecomposedQueryRequest + */ @Test public void testQueryGetDecomposedQueryRequest() { // TODO: test QueryGetDecomposedQueryRequest } - /** Test the property 'answerIds' */ + /** + * Test the property 'answerIds' + */ @Test public void answerIdsTest() { // TODO: test answerIds } - /** Test the property 'content' */ + /** + * Test the property 'content' + */ @Test public void contentTest() { // TODO: test content } - /** Test the property 'conversationId' */ + /** + * Test the property 'conversationId' + */ @Test public void conversationIdTest() { // TODO: test conversationId } - /** Test the property 'liveboardIds' */ + /** + * Test the property 'liveboardIds' + */ @Test public void liveboardIdsTest() { // TODO: test liveboardIds } - /** Test the property 'maxDecomposedQueries' */ + /** + * Test the property 'maxDecomposedQueries' + */ @Test public void maxDecomposedQueriesTest() { // TODO: test maxDecomposedQueries } - /** Test the property 'nlsRequest' */ + /** + * Test the property 'nlsRequest' + */ @Test public void nlsRequestTest() { // TODO: test nlsRequest } - /** Test the property 'worksheetIds' */ + /** + * Test the property 'worksheetIds' + */ @Test public void worksheetIdsTest() { // TODO: test worksheetIds } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java index b158fa14d..e893297a8 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsListItemInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RecipientDetailsInput */ +/** + * Model tests for RecipientDetailsInput + */ public class RecipientDetailsInputTest { private final RecipientDetailsInput model = new RecipientDetailsInput(); - /** Model tests for RecipientDetailsInput */ + /** + * Model tests for RecipientDetailsInput + */ @Test public void testRecipientDetailsInput() { // TODO: test RecipientDetailsInput } - /** Test the property 'emails' */ + /** + * Test the property 'emails' + */ @Test public void emailsTest() { // TODO: test emails } - /** Test the property 'principals' */ + /** + * Test the property 'principals' + */ @Test public void principalsTest() { // TODO: test principals } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java index fb0af587b..a42615886 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RecipientDetails */ +/** + * Model tests for RecipientDetails + */ public class RecipientDetailsTest { private final RecipientDetails model = new RecipientDetails(); - /** Model tests for RecipientDetails */ + /** + * Model tests for RecipientDetails + */ @Test public void testRecipientDetails() { // TODO: test RecipientDetails } - /** Test the property 'emails' */ + /** + * Test the property 'emails' + */ @Test public void emailsTest() { // TODO: test emails } - /** Test the property 'principals' */ + /** + * Test the property 'principals' + */ @Test public void principalsTest() { // TODO: test principals } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java index 514438de3..4eb979c83 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RegionalSettingsInput */ +/** + * Model tests for RegionalSettingsInput + */ public class RegionalSettingsInputTest { private final RegionalSettingsInput model = new RegionalSettingsInput(); - /** Model tests for RegionalSettingsInput */ + /** + * Model tests for RegionalSettingsInput + */ @Test public void testRegionalSettingsInput() { // TODO: test RegionalSettingsInput } - /** Test the property 'currencyFormat' */ + /** + * Test the property 'currencyFormat' + */ @Test public void currencyFormatTest() { // TODO: test currencyFormat } - /** Test the property 'userLocale' */ + /** + * Test the property 'userLocale' + */ @Test public void userLocaleTest() { // TODO: test userLocale } - /** Test the property 'numberFormatLocale' */ + /** + * Test the property 'numberFormatLocale' + */ @Test public void numberFormatLocaleTest() { // TODO: test numberFormatLocale } - /** Test the property 'dateFormatLocale' */ + /** + * Test the property 'dateFormatLocale' + */ @Test public void dateFormatLocaleTest() { // TODO: test dateFormatLocale } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java index ce98da74b..c6ccbeb73 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java @@ -4,57 +4,88 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Org; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RepoConfigObject */ +/** + * Model tests for RepoConfigObject + */ public class RepoConfigObjectTest { private final RepoConfigObject model = new RepoConfigObject(); - /** Model tests for RepoConfigObject */ + /** + * Model tests for RepoConfigObject + */ @Test public void testRepoConfigObject() { // TODO: test RepoConfigObject } - /** Test the property 'repositoryUrl' */ + /** + * Test the property 'repositoryUrl' + */ @Test public void repositoryUrlTest() { // TODO: test repositoryUrl } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'commitBranchName' */ + /** + * Test the property 'commitBranchName' + */ @Test public void commitBranchNameTest() { // TODO: test commitBranchName } - /** Test the property 'branches' */ + /** + * Test the property 'branches' + */ @Test public void branchesTest() { // TODO: test branches } - /** Test the property 'enableGuidMapping' */ + /** + * Test the property 'enableGuidMapping' + */ @Test public void enableGuidMappingTest() { // TODO: test enableGuidMapping } - /** Test the property 'configurationBranchName' */ + /** + * Test the property 'configurationBranchName' + */ @Test public void configurationBranchNameTest() { // TODO: test configurationBranchName } - /** Test the property 'org' */ + /** + * Test the property 'org' + */ @Test public void orgTest() { // TODO: test org } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java index 112f5a617..f417b6aee 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResetUserPasswordRequest */ +/** + * Model tests for ResetUserPasswordRequest + */ public class ResetUserPasswordRequestTest { private final ResetUserPasswordRequest model = new ResetUserPasswordRequest(); - /** Model tests for ResetUserPasswordRequest */ + /** + * Model tests for ResetUserPasswordRequest + */ @Test public void testResetUserPasswordRequest() { // TODO: test ResetUserPasswordRequest } - /** Test the property 'newPassword' */ + /** + * Test the property 'newPassword' + */ @Test public void newPasswordTest() { // TODO: test newPassword } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java index 098b39b8e..74a00100f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseActivationURL */ +/** + * Model tests for ResponseActivationURL + */ public class ResponseActivationURLTest { private final ResponseActivationURL model = new ResponseActivationURL(); - /** Model tests for ResponseActivationURL */ + /** + * Model tests for ResponseActivationURL + */ @Test public void testResponseActivationURL() { // TODO: test ResponseActivationURL } - /** Test the property 'activationLink' */ + /** + * Test the property 'activationLink' + */ @Test public void activationLinkTest() { // TODO: test activationLink } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java index cb825c152..842152b83 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseCopyObject */ +/** + * Model tests for ResponseCopyObject + */ public class ResponseCopyObjectTest { private final ResponseCopyObject model = new ResponseCopyObject(); - /** Model tests for ResponseCopyObject */ + /** + * Model tests for ResponseCopyObject + */ @Test public void testResponseCopyObject() { // TODO: test ResponseCopyObject } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java index d5c796b76..6ecc88e17 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java @@ -4,51 +4,83 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionDetails; +import com.thoughtspot.client.model.DefaultActionConfig; +import com.thoughtspot.client.model.MetadataAssociationItem; +import com.thoughtspot.client.model.ObjectIDAndName; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseCustomAction */ +/** + * Model tests for ResponseCustomAction + */ public class ResponseCustomActionTest { private final ResponseCustomAction model = new ResponseCustomAction(); - /** Model tests for ResponseCustomAction */ + /** + * Model tests for ResponseCustomAction + */ @Test public void testResponseCustomAction() { // TODO: test ResponseCustomAction } - /** Test the property 'actionDetails' */ + /** + * Test the property 'actionDetails' + */ @Test public void actionDetailsTest() { // TODO: test actionDetails } - /** Test the property 'defaultActionConfig' */ + /** + * Test the property 'defaultActionConfig' + */ @Test public void defaultActionConfigTest() { // TODO: test defaultActionConfig } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'metadataAssociation' */ + /** + * Test the property 'metadataAssociation' + */ @Test public void metadataAssociationTest() { // TODO: test metadataAssociation } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'userGroups' */ + /** + * Test the property 'userGroups' + */ @Test public void userGroupsTest() { // TODO: test userGroups } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java index 154d9e1df..5827f12dd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseFailedEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseFailedEntities */ +/** + * Model tests for ResponseFailedEntities + */ public class ResponseFailedEntitiesTest { private final ResponseFailedEntities model = new ResponseFailedEntities(); - /** Model tests for ResponseFailedEntities */ + /** + * Model tests for ResponseFailedEntities + */ @Test public void testResponseFailedEntities() { // TODO: test ResponseFailedEntities } - /** Test the property 'data' */ + /** + * Test the property 'data' + */ @Test public void dataTest() { // TODO: test data } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java index f9f7d85e3..50ca40bcd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseFailedEntity */ +/** + * Model tests for ResponseFailedEntity + */ public class ResponseFailedEntityTest { private final ResponseFailedEntity model = new ResponseFailedEntity(); - /** Model tests for ResponseFailedEntity */ + /** + * Model tests for ResponseFailedEntity + */ @Test public void testResponseFailedEntity() { // TODO: test ResponseFailedEntity } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'error' */ + /** + * Test the property 'error' + */ @Test public void errorTest() { // TODO: test error } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java index 51dc446a5..061cf57a4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseIncompleteEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseIncompleteEntities */ +/** + * Model tests for ResponseIncompleteEntities + */ public class ResponseIncompleteEntitiesTest { private final ResponseIncompleteEntities model = new ResponseIncompleteEntities(); - /** Model tests for ResponseIncompleteEntities */ + /** + * Model tests for ResponseIncompleteEntities + */ @Test public void testResponseIncompleteEntities() { // TODO: test ResponseIncompleteEntities } - /** Test the property 'data' */ + /** + * Test the property 'data' + */ @Test public void dataTest() { // TODO: test data } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java index ad0b87bd6..a050e74d1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseIncompleteEntity */ +/** + * Model tests for ResponseIncompleteEntity + */ public class ResponseIncompleteEntityTest { private final ResponseIncompleteEntity model = new ResponseIncompleteEntity(); - /** Model tests for ResponseIncompleteEntity */ + /** + * Model tests for ResponseIncompleteEntity + */ @Test public void testResponseIncompleteEntity() { // TODO: test ResponseIncompleteEntity } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'error' */ + /** + * Test the property 'error' + */ @Test public void errorTest() { // TODO: test error } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java index 9951b25c6..5c7e55600 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java @@ -4,51 +4,77 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseMessage */ +/** + * Model tests for ResponseMessage + */ public class ResponseMessageTest { private final ResponseMessage model = new ResponseMessage(); - /** Model tests for ResponseMessage */ + /** + * Model tests for ResponseMessage + */ @Test public void testResponseMessage() { // TODO: test ResponseMessage } - /** Test the property 'sessionIdentifier' */ + /** + * Test the property 'sessionIdentifier' + */ @Test public void sessionIdentifierTest() { // TODO: test sessionIdentifier } - /** Test the property 'generationNumber' */ + /** + * Test the property 'generationNumber' + */ @Test public void generationNumberTest() { // TODO: test generationNumber } - /** Test the property 'messageType' */ + /** + * Test the property 'messageType' + */ @Test public void messageTypeTest() { // TODO: test messageType } - /** Test the property 'visualizationType' */ + /** + * Test the property 'visualizationType' + */ @Test public void visualizationTypeTest() { // TODO: test visualizationType } - /** Test the property 'tokens' */ + /** + * Test the property 'tokens' + */ @Test public void tokensTest() { // TODO: test tokens } - /** Test the property 'displayTokens' */ + /** + * Test the property 'displayTokens' + */ @Test public void displayTokensTest() { // TODO: test displayTokens } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java index e1718620d..3d0cc4859 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponsePostUpgradeFailedEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponsePostUpgradeFailedEntities */ +/** + * Model tests for ResponsePostUpgradeFailedEntities + */ public class ResponsePostUpgradeFailedEntitiesTest { private final ResponsePostUpgradeFailedEntities model = new ResponsePostUpgradeFailedEntities(); - /** Model tests for ResponsePostUpgradeFailedEntities */ + /** + * Model tests for ResponsePostUpgradeFailedEntities + */ @Test public void testResponsePostUpgradeFailedEntities() { // TODO: test ResponsePostUpgradeFailedEntities } - /** Test the property 'data' */ + /** + * Test the property 'data' + */ @Test public void dataTest() { // TODO: test data } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java index 9210925aa..45da011f4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponsePostUpgradeFailedEntity */ +/** + * Model tests for ResponsePostUpgradeFailedEntity + */ public class ResponsePostUpgradeFailedEntityTest { private final ResponsePostUpgradeFailedEntity model = new ResponsePostUpgradeFailedEntity(); - /** Model tests for ResponsePostUpgradeFailedEntity */ + /** + * Model tests for ResponsePostUpgradeFailedEntity + */ @Test public void testResponsePostUpgradeFailedEntity() { // TODO: test ResponsePostUpgradeFailedEntity } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'error' */ + /** + * Test the property 'error' + */ @Test public void errorTest() { // TODO: test error } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java index 524ae3cbf..81077e4e4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseScheduleRun */ +/** + * Model tests for ResponseScheduleRun + */ public class ResponseScheduleRunTest { private final ResponseScheduleRun model = new ResponseScheduleRun(); - /** Model tests for ResponseScheduleRun */ + /** + * Model tests for ResponseScheduleRun + */ @Test public void testResponseScheduleRun() { // TODO: test ResponseScheduleRun } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'startTimeInMillis' */ + /** + * Test the property 'startTimeInMillis' + */ @Test public void startTimeInMillisTest() { // TODO: test startTimeInMillis } - /** Test the property 'endTimeInMillis' */ + /** + * Test the property 'endTimeInMillis' + */ @Test public void endTimeInMillisTest() { // TODO: test endTimeInMillis } - /** Test the property 'status' */ + /** + * Test the property 'status' + */ @Test public void statusTest() { // TODO: test status } - /** Test the property 'detail' */ + /** + * Test the property 'detail' + */ @Test public void detailTest() { // TODO: test detail } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java index a031390b3..4e369bda6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java @@ -4,105 +4,158 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Author; +import com.thoughtspot.client.model.Frequency; +import com.thoughtspot.client.model.LiveboardOptions; +import com.thoughtspot.client.model.MetadataResponse; +import com.thoughtspot.client.model.PdfOptions; +import com.thoughtspot.client.model.RecipientDetails; +import com.thoughtspot.client.model.ResponseScheduleRun; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseSchedule */ +/** + * Model tests for ResponseSchedule + */ public class ResponseScheduleTest { private final ResponseSchedule model = new ResponseSchedule(); - /** Model tests for ResponseSchedule */ + /** + * Model tests for ResponseSchedule + */ @Test public void testResponseSchedule() { // TODO: test ResponseSchedule } - /** Test the property 'author' */ + /** + * Test the property 'author' + */ @Test public void authorTest() { // TODO: test author } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'fileFormat' */ + /** + * Test the property 'fileFormat' + */ @Test public void fileFormatTest() { // TODO: test fileFormat } - /** Test the property 'frequency' */ + /** + * Test the property 'frequency' + */ @Test public void frequencyTest() { // TODO: test frequency } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'liveboardOptions' */ + /** + * Test the property 'liveboardOptions' + */ @Test public void liveboardOptionsTest() { // TODO: test liveboardOptions } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'pdfOptions' */ + /** + * Test the property 'pdfOptions' + */ @Test public void pdfOptionsTest() { // TODO: test pdfOptions } - /** Test the property 'recipientDetails' */ + /** + * Test the property 'recipientDetails' + */ @Test public void recipientDetailsTest() { // TODO: test recipientDetails } - /** Test the property 'status' */ + /** + * Test the property 'status' + */ @Test public void statusTest() { // TODO: test status } - /** Test the property 'timeZone' */ + /** + * Test the property 'timeZone' + */ @Test public void timeZoneTest() { // TODO: test timeZone } - /** Test the property 'historyRuns' */ + /** + * Test the property 'historyRuns' + */ @Test public void historyRunsTest() { // TODO: test historyRuns } - /** Test the property 'personalisedViewId' */ + /** + * Test the property 'personalisedViewId' + */ @Test public void personalisedViewIdTest() { // TODO: test personalisedViewId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java index 34aa6d956..4582609d5 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseSuccessfulEntity; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseSuccessfulEntities */ +/** + * Model tests for ResponseSuccessfulEntities + */ public class ResponseSuccessfulEntitiesTest { private final ResponseSuccessfulEntities model = new ResponseSuccessfulEntities(); - /** Model tests for ResponseSuccessfulEntities */ + /** + * Model tests for ResponseSuccessfulEntities + */ @Test public void testResponseSuccessfulEntities() { // TODO: test ResponseSuccessfulEntities } - /** Test the property 'data' */ + /** + * Test the property 'data' + */ @Test public void dataTest() { // TODO: test data } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java index 2f0dafe0a..84dab2bf9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseSuccessfulEntity */ +/** + * Model tests for ResponseSuccessfulEntity + */ public class ResponseSuccessfulEntityTest { private final ResponseSuccessfulEntity model = new ResponseSuccessfulEntity(); - /** Model tests for ResponseSuccessfulEntity */ + /** + * Model tests for ResponseSuccessfulEntity + */ @Test public void testResponseSuccessfulEntity() { // TODO: test ResponseSuccessfulEntity } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java index 8527e05a8..397af2ca4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java @@ -4,76 +4,112 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ResponseFailedEntities; +import com.thoughtspot.client.model.ResponseIncompleteEntities; +import com.thoughtspot.client.model.ResponsePostUpgradeFailedEntities; +import com.thoughtspot.client.model.ResponseSuccessfulEntities; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ResponseWorksheetToModelConversion */ +/** + * Model tests for ResponseWorksheetToModelConversion + */ public class ResponseWorksheetToModelConversionTest { - private final ResponseWorksheetToModelConversion model = - new ResponseWorksheetToModelConversion(); + private final ResponseWorksheetToModelConversion model = new ResponseWorksheetToModelConversion(); - /** Model tests for ResponseWorksheetToModelConversion */ + /** + * Model tests for ResponseWorksheetToModelConversion + */ @Test public void testResponseWorksheetToModelConversion() { // TODO: test ResponseWorksheetToModelConversion } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'successCount' */ + /** + * Test the property 'successCount' + */ @Test public void successCountTest() { // TODO: test successCount } - /** Test the property 'failureCount' */ + /** + * Test the property 'failureCount' + */ @Test public void failureCountTest() { // TODO: test failureCount } - /** Test the property 'incompleteCount' */ + /** + * Test the property 'incompleteCount' + */ @Test public void incompleteCountTest() { // TODO: test incompleteCount } - /** Test the property 'postUpgradeFailedCount' */ + /** + * Test the property 'postUpgradeFailedCount' + */ @Test public void postUpgradeFailedCountTest() { // TODO: test postUpgradeFailedCount } - /** Test the property 'totalTimeInMillis' */ + /** + * Test the property 'totalTimeInMillis' + */ @Test public void totalTimeInMillisTest() { // TODO: test totalTimeInMillis } - /** Test the property 'successfulEntities' */ + /** + * Test the property 'successfulEntities' + */ @Test public void successfulEntitiesTest() { // TODO: test successfulEntities } - /** Test the property 'failedEntities' */ + /** + * Test the property 'failedEntities' + */ @Test public void failedEntitiesTest() { // TODO: test failedEntities } - /** Test the property 'incompleteEntities' */ + /** + * Test the property 'incompleteEntities' + */ @Test public void incompleteEntitiesTest() { // TODO: test incompleteEntities } - /** Test the property 'postUpgradeFailedEntities' */ + /** + * Test the property 'postUpgradeFailedEntities' + */ @Test public void postUpgradeFailedEntitiesTest() { // TODO: test postUpgradeFailedEntities } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java index dfbe7a00e..98d910950 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java @@ -4,33 +4,55 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.MetadataObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RevertCommitRequest */ +/** + * Model tests for RevertCommitRequest + */ public class RevertCommitRequestTest { private final RevertCommitRequest model = new RevertCommitRequest(); - /** Model tests for RevertCommitRequest */ + /** + * Model tests for RevertCommitRequest + */ @Test public void testRevertCommitRequest() { // TODO: test RevertCommitRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'branchName' */ + /** + * Test the property 'branchName' + */ @Test public void branchNameTest() { // TODO: test branchName } - /** Test the property 'revertPolicy' */ + /** + * Test the property 'revertPolicy' + */ @Test public void revertPolicyTest() { // TODO: test revertPolicy } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java index adec1a8ea..51ea18045 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java @@ -4,63 +4,99 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthorType; +import com.thoughtspot.client.model.CommitFileType; +import com.thoughtspot.client.model.CommiterType; +import com.thoughtspot.client.model.RevertedMetadata; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RevertResponse */ +/** + * Model tests for RevertResponse + */ public class RevertResponseTest { private final RevertResponse model = new RevertResponse(); - /** Model tests for RevertResponse */ + /** + * Model tests for RevertResponse + */ @Test public void testRevertResponse() { // TODO: test RevertResponse } - /** Test the property 'committer' */ + /** + * Test the property 'committer' + */ @Test public void committerTest() { // TODO: test committer } - /** Test the property 'author' */ + /** + * Test the property 'author' + */ @Test public void authorTest() { // TODO: test author } - /** Test the property 'comment' */ + /** + * Test the property 'comment' + */ @Test public void commentTest() { // TODO: test comment } - /** Test the property 'commitTime' */ + /** + * Test the property 'commitTime' + */ @Test public void commitTimeTest() { // TODO: test commitTime } - /** Test the property 'commitId' */ + /** + * Test the property 'commitId' + */ @Test public void commitIdTest() { // TODO: test commitId } - /** Test the property 'branch' */ + /** + * Test the property 'branch' + */ @Test public void branchTest() { // TODO: test branch } - /** Test the property 'committedFiles' */ + /** + * Test the property 'committedFiles' + */ @Test public void committedFilesTest() { // TODO: test committedFiles } - /** Test the property 'revertedMetadata' */ + /** + * Test the property 'revertedMetadata' + */ @Test public void revertedMetadataTest() { // TODO: test revertedMetadata } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java index 4257bdb79..9dd7a1f28 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java @@ -4,45 +4,68 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RevertedMetadata */ +/** + * Model tests for RevertedMetadata + */ public class RevertedMetadataTest { private final RevertedMetadata model = new RevertedMetadata(); - /** Model tests for RevertedMetadata */ + /** + * Model tests for RevertedMetadata + */ @Test public void testRevertedMetadata() { // TODO: test RevertedMetadata } - /** Test the property 'fileName' */ + /** + * Test the property 'fileName' + */ @Test public void fileNameTest() { // TODO: test fileName } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'statusCode' */ + /** + * Test the property 'statusCode' + */ @Test public void statusCodeTest() { // TODO: test statusCode } - /** Test the property 'statusMessage' */ + /** + * Test the property 'statusMessage' + */ @Test public void statusMessageTest() { // TODO: test statusMessage } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java index 4531a2ccb..4469faaac 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RevokeTokenRequest */ +/** + * Model tests for RevokeTokenRequest + */ public class RevokeTokenRequestTest { private final RevokeTokenRequest model = new RevokeTokenRequest(); - /** Model tests for RevokeTokenRequest */ + /** + * Model tests for RevokeTokenRequest + */ @Test public void testRevokeTokenRequest() { // TODO: test RevokeTokenRequest } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } - /** Test the property 'token' */ + /** + * Test the property 'token' + */ @Test public void tokenTest() { // TODO: test token } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java index 9d2a3038b..cec9093f9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RiseGQLArgWrapper */ +/** + * Model tests for RiseGQLArgWrapper + */ public class RiseGQLArgWrapperTest { private final RiseGQLArgWrapper model = new RiseGQLArgWrapper(); - /** Model tests for RiseGQLArgWrapper */ + /** + * Model tests for RiseGQLArgWrapper + */ @Test public void testRiseGQLArgWrapper() { // TODO: test RiseGQLArgWrapper } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java index 463f5a721..6786c252a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RiseSetter */ +/** + * Model tests for RiseSetter + */ public class RiseSetterTest { private final RiseSetter model = new RiseSetter(); - /** Model tests for RiseSetter */ + /** + * Model tests for RiseSetter + */ @Test public void testRiseSetter() { // TODO: test RiseSetter } - /** Test the property 'field' */ + /** + * Test the property 'field' + */ @Test public void fieldTest() { // TODO: test field } - /** Test the property 'path' */ + /** + * Test the property 'path' + */ @Test public void pathTest() { // TODO: test path } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java index d2c3e1401..656f656bb 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java @@ -4,117 +4,168 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.GenericInfo; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RoleResponse */ +/** + * Model tests for RoleResponse + */ public class RoleResponseTest { private final RoleResponse model = new RoleResponse(); - /** Model tests for RoleResponse */ + /** + * Model tests for RoleResponse + */ @Test public void testRoleResponse() { // TODO: test RoleResponse } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'groupsAssignedCount' */ + /** + * Test the property 'groupsAssignedCount' + */ @Test public void groupsAssignedCountTest() { // TODO: test groupsAssignedCount } - /** Test the property 'orgs' */ + /** + * Test the property 'orgs' + */ @Test public void orgsTest() { // TODO: test orgs } - /** Test the property 'groups' */ + /** + * Test the property 'groups' + */ @Test public void groupsTest() { // TODO: test groups } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'permission' */ + /** + * Test the property 'permission' + */ @Test public void permissionTest() { // TODO: test permission } - /** Test the property 'authorId' */ + /** + * Test the property 'authorId' + */ @Test public void authorIdTest() { // TODO: test authorId } - /** Test the property 'modifierId' */ + /** + * Test the property 'modifierId' + */ @Test public void modifierIdTest() { // TODO: test modifierId } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'modificationTimeInMillis' */ + /** + * Test the property 'modificationTimeInMillis' + */ @Test public void modificationTimeInMillisTest() { // TODO: test modificationTimeInMillis } - /** Test the property 'deleted' */ + /** + * Test the property 'deleted' + */ @Test public void deletedTest() { // TODO: test deleted } - /** Test the property 'deprecated' */ + /** + * Test the property 'deprecated' + */ @Test public void deprecatedTest() { // TODO: test deprecated } - /** Test the property 'external' */ + /** + * Test the property 'external' + */ @Test public void externalTest() { // TODO: test external } - /** Test the property 'hidden' */ + /** + * Test the property 'hidden' + */ @Test public void hiddenTest() { // TODO: test hidden } - /** Test the property 'sharedViaConnection' */ + /** + * Test the property 'sharedViaConnection' + */ @Test public void sharedViaConnectionTest() { // TODO: test sharedViaConnection } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java index dbd6adb6b..d84b03f00 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Role */ +/** + * Model tests for Role + */ public class RoleTest { private final Role model = new Role(); - /** Model tests for Role */ + /** + * Model tests for Role + */ @Test public void testRole() { // TODO: test Role } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java index 9451953f9..68329d756 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RuntimeFilter */ +/** + * Model tests for RuntimeFilter + */ public class RuntimeFilterTest { private final RuntimeFilter model = new RuntimeFilter(); - /** Model tests for RuntimeFilter */ + /** + * Model tests for RuntimeFilter + */ @Test public void testRuntimeFilter() { // TODO: test RuntimeFilter } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java index 4603c31d0..b9492fd03 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java @@ -4,45 +4,72 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RuntimeFilters */ +/** + * Model tests for RuntimeFilters + */ public class RuntimeFiltersTest { private final RuntimeFilters model = new RuntimeFilters(); - /** Model tests for RuntimeFilters */ + /** + * Model tests for RuntimeFilters + */ @Test public void testRuntimeFilters() { // TODO: test RuntimeFilters } - /** Test the property 'columnName' */ + /** + * Test the property 'columnName' + */ @Test public void columnNameTest() { // TODO: test columnName } - /** Test the property 'values' */ + /** + * Test the property 'values' + */ @Test public void valuesTest() { // TODO: test values } - /** Test the property 'operator' */ + /** + * Test the property 'operator' + */ @Test public void operatorTest() { // TODO: test operator } - /** Test the property 'persist' */ + /** + * Test the property 'persist' + */ @Test public void persistTest() { // TODO: test persist } - /** Test the property 'objects' */ + /** + * Test the property 'objects' + */ @Test public void objectsTest() { // TODO: test objects } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java index 289b3e9fb..0ff4bdfde 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RuntimeParamOverride */ +/** + * Model tests for RuntimeParamOverride + */ public class RuntimeParamOverrideTest { private final RuntimeParamOverride model = new RuntimeParamOverride(); - /** Model tests for RuntimeParamOverride */ + /** + * Model tests for RuntimeParamOverride + */ @Test public void testRuntimeParamOverride() { // TODO: test RuntimeParamOverride } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java index a6ede07de..9748cc4a7 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RuntimeParameters */ +/** + * Model tests for RuntimeParameters + */ public class RuntimeParametersTest { private final RuntimeParameters model = new RuntimeParameters(); - /** Model tests for RuntimeParameters */ + /** + * Model tests for RuntimeParameters + */ @Test public void testRuntimeParameters() { // TODO: test RuntimeParameters } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'values' */ + /** + * Test the property 'values' + */ @Test public void valuesTest() { // TODO: test values } - /** Test the property 'persist' */ + /** + * Test the property 'persist' + */ @Test public void persistTest() { // TODO: test persist } - /** Test the property 'objects' */ + /** + * Test the property 'objects' + */ @Test public void objectsTest() { // TODO: test objects } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java index 3333ee5f2..5003c8e9f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RuntimeSort */ +/** + * Model tests for RuntimeSort + */ public class RuntimeSortTest { private final RuntimeSort model = new RuntimeSort(); - /** Model tests for RuntimeSort */ + /** + * Model tests for RuntimeSort + */ @Test public void testRuntimeSort() { // TODO: test RuntimeSort } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java index 3fc20ecad..e2b3e48c6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for RuntimeSorts */ +/** + * Model tests for RuntimeSorts + */ public class RuntimeSortsTest { private final RuntimeSorts model = new RuntimeSorts(); - /** Model tests for RuntimeSorts */ + /** + * Model tests for RuntimeSorts + */ @Test public void testRuntimeSorts() { // TODO: test RuntimeSorts } - /** Test the property 'columnName' */ + /** + * Test the property 'columnName' + */ @Test public void columnNameTest() { // TODO: test columnName } - /** Test the property 'order' */ + /** + * Test the property 'order' + */ @Test public void orderTest() { // TODO: test order } - /** Test the property 'persist' */ + /** + * Test the property 'persist' + */ @Test public void persistTest() { // TODO: test persist } - /** Test the property 'objects' */ + /** + * Test the property 'objects' + */ @Test public void objectsTest() { // TODO: test objects } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java index 5943493ee..426b6bf18 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ScheduleHistoryRunsOptionsInput */ +/** + * Model tests for ScheduleHistoryRunsOptionsInput + */ public class ScheduleHistoryRunsOptionsInputTest { private final ScheduleHistoryRunsOptionsInput model = new ScheduleHistoryRunsOptionsInput(); - /** Model tests for ScheduleHistoryRunsOptionsInput */ + /** + * Model tests for ScheduleHistoryRunsOptionsInput + */ @Test public void testScheduleHistoryRunsOptionsInput() { // TODO: test ScheduleHistoryRunsOptionsInput } - /** Test the property 'includeHistoryRuns' */ + /** + * Test the property 'includeHistoryRuns' + */ @Test public void includeHistoryRunsTest() { // TODO: test includeHistoryRuns } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java index ad7e3a1db..f26a03ee6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java @@ -4,69 +4,101 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SchedulesPdfOptionsInput */ +/** + * Model tests for SchedulesPdfOptionsInput + */ public class SchedulesPdfOptionsInputTest { private final SchedulesPdfOptionsInput model = new SchedulesPdfOptionsInput(); - /** Model tests for SchedulesPdfOptionsInput */ + /** + * Model tests for SchedulesPdfOptionsInput + */ @Test public void testSchedulesPdfOptionsInput() { // TODO: test SchedulesPdfOptionsInput } - /** Test the property 'completeLiveboard' */ + /** + * Test the property 'completeLiveboard' + */ @Test public void completeLiveboardTest() { // TODO: test completeLiveboard } - /** Test the property 'includeCoverPage' */ + /** + * Test the property 'includeCoverPage' + */ @Test public void includeCoverPageTest() { // TODO: test includeCoverPage } - /** Test the property 'includeCustomLogo' */ + /** + * Test the property 'includeCustomLogo' + */ @Test public void includeCustomLogoTest() { // TODO: test includeCustomLogo } - /** Test the property 'includeFilterPage' */ + /** + * Test the property 'includeFilterPage' + */ @Test public void includeFilterPageTest() { // TODO: test includeFilterPage } - /** Test the property 'includePageNumber' */ + /** + * Test the property 'includePageNumber' + */ @Test public void includePageNumberTest() { // TODO: test includePageNumber } - /** Test the property 'pageFooterText' */ + /** + * Test the property 'pageFooterText' + */ @Test public void pageFooterTextTest() { // TODO: test pageFooterText } - /** Test the property 'pageOrientation' */ + /** + * Test the property 'pageOrientation' + */ @Test public void pageOrientationTest() { // TODO: test pageOrientation } - /** Test the property 'pageSize' */ + /** + * Test the property 'pageSize' + */ @Test public void pageSizeTest() { // TODO: test pageSize } - /** Test the property 'truncateTable' */ + /** + * Test the property 'truncateTable' + */ @Test public void truncateTableTest() { // TODO: test truncateTable } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java index 37f16a996..ce853a406 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Table; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SchemaObject */ +/** + * Model tests for SchemaObject + */ public class SchemaObjectTest { private final SchemaObject model = new SchemaObject(); - /** Model tests for SchemaObject */ + /** + * Model tests for SchemaObject + */ @Test public void testSchemaObject() { // TODO: test SchemaObject } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'tables' */ + /** + * Test the property 'tables' + */ @Test public void tablesTest() { // TODO: test tables } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java index 4dd07ec04..8c00f145d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Scope */ +/** + * Model tests for Scope + */ public class ScopeTest { private final Scope model = new Scope(); - /** Model tests for Scope */ + /** + * Model tests for Scope + */ @Test public void testScope() { // TODO: test Scope } - /** Test the property 'accessType' */ + /** + * Test the property 'accessType' + */ @Test public void accessTypeTest() { // TODO: test accessType } - /** Test the property 'orgId' */ + /** + * Test the property 'orgId' + */ @Test public void orgIdTest() { // TODO: test orgId } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java index 3fdebb922..0f10ed7fe 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SortOption; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchCalendarsRequest */ +/** + * Model tests for SearchCalendarsRequest + */ public class SearchCalendarsRequestTest { private final SearchCalendarsRequest model = new SearchCalendarsRequest(); - /** Model tests for SearchCalendarsRequest */ + /** + * Model tests for SearchCalendarsRequest + */ @Test public void testSearchCalendarsRequest() { // TODO: test SearchCalendarsRequest } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'sortOptions' */ + /** + * Test the property 'sortOptions' + */ @Test public void sortOptionsTest() { // TODO: test sortOptions } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java index 0d6f150c2..b9971d22f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java @@ -4,45 +4,68 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchCommitsRequest */ +/** + * Model tests for SearchCommitsRequest + */ public class SearchCommitsRequestTest { private final SearchCommitsRequest model = new SearchCommitsRequest(); - /** Model tests for SearchCommitsRequest */ + /** + * Model tests for SearchCommitsRequest + */ @Test public void testSearchCommitsRequest() { // TODO: test SearchCommitsRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'branchName' */ + /** + * Test the property 'branchName' + */ @Test public void branchNameTest() { // TODO: test branchName } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java new file mode 100644 index 000000000..ca0373193 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java @@ -0,0 +1,50 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.OrgPreferenceSearchCriteriaInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SearchCommunicationChannelPreferencesRequest + */ +public class SearchCommunicationChannelPreferencesRequestTest { + private final SearchCommunicationChannelPreferencesRequest model = new SearchCommunicationChannelPreferencesRequest(); + + /** + * Model tests for SearchCommunicationChannelPreferencesRequest + */ + @Test + public void testSearchCommunicationChannelPreferencesRequest() { + // TODO: test SearchCommunicationChannelPreferencesRequest + } + + /** + * Test the property 'clusterPreferences' + */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** + * Test the property 'orgPreferences' + */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java index 0d1f4524c..255f5e1a9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java @@ -4,21 +4,38 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchConfigRequest */ +/** + * Model tests for SearchConfigRequest + */ public class SearchConfigRequestTest { private final SearchConfigRequest model = new SearchConfigRequest(); - /** Model tests for SearchConfigRequest */ + /** + * Model tests for SearchConfigRequest + */ @Test public void testSearchConfigRequest() { // TODO: test SearchConfigRequest } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java index fce605050..46756c21b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java @@ -4,81 +4,121 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ConnectionInput; +import com.thoughtspot.client.model.SortOptionInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchConnectionRequest */ +/** + * Model tests for SearchConnectionRequest + */ public class SearchConnectionRequestTest { private final SearchConnectionRequest model = new SearchConnectionRequest(); - /** Model tests for SearchConnectionRequest */ + /** + * Model tests for SearchConnectionRequest + */ @Test public void testSearchConnectionRequest() { // TODO: test SearchConnectionRequest } - /** Test the property 'connections' */ + /** + * Test the property 'connections' + */ @Test public void connectionsTest() { // TODO: test connections } - /** Test the property 'dataWarehouseTypes' */ + /** + * Test the property 'dataWarehouseTypes' + */ @Test public void dataWarehouseTypesTest() { // TODO: test dataWarehouseTypes } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'tagIdentifiers' */ + /** + * Test the property 'tagIdentifiers' + */ @Test public void tagIdentifiersTest() { // TODO: test tagIdentifiers } - /** Test the property 'dataWarehouseObjectType' */ + /** + * Test the property 'dataWarehouseObjectType' + */ @Test public void dataWarehouseObjectTypeTest() { // TODO: test dataWarehouseObjectType } - /** Test the property 'sortOptions' */ + /** + * Test the property 'sortOptions' + */ @Test public void sortOptionsTest() { // TODO: test sortOptions } - /** Test the property 'includeDetails' */ + /** + * Test the property 'includeDetails' + */ @Test public void includeDetailsTest() { // TODO: test includeDetails } - /** Test the property '_configuration' */ + /** + * Test the property '_configuration' + */ @Test public void _configurationTest() { // TODO: test _configuration } - /** Test the property 'authenticationType' */ + /** + * Test the property 'authenticationType' + */ @Test public void authenticationTypeTest() { // TODO: test authenticationType } - /** Test the property 'showResolvedParameters' */ + /** + * Test the property 'showResolvedParameters' + */ @Test public void showResolvedParametersTest() { // TODO: test showResolvedParameters } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java index 94df7aff7..6308704df 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java @@ -4,51 +4,78 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.DataWarehouseObjects; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchConnectionResponse */ +/** + * Model tests for SearchConnectionResponse + */ public class SearchConnectionResponseTest { private final SearchConnectionResponse model = new SearchConnectionResponse(); - /** Model tests for SearchConnectionResponse */ + /** + * Model tests for SearchConnectionResponse + */ @Test public void testSearchConnectionResponse() { // TODO: test SearchConnectionResponse } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'dataWarehouseType' */ + /** + * Test the property 'dataWarehouseType' + */ @Test public void dataWarehouseTypeTest() { // TODO: test dataWarehouseType } - /** Test the property 'dataWarehouseObjects' */ + /** + * Test the property 'dataWarehouseObjects' + */ @Test public void dataWarehouseObjectsTest() { // TODO: test dataWarehouseObjects } - /** Test the property 'details' */ + /** + * Test the property 'details' + */ @Test public void detailsTest() { // TODO: test details } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java index db42bfe57..7a950b825 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java @@ -4,57 +4,89 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.CustomActionMetadataTypeInput; +import com.thoughtspot.client.model.DefaultActionConfigSearchInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchCustomActionsRequest */ +/** + * Model tests for SearchCustomActionsRequest + */ public class SearchCustomActionsRequestTest { private final SearchCustomActionsRequest model = new SearchCustomActionsRequest(); - /** Model tests for SearchCustomActionsRequest */ + /** + * Model tests for SearchCustomActionsRequest + */ @Test public void testSearchCustomActionsRequest() { // TODO: test SearchCustomActionsRequest } - /** Test the property 'customActionIdentifier' */ + /** + * Test the property 'customActionIdentifier' + */ @Test public void customActionIdentifierTest() { // TODO: test customActionIdentifier } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'defaultActionConfig' */ + /** + * Test the property 'defaultActionConfig' + */ @Test public void defaultActionConfigTest() { // TODO: test defaultActionConfig } - /** Test the property 'includeGroupAssociations' */ + /** + * Test the property 'includeGroupAssociations' + */ @Test public void includeGroupAssociationsTest() { // TODO: test includeGroupAssociations } - /** Test the property 'includeMetadataAssociations' */ + /** + * Test the property 'includeMetadataAssociations' + */ @Test public void includeMetadataAssociationsTest() { // TODO: test includeMetadataAssociations } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java index bec58f33d..4b395e380 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java @@ -4,63 +4,92 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchDataRequest */ +/** + * Model tests for SearchDataRequest + */ public class SearchDataRequestTest { private final SearchDataRequest model = new SearchDataRequest(); - /** Model tests for SearchDataRequest */ + /** + * Model tests for SearchDataRequest + */ @Test public void testSearchDataRequest() { // TODO: test SearchDataRequest } - /** Test the property 'queryString' */ + /** + * Test the property 'queryString' + */ @Test public void queryStringTest() { // TODO: test queryString } - /** Test the property 'logicalTableIdentifier' */ + /** + * Test the property 'logicalTableIdentifier' + */ @Test public void logicalTableIdentifierTest() { // TODO: test logicalTableIdentifier } - /** Test the property 'dataFormat' */ + /** + * Test the property 'dataFormat' + */ @Test public void dataFormatTest() { // TODO: test dataFormat } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'runtimeFilter' */ + /** + * Test the property 'runtimeFilter' + */ @Test public void runtimeFilterTest() { // TODO: test runtimeFilter } - /** Test the property 'runtimeSort' */ + /** + * Test the property 'runtimeSort' + */ @Test public void runtimeSortTest() { // TODO: test runtimeSort } - /** Test the property 'runtimeParamOverride' */ + /** + * Test the property 'runtimeParamOverride' + */ @Test public void runtimeParamOverrideTest() { // TODO: test runtimeParamOverride } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java index ca86bc0f2..35594265a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AnswerContent; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchDataResponse */ +/** + * Model tests for SearchDataResponse + */ public class SearchDataResponseTest { private final SearchDataResponse model = new SearchDataResponse(); - /** Model tests for SearchDataResponse */ + /** + * Model tests for SearchDataResponse + */ @Test public void testSearchDataResponse() { // TODO: test SearchDataResponse } - /** Test the property 'contents' */ + /** + * Test the property 'contents' + */ @Test public void contentsTest() { // TODO: test contents } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java index 948d70539..263d9df16 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java @@ -4,21 +4,38 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchEmailCustomizationRequest */ +/** + * Model tests for SearchEmailCustomizationRequest + */ public class SearchEmailCustomizationRequestTest { private final SearchEmailCustomizationRequest model = new SearchEmailCustomizationRequest(); - /** Model tests for SearchEmailCustomizationRequest */ + /** + * Model tests for SearchEmailCustomizationRequest + */ @Test public void testSearchEmailCustomizationRequest() { // TODO: test SearchEmailCustomizationRequest } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java index 130c5816a..12f206331 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java @@ -4,165 +4,236 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExcludeMetadataListItemInput; +import com.thoughtspot.client.model.FavoriteObjectOptionsInput; +import com.thoughtspot.client.model.MetadataListItemInput; +import com.thoughtspot.client.model.MetadataSearchSortOptions; +import com.thoughtspot.client.model.PermissionInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchMetadataRequest */ +/** + * Model tests for SearchMetadataRequest + */ public class SearchMetadataRequestTest { private final SearchMetadataRequest model = new SearchMetadataRequest(); - /** Model tests for SearchMetadataRequest */ + /** + * Model tests for SearchMetadataRequest + */ @Test public void testSearchMetadataRequest() { // TODO: test SearchMetadataRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'permissions' */ + /** + * Test the property 'permissions' + */ @Test public void permissionsTest() { // TODO: test permissions } - /** Test the property 'createdByUserIdentifiers' */ + /** + * Test the property 'createdByUserIdentifiers' + */ @Test public void createdByUserIdentifiersTest() { // TODO: test createdByUserIdentifiers } - /** Test the property 'dependentObjectVersion' */ + /** + * Test the property 'dependentObjectVersion' + */ @Test public void dependentObjectVersionTest() { // TODO: test dependentObjectVersion } - /** Test the property 'excludeObjects' */ + /** + * Test the property 'excludeObjects' + */ @Test public void excludeObjectsTest() { // TODO: test excludeObjects } - /** Test the property 'favoriteObjectOptions' */ + /** + * Test the property 'favoriteObjectOptions' + */ @Test public void favoriteObjectOptionsTest() { // TODO: test favoriteObjectOptions } - /** Test the property 'includeAutoCreatedObjects' */ + /** + * Test the property 'includeAutoCreatedObjects' + */ @Test public void includeAutoCreatedObjectsTest() { // TODO: test includeAutoCreatedObjects } - /** Test the property 'includeDependentObjects' */ + /** + * Test the property 'includeDependentObjects' + */ @Test public void includeDependentObjectsTest() { // TODO: test includeDependentObjects } - /** Test the property 'dependentObjectsRecordSize' */ + /** + * Test the property 'dependentObjectsRecordSize' + */ @Test public void dependentObjectsRecordSizeTest() { // TODO: test dependentObjectsRecordSize } - /** Test the property 'includeDetails' */ + /** + * Test the property 'includeDetails' + */ @Test public void includeDetailsTest() { // TODO: test includeDetails } - /** Test the property 'includeHeaders' */ + /** + * Test the property 'includeHeaders' + */ @Test public void includeHeadersTest() { // TODO: test includeHeaders } - /** Test the property 'includeHiddenObjects' */ + /** + * Test the property 'includeHiddenObjects' + */ @Test public void includeHiddenObjectsTest() { // TODO: test includeHiddenObjects } - /** Test the property 'includeIncompleteObjects' */ + /** + * Test the property 'includeIncompleteObjects' + */ @Test public void includeIncompleteObjectsTest() { // TODO: test includeIncompleteObjects } - /** Test the property 'includeVisualizationHeaders' */ + /** + * Test the property 'includeVisualizationHeaders' + */ @Test public void includeVisualizationHeadersTest() { // TODO: test includeVisualizationHeaders } - /** Test the property 'includeWorksheetSearchAssistData' */ + /** + * Test the property 'includeWorksheetSearchAssistData' + */ @Test public void includeWorksheetSearchAssistDataTest() { // TODO: test includeWorksheetSearchAssistData } - /** Test the property 'modifiedByUserIdentifiers' */ + /** + * Test the property 'modifiedByUserIdentifiers' + */ @Test public void modifiedByUserIdentifiersTest() { // TODO: test modifiedByUserIdentifiers } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'sortOptions' */ + /** + * Test the property 'sortOptions' + */ @Test public void sortOptionsTest() { // TODO: test sortOptions } - /** Test the property 'tagIdentifiers' */ + /** + * Test the property 'tagIdentifiers' + */ @Test public void tagIdentifiersTest() { // TODO: test tagIdentifiers } - /** Test the property 'includeStats' */ + /** + * Test the property 'includeStats' + */ @Test public void includeStatsTest() { // TODO: test includeStats } - /** Test the property 'includeDiscoverableObjects' */ + /** + * Test the property 'includeDiscoverableObjects' + */ @Test public void includeDiscoverableObjectsTest() { // TODO: test includeDiscoverableObjects } - /** Test the property 'showResolvedParameters' */ + /** + * Test the property 'showResolvedParameters' + */ @Test public void showResolvedParametersTest() { // TODO: test showResolvedParameters } - /** Test the property 'liveboardResponseVersion' */ + /** + * Test the property 'liveboardResponseVersion' + */ @Test public void liveboardResponseVersionTest() { // TODO: test liveboardResponseVersion } - /** Test the property 'includeOnlyPublishedObjects' */ + /** + * Test the property 'includeOnlyPublishedObjects' + */ @Test public void includeOnlyPublishedObjectsTest() { // TODO: test includeOnlyPublishedObjects } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java index 018b876c7..86b988bc5 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java @@ -4,45 +4,70 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchOrgsRequest */ +/** + * Model tests for SearchOrgsRequest + */ public class SearchOrgsRequestTest { private final SearchOrgsRequest model = new SearchOrgsRequest(); - /** Model tests for SearchOrgsRequest */ + /** + * Model tests for SearchOrgsRequest + */ @Test public void testSearchOrgsRequest() { // TODO: test SearchOrgsRequest } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'status' */ + /** + * Test the property 'status' + */ @Test public void statusTest() { // TODO: test status } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java index c0ca11191..05d1bcc48 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java @@ -4,117 +4,168 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.GenericInfo; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchRoleResponse */ +/** + * Model tests for SearchRoleResponse + */ public class SearchRoleResponseTest { private final SearchRoleResponse model = new SearchRoleResponse(); - /** Model tests for SearchRoleResponse */ + /** + * Model tests for SearchRoleResponse + */ @Test public void testSearchRoleResponse() { // TODO: test SearchRoleResponse } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'groupsAssignedCount' */ + /** + * Test the property 'groupsAssignedCount' + */ @Test public void groupsAssignedCountTest() { // TODO: test groupsAssignedCount } - /** Test the property 'orgs' */ + /** + * Test the property 'orgs' + */ @Test public void orgsTest() { // TODO: test orgs } - /** Test the property 'groups' */ + /** + * Test the property 'groups' + */ @Test public void groupsTest() { // TODO: test groups } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'permission' */ + /** + * Test the property 'permission' + */ @Test public void permissionTest() { // TODO: test permission } - /** Test the property 'authorId' */ + /** + * Test the property 'authorId' + */ @Test public void authorIdTest() { // TODO: test authorId } - /** Test the property 'modifierId' */ + /** + * Test the property 'modifierId' + */ @Test public void modifierIdTest() { // TODO: test modifierId } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'modificationTimeInMillis' */ + /** + * Test the property 'modificationTimeInMillis' + */ @Test public void modificationTimeInMillisTest() { // TODO: test modificationTimeInMillis } - /** Test the property 'deleted' */ + /** + * Test the property 'deleted' + */ @Test public void deletedTest() { // TODO: test deleted } - /** Test the property 'deprecated' */ + /** + * Test the property 'deprecated' + */ @Test public void deprecatedTest() { // TODO: test deprecated } - /** Test the property 'external' */ + /** + * Test the property 'external' + */ @Test public void externalTest() { // TODO: test external } - /** Test the property 'hidden' */ + /** + * Test the property 'hidden' + */ @Test public void hiddenTest() { // TODO: test hidden } - /** Test the property 'sharedViaConnection' */ + /** + * Test the property 'sharedViaConnection' + */ @Test public void sharedViaConnectionTest() { // TODO: test sharedViaConnection } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java index b249da802..8ed53b931 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java @@ -4,63 +4,95 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchRolesRequest */ +/** + * Model tests for SearchRolesRequest + */ public class SearchRolesRequestTest { private final SearchRolesRequest model = new SearchRolesRequest(); - /** Model tests for SearchRolesRequest */ + /** + * Model tests for SearchRolesRequest + */ @Test public void testSearchRolesRequest() { // TODO: test SearchRolesRequest } - /** Test the property 'roleIdentifiers' */ + /** + * Test the property 'roleIdentifiers' + */ @Test public void roleIdentifiersTest() { // TODO: test roleIdentifiers } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'deprecated' */ + /** + * Test the property 'deprecated' + */ @Test public void deprecatedTest() { // TODO: test deprecated } - /** Test the property 'external' */ + /** + * Test the property 'external' + */ @Test public void externalTest() { // TODO: test external } - /** Test the property 'sharedViaConnection' */ + /** + * Test the property 'sharedViaConnection' + */ @Test public void sharedViaConnectionTest() { // TODO: test sharedViaConnection } - /** Test the property 'permissions' */ + /** + * Test the property 'permissions' + */ @Test public void permissionsTest() { // TODO: test permissions } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java index 31a5be6e1..96344a3bb 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java @@ -4,51 +4,81 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.MetadataInput; +import com.thoughtspot.client.model.ScheduleHistoryRunsOptionsInput; +import com.thoughtspot.client.model.SortingOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchSchedulesRequest */ +/** + * Model tests for SearchSchedulesRequest + */ public class SearchSchedulesRequestTest { private final SearchSchedulesRequest model = new SearchSchedulesRequest(); - /** Model tests for SearchSchedulesRequest */ + /** + * Model tests for SearchSchedulesRequest + */ @Test public void testSearchSchedulesRequest() { // TODO: test SearchSchedulesRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'sortOptions' */ + /** + * Test the property 'sortOptions' + */ @Test public void sortOptionsTest() { // TODO: test sortOptions } - /** Test the property 'historyRunsOptions' */ + /** + * Test the property 'historyRunsOptions' + */ @Test public void historyRunsOptionsTest() { // TODO: test historyRunsOptions } - /** Test the property 'scheduleIdentifiers' */ + /** + * Test the property 'scheduleIdentifiers' + */ @Test public void scheduleIdentifiersTest() { // TODO: test scheduleIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java index 4ad139158..af254c3e7 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchTagsRequest */ +/** + * Model tests for SearchTagsRequest + */ public class SearchTagsRequestTest { private final SearchTagsRequest model = new SearchTagsRequest(); - /** Model tests for SearchTagsRequest */ + /** + * Model tests for SearchTagsRequest + */ @Test public void testSearchTagsRequest() { // TODO: test SearchTagsRequest } - /** Test the property 'tagIdentifier' */ + /** + * Test the property 'tagIdentifier' + */ @Test public void tagIdentifierTest() { // TODO: test tagIdentifier } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'color' */ + /** + * Test the property 'color' + */ @Test public void colorTest() { // TODO: test color } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java index f6ca59a08..1086b1081 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java @@ -4,117 +4,168 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SortOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchUserGroupsRequest */ +/** + * Model tests for SearchUserGroupsRequest + */ public class SearchUserGroupsRequestTest { private final SearchUserGroupsRequest model = new SearchUserGroupsRequest(); - /** Model tests for SearchUserGroupsRequest */ + /** + * Model tests for SearchUserGroupsRequest + */ @Test public void testSearchUserGroupsRequest() { // TODO: test SearchUserGroupsRequest } - /** Test the property 'defaultLiveboardIdentifiers' */ + /** + * Test the property 'defaultLiveboardIdentifiers' + */ @Test public void defaultLiveboardIdentifiersTest() { // TODO: test defaultLiveboardIdentifiers } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'groupIdentifier' */ + /** + * Test the property 'groupIdentifier' + */ @Test public void groupIdentifierTest() { // TODO: test groupIdentifier } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'subGroupIdentifiers' */ + /** + * Test the property 'subGroupIdentifiers' + */ @Test public void subGroupIdentifiersTest() { // TODO: test subGroupIdentifiers } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'roleIdentifiers' */ + /** + * Test the property 'roleIdentifiers' + */ @Test public void roleIdentifiersTest() { // TODO: test roleIdentifiers } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'sortOptions' */ + /** + * Test the property 'sortOptions' + */ @Test public void sortOptionsTest() { // TODO: test sortOptions } - /** Test the property 'includeUsers' */ + /** + * Test the property 'includeUsers' + */ @Test public void includeUsersTest() { // TODO: test includeUsers } - /** Test the property 'includeSubGroups' */ + /** + * Test the property 'includeSubGroups' + */ @Test public void includeSubGroupsTest() { // TODO: test includeSubGroups } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java index 98fa6eb77..e2238545b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java @@ -4,135 +4,193 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import com.thoughtspot.client.model.SortOptions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchUsersRequest */ +/** + * Model tests for SearchUsersRequest + */ public class SearchUsersRequestTest { private final SearchUsersRequest model = new SearchUsersRequest(); - /** Model tests for SearchUsersRequest */ + /** + * Model tests for SearchUsersRequest + */ @Test public void testSearchUsersRequest() { // TODO: test SearchUsersRequest } - /** Test the property 'userIdentifier' */ + /** + * Test the property 'userIdentifier' + */ @Test public void userIdentifierTest() { // TODO: test userIdentifier } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'accountType' */ + /** + * Test the property 'accountType' + */ @Test public void accountTypeTest() { // TODO: test accountType } - /** Test the property 'accountStatus' */ + /** + * Test the property 'accountStatus' + */ @Test public void accountStatusTest() { // TODO: test accountStatus } - /** Test the property 'notifyOnShare' */ + /** + * Test the property 'notifyOnShare' + */ @Test public void notifyOnShareTest() { // TODO: test notifyOnShare } - /** Test the property 'showOnboardingExperience' */ + /** + * Test the property 'showOnboardingExperience' + */ @Test public void showOnboardingExperienceTest() { // TODO: test showOnboardingExperience } - /** Test the property 'onboardingExperienceCompleted' */ + /** + * Test the property 'onboardingExperienceCompleted' + */ @Test public void onboardingExperienceCompletedTest() { // TODO: test onboardingExperienceCompleted } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'homeLiveboardIdentifier' */ + /** + * Test the property 'homeLiveboardIdentifier' + */ @Test public void homeLiveboardIdentifierTest() { // TODO: test homeLiveboardIdentifier } - /** Test the property 'favoriteMetadata' */ + /** + * Test the property 'favoriteMetadata' + */ @Test public void favoriteMetadataTest() { // TODO: test favoriteMetadata } - /** Test the property 'recordOffset' */ + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'sortOptions' */ + /** + * Test the property 'sortOptions' + */ @Test public void sortOptionsTest() { // TODO: test sortOptions } - /** Test the property 'roleIdentifiers' */ + /** + * Test the property 'roleIdentifiers' + */ @Test public void roleIdentifiersTest() { // TODO: test roleIdentifiers } - /** Test the property 'includeFavoriteMetadata' */ + /** + * Test the property 'includeFavoriteMetadata' + */ @Test public void includeFavoriteMetadataTest() { // TODO: test includeFavoriteMetadata } + } 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..710f4b1e7 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 @@ -4,39 +4,72 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ValueScopeInput; +import com.thoughtspot.client.model.VariableDetailInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SearchVariablesRequest */ +/** + * Model tests for SearchVariablesRequest + */ public class SearchVariablesRequestTest { private final SearchVariablesRequest model = new SearchVariablesRequest(); - /** Model tests for SearchVariablesRequest */ + /** + * Model tests for SearchVariablesRequest + */ @Test public void testSearchVariablesRequest() { // TODO: test SearchVariablesRequest } - /** Test the property 'variableDetails' */ + /** + * Test the property 'variableDetails' + */ @Test public void variableDetailsTest() { // TODO: test variableDetails } - /** Test the property 'recordOffset' */ + /** + * Test the property 'valueScope' + */ + @Test + public void valueScopeTest() { + // TODO: test valueScope + } + + /** + * Test the property 'recordOffset' + */ @Test public void recordOffsetTest() { // TODO: test recordOffset } - /** Test the property 'recordSize' */ + /** + * Test the property 'recordSize' + */ @Test public void recordSizeTest() { // TODO: test recordSize } - /** Test the property 'outputFormat' */ + /** + * Test the property 'outputFormat' + */ @Test public void outputFormatTest() { // TODO: test outputFormat } + } 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..0b98c41e1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequestTest.java @@ -0,0 +1,80 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookSortOptionsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..dd502c415 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageRequestTest.java @@ -0,0 +1,41 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SendAgentMessageRequest + */ +public class SendAgentMessageRequestTest { + private final SendAgentMessageRequest model = new SendAgentMessageRequest(); + + /** + * Model tests for SendAgentMessageRequest + */ + @Test + public void testSendAgentMessageRequest() { + // TODO: test SendAgentMessageRequest + } + + /** + * Test the property 'messages' + */ + @Test + public void messagesTest() { + // TODO: test messages + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java index a1fb4b743..bd21185a9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SendAgentMessageResponse */ +/** + * Model tests for SendAgentMessageResponse + */ public class SendAgentMessageResponseTest { private final SendAgentMessageResponse model = new SendAgentMessageResponse(); - /** Model tests for SendAgentMessageResponse */ + /** + * Model tests for SendAgentMessageResponse + */ @Test public void testSendAgentMessageResponse() { // TODO: test SendAgentMessageResponse } - /** Test the property 'success' */ + /** + * Test the property 'success' + */ @Test public void successTest() { // TODO: test success } - /** Test the property 'message' */ + /** + * Test the property 'message' + */ @Test public void messageTest() { // TODO: test message } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java index bfb022db0..677329686 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java @@ -4,27 +4,46 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SendAgentMessageStreamingRequest */ +/** + * Model tests for SendAgentMessageStreamingRequest + */ public class SendAgentMessageStreamingRequestTest { private final SendAgentMessageStreamingRequest model = new SendAgentMessageStreamingRequest(); - /** Model tests for SendAgentMessageStreamingRequest */ + /** + * Model tests for SendAgentMessageStreamingRequest + */ @Test public void testSendAgentMessageStreamingRequest() { // TODO: test SendAgentMessageStreamingRequest } - /** Test the property 'conversationIdentifier' */ + /** + * Test the property 'conversationIdentifier' + */ @Test public void conversationIdentifierTest() { // TODO: test conversationIdentifier } - /** Test the property 'messages' */ + /** + * Test the property 'messages' + */ @Test public void messagesTest() { // TODO: test messages } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java index b12243fca..16841b550 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SendMessageRequest */ +/** + * Model tests for SendMessageRequest + */ public class SendMessageRequestTest { private final SendMessageRequest model = new SendMessageRequest(); - /** Model tests for SendMessageRequest */ + /** + * Model tests for SendMessageRequest + */ @Test public void testSendMessageRequest() { // TODO: test SendMessageRequest } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'message' */ + /** + * Test the property 'message' + */ @Test public void messageTest() { // TODO: test message } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java index a6c539674..dcace27a8 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java @@ -4,75 +4,113 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ShareMetadataTypeInput; +import com.thoughtspot.client.model.SharePermissionsInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ShareMetadataRequest */ +/** + * Model tests for ShareMetadataRequest + */ public class ShareMetadataRequestTest { private final ShareMetadataRequest model = new ShareMetadataRequest(); - /** Model tests for ShareMetadataRequest */ + /** + * Model tests for ShareMetadataRequest + */ @Test public void testShareMetadataRequest() { // TODO: test ShareMetadataRequest } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'metadataIdentifiers' */ + /** + * Test the property 'metadataIdentifiers' + */ @Test public void metadataIdentifiersTest() { // TODO: test metadataIdentifiers } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'permissions' */ + /** + * Test the property 'permissions' + */ @Test public void permissionsTest() { // TODO: test permissions } - /** Test the property 'visualizationIdentifiers' */ + /** + * Test the property 'visualizationIdentifiers' + */ @Test public void visualizationIdentifiersTest() { // TODO: test visualizationIdentifiers } - /** Test the property 'emails' */ + /** + * Test the property 'emails' + */ @Test public void emailsTest() { // TODO: test emails } - /** Test the property 'message' */ + /** + * Test the property 'message' + */ @Test public void messageTest() { // TODO: test message } - /** Test the property 'enableCustomUrl' */ + /** + * Test the property 'enableCustomUrl' + */ @Test public void enableCustomUrlTest() { // TODO: test enableCustomUrl } - /** Test the property 'notifyOnShare' */ + /** + * Test the property 'notifyOnShare' + */ @Test public void notifyOnShareTest() { // TODO: test notifyOnShare } - /** Test the property 'hasLenientDiscoverability' */ + /** + * Test the property 'hasLenientDiscoverability' + */ @Test public void hasLenientDiscoverabilityTest() { // TODO: test hasLenientDiscoverability } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java index 5dba3847d..3f6063d66 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ShareMetadataTypeInput */ +/** + * Model tests for ShareMetadataTypeInput + */ public class ShareMetadataTypeInputTest { private final ShareMetadataTypeInput model = new ShareMetadataTypeInput(); - /** Model tests for ShareMetadataTypeInput */ + /** + * Model tests for ShareMetadataTypeInput + */ @Test public void testShareMetadataTypeInput() { // TODO: test ShareMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java index 52c792400..99d56773b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PrincipalsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SharePermissionsInput */ +/** + * Model tests for SharePermissionsInput + */ public class SharePermissionsInputTest { private final SharePermissionsInput model = new SharePermissionsInput(); - /** Model tests for SharePermissionsInput */ + /** + * Model tests for SharePermissionsInput + */ @Test public void testSharePermissionsInput() { // TODO: test SharePermissionsInput } - /** Test the property 'principal' */ + /** + * Test the property 'principal' + */ @Test public void principalTest() { // TODO: test principal } - /** Test the property 'shareMode' */ + /** + * Test the property 'shareMode' + */ @Test public void shareModeTest() { // TODO: test shareMode } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java index 96629dbd2..4f1d67d65 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SingleAnswerRequest */ +/** + * Model tests for SingleAnswerRequest + */ public class SingleAnswerRequestTest { private final SingleAnswerRequest model = new SingleAnswerRequest(); - /** Model tests for SingleAnswerRequest */ + /** + * Model tests for SingleAnswerRequest + */ @Test public void testSingleAnswerRequest() { // TODO: test SingleAnswerRequest } - /** Test the property 'query' */ + /** + * Test the property 'query' + */ @Test public void queryTest() { // TODO: test query } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java index 6f3642f78..06da56a8b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SortOptionInput */ +/** + * Model tests for SortOptionInput + */ public class SortOptionInputTest { private final SortOptionInput model = new SortOptionInput(); - /** Model tests for SortOptionInput */ + /** + * Model tests for SortOptionInput + */ @Test public void testSortOptionInput() { // TODO: test SortOptionInput } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'order' */ + /** + * Test the property 'order' + */ @Test public void orderTest() { // TODO: test order } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java index 450fd8d25..67e47ea10 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SortOption */ +/** + * Model tests for SortOption + */ public class SortOptionTest { private final SortOption model = new SortOption(); - /** Model tests for SortOption */ + /** + * Model tests for SortOption + */ @Test public void testSortOption() { // TODO: test SortOption } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'order' */ + /** + * Test the property 'order' + */ @Test public void orderTest() { // TODO: test order } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java index e875b6e4e..4e0ec17d9 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SortOptions */ +/** + * Model tests for SortOptions + */ public class SortOptionsTest { private final SortOptions model = new SortOptions(); - /** Model tests for SortOptions */ + /** + * Model tests for SortOptions + */ @Test public void testSortOptions() { // TODO: test SortOptions } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'order' */ + /** + * Test the property 'order' + */ @Test public void orderTest() { // TODO: test order } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java index 6b7c2b39a..53aa8c835 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SortingOptions */ +/** + * Model tests for SortingOptions + */ public class SortingOptionsTest { private final SortingOptions model = new SortingOptions(); - /** Model tests for SortingOptions */ + /** + * Model tests for SortingOptions + */ @Test public void testSortingOptions() { // TODO: test SortingOptions } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'order' */ + /** + * Test the property 'order' + */ @Test public void orderTest() { // TODO: test order } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java index 9f1b14bc8..b47378d44 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java @@ -4,39 +4,63 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.SqlQuery; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SqlQueryResponse */ +/** + * Model tests for SqlQueryResponse + */ public class SqlQueryResponseTest { private final SqlQueryResponse model = new SqlQueryResponse(); - /** Model tests for SqlQueryResponse */ + /** + * Model tests for SqlQueryResponse + */ @Test public void testSqlQueryResponse() { // TODO: test SqlQueryResponse } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'sqlQueries' */ + /** + * Test the property 'sqlQueries' + */ @Test public void sqlQueriesTest() { // TODO: test sqlQueries } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java index de02b13df..f7d4aa61e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java @@ -4,33 +4,52 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SqlQuery */ +/** + * Model tests for SqlQuery + */ public class SqlQueryTest { private final SqlQuery model = new SqlQuery(); - /** Model tests for SqlQuery */ + /** + * Model tests for SqlQuery + */ @Test public void testSqlQuery() { // TODO: test SqlQuery } - /** Test the property 'metadataId' */ + /** + * Test the property 'metadataId' + */ @Test public void metadataIdTest() { // TODO: test metadataId } - /** Test the property 'metadataName' */ + /** + * Test the property 'metadataName' + */ @Test public void metadataNameTest() { // TODO: test metadataName } - /** Test the property 'sqlQuery' */ + /** + * Test the property 'sqlQuery' + */ @Test public void sqlQueryTest() { // TODO: test sqlQuery } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java index a1c2c7cc5..2a11f328a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SystemConfig */ +/** + * Model tests for SystemConfig + */ public class SystemConfigTest { private final SystemConfig model = new SystemConfig(); - /** Model tests for SystemConfig */ + /** + * Model tests for SystemConfig + */ @Test public void testSystemConfig() { // TODO: test SystemConfig } - /** Test the property 'onboardingContentUrl' */ + /** + * Test the property 'onboardingContentUrl' + */ @Test public void onboardingContentUrlTest() { // TODO: test onboardingContentUrl } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java index 015a1c84d..eb38ad80c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java @@ -4,153 +4,213 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SystemInfo */ +/** + * Model tests for SystemInfo + */ public class SystemInfoTest { private final SystemInfo model = new SystemInfo(); - /** Model tests for SystemInfo */ + /** + * Model tests for SystemInfo + */ @Test public void testSystemInfo() { // TODO: test SystemInfo } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'releaseVersion' */ + /** + * Test the property 'releaseVersion' + */ @Test public void releaseVersionTest() { // TODO: test releaseVersion } - /** Test the property 'timeZone' */ + /** + * Test the property 'timeZone' + */ @Test public void timeZoneTest() { // TODO: test timeZone } - /** Test the property 'locale' */ + /** + * Test the property 'locale' + */ @Test public void localeTest() { // TODO: test locale } - /** Test the property 'dateFormat' */ + /** + * Test the property 'dateFormat' + */ @Test public void dateFormatTest() { // TODO: test dateFormat } - /** Test the property 'apiVersion' */ + /** + * Test the property 'apiVersion' + */ @Test public void apiVersionTest() { // TODO: test apiVersion } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'environment' */ + /** + * Test the property 'environment' + */ @Test public void environmentTest() { // TODO: test environment } - /** Test the property 'license' */ + /** + * Test the property 'license' + */ @Test public void licenseTest() { // TODO: test license } - /** Test the property 'dateTimeFormat' */ + /** + * Test the property 'dateTimeFormat' + */ @Test public void dateTimeFormatTest() { // TODO: test dateTimeFormat } - /** Test the property 'timeFormat' */ + /** + * Test the property 'timeFormat' + */ @Test public void timeFormatTest() { // TODO: test timeFormat } - /** Test the property 'systemUserId' */ + /** + * Test the property 'systemUserId' + */ @Test public void systemUserIdTest() { // TODO: test systemUserId } - /** Test the property 'superUserId' */ + /** + * Test the property 'superUserId' + */ @Test public void superUserIdTest() { // TODO: test superUserId } - /** Test the property 'hiddenObjectId' */ + /** + * Test the property 'hiddenObjectId' + */ @Test public void hiddenObjectIdTest() { // TODO: test hiddenObjectId } - /** Test the property 'systemGroupId' */ + /** + * Test the property 'systemGroupId' + */ @Test public void systemGroupIdTest() { // TODO: test systemGroupId } - /** Test the property 'tsadminUserId' */ + /** + * Test the property 'tsadminUserId' + */ @Test public void tsadminUserIdTest() { // TODO: test tsadminUserId } - /** Test the property 'adminGroupId' */ + /** + * Test the property 'adminGroupId' + */ @Test public void adminGroupIdTest() { // TODO: test adminGroupId } - /** Test the property 'allTablesConnectionId' */ + /** + * Test the property 'allTablesConnectionId' + */ @Test public void allTablesConnectionIdTest() { // TODO: test allTablesConnectionId } - /** Test the property 'allUserGroupId' */ + /** + * Test the property 'allUserGroupId' + */ @Test public void allUserGroupIdTest() { // TODO: test allUserGroupId } - /** Test the property 'acceptLanguage' */ + /** + * Test the property 'acceptLanguage' + */ @Test public void acceptLanguageTest() { // TODO: test acceptLanguage } - /** Test the property 'allUserGroupMemberUserCount' */ + /** + * Test the property 'allUserGroupMemberUserCount' + */ @Test public void allUserGroupMemberUserCountTest() { // TODO: test allUserGroupMemberUserCount } - /** Test the property 'logicalModelVersion' */ + /** + * Test the property 'logicalModelVersion' + */ @Test public void logicalModelVersionTest() { // TODO: test logicalModelVersion } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java index 939a5cedc..0e00a2aab 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java @@ -4,21 +4,37 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for SystemOverrideInfo */ +/** + * Model tests for SystemOverrideInfo + */ public class SystemOverrideInfoTest { private final SystemOverrideInfo model = new SystemOverrideInfo(); - /** Model tests for SystemOverrideInfo */ + /** + * Model tests for SystemOverrideInfo + */ @Test public void testSystemOverrideInfo() { // TODO: test SystemOverrideInfo } - /** Test the property 'configOverrideInfo' */ + /** + * Test the property 'configOverrideInfo' + */ @Test public void configOverrideInfoTest() { // TODO: test configOverrideInfo } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java index b012110dd..2246c7929 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java @@ -4,57 +4,88 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Column; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Table */ +/** + * Model tests for Table + */ public class TableTest { private final Table model = new Table(); - /** Model tests for Table */ + /** + * Model tests for Table + */ @Test public void testTable() { // TODO: test Table } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'columns' */ + /** + * Test the property 'columns' + */ @Test public void columnsTest() { // TODO: test columns } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'selected' */ + /** + * Test the property 'selected' + */ @Test public void selectedTest() { // TODO: test selected } - /** Test the property 'linked' */ + /** + * Test the property 'linked' + */ @Test public void linkedTest() { // TODO: test linked } - /** Test the property 'relationships' */ + /** + * Test the property 'relationships' + */ @Test public void relationshipsTest() { // TODO: test relationships } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java index 61d972459..584fd8ee7 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for TagMetadataTypeInput */ +/** + * Model tests for TagMetadataTypeInput + */ public class TagMetadataTypeInputTest { private final TagMetadataTypeInput model = new TagMetadataTypeInput(); - /** Model tests for TagMetadataTypeInput */ + /** + * Model tests for TagMetadataTypeInput + */ @Test public void testTagMetadataTypeInput() { // TODO: test TagMetadataTypeInput } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java index 0f4cd786c..12d3f5173 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java @@ -4,87 +4,125 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Tag */ +/** + * Model tests for Tag + */ public class TagTest { private final Tag model = new Tag(); - /** Model tests for Tag */ + /** + * Model tests for Tag + */ @Test public void testTag() { // TODO: test Tag } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'color' */ + /** + * Test the property 'color' + */ @Test public void colorTest() { // TODO: test color } - /** Test the property 'deleted' */ + /** + * Test the property 'deleted' + */ @Test public void deletedTest() { // TODO: test deleted } - /** Test the property 'hidden' */ + /** + * Test the property 'hidden' + */ @Test public void hiddenTest() { // TODO: test hidden } - /** Test the property 'external' */ + /** + * Test the property 'external' + */ @Test public void externalTest() { // TODO: test external } - /** Test the property 'deprecated' */ + /** + * Test the property 'deprecated' + */ @Test public void deprecatedTest() { // TODO: test deprecated } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'modificationTimeInMillis' */ + /** + * Test the property 'modificationTimeInMillis' + */ @Test public void modificationTimeInMillisTest() { // TODO: test modificationTimeInMillis } - /** Test the property 'authorId' */ + /** + * Test the property 'authorId' + */ @Test public void authorIdTest() { // TODO: test authorId } - /** Test the property 'modifierId' */ + /** + * Test the property 'modifierId' + */ @Test public void modifierIdTest() { // TODO: test modifierId } - /** Test the property 'ownerId' */ + /** + * Test the property 'ownerId' + */ @Test public void ownerIdTest() { // TODO: test ownerId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java index a70535f04..98510e039 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java @@ -4,165 +4,229 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for TemplatePropertiesInputCreate */ +/** + * Model tests for TemplatePropertiesInputCreate + */ public class TemplatePropertiesInputCreateTest { private final TemplatePropertiesInputCreate model = new TemplatePropertiesInputCreate(); - /** Model tests for TemplatePropertiesInputCreate */ + /** + * Model tests for TemplatePropertiesInputCreate + */ @Test public void testTemplatePropertiesInputCreate() { // TODO: test TemplatePropertiesInputCreate } - /** Test the property 'ctaButtonBgColor' */ + /** + * Test the property 'ctaButtonBgColor' + */ @Test public void ctaButtonBgColorTest() { // TODO: test ctaButtonBgColor } - /** Test the property 'ctaTextFontColor' */ + /** + * Test the property 'ctaTextFontColor' + */ @Test public void ctaTextFontColorTest() { // TODO: test ctaTextFontColor } - /** Test the property 'primaryBgColor' */ + /** + * Test the property 'primaryBgColor' + */ @Test public void primaryBgColorTest() { // TODO: test primaryBgColor } - /** Test the property 'homeUrl' */ + /** + * Test the property 'homeUrl' + */ @Test public void homeUrlTest() { // TODO: test homeUrl } - /** Test the property 'logoUrl' */ + /** + * Test the property 'logoUrl' + */ @Test public void logoUrlTest() { // TODO: test logoUrl } - /** Test the property 'fontFamily' */ + /** + * Test the property 'fontFamily' + */ @Test public void fontFamilyTest() { // TODO: test fontFamily } - /** Test the property 'productName' */ + /** + * Test the property 'productName' + */ @Test public void productNameTest() { // TODO: test productName } - /** Test the property 'footerAddress' */ + /** + * Test the property 'footerAddress' + */ @Test public void footerAddressTest() { // TODO: test footerAddress } - /** Test the property 'footerPhone' */ + /** + * Test the property 'footerPhone' + */ @Test public void footerPhoneTest() { // TODO: test footerPhone } - /** Test the property 'replacementValueForLiveboard' */ + /** + * Test the property 'replacementValueForLiveboard' + */ @Test public void replacementValueForLiveboardTest() { // TODO: test replacementValueForLiveboard } - /** Test the property 'replacementValueForAnswer' */ + /** + * Test the property 'replacementValueForAnswer' + */ @Test public void replacementValueForAnswerTest() { // TODO: test replacementValueForAnswer } - /** Test the property 'replacementValueForSpotIq' */ + /** + * Test the property 'replacementValueForSpotIq' + */ @Test public void replacementValueForSpotIqTest() { // TODO: test replacementValueForSpotIq } - /** Test the property 'hideFooterAddress' */ + /** + * Test the property 'hideFooterAddress' + */ @Test public void hideFooterAddressTest() { // TODO: test hideFooterAddress } - /** Test the property 'hideFooterPhone' */ + /** + * Test the property 'hideFooterPhone' + */ @Test public void hideFooterPhoneTest() { // TODO: test hideFooterPhone } - /** Test the property 'hideManageNotification' */ + /** + * Test the property 'hideManageNotification' + */ @Test public void hideManageNotificationTest() { // TODO: test hideManageNotification } - /** Test the property 'hideMobileAppNudge' */ + /** + * Test the property 'hideMobileAppNudge' + */ @Test public void hideMobileAppNudgeTest() { // TODO: test hideMobileAppNudge } - /** Test the property 'hidePrivacyPolicy' */ + /** + * Test the property 'hidePrivacyPolicy' + */ @Test public void hidePrivacyPolicyTest() { // TODO: test hidePrivacyPolicy } - /** Test the property 'hideProductName' */ + /** + * Test the property 'hideProductName' + */ @Test public void hideProductNameTest() { // TODO: test hideProductName } - /** Test the property 'hideTsVocabularyDefinitions' */ + /** + * Test the property 'hideTsVocabularyDefinitions' + */ @Test public void hideTsVocabularyDefinitionsTest() { // TODO: test hideTsVocabularyDefinitions } - /** Test the property 'hideNotificationStatus' */ + /** + * Test the property 'hideNotificationStatus' + */ @Test public void hideNotificationStatusTest() { // TODO: test hideNotificationStatus } - /** Test the property 'hideErrorMessage' */ + /** + * Test the property 'hideErrorMessage' + */ @Test public void hideErrorMessageTest() { // TODO: test hideErrorMessage } - /** Test the property 'hideUnsubscribeLink' */ + /** + * Test the property 'hideUnsubscribeLink' + */ @Test public void hideUnsubscribeLinkTest() { // TODO: test hideUnsubscribeLink } - /** Test the property 'hideModifyAlert' */ + /** + * Test the property 'hideModifyAlert' + */ @Test public void hideModifyAlertTest() { // TODO: test hideModifyAlert } - /** Test the property 'companyPrivacyPolicyUrl' */ + /** + * Test the property 'companyPrivacyPolicyUrl' + */ @Test public void companyPrivacyPolicyUrlTest() { // TODO: test companyPrivacyPolicyUrl } - /** Test the property 'companyWebsiteUrl' */ + /** + * Test the property 'companyWebsiteUrl' + */ @Test public void companyWebsiteUrlTest() { // TODO: test companyWebsiteUrl } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java index 1c60be796..5f3d771a4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for TokenAccessScopeObject */ +/** + * Model tests for TokenAccessScopeObject + */ public class TokenAccessScopeObjectTest { private final TokenAccessScopeObject model = new TokenAccessScopeObject(); - /** Model tests for TokenAccessScopeObject */ + /** + * Model tests for TokenAccessScopeObject + */ @Test public void testTokenAccessScopeObject() { // TODO: test TokenAccessScopeObject } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java index 30062a873..a3bc5384a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java @@ -4,51 +4,77 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Scope; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Token */ +/** + * Model tests for Token + */ public class TokenTest { private final Token model = new Token(); - /** Model tests for Token */ + /** + * Model tests for Token + */ @Test public void testToken() { // TODO: test Token } - /** Test the property 'token' */ + /** + * Test the property 'token' + */ @Test public void tokenTest() { // TODO: test token } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'expirationTimeInMillis' */ + /** + * Test the property 'expirationTimeInMillis' + */ @Test public void expirationTimeInMillisTest() { // TODO: test expirationTimeInMillis } - /** Test the property 'scope' */ + /** + * Test the property 'scope' + */ @Test public void scopeTest() { // TODO: test scope } - /** Test the property 'validForUserId' */ + /** + * Test the property 'validForUserId' + */ @Test public void validForUserIdTest() { // TODO: test validForUserId } - /** Test the property 'validForUsername' */ + /** + * Test the property 'validForUsername' + */ @Test public void validForUsernameTest() { // TODO: test validForUsername } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java index b0ee9aba0..7f4dac895 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Scope; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for TokenValidationResponse */ +/** + * Model tests for TokenValidationResponse + */ public class TokenValidationResponseTest { private final TokenValidationResponse model = new TokenValidationResponse(); - /** Model tests for TokenValidationResponse */ + /** + * Model tests for TokenValidationResponse + */ @Test public void testTokenValidationResponse() { // TODO: test TokenValidationResponse } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'expirationTimeInMillis' */ + /** + * Test the property 'expirationTimeInMillis' + */ @Test public void expirationTimeInMillisTest() { // TODO: test expirationTimeInMillis } - /** Test the property 'scope' */ + /** + * Test the property 'scope' + */ @Test public void scopeTest() { // TODO: test scope } - /** Test the property 'validForUserId' */ + /** + * Test the property 'validForUserId' + */ @Test public void validForUserIdTest() { // TODO: test validForUserId } - /** Test the property 'tokenType' */ + /** + * Test the property 'tokenType' + */ @Test public void tokenTypeTest() { // TODO: test tokenType } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java index 274d5d5ae..eb10fb39f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java @@ -4,39 +4,65 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthenticationInput; +import com.thoughtspot.client.model.ParametersListItemInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for URLInputMandatory */ +/** + * Model tests for URLInputMandatory + */ public class URLInputMandatoryTest { private final URLInputMandatory model = new URLInputMandatory(); - /** Model tests for URLInputMandatory */ + /** + * Model tests for URLInputMandatory + */ @Test public void testURLInputMandatory() { // TODO: test URLInputMandatory } - /** Test the property 'authentication' */ + /** + * Test the property 'authentication' + */ @Test public void authenticationTest() { // TODO: test authentication } - /** Test the property 'parameters' */ + /** + * Test the property 'parameters' + */ @Test public void parametersTest() { // TODO: test parameters } - /** Test the property 'url' */ + /** + * Test the property 'url' + */ @Test public void urlTest() { // TODO: test url } - /** Test the property 'reference' */ + /** + * Test the property 'reference' + */ @Test public void referenceTest() { // TODO: test reference } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java index 5aa0bfaa8..9d08c1fbd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java @@ -4,39 +4,65 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.AuthenticationInput; +import com.thoughtspot.client.model.ParametersListItemInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for URLInput */ +/** + * Model tests for URLInput + */ public class URLInputTest { private final URLInput model = new URLInput(); - /** Model tests for URLInput */ + /** + * Model tests for URLInput + */ @Test public void testURLInput() { // TODO: test URLInput } - /** Test the property 'authentication' */ + /** + * Test the property 'authentication' + */ @Test public void authenticationTest() { // TODO: test authentication } - /** Test the property 'parameters' */ + /** + * Test the property 'parameters' + */ @Test public void parametersTest() { // TODO: test parameters } - /** Test the property 'url' */ + /** + * Test the property 'url' + */ @Test public void urlTest() { // TODO: test url } - /** Test the property 'reference' */ + /** + * Test the property 'reference' + */ @Test public void referenceTest() { // TODO: test reference } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java index 0aee46a67..93954a1fe 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java @@ -4,39 +4,65 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Authentication; +import com.thoughtspot.client.model.ParametersListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for URL */ +/** + * Model tests for URL + */ public class URLTest { private final URL model = new URL(); - /** Model tests for URL */ + /** + * Model tests for URL + */ @Test public void testURL() { // TODO: test URL } - /** Test the property 'authentication' */ + /** + * Test the property 'authentication' + */ @Test public void authenticationTest() { // TODO: test authentication } - /** Test the property 'parameters' */ + /** + * Test the property 'parameters' + */ @Test public void parametersTest() { // TODO: test parameters } - /** Test the property 'url' */ + /** + * Test the property 'url' + */ @Test public void urlTest() { // TODO: test url } - /** Test the property 'reference' */ + /** + * Test the property 'reference' + */ @Test public void referenceTest() { // TODO: test reference } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java index c6edf9aed..5bde041f2 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java @@ -4,45 +4,68 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UnparameterizeMetadataRequest */ +/** + * Model tests for UnparameterizeMetadataRequest + */ public class UnparameterizeMetadataRequestTest { private final UnparameterizeMetadataRequest model = new UnparameterizeMetadataRequest(); - /** Model tests for UnparameterizeMetadataRequest */ + /** + * Model tests for UnparameterizeMetadataRequest + */ @Test public void testUnparameterizeMetadataRequest() { // TODO: test UnparameterizeMetadataRequest } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'fieldType' */ + /** + * Test the property 'fieldType' + */ @Test public void fieldTypeTest() { // TODO: test fieldType } - /** Test the property 'fieldName' */ + /** + * Test the property 'fieldName' + */ @Test public void fieldNameTest() { // TODO: test fieldName } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java index 970095a6c..7efe97831 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.PublishMetadataListItem; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UnpublishMetadataRequest */ +/** + * Model tests for UnpublishMetadataRequest + */ public class UnpublishMetadataRequestTest { private final UnpublishMetadataRequest model = new UnpublishMetadataRequest(); - /** Model tests for UnpublishMetadataRequest */ + /** + * Model tests for UnpublishMetadataRequest + */ @Test public void testUnpublishMetadataRequest() { // TODO: test UnpublishMetadataRequest } - /** Test the property 'force' */ + /** + * Test the property 'force' + */ @Test public void forceTest() { // TODO: test force } - /** Test the property 'includeDependencies' */ + /** + * Test the property 'includeDependencies' + */ @Test public void includeDependenciesTest() { // TODO: test includeDependencies } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java index 5562cbbd1..57eebd82c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java @@ -4,69 +4,101 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ExternalTableInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateCalendarRequest */ +/** + * Model tests for UpdateCalendarRequest + */ public class UpdateCalendarRequestTest { private final UpdateCalendarRequest model = new UpdateCalendarRequest(); - /** Model tests for UpdateCalendarRequest */ + /** + * Model tests for UpdateCalendarRequest + */ @Test public void testUpdateCalendarRequest() { // TODO: test UpdateCalendarRequest } - /** Test the property 'updateMethod' */ + /** + * Test the property 'updateMethod' + */ @Test public void updateMethodTest() { // TODO: test updateMethod } - /** Test the property 'tableReference' */ + /** + * Test the property 'tableReference' + */ @Test public void tableReferenceTest() { // TODO: test tableReference } - /** Test the property 'startDate' */ + /** + * Test the property 'startDate' + */ @Test public void startDateTest() { // TODO: test startDate } - /** Test the property 'endDate' */ + /** + * Test the property 'endDate' + */ @Test public void endDateTest() { // TODO: test endDate } - /** Test the property 'calendarType' */ + /** + * Test the property 'calendarType' + */ @Test public void calendarTypeTest() { // TODO: test calendarType } - /** Test the property 'monthOffset' */ + /** + * Test the property 'monthOffset' + */ @Test public void monthOffsetTest() { // TODO: test monthOffset } - /** Test the property 'startDayOfWeek' */ + /** + * Test the property 'startDayOfWeek' + */ @Test public void startDayOfWeekTest() { // TODO: test startDayOfWeek } - /** Test the property 'quarterNamePrefix' */ + /** + * Test the property 'quarterNamePrefix' + */ @Test public void quarterNamePrefixTest() { // TODO: test quarterNamePrefix } - /** Test the property 'yearNamePrefix' */ + /** + * Test the property 'yearNamePrefix' + */ @Test public void yearNamePrefixTest() { // TODO: test yearNamePrefix } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java index 1cbb89dca..ce7006aaa 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java @@ -4,39 +4,64 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ColumnSecurityRuleUpdate; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateColumnSecurityRulesRequest */ +/** + * Model tests for UpdateColumnSecurityRulesRequest + */ public class UpdateColumnSecurityRulesRequestTest { private final UpdateColumnSecurityRulesRequest model = new UpdateColumnSecurityRulesRequest(); - /** Model tests for UpdateColumnSecurityRulesRequest */ + /** + * Model tests for UpdateColumnSecurityRulesRequest + */ @Test public void testUpdateColumnSecurityRulesRequest() { // TODO: test UpdateColumnSecurityRulesRequest } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'objIdentifier' */ + /** + * Test the property 'objIdentifier' + */ @Test public void objIdentifierTest() { // TODO: test objIdentifier } - /** Test the property 'clearCsr' */ + /** + * Test the property 'clearCsr' + */ @Test public void clearCsrTest() { // TODO: test clearCsr } - /** Test the property 'columnSecurityRules' */ + /** + * Test the property 'columnSecurityRules' + */ @Test public void columnSecurityRulesTest() { // TODO: test columnSecurityRules } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java index 1581fecdc..0d8f76d50 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java @@ -4,57 +4,87 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateConfigRequest */ +/** + * Model tests for UpdateConfigRequest + */ public class UpdateConfigRequestTest { private final UpdateConfigRequest model = new UpdateConfigRequest(); - /** Model tests for UpdateConfigRequest */ + /** + * Model tests for UpdateConfigRequest + */ @Test public void testUpdateConfigRequest() { // TODO: test UpdateConfigRequest } - /** Test the property 'username' */ + /** + * Test the property 'username' + */ @Test public void usernameTest() { // TODO: test username } - /** Test the property 'accessToken' */ + /** + * Test the property 'accessToken' + */ @Test public void accessTokenTest() { // TODO: test accessToken } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } - /** Test the property 'branchNames' */ + /** + * Test the property 'branchNames' + */ @Test public void branchNamesTest() { // TODO: test branchNames } - /** Test the property 'commitBranchName' */ + /** + * Test the property 'commitBranchName' + */ @Test public void commitBranchNameTest() { // TODO: test commitBranchName } - /** Test the property 'enableGuidMapping' */ + /** + * Test the property 'enableGuidMapping' + */ @Test public void enableGuidMappingTest() { // TODO: test enableGuidMapping } - /** Test the property 'configurationBranchName' */ + /** + * Test the property 'configurationBranchName' + */ @Test public void configurationBranchNameTest() { // TODO: test configurationBranchName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java index 7c48db576..bbc8bb5e5 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java @@ -4,70 +4,103 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateConnectionConfigurationRequest */ +/** + * Model tests for UpdateConnectionConfigurationRequest + */ public class UpdateConnectionConfigurationRequestTest { - private final UpdateConnectionConfigurationRequest model = - new UpdateConnectionConfigurationRequest(); + private final UpdateConnectionConfigurationRequest model = new UpdateConnectionConfigurationRequest(); - /** Model tests for UpdateConnectionConfigurationRequest */ + /** + * Model tests for UpdateConnectionConfigurationRequest + */ @Test public void testUpdateConnectionConfigurationRequest() { // TODO: test UpdateConnectionConfigurationRequest } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'authenticationType' */ + /** + * Test the property 'authenticationType' + */ @Test public void authenticationTypeTest() { // TODO: test authenticationType } - /** Test the property '_configuration' */ + /** + * Test the property '_configuration' + */ @Test public void _configurationTest() { // TODO: test _configuration } - /** Test the property 'policyType' */ + /** + * Test the property 'policyType' + */ @Test public void policyTypeTest() { // TODO: test policyType } - /** Test the property 'policyPrincipals' */ + /** + * Test the property 'policyPrincipals' + */ @Test public void policyPrincipalsTest() { // TODO: test policyPrincipals } - /** Test the property 'policyProcesses' */ + /** + * Test the property 'policyProcesses' + */ @Test public void policyProcessesTest() { // TODO: test policyProcesses } - /** Test the property 'disable' */ + /** + * Test the property 'disable' + */ @Test public void disableTest() { // TODO: test disable } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java index 20deb9ee1..f4daf9add 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java @@ -4,45 +4,69 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateConnectionRequest */ +/** + * Model tests for UpdateConnectionRequest + */ public class UpdateConnectionRequestTest { private final UpdateConnectionRequest model = new UpdateConnectionRequest(); - /** Model tests for UpdateConnectionRequest */ + /** + * Model tests for UpdateConnectionRequest + */ @Test public void testUpdateConnectionRequest() { // TODO: test UpdateConnectionRequest } - /** Test the property 'connectionIdentifier' */ + /** + * Test the property 'connectionIdentifier' + */ @Test public void connectionIdentifierTest() { // TODO: test connectionIdentifier } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'dataWarehouseConfig' */ + /** + * Test the property 'dataWarehouseConfig' + */ @Test public void dataWarehouseConfigTest() { // TODO: test dataWarehouseConfig } - /** Test the property 'validate' */ + /** + * Test the property 'validate' + */ @Test public void validateTest() { // TODO: test validate } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java index 6cd75972f..616c4d962 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateConnectionV2Request */ +/** + * Model tests for UpdateConnectionV2Request + */ public class UpdateConnectionV2RequestTest { private final UpdateConnectionV2Request model = new UpdateConnectionV2Request(); - /** Model tests for UpdateConnectionV2Request */ + /** + * Model tests for UpdateConnectionV2Request + */ @Test public void testUpdateConnectionV2Request() { // TODO: test UpdateConnectionV2Request } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'dataWarehouseConfig' */ + /** + * Test the property 'dataWarehouseConfig' + */ @Test public void dataWarehouseConfigTest() { // TODO: test dataWarehouseConfig } - /** Test the property 'validate' */ + /** + * Test the property 'validate' + */ @Test public void validateTest() { // TODO: test validate } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java index 23f080962..3f86aff25 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java @@ -4,51 +4,81 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.ActionDetailsInput; +import com.thoughtspot.client.model.AssociateMetadataInput; +import com.thoughtspot.client.model.DefaultActionConfigInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateCustomActionRequest */ +/** + * Model tests for UpdateCustomActionRequest + */ public class UpdateCustomActionRequestTest { private final UpdateCustomActionRequest model = new UpdateCustomActionRequest(); - /** Model tests for UpdateCustomActionRequest */ + /** + * Model tests for UpdateCustomActionRequest + */ @Test public void testUpdateCustomActionRequest() { // TODO: test UpdateCustomActionRequest } - /** Test the property 'actionDetails' */ + /** + * Test the property 'actionDetails' + */ @Test public void actionDetailsTest() { // TODO: test actionDetails } - /** Test the property 'associateMetadata' */ + /** + * Test the property 'associateMetadata' + */ @Test public void associateMetadataTest() { // TODO: test associateMetadata } - /** Test the property 'defaultActionConfig' */ + /** + * Test the property 'defaultActionConfig' + */ @Test public void defaultActionConfigTest() { // TODO: test defaultActionConfig } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'operation' */ + /** + * Test the property 'operation' + */ @Test public void operationTest() { // TODO: test operation } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateDbtConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateDbtConnectionRequestTest.java deleted file mode 100644 index 87cf9003c..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateDbtConnectionRequestTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for UpdateDbtConnectionRequest */ -public class UpdateDbtConnectionRequestTest { - private final UpdateDbtConnectionRequest model = new UpdateDbtConnectionRequest(); - - /** Model tests for UpdateDbtConnectionRequest */ - @Test - public void testUpdateDbtConnectionRequest() { - // TODO: test UpdateDbtConnectionRequest - } - - /** Test the property 'dbtConnectionIdentifier' */ - @Test - public void dbtConnectionIdentifierTest() { - // TODO: test dbtConnectionIdentifier - } - - /** Test the property 'connectionName' */ - @Test - public void connectionNameTest() { - // TODO: test connectionName - } - - /** Test the property 'databaseName' */ - @Test - public void databaseNameTest() { - // TODO: test databaseName - } - - /** Test the property 'importType' */ - @Test - public void importTypeTest() { - // TODO: test importType - } - - /** Test the property 'accessToken' */ - @Test - public void accessTokenTest() { - // TODO: test accessToken - } - - /** Test the property 'dbtUrl' */ - @Test - public void dbtUrlTest() { - // TODO: test dbtUrl - } - - /** Test the property 'accountId' */ - @Test - public void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'projectId' */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** Test the property 'dbtEnvId' */ - @Test - public void dbtEnvIdTest() { - // TODO: test dbtEnvId - } - - /** Test the property 'projectName' */ - @Test - public void projectNameTest() { - // TODO: test projectName - } - - /** Test the property 'fileContent' */ - @Test - public void fileContentTest() { - // TODO: test fileContent - } -} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java index e3d1ab34c..774b15cce 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.TemplatePropertiesInputCreate; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateEmailCustomizationRequest */ +/** + * Model tests for UpdateEmailCustomizationRequest + */ public class UpdateEmailCustomizationRequestTest { private final UpdateEmailCustomizationRequest model = new UpdateEmailCustomizationRequest(); - /** Model tests for UpdateEmailCustomizationRequest */ + /** + * Model tests for UpdateEmailCustomizationRequest + */ @Test public void testUpdateEmailCustomizationRequest() { // TODO: test UpdateEmailCustomizationRequest } - /** Test the property 'templateProperties' */ + /** + * Test the property 'templateProperties' + */ @Test public void templatePropertiesTest() { // TODO: test templateProperties } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java index 8467f5794..55287824d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java @@ -4,27 +4,47 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.HeaderUpdateInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateMetadataHeaderRequest */ +/** + * Model tests for UpdateMetadataHeaderRequest + */ public class UpdateMetadataHeaderRequestTest { private final UpdateMetadataHeaderRequest model = new UpdateMetadataHeaderRequest(); - /** Model tests for UpdateMetadataHeaderRequest */ + /** + * Model tests for UpdateMetadataHeaderRequest + */ @Test public void testUpdateMetadataHeaderRequest() { // TODO: test UpdateMetadataHeaderRequest } - /** Test the property 'headersUpdate' */ + /** + * Test the property 'headersUpdate' + */ @Test public void headersUpdateTest() { // TODO: test headersUpdate } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java index d001e018e..1c61b73d6 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java @@ -4,21 +4,39 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.UpdateObjIdInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateMetadataObjIdRequest */ +/** + * Model tests for UpdateMetadataObjIdRequest + */ public class UpdateMetadataObjIdRequestTest { private final UpdateMetadataObjIdRequest model = new UpdateMetadataObjIdRequest(); - /** Model tests for UpdateMetadataObjIdRequest */ + /** + * Model tests for UpdateMetadataObjIdRequest + */ @Test public void testUpdateMetadataObjIdRequest() { // TODO: test UpdateMetadataObjIdRequest } - /** Test the property 'metadata' */ + /** + * Test the property 'metadata' + */ @Test public void metadataTest() { // TODO: test metadata } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java index e5243d5c0..04793ea5b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java @@ -4,39 +4,61 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateObjIdInput */ +/** + * Model tests for UpdateObjIdInput + */ public class UpdateObjIdInputTest { private final UpdateObjIdInput model = new UpdateObjIdInput(); - /** Model tests for UpdateObjIdInput */ + /** + * Model tests for UpdateObjIdInput + */ @Test public void testUpdateObjIdInput() { // TODO: test UpdateObjIdInput } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'currentObjId' */ + /** + * Test the property 'currentObjId' + */ @Test public void currentObjIdTest() { // TODO: test currentObjId } - /** Test the property 'newObjId' */ + /** + * Test the property 'newObjId' + */ @Test public void newObjIdTest() { // TODO: test newObjId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java index 229e0a9d2..a067d9d88 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java @@ -4,45 +4,70 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateOrgRequest */ +/** + * Model tests for UpdateOrgRequest + */ public class UpdateOrgRequestTest { private final UpdateOrgRequest model = new UpdateOrgRequest(); - /** Model tests for UpdateOrgRequest */ + /** + * Model tests for UpdateOrgRequest + */ @Test public void testUpdateOrgRequest() { // TODO: test UpdateOrgRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'operation' */ + /** + * Test the property 'operation' + */ @Test public void operationTest() { // TODO: test operation } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java index 12008a8c5..eee7d7f9d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java @@ -4,33 +4,54 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateRoleRequest */ +/** + * Model tests for UpdateRoleRequest + */ public class UpdateRoleRequestTest { private final UpdateRoleRequest model = new UpdateRoleRequest(); - /** Model tests for UpdateRoleRequest */ + /** + * Model tests for UpdateRoleRequest + */ @Test public void testUpdateRoleRequest() { // TODO: test UpdateRoleRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java index 98daac65a..de6a0a956 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java @@ -4,87 +4,128 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FrequencyInput; +import com.thoughtspot.client.model.LiveboardOptionsInput; +import com.thoughtspot.client.model.RecipientDetailsInput; +import com.thoughtspot.client.model.SchedulesPdfOptionsInput; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateScheduleRequest */ +/** + * Model tests for UpdateScheduleRequest + */ public class UpdateScheduleRequestTest { private final UpdateScheduleRequest model = new UpdateScheduleRequest(); - /** Model tests for UpdateScheduleRequest */ + /** + * Model tests for UpdateScheduleRequest + */ @Test public void testUpdateScheduleRequest() { // TODO: test UpdateScheduleRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'metadataType' */ + /** + * Test the property 'metadataType' + */ @Test public void metadataTypeTest() { // TODO: test metadataType } - /** Test the property 'metadataIdentifier' */ + /** + * Test the property 'metadataIdentifier' + */ @Test public void metadataIdentifierTest() { // TODO: test metadataIdentifier } - /** Test the property 'fileFormat' */ + /** + * Test the property 'fileFormat' + */ @Test public void fileFormatTest() { // TODO: test fileFormat } - /** Test the property 'liveboardOptions' */ + /** + * Test the property 'liveboardOptions' + */ @Test public void liveboardOptionsTest() { // TODO: test liveboardOptions } - /** Test the property 'pdfOptions' */ + /** + * Test the property 'pdfOptions' + */ @Test public void pdfOptionsTest() { // TODO: test pdfOptions } - /** Test the property 'timeZone' */ + /** + * Test the property 'timeZone' + */ @Test public void timeZoneTest() { // TODO: test timeZone } - /** Test the property 'frequency' */ + /** + * Test the property 'frequency' + */ @Test public void frequencyTest() { // TODO: test frequency } - /** Test the property 'recipientDetails' */ + /** + * Test the property 'recipientDetails' + */ @Test public void recipientDetailsTest() { // TODO: test recipientDetails } - /** Test the property 'status' */ + /** + * Test the property 'status' + */ @Test public void statusTest() { // TODO: test status } - /** Test the property 'personalisedViewId' */ + /** + * Test the property 'personalisedViewId' + */ @Test public void personalisedViewIdTest() { // TODO: test personalisedViewId } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java index 8cf08d04f..69915e8e4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateSystemConfigRequest */ +/** + * Model tests for UpdateSystemConfigRequest + */ public class UpdateSystemConfigRequestTest { private final UpdateSystemConfigRequest model = new UpdateSystemConfigRequest(); - /** Model tests for UpdateSystemConfigRequest */ + /** + * Model tests for UpdateSystemConfigRequest + */ @Test public void testUpdateSystemConfigRequest() { // TODO: test UpdateSystemConfigRequest } - /** Test the property '_configuration' */ + /** + * Test the property '_configuration' + */ @Test public void _configurationTest() { // TODO: test _configuration } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java index e4dd88aae..a8a7d567b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateTagRequest */ +/** + * Model tests for UpdateTagRequest + */ public class UpdateTagRequestTest { private final UpdateTagRequest model = new UpdateTagRequest(); - /** Model tests for UpdateTagRequest */ + /** + * Model tests for UpdateTagRequest + */ @Test public void testUpdateTagRequest() { // TODO: test UpdateTagRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'color' */ + /** + * Test the property 'color' + */ @Test public void colorTest() { // TODO: test color } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java index 8d94b1c5c..7d56d1f78 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java @@ -4,81 +4,118 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateUserGroupRequest */ +/** + * Model tests for UpdateUserGroupRequest + */ public class UpdateUserGroupRequestTest { private final UpdateUserGroupRequest model = new UpdateUserGroupRequest(); - /** Model tests for UpdateUserGroupRequest */ + /** + * Model tests for UpdateUserGroupRequest + */ @Test public void testUpdateUserGroupRequest() { // TODO: test UpdateUserGroupRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'defaultLiveboardIdentifiers' */ + /** + * Test the property 'defaultLiveboardIdentifiers' + */ @Test public void defaultLiveboardIdentifiersTest() { // TODO: test defaultLiveboardIdentifiers } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'subGroupIdentifiers' */ + /** + * Test the property 'subGroupIdentifiers' + */ @Test public void subGroupIdentifiersTest() { // TODO: test subGroupIdentifiers } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'userIdentifiers' */ + /** + * Test the property 'userIdentifiers' + */ @Test public void userIdentifiersTest() { // TODO: test userIdentifiers } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'roleIdentifiers' */ + /** + * Test the property 'roleIdentifiers' + */ @Test public void roleIdentifiersTest() { // TODO: test roleIdentifiers } - /** Test the property 'operation' */ + /** + * Test the property 'operation' + */ @Test public void operationTest() { // TODO: test operation } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java index ecf3b472e..19690800c 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java @@ -4,117 +4,168 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateUserRequest */ +/** + * Model tests for UpdateUserRequest + */ public class UpdateUserRequestTest { private final UpdateUserRequest model = new UpdateUserRequest(); - /** Model tests for UpdateUserRequest */ + /** + * Model tests for UpdateUserRequest + */ @Test public void testUpdateUserRequest() { // TODO: test UpdateUserRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'accountStatus' */ + /** + * Test the property 'accountStatus' + */ @Test public void accountStatusTest() { // TODO: test accountStatus } - /** Test the property 'notifyOnShare' */ + /** + * Test the property 'notifyOnShare' + */ @Test public void notifyOnShareTest() { // TODO: test notifyOnShare } - /** Test the property 'showOnboardingExperience' */ + /** + * Test the property 'showOnboardingExperience' + */ @Test public void showOnboardingExperienceTest() { // TODO: test showOnboardingExperience } - /** Test the property 'onboardingExperienceCompleted' */ + /** + * Test the property 'onboardingExperienceCompleted' + */ @Test public void onboardingExperienceCompletedTest() { // TODO: test onboardingExperienceCompleted } - /** Test the property 'accountType' */ + /** + * Test the property 'accountType' + */ @Test public void accountTypeTest() { // TODO: test accountType } - /** Test the property 'groupIdentifiers' */ + /** + * Test the property 'groupIdentifiers' + */ @Test public void groupIdentifiersTest() { // TODO: test groupIdentifiers } - /** Test the property 'homeLiveboardIdentifier' */ + /** + * Test the property 'homeLiveboardIdentifier' + */ @Test public void homeLiveboardIdentifierTest() { // TODO: test homeLiveboardIdentifier } - /** Test the property 'favoriteMetadata' */ + /** + * Test the property 'favoriteMetadata' + */ @Test public void favoriteMetadataTest() { // TODO: test favoriteMetadata } - /** Test the property 'orgIdentifiers' */ + /** + * Test the property 'orgIdentifiers' + */ @Test public void orgIdentifiersTest() { // TODO: test orgIdentifiers } - /** Test the property 'operation' */ + /** + * Test the property 'operation' + */ @Test public void operationTest() { // TODO: test operation } - /** Test the property 'preferredLocale' */ + /** + * Test the property 'preferredLocale' + */ @Test public void preferredLocaleTest() { // TODO: test preferredLocale } - /** Test the property 'extendedProperties' */ + /** + * Test the property 'extendedProperties' + */ @Test public void extendedPropertiesTest() { // TODO: test extendedProperties } - /** Test the property 'extendedPreferences' */ + /** + * Test the property 'extendedPreferences' + */ @Test public void extendedPreferencesTest() { // TODO: test extendedPreferences } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java index ae5eb5929..771814afc 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 @@ -4,33 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateVariableRequest */ +/** + * Model tests for UpdateVariableRequest + */ public class UpdateVariableRequestTest { private final UpdateVariableRequest model = new UpdateVariableRequest(); - /** Model tests for UpdateVariableRequest */ + /** + * Model tests for UpdateVariableRequest + */ @Test public void testUpdateVariableRequest() { // TODO: test UpdateVariableRequest } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test 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..81a1c9be9 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 @@ -4,27 +4,48 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.VariableUpdateAssignmentInput; +import com.thoughtspot.client.model.VariableUpdateScopeInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UpdateVariableValuesRequest */ +/** + * Model tests for UpdateVariableValuesRequest + */ public class UpdateVariableValuesRequestTest { private final UpdateVariableValuesRequest model = new UpdateVariableValuesRequest(); - /** Model tests for UpdateVariableValuesRequest */ + /** + * Model tests for UpdateVariableValuesRequest + */ @Test 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..31eb2c1af --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java @@ -0,0 +1,91 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthenticationInput; +import com.thoughtspot.client.model.WebhookSignatureVerificationInput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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/UserGroupResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java index 9a58329c4..3bbdc0b71 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java @@ -4,195 +4,273 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.Role; +import com.thoughtspot.client.model.UserGroup; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UserGroupResponse */ +/** + * Model tests for UserGroupResponse + */ public class UserGroupResponseTest { private final UserGroupResponse model = new UserGroupResponse(); - /** Model tests for UserGroupResponse */ + /** + * Model tests for UserGroupResponse + */ @Test public void testUserGroupResponse() { // TODO: test UserGroupResponse } - /** Test the property 'authorId' */ + /** + * Test the property 'authorId' + */ @Test public void authorIdTest() { // TODO: test authorId } - /** Test the property 'completeDetail' */ + /** + * Test the property 'completeDetail' + */ @Test public void completeDetailTest() { // TODO: test completeDetail } - /** Test the property 'content' */ + /** + * Test the property 'content' + */ @Test public void contentTest() { // TODO: test content } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'defaultLiveboards' */ + /** + * Test the property 'defaultLiveboards' + */ @Test public void defaultLiveboardsTest() { // TODO: test defaultLiveboards } - /** Test the property 'deleted' */ + /** + * Test the property 'deleted' + */ @Test public void deletedTest() { // TODO: test deleted } - /** Test the property 'deprecated' */ + /** + * Test the property 'deprecated' + */ @Test public void deprecatedTest() { // TODO: test deprecated } - /** Test the property 'description' */ + /** + * Test the property 'description' + */ @Test public void descriptionTest() { // TODO: test description } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'external' */ + /** + * Test the property 'external' + */ @Test public void externalTest() { // TODO: test external } - /** Test the property 'generationNumber' */ + /** + * Test the property 'generationNumber' + */ @Test public void generationNumberTest() { // TODO: test generationNumber } - /** Test the property 'hidden' */ + /** + * Test the property 'hidden' + */ @Test public void hiddenTest() { // TODO: test hidden } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'index' */ + /** + * Test the property 'index' + */ @Test public void indexTest() { // TODO: test index } - /** Test the property 'indexVersion' */ + /** + * Test the property 'indexVersion' + */ @Test public void indexVersionTest() { // TODO: test indexVersion } - /** Test the property 'metadataVersion' */ + /** + * Test the property 'metadataVersion' + */ @Test public void metadataVersionTest() { // TODO: test metadataVersion } - /** Test the property 'modificationTimeInMillis' */ + /** + * Test the property 'modificationTimeInMillis' + */ @Test public void modificationTimeInMillisTest() { // TODO: test modificationTimeInMillis } - /** Test the property 'modifierId' */ + /** + * Test the property 'modifierId' + */ @Test public void modifierIdTest() { // TODO: test modifierId } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'orgs' */ + /** + * Test the property 'orgs' + */ @Test public void orgsTest() { // TODO: test orgs } - /** Test the property 'ownerId' */ + /** + * Test the property 'ownerId' + */ @Test public void ownerIdTest() { // TODO: test ownerId } - /** Test the property 'parentType' */ + /** + * Test the property 'parentType' + */ @Test public void parentTypeTest() { // TODO: test parentType } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'subGroups' */ + /** + * Test the property 'subGroups' + */ @Test public void subGroupsTest() { // TODO: test subGroups } - /** Test the property 'systemGroup' */ + /** + * Test the property 'systemGroup' + */ @Test public void systemGroupTest() { // TODO: test systemGroup } - /** Test the property 'tags' */ + /** + * Test the property 'tags' + */ @Test public void tagsTest() { // TODO: test tags } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'users' */ + /** + * Test the property 'users' + */ @Test public void usersTest() { // TODO: test users } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'roles' */ + /** + * Test the property 'roles' + */ @Test public void rolesTest() { // TODO: test roles } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java index 9d79b7377..6e6f0b93f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UserGroup */ +/** + * Model tests for UserGroup + */ public class UserGroupTest { private final UserGroup model = new UserGroup(); - /** Model tests for UserGroup */ + /** + * Model tests for UserGroup + */ @Test public void testUserGroup() { // TODO: test UserGroup } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java index 5452c5549..2bc9bd192 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UserInfo */ +/** + * Model tests for UserInfo + */ public class UserInfoTest { private final UserInfo model = new UserInfo(); - /** Model tests for UserInfo */ + /** + * Model tests for UserInfo + */ @Test public void testUserInfo() { // TODO: test UserInfo } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java index 8d53c9435..101ffa962 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java @@ -4,27 +4,45 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UserObject */ +/** + * Model tests for UserObject + */ public class UserObjectTest { private final UserObject model = new UserObject(); - /** Model tests for UserObject */ + /** + * Model tests for UserObject + */ @Test public void testUserObject() { // TODO: test UserObject } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java index 7030323bb..fade6ba38 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java @@ -4,39 +4,67 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.RuntimeFilters; +import com.thoughtspot.client.model.RuntimeParameters; +import com.thoughtspot.client.model.RuntimeSorts; +import com.thoughtspot.client.model.UserObject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UserParameterOptions */ +/** + * Model tests for UserParameterOptions + */ public class UserParameterOptionsTest { private final UserParameterOptions model = new UserParameterOptions(); - /** Model tests for UserParameterOptions */ + /** + * Model tests for UserParameterOptions + */ @Test public void testUserParameterOptions() { // TODO: test UserParameterOptions } - /** Test the property 'objects' */ + /** + * Test the property 'objects' + */ @Test public void objectsTest() { // TODO: test objects } - /** Test the property 'runtimeFilters' */ + /** + * Test the property 'runtimeFilters' + */ @Test public void runtimeFiltersTest() { // TODO: test runtimeFilters } - /** Test the property 'runtimeSorts' */ + /** + * Test the property 'runtimeSorts' + */ @Test public void runtimeSortsTest() { // TODO: test runtimeSorts } - /** Test the property 'parameters' */ + /** + * Test the property 'parameters' + */ @Test public void parametersTest() { // TODO: test parameters } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java index 74458e302..5398b87b7 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for UserPrincipal */ +/** + * Model tests for UserPrincipal + */ public class UserPrincipalTest { private final UserPrincipal model = new UserPrincipal(); - /** Model tests for UserPrincipal */ + /** + * Model tests for UserPrincipal + */ @Test public void testUserPrincipal() { // TODO: test UserPrincipal } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java index 5176115d1..ddac7bf9f 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 @@ -4,285 +4,402 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.FavoriteMetadataItem; +import com.thoughtspot.client.model.ObjectIDAndName; +import com.thoughtspot.client.model.Org; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for User */ +/** + * Model tests for User + */ public class UserTest { private final User model = new User(); - /** Model tests for User */ + /** + * Model tests for User + */ @Test public void testUser() { // TODO: test User } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'displayName' */ + /** + * Test the property 'displayName' + */ @Test public void displayNameTest() { // TODO: test displayName } - /** Test the property 'visibility' */ + /** + * Test the property 'visibility' + */ @Test public void visibilityTest() { // TODO: test visibility } - /** Test the property 'authorId' */ + /** + * Test the property 'authorId' + */ @Test public void authorIdTest() { // TODO: test authorId } - /** Test the property 'canChangePassword' */ + /** + * Test the property 'canChangePassword' + */ @Test public void canChangePasswordTest() { // TODO: test canChangePassword } - /** Test the property 'completeDetail' */ + /** + * Test the property 'completeDetail' + */ @Test public void completeDetailTest() { // TODO: test completeDetail } - /** Test the property 'creationTimeInMillis' */ + /** + * Test the property 'creationTimeInMillis' + */ @Test public void creationTimeInMillisTest() { // TODO: test creationTimeInMillis } - /** Test the property 'currentOrg' */ + /** + * Test the property 'currentOrg' + */ @Test public void currentOrgTest() { // TODO: test currentOrg } - /** Test the property 'deleted' */ + /** + * Test the property 'deleted' + */ @Test public void deletedTest() { // TODO: test deleted } - /** Test the property 'deprecated' */ + /** + * Test the property 'deprecated' + */ @Test public void deprecatedTest() { // TODO: test deprecated } - /** Test the property 'accountType' */ + /** + * Test the property 'accountType' + */ @Test public void accountTypeTest() { // TODO: test accountType } - /** Test the property 'accountStatus' */ + /** + * Test the property 'accountStatus' + */ @Test public void accountStatusTest() { // TODO: test accountStatus } - /** Test the property 'email' */ + /** + * Test the property 'email' + */ @Test public void emailTest() { // TODO: test email } - /** Test the property 'expirationTimeInMillis' */ + /** + * Test the property 'expirationTimeInMillis' + */ @Test public void expirationTimeInMillisTest() { // TODO: test expirationTimeInMillis } - /** Test the property 'external' */ + /** + * Test the property 'external' + */ @Test public void externalTest() { // TODO: test external } - /** Test the property 'favoriteMetadata' */ + /** + * Test the property 'favoriteMetadata' + */ @Test public void favoriteMetadataTest() { // TODO: test favoriteMetadata } - /** Test the property 'firstLoginTimeInMillis' */ + /** + * Test the property 'firstLoginTimeInMillis' + */ @Test public void firstLoginTimeInMillisTest() { // TODO: test firstLoginTimeInMillis } - /** Test the property 'groupMask' */ + /** + * Test the property 'groupMask' + */ @Test public void groupMaskTest() { // TODO: test groupMask } - /** Test the property 'hidden' */ + /** + * Test the property 'hidden' + */ @Test public void hiddenTest() { // TODO: test hidden } - /** Test the property 'homeLiveboard' */ + /** + * Test the property 'homeLiveboard' + */ @Test public void homeLiveboardTest() { // TODO: test homeLiveboard } - /** Test the property 'incompleteDetails' */ + /** + * Test the property 'incompleteDetails' + */ @Test public void incompleteDetailsTest() { // TODO: test incompleteDetails } - /** Test the property 'isFirstLogin' */ + /** + * Test the property 'isFirstLogin' + */ @Test public void isFirstLoginTest() { // TODO: test isFirstLogin } - /** Test the property 'modificationTimeInMillis' */ + /** + * Test the property 'modificationTimeInMillis' + */ @Test public void modificationTimeInMillisTest() { // TODO: test modificationTimeInMillis } - /** Test the property 'modifierId' */ + /** + * Test the property 'modifierId' + */ @Test public void modifierIdTest() { // TODO: test modifierId } - /** Test the property 'notifyOnShare' */ + /** + * Test the property 'notifyOnShare' + */ @Test public void notifyOnShareTest() { // TODO: test notifyOnShare } - /** Test the property 'onboardingExperienceCompleted' */ + /** + * Test the property 'onboardingExperienceCompleted' + */ @Test public void onboardingExperienceCompletedTest() { // TODO: test onboardingExperienceCompleted } - /** Test the property 'orgs' */ + /** + * Test the property 'orgs' + */ @Test public void orgsTest() { // TODO: test orgs } - /** Test the property 'ownerId' */ + /** + * Test the property 'ownerId' + */ @Test public void ownerIdTest() { // TODO: test ownerId } - /** Test the property 'parentType' */ + /** + * Test the property 'parentType' + */ @Test public void parentTypeTest() { // TODO: test parentType } - /** Test the property 'privileges' */ + /** + * Test the property 'privileges' + */ @Test public void privilegesTest() { // TODO: test privileges } - /** Test the property 'showOnboardingExperience' */ + /** + * Test the property 'showOnboardingExperience' + */ @Test public void showOnboardingExperienceTest() { // TODO: test showOnboardingExperience } - /** Test the property 'superUser' */ + /** + * Test the property 'superUser' + */ @Test public void superUserTest() { // TODO: test superUser } - /** Test the property 'systemUser' */ + /** + * Test the property 'systemUser' + */ @Test public void systemUserTest() { // TODO: test systemUser } - /** Test the property 'tags' */ + /** + * Test the property 'tags' + */ @Test public void tagsTest() { // TODO: test tags } - /** Test the property 'tenantId' */ + /** + * Test the property 'tenantId' + */ @Test public void tenantIdTest() { // TODO: test tenantId } - /** Test the property 'userGroups' */ + /** + * Test the property 'userGroups' + */ @Test public void userGroupsTest() { // TODO: test userGroups } - /** Test the property 'userInheritedGroups' */ + /** + * Test the property 'userInheritedGroups' + */ @Test public void userInheritedGroupsTest() { // TODO: test userInheritedGroups } - /** Test the property 'welcomeEmailSent' */ + /** + * Test the property 'welcomeEmailSent' + */ @Test public void welcomeEmailSentTest() { // TODO: test welcomeEmailSent } - /** Test the property 'orgPrivileges' */ + /** + * Test the property 'orgPrivileges' + */ @Test public void orgPrivilegesTest() { // TODO: test orgPrivileges } - /** Test the property 'preferredLocale' */ + /** + * Test the property 'preferredLocale' + */ @Test public void preferredLocaleTest() { // TODO: test preferredLocale } - /** Test the property 'extendedProperties' */ + /** + * Test the property 'extendedProperties' + */ @Test public void extendedPropertiesTest() { // TODO: test extendedProperties } - /** Test the property 'extendedPreferences' */ + /** + * Test the property 'extendedPreferences' + */ @Test public void extendedPreferencesTest() { // TODO: test extendedPreferences } - /** Test the property 'userParameters' */ + /** + * Test the property 'userParameters' + */ @Test public void userParametersTest() { // TODO: test userParameters } - /** Test the property 'accessControlProperties' */ + /** + * Test the property 'accessControlProperties' + */ @Test public void accessControlPropertiesTest() { // TODO: test accessControlProperties } + + /** + * Test the property 'variableValues' + */ + @Test + public void variableValuesTest() { + // TODO: test variableValues + } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java index e5ae99287..67fa8be74 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java @@ -4,27 +4,44 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ValidateMergeRequest */ +/** + * Model tests for ValidateMergeRequest + */ public class ValidateMergeRequestTest { private final ValidateMergeRequest model = new ValidateMergeRequest(); - /** Model tests for ValidateMergeRequest */ + /** + * Model tests for ValidateMergeRequest + */ @Test public void testValidateMergeRequest() { // TODO: test ValidateMergeRequest } - /** Test the property 'sourceBranchName' */ + /** + * Test the property 'sourceBranchName' + */ @Test public void sourceBranchNameTest() { // TODO: test sourceBranchName } - /** Test the property 'targetBranchName' */ + /** + * Test the property 'targetBranchName' + */ @Test public void targetBranchNameTest() { // TODO: test targetBranchName } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java index c4d273414..37896d5cf 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java @@ -4,21 +4,36 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for ValidateTokenRequest */ +/** + * Model tests for ValidateTokenRequest + */ public class ValidateTokenRequestTest { private final ValidateTokenRequest model = new ValidateTokenRequest(); - /** Model tests for ValidateTokenRequest */ + /** + * Model tests for ValidateTokenRequest + */ @Test public void testValidateTokenRequest() { // TODO: test ValidateTokenRequest } - /** Test the property 'token' */ + /** + * Test the property 'token' + */ @Test public void tokenTest() { // TODO: test token } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java new file mode 100644 index 000000000..18835ebf3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java @@ -0,0 +1,64 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ValueScopeInput + */ +public class ValueScopeInputTest { + private final ValueScopeInput model = new ValueScopeInput(); + + /** + * Model tests for ValueScopeInput + */ + @Test + public void testValueScopeInput() { + // TODO: test ValueScopeInput + } + + /** + * Test the property 'orgIdentifier' + */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** + * Test the property 'principalType' + */ + @Test + public void principalTypeTest() { + // TODO: test principalType + } + + /** + * Test the property 'principalIdentifier' + */ + @Test + public void principalIdentifierTest() { + // TODO: test principalIdentifier + } + + /** + * Test the property 'modelIdentifier' + */ + @Test + public void modelIdentifierTest() { + // TODO: test modelIdentifier + } + +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java index 6c7c4ccb5..1ae3eacbd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java @@ -4,33 +4,53 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for VariableDetailInput */ +/** + * Model tests for VariableDetailInput + */ public class VariableDetailInputTest { private final VariableDetailInput model = new VariableDetailInput(); - /** Model tests for VariableDetailInput */ + /** + * Model tests for VariableDetailInput + */ @Test public void testVariableDetailInput() { // TODO: test VariableDetailInput } - /** Test the property 'identifier' */ + /** + * Test the property 'identifier' + */ @Test public void identifierTest() { // TODO: test identifier } - /** Test the property 'type' */ + /** + * Test the property 'type' + */ @Test public void typeTest() { // TODO: test type } - /** Test the property 'namePattern' */ + /** + * Test the property 'namePattern' + */ @Test public void namePatternTest() { // TODO: test namePattern } + } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java index 226c02ba4..b06f592e2 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java @@ -4,45 +4,72 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.VariableValue; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for Variable */ +/** + * Model tests for Variable + */ public class VariableTest { private final Variable model = new Variable(); - /** Model tests for Variable */ + /** + * Model tests for Variable + */ @Test public void testVariable() { // TODO: test Variable } - /** Test the property 'id' */ + /** + * Test the property 'id' + */ @Test public void idTest() { // TODO: test id } - /** Test the property 'name' */ + /** + * Test the property 'name' + */ @Test public void nameTest() { // TODO: test name } - /** Test the property 'variableType' */ + /** + * Test the property 'variableType' + */ @Test public void variableTypeTest() { // TODO: test variableType } - /** Test the property 'sensitive' */ + /** + * Test the property 'sensitive' + */ @Test public void sensitiveTest() { // TODO: test sensitive } - /** Test the property 'values' */ + /** + * Test the property 'values' + */ @Test public void valuesTest() { // TODO: test values } + } 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..136bead98 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateAssignmentInputTest.java @@ -0,0 +1,57 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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..1cacf8cea --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateScopeInputTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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/VariableValueInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueInputTest.java deleted file mode 100644 index bf566b422..000000000 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueInputTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * NOTE: This class is auto generated. Do not edit the class manually. - */ - -package com.thoughtspot.client.model; - -import org.junit.jupiter.api.Test; - -/** Model tests for VariableValueInput */ -public class VariableValueInputTest { - private final VariableValueInput model = new VariableValueInput(); - - /** Model tests for VariableValueInput */ - @Test - public void testVariableValueInput() { - // TODO: test VariableValueInput - } - - /** Test the property 'variableIdentifier' */ - @Test - public void variableIdentifierTest() { - // TODO: test variableIdentifier - } - - /** Test the property 'variableValues' */ - @Test - public void variableValuesTest() { - // TODO: test variableValues - } -} 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..f547aaf51 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 @@ -4,45 +4,79 @@ package com.thoughtspot.client.model; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -/** Model tests for VariableValue */ +/** + * Model tests for VariableValue + */ public class VariableValueTest { private final VariableValue model = new VariableValue(); - /** Model tests for VariableValue */ + /** + * Model tests for VariableValue + */ @Test public void testVariableValue() { // TODO: test VariableValue } - /** Test the property 'value' */ + /** + * Test the property 'value' + */ @Test public void valueTest() { // TODO: test value } - /** Test the property 'orgIdentifier' */ + /** + * Test the property 'valueList' + */ + @Test + public void valueListTest() { + // TODO: test valueList + } + + /** + * Test the property 'orgIdentifier' + */ @Test public void orgIdentifierTest() { // TODO: test orgIdentifier } - /** Test the property 'principalType' */ + /** + * Test the property 'principalType' + */ @Test public void principalTypeTest() { // TODO: test principalType } - /** Test the property 'principalIdentifier' */ + /** + * Test the property 'principalIdentifier' + */ @Test public void principalIdentifierTest() { // TODO: test principalIdentifier } - /** Test the property 'priority' */ + /** + * Test the property 'priority' + */ @Test public void priorityTest() { // TODO: test priority } + } 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..4fdf83ce4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyInputTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..1a65fa67c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..671812f27 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInputTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..04cfd80d3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..e100eef1b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2InputTest.java @@ -0,0 +1,55 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..8b66285ea --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2Test.java @@ -0,0 +1,55 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..1eff0dcd9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationInputTest.java @@ -0,0 +1,67 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthApiKeyInput; +import com.thoughtspot.client.model.WebhookAuthBasicAuthInput; +import com.thoughtspot.client.model.WebhookAuthOAuth2Input; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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..b4db70e85 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationTest.java @@ -0,0 +1,67 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthApiKey; +import com.thoughtspot.client.model.WebhookAuthBasicAuth; +import com.thoughtspot.client.model.WebhookAuthOAuth2; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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..664da98c0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteFailureTest.java @@ -0,0 +1,55 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..7ed6c0713 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteResponseTest.java @@ -0,0 +1,67 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookDeleteFailure; +import com.thoughtspot.client.model.WebhookResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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..793533169 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookOrgTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..f39761813 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookPaginationTest.java @@ -0,0 +1,63 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..d500c83c9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java @@ -0,0 +1,142 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookAuthentication; +import com.thoughtspot.client.model.WebhookOrg; +import com.thoughtspot.client.model.WebhookSignatureVerification; +import com.thoughtspot.client.model.WebhookUser; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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..1a9f79826 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSearchResponseTest.java @@ -0,0 +1,51 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.model.WebhookPagination; +import com.thoughtspot.client.model.WebhookResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +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..ad64a6f64 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationInputTest.java @@ -0,0 +1,63 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..9a8efa67f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationTest.java @@ -0,0 +1,63 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +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..26ca4528a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSortOptionsInputTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +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..a9fdce523 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookUserTest.java @@ -0,0 +1,47 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for WebhookUser + */ +public class WebhookUserTest { + private final WebhookUser model = new WebhookUser(); + + /** + * Model tests for WebhookUser + */ + @Test + public void testWebhookUser() { + // TODO: test WebhookUser + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/sdks/typescript/AIApi.md b/sdks/typescript/AIApi.md index 224f8f64f..325029f78 100644 --- a/sdks/typescript/AIApi.md +++ b/sdks/typescript/AIApi.md @@ -4,12 +4,79 @@ All URIs are relative to *CLUSTER_URL* Method | HTTP request | Description ------------- | ------------- | ------------- +[**createAgentConversation**](AIApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | [**createConversation**](AIApi.md#createConversation) | **POST** /api/rest/2.0/ai/conversation/create | +[**getDataSourceSuggestions**](AIApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | +[**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 | +# **createAgentConversation** +> AgentConversation createAgentConversation(createAgentConversationRequest) + +Version: 10.13.0.cl or later + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, CreateAgentConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.createAgentConversation( + // CreateAgentConversationRequest + { + metadata_context: null, + conversation_settings: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAgentConversationRequest** | **CreateAgentConversationRequest**| | + + +### Return type + +**AgentConversation** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **createConversation** > Conversation createConversation(createConversationRequest) @@ -62,6 +129,132 @@ Name | Type | Description | Notes - **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 | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getDataSourceSuggestions** +> EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) + + Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, GetDataSourceSuggestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.getDataSourceSuggestions( + // GetDataSourceSuggestionsRequest + { + query: "query_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getDataSourceSuggestionsRequest** | **GetDataSourceSuggestionsRequest**| | + + +### Return type + +**EurekaDataSourceSuggestionResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getRelevantQuestions** +> EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) + + Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, GetRelevantQuestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.getRelevantQuestions( + // GetRelevantQuestionsRequest + { + metadata_context: null, + limit_relevant_questions: 1, + bypass_cache: true, + query: "query_example", + ai_context: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getRelevantQuestionsRequest** | **GetRelevantQuestionsRequest**| | + + +### Return type + +**EurekaGetRelevantQuestionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| @@ -137,6 +330,136 @@ Name | Type | Description | Notes - **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 | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessage** +> any sendAgentMessage(sendAgentMessageRequest) + + Version: 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. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendAgentMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendAgentMessage( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentMessageRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageRequest** | **SendAgentMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessageStreaming** +> SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) + + Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendAgentMessageStreamingRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendAgentMessageStreaming( + // SendAgentMessageStreamingRequest + { + conversation_identifier: "conversation_identifier_example", + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageStreamingRequest** | **SendAgentMessageStreamingRequest**| | + + +### Return type + +**SendAgentMessageResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| diff --git a/sdks/typescript/AuthenticationApi.md b/sdks/typescript/AuthenticationApi.md index 9d8ab69fa..e59a5f823 100644 --- a/sdks/typescript/AuthenticationApi.md +++ b/sdks/typescript/AuthenticationApi.md @@ -126,7 +126,7 @@ This endpoint does not need any parameter. # **getCustomAccessToken** > AccessToken getCustomAccessToken(getCustomAccessTokenRequest) - 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. ### Example diff --git a/sdks/typescript/ConnectionsApi.md b/sdks/typescript/ConnectionsApi.md index 2708e1373..2f37bf2ec 100644 --- a/sdks/typescript/ConnectionsApi.md +++ b/sdks/typescript/ConnectionsApi.md @@ -480,7 +480,7 @@ Name | Type | Description | Notes # **updateConnectionV2** > void updateConnectionV2(updateConnectionV2Request) - Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` ### Example diff --git a/sdks/typescript/DBTApi.md b/sdks/typescript/DBTApi.md index 044d1b860..7cc75d9a9 100644 --- a/sdks/typescript/DBTApi.md +++ b/sdks/typescript/DBTApi.md @@ -182,11 +182,11 @@ const apiInstance = new DBTApi(configuration); apiInstance.dbtGenerateTml( // string | Unique ID of the DBT connection. "dbtConnectionIdentifier_example" , + // string | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + "modelTables_example" , // string | Mention the worksheet tmls to import "ALL" , - // string | List of Models and their respective Tables (optional) - "modelTables_example" , - // string | List of worksheets is mandatory when import_Worksheets is type SELECTED (optional) + // string | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) "worksheets_example" , // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } @@ -203,9 +203,9 @@ apiInstance.dbtGenerateTml( Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT connection. | defaults to undefined + **modelTables** | [**string**] | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' | defaults to undefined **importWorksheets** | [**string**]**Array<'ALL' | 'NONE' | 'SELECTED'>** | Mention the worksheet tmls to import | defaults to undefined - **modelTables** | [**string**] | List of Models and their respective Tables | (optional) defaults to undefined - **worksheets** | [**string**] | List of worksheets is mandatory when import_Worksheets is type SELECTED | (optional) defaults to undefined + **worksheets** | [**string**] | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] | (optional) defaults to undefined **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ | (optional) defaults to undefined diff --git a/sdks/typescript/EmailCustomisationApi.md b/sdks/typescript/EmailCustomisationApi.md deleted file mode 100644 index d7f6a9a76..000000000 --- a/sdks/typescript/EmailCustomisationApi.md +++ /dev/null @@ -1,238 +0,0 @@ -# ThoughtSpotRestApiSdk.EmailCustomisationApi - -All URIs are relative to *CLUSTER_URL* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createEmailCustomisation**](EmailCustomisationApi.md#createEmailCustomisation) | **POST** /api/rest/2.0/customization/email | -[**deleteEmailCustomisation**](EmailCustomisationApi.md#deleteEmailCustomisation) | **POST** /api/rest/2.0/customization/email/{template_identifier}/delete | -[**searchEmailCustomisation**](EmailCustomisationApi.md#searchEmailCustomisation) | **POST** /api/rest/2.0/customization/email/search | -[**validateEmailCustomisation**](EmailCustomisationApi.md#validateEmailCustomisation) | **POST** /api/rest/2.0/customization/email/validate | - - -# **createEmailCustomisation** -> CreateEmailCustomisationResponse createEmailCustomisation(createEmailCustomisationRequest) - - Version: 10.10.0.cl or later Creates a custom configuration for the email customisation #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines To create a custom confuguration: 1. Pass these parameters in your API request. - A JSON map of configuration attributes `template_properties`. The following example shows the configuration attribures for a csutom configuration: ``` { { \"logoUrl\": \"\", \"homeUrl\": \"\", \"productName\": \"\", \"footerAddress\": \"
\", \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": , \"hideTsVocabularyDefinitions\": e, \"hideProductName\": , \"hideFooterPhone\": , \"hideFooterAddress\": , \"hidePrivacyPolicy\": , \"hideManageNotification\": , \"fontfamily\": \"\" } } ``` - -### Example - - -```typescript -import { createBearerAuthenticationConfig, EmailCustomisationApi, CreateEmailCustomisationRequest } from '@thoughtspot/rest-api-sdk'; - -const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { - username: "YOUR_USERNAME", - password: "YOUR_PASSWORD", -}); -const apiInstance = new EmailCustomisationApi(configuration); - -apiInstance.createEmailCustomisation( - // CreateEmailCustomisationRequest - { - template_properties: {}, - } -).then((data:any) => { - console.log('API called successfully. Returned data: ' + data); -}).catch((error:any) => console.error(error)); - - -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createEmailCustomisationRequest** | **CreateEmailCustomisationRequest**| | - - -### Return type - -**CreateEmailCustomisationResponse** - -### Authorization - -[bearerAuth](README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Invalid request. | - | -**403** | Unauthorized access. | - | -**500** | Unexpected error | - | - -[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) - -# **deleteEmailCustomisation** -> void deleteEmailCustomisation() - - Version: 10.10.0.cl or later Deletes the configuration for the email customisation. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines Deletes the configuration available for the cluster/org. Pass the `template_identifier` in the API request. Note: `template_identifier` can be fetched from search API request. - -### Example - - -```typescript -import { createBearerAuthenticationConfig, EmailCustomisationApi, DeleteEmailCustomisationRequest } from '@thoughtspot/rest-api-sdk'; - -const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { - username: "YOUR_USERNAME", - password: "YOUR_PASSWORD", -}); -const apiInstance = new EmailCustomisationApi(configuration); - -apiInstance.deleteEmailCustomisation( - // string | Unique ID or name of the email customization. - "template_identifier_example" -).then((data:any) => { - console.log('API called successfully. Returned data: ' + data); -}).catch((error:any) => console.error(error)); - - -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateIdentifier** | [**string**] | Unique ID or name of the email customization. | defaults to undefined - - -### Return type - -**void** - -### Authorization - -[bearerAuth](README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Email Customization configuration successfully deleted. | - | -**400** | Invalid request. | - | -**403** | Unauthorized access. | - | -**500** | Unexpected error | - | - -[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) - -# **searchEmailCustomisation** -> Array searchEmailCustomisation() - - Version: 10.10.0.cl or later Search the email customisation configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines To get the list of configurations set in the cluster/org. - -### Example - - -```typescript -import { createBearerAuthenticationConfig, EmailCustomisationApi, SearchEmailCustomisationRequest } from '@thoughtspot/rest-api-sdk'; - -const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { - username: "YOUR_USERNAME", - password: "YOUR_PASSWORD", -}); -const apiInstance = new EmailCustomisationApi(configuration); - -apiInstance.searchEmailCustomisation().then((data:any) => { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); -}).catch((error:any) => console.error(error)); - - -``` - - -### Parameters -This endpoint does not need any parameter. - - -### Return type - -**Array** - -### Authorization - -[bearerAuth](README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Invalid request. | - | -**403** | Unauthorized access. | - | -**500** | Unexpected error | - | - -[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) - -# **validateEmailCustomisation** -> void validateEmailCustomisation() - - Version: 10.10.0.cl or later Validates the email customisation configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. - -### Example - - -```typescript -import { createBearerAuthenticationConfig, EmailCustomisationApi, ValidateEmailCustomisationRequest } from '@thoughtspot/rest-api-sdk'; - -const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { - username: "YOUR_USERNAME", - password: "YOUR_PASSWORD", -}); -const apiInstance = new EmailCustomisationApi(configuration); - -apiInstance.validateEmailCustomisation().then((data:any) => { - console.log('API called successfully. Returned data: ' + JSON.stringify(data)); -}).catch((error:any) => console.error(error)); - - -``` - - -### Parameters -This endpoint does not need any parameter. - - -### Return type - -**void** - -### Authorization - -[bearerAuth](README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Triggered test email for customization configuration | - | -**400** | Invalid request. | - | -**403** | Unauthorized access. | - | -**500** | Unexpected error | - | - -[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) - diff --git a/sdks/typescript/MetadataApi.md b/sdks/typescript/MetadataApi.md index 9441b71c2..1456f5bf3 100644 --- a/sdks/typescript/MetadataApi.md +++ b/sdks/typescript/MetadataApi.md @@ -93,7 +93,7 @@ Name | Type | Description | Notes # **copyObject** > ResponseCopyObject copyObject(copyObjectRequest) - 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. ### Example diff --git a/sdks/typescript/README.md b/sdks/typescript/README.md index ae73790a9..ff9f7060a 100644 --- a/sdks/typescript/README.md +++ b/sdks/typescript/README.md @@ -1,4 +1,4 @@ -## @thoughtspot/rest-api-sdk@2.17.1 +## @thoughtspot/rest-api-sdk@2.19.0 TypeScript/JavaScript client for ThoughtSpot's v2 [Rest APIs](https://developers.thoughtspot.com/docs/rest-api-v2). diff --git a/sdks/typescript/SystemApi.md b/sdks/typescript/SystemApi.md index e97799cb9..5684691e4 100644 --- a/sdks/typescript/SystemApi.md +++ b/sdks/typescript/SystemApi.md @@ -4,12 +4,100 @@ All URIs are relative to *CLUSTER_URL* Method | HTTP request | Description ------------- | ------------- | ------------- +[**configureCommunicationChannelPreferences**](SystemApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/configure | [**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** +> void configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, ConfigureCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.configureCommunicationChannelPreferences( + // ConfigureCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + operation: "REPLACE", + preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + reset_events: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureCommunicationChannelPreferencesRequest** | **ConfigureCommunicationChannelPreferencesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Communication channel preferences successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **getSystemConfig** > SystemConfig getSystemConfig() @@ -172,6 +260,78 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **searchCommunicationChannelPreferences** +> CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, SearchCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.searchCommunicationChannelPreferences( + // SearchCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + "LIVEBOARD_SCHEDULE", + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + event_types: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCommunicationChannelPreferencesRequest** | **SearchCommunicationChannelPreferencesRequest**| | + + +### Return type + +**CommunicationChannelPreferencesResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Communication channel preferences retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **updateSystemConfig** > void updateSystemConfig(updateSystemConfigRequest) diff --git a/sdks/typescript/ThoughtSpotRestApi.md b/sdks/typescript/ThoughtSpotRestApi.md index 66dbfc306..dce8d26bf 100644 --- a/sdks/typescript/ThoughtSpotRestApi.md +++ b/sdks/typescript/ThoughtSpotRestApi.md @@ -9,9 +9,11 @@ Method | HTTP request | Description [**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 | +[**createAgentConversation**](ThoughtSpotRestApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | [**createCalendar**](ThoughtSpotRestApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | [**createConfig**](ThoughtSpotRestApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | [**createConnection**](ThoughtSpotRestApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | @@ -26,6 +28,7 @@ Method | HTTP request | Description [**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 | @@ -48,6 +51,7 @@ Method | HTTP request | Description [**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 | @@ -69,8 +73,10 @@ Method | HTTP request | Description [**getCurrentUserInfo**](ThoughtSpotRestApi.md#getCurrentUserInfo) | **GET** /api/rest/2.0/auth/session/user | [**getCurrentUserToken**](ThoughtSpotRestApi.md#getCurrentUserToken) | **GET** /api/rest/2.0/auth/session/token | [**getCustomAccessToken**](ThoughtSpotRestApi.md#getCustomAccessToken) | **POST** /api/rest/2.0/auth/token/custom | +[**getDataSourceSuggestions**](ThoughtSpotRestApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | [**getFullAccessToken**](ThoughtSpotRestApi.md#getFullAccessToken) | **POST** /api/rest/2.0/auth/token/full | [**getObjectAccessToken**](ThoughtSpotRestApi.md#getObjectAccessToken) | **POST** /api/rest/2.0/auth/token/object | +[**getRelevantQuestions**](ThoughtSpotRestApi.md#getRelevantQuestions) | **POST** /api/rest/2.0/ai/relevant-questions/ | [**getSystemConfig**](ThoughtSpotRestApi.md#getSystemConfig) | **GET** /api/rest/2.0/system/config | [**getSystemInformation**](ThoughtSpotRestApi.md#getSystemInformation) | **GET** /api/rest/2.0/system | [**getSystemOverrideInfo**](ThoughtSpotRestApi.md#getSystemOverrideInfo) | **GET** /api/rest/2.0/system/config-overrides | @@ -88,6 +94,7 @@ Method | HTTP request | Description [**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 | @@ -101,6 +108,9 @@ Method | HTTP request | Description [**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 | [**singleAnswer**](ThoughtSpotRestApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | @@ -126,7 +136,8 @@ Method | HTTP request | Description [**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 | @@ -470,6 +481,92 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **configureCommunicationChannelPreferences** +> void configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ConfigureCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.configureCommunicationChannelPreferences( + // ConfigureCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + operation: "REPLACE", + preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + reset_events: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureCommunicationChannelPreferencesRequest** | **ConfigureCommunicationChannelPreferencesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Communication channel preferences successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **connectionConfigurationSearch** > Array connectionConfigurationSearch(connectionConfigurationSearchRequest) @@ -606,7 +703,7 @@ Name | Type | Description | Notes # **copyObject** > ResponseCopyObject copyObject(copyObjectRequest) - 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. ### Example @@ -669,6 +766,68 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **createAgentConversation** +> AgentConversation createAgentConversation(createAgentConversationRequest) + +Version: 10.13.0.cl or later + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateAgentConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createAgentConversation( + // CreateAgentConversationRequest + { + metadata_context: null, + conversation_settings: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAgentConversationRequest** | **CreateAgentConversationRequest**| | + + +### Return type + +**AgentConversation** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **createCalendar** > CalendarResponse createCalendar(createCalendarRequest) @@ -1589,7 +1748,7 @@ Name | Type | Description | Notes # **createVariable** > Variable createVariable(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. 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 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 ### Example @@ -1608,16 +1767,8 @@ apiInstance.createVariable( { type: "CONNECTION_PROPERTY", name: "name_example", - sensitive: false, - values: [ - { - value: "value_example", - org_identifier: "org_identifier_example", - principal_type: "USER", - principal_identifier: "principal_identifier_example", - priority: 1, - }, - ], + is_sensitive: false, + data_type: "VARCHAR", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -1659,6 +1810,76 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **createWebhookConfiguration** +> WebhookResponse createWebhookConfiguration(createWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createWebhookConfiguration( + // CreateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWebhookConfigurationRequest** | **CreateWebhookConfigurationRequest**| | + + +### Return type + +**WebhookResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configuration created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **dbtConnection** > any dbtConnection() @@ -1829,11 +2050,11 @@ const apiInstance = new ThoughtSpotRestApi(configuration); apiInstance.dbtGenerateTml( // string | Unique ID of the DBT connection. "dbtConnectionIdentifier_example" , + // string | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + "modelTables_example" , // string | Mention the worksheet tmls to import "ALL" , - // string | List of Models and their respective Tables (optional) - "modelTables_example" , - // string | List of worksheets is mandatory when import_Worksheets is type SELECTED (optional) + // string | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) "worksheets_example" , // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } @@ -1850,9 +2071,9 @@ apiInstance.dbtGenerateTml( Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT connection. | defaults to undefined + **modelTables** | [**string**] | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' | defaults to undefined **importWorksheets** | [**string**]**Array<'ALL' | 'NONE' | 'SELECTED'>** | Mention the worksheet tmls to import | defaults to undefined - **modelTables** | [**string**] | List of Models and their respective Tables | (optional) defaults to undefined - **worksheets** | [**string**] | List of worksheets is mandatory when import_Worksheets is type SELECTED | (optional) defaults to undefined + **worksheets** | [**string**] | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] | (optional) defaults to undefined **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ | (optional) defaults to undefined @@ -2979,7 +3200,7 @@ Name | Type | Description | Notes # **deleteVariable** > void deleteVariable() - 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 ### Example @@ -3036,6 +3257,70 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **deleteWebhookConfigurations** +> WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteWebhookConfigurations( + // DeleteWebhookConfigurationsRequest + { + webhook_identifiers: [ + "webhook_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteWebhookConfigurationsRequest** | **DeleteWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations deleted successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **deployCommit** > Array deployCommit(deployCommitRequest) @@ -4378,7 +4663,7 @@ This endpoint does not need any parameter. # **getCustomAccessToken** > AccessToken getCustomAccessToken(getCustomAccessTokenRequest) - 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. ### Example @@ -4473,16 +4758,16 @@ No authorization required [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) -# **getFullAccessToken** -> Token getFullAccessToken(getFullAccessTokenRequest) +# **getDataSourceSuggestions** +> EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) - Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. ### Example ```typescript -import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetFullAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetDataSourceSuggestionsRequest } from '@thoughtspot/rest-api-sdk'; const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { username: "YOUR_USERNAME", @@ -4490,21 +4775,10 @@ const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { }); const apiInstance = new ThoughtSpotRestApi(configuration); -apiInstance.getFullAccessToken( - // GetFullAccessTokenRequest +apiInstance.getDataSourceSuggestions( + // GetDataSourceSuggestionsRequest { - username: "username_example", - password: "", - secret_key: "", - validity_time_in_sec: 300, - org_id: 1, - email: "email_example", - display_name: "display_name_example", - auto_create: false, - group_identifiers: [ - "group_identifiers_example", - ], - user_parameters: null, + query: "query_example", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -4518,12 +4792,84 @@ apiInstance.getFullAccessToken( Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **getFullAccessTokenRequest** | **GetFullAccessTokenRequest**| | + **getDataSourceSuggestionsRequest** | **GetDataSourceSuggestionsRequest**| | ### Return type -**Token** +**EurekaDataSourceSuggestionResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getFullAccessToken** +> Token getFullAccessToken(getFullAccessTokenRequest) + + Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetFullAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getFullAccessToken( + // GetFullAccessTokenRequest + { + username: "username_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_id: 1, + email: "email_example", + display_name: "display_name_example", + auto_create: false, + group_identifiers: [ + "group_identifiers_example", + ], + user_parameters: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getFullAccessTokenRequest** | **GetFullAccessTokenRequest**| | + + +### Return type + +**Token** ### Authorization @@ -4620,6 +4966,71 @@ No authorization required [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **getRelevantQuestions** +> EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) + + Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetRelevantQuestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getRelevantQuestions( + // GetRelevantQuestionsRequest + { + metadata_context: null, + limit_relevant_questions: 1, + bypass_cache: true, + query: "query_example", + ai_context: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getRelevantQuestionsRequest** | **GetRelevantQuestionsRequest**| | + + +### Return type + +**EurekaGetRelevantQuestionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **getSystemConfig** > SystemConfig getSystemConfig() @@ -5756,6 +6167,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **searchCommunicationChannelPreferences** +> CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCommunicationChannelPreferences( + // SearchCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + "LIVEBOARD_SCHEDULE", + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + event_types: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCommunicationChannelPreferencesRequest** | **SearchCommunicationChannelPreferencesRequest**| | + + +### Return type + +**CommunicationChannelPreferencesResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Communication channel preferences retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **searchConfig** > Array searchConfig(searchConfigRequest) @@ -6701,7 +7184,7 @@ Name | Type | Description | Notes # **searchVariables** > Array searchVariables(searchVariablesRequest) - 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 ### Example @@ -6725,6 +7208,14 @@ apiInstance.searchVariables( name_pattern: "name_pattern_example", }, ], + value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + }, + ], record_offset: 0, record_size: 10, output_format: "METADATA_ONLY", @@ -6769,6 +7260,203 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **searchWebhookConfigurations** +> WebhookSearchResponse searchWebhookConfigurations(searchWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchWebhookConfigurations( + // SearchWebhookConfigurationsRequest + { + org_identifier: "org_identifier_example", + webhook_identifier: "webhook_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + record_offset: 0, + record_size: 50, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchWebhookConfigurationsRequest** | **SearchWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations retrieved successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessage** +> any sendAgentMessage(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. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendAgentMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendAgentMessage( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentMessageRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageRequest** | **SendAgentMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessageStreaming** +> SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) + + Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendAgentMessageStreamingRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendAgentMessageStreaming( + // SendAgentMessageStreamingRequest + { + conversation_identifier: "conversation_identifier_example", + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageStreamingRequest** | **SendAgentMessageStreamingRequest**| | + + +### Return type + +**SendAgentMessageResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **sendMessage** > Array sendMessage(sendMessageRequest) @@ -7559,7 +8247,7 @@ Name | Type | Description | Notes # **updateConnectionV2** > void updateConnectionV2(updateConnectionV2Request) - Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` ### Example @@ -8526,7 +9214,7 @@ Name | Type | Description | Notes # **updateVariable** > void updateVariable(updateVariableRequest) - 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 ### Example @@ -8546,16 +9234,6 @@ apiInstance.updateVariable( // UpdateVariableRequest { name: "name_example", - operation: "REPLACE", - values: [ - { - value: "value_example", - org_identifier: "org_identifier_example", - principal_type: "USER", - principal_identifier: "principal_identifier_example", - priority: 1, - }, - ], } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -8590,7 +9268,7 @@ Name | Type | Description | Notes ### 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. | - | @@ -8601,7 +9279,7 @@ Name | Type | Description | Notes # **updateVariableValues** > void updateVariableValues(updateVariableValuesRequest) - 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 ### Example @@ -8618,21 +9296,24 @@ const apiInstance = new ThoughtSpotRestApi(configuration); apiInstance.updateVariableValues( // UpdateVariableValuesRequest { - variable_updates: [ + variable_assignment: [ { variable_identifier: "variable_identifier_example", variable_values: [ - { - value: "value_example", - org_identifier: "org_identifier_example", - principal_type: "USER", - principal_identifier: "principal_identifier_example", - priority: 1, - }, + "variable_values_example", ], + operation: "ADD", + }, + ], + variable_value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, }, ], - operation: "ADD", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -8666,7 +9347,80 @@ Name | Type | Description | Notes ### 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 | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateWebhookConfiguration** +> void updateWebhookConfiguration(updateWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateWebhookConfiguration( + // string | Unique ID or name of the webhook configuration. + "webhook_identifier_example" , + // UpdateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateWebhookConfigurationRequest** | **UpdateWebhookConfigurationRequest**| | + **webhookIdentifier** | [**string**] | Unique ID or name of the webhook configuration. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Webhook configuration updated successfully | - | **400** | Invalid request. | - | **401** | Unauthorized access. | - | **403** | Forbidden access. | - | diff --git a/sdks/typescript/VariableApi.md b/sdks/typescript/VariableApi.md index 017f60a6d..e81bbfc66 100644 --- a/sdks/typescript/VariableApi.md +++ b/sdks/typescript/VariableApi.md @@ -8,13 +8,13 @@ Method | HTTP request | Description [**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 | # **createVariable** > Variable createVariable(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. 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 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 ### Example @@ -33,16 +33,8 @@ apiInstance.createVariable( { type: "CONNECTION_PROPERTY", name: "name_example", - sensitive: false, - values: [ - { - value: "value_example", - org_identifier: "org_identifier_example", - principal_type: "USER", - principal_identifier: "principal_identifier_example", - priority: 1, - }, - ], + is_sensitive: false, + data_type: "VARCHAR", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -87,7 +79,7 @@ Name | Type | Description | Notes # **deleteVariable** > void deleteVariable() - 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 ### Example @@ -147,7 +139,7 @@ Name | Type | Description | Notes # **searchVariables** > Array searchVariables(searchVariablesRequest) - 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 ### Example @@ -171,6 +163,14 @@ apiInstance.searchVariables( name_pattern: "name_pattern_example", }, ], + value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + }, + ], record_offset: 0, record_size: 10, output_format: "METADATA_ONLY", @@ -218,7 +218,7 @@ Name | Type | Description | Notes # **updateVariable** > void updateVariable(updateVariableRequest) - 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 ### Example @@ -238,16 +238,6 @@ apiInstance.updateVariable( // UpdateVariableRequest { name: "name_example", - operation: "REPLACE", - values: [ - { - value: "value_example", - org_identifier: "org_identifier_example", - principal_type: "USER", - principal_identifier: "principal_identifier_example", - priority: 1, - }, - ], } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -282,7 +272,7 @@ Name | Type | Description | Notes ### 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. | - | @@ -293,7 +283,7 @@ Name | Type | Description | Notes # **updateVariableValues** > void updateVariableValues(updateVariableValuesRequest) - 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 ### Example @@ -310,21 +300,24 @@ const apiInstance = new VariableApi(configuration); apiInstance.updateVariableValues( // UpdateVariableValuesRequest { - variable_updates: [ + variable_assignment: [ { variable_identifier: "variable_identifier_example", variable_values: [ - { - value: "value_example", - org_identifier: "org_identifier_example", - principal_type: "USER", - principal_identifier: "principal_identifier_example", - priority: 1, - }, + "variable_values_example", ], + operation: "ADD", + }, + ], + variable_value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, }, ], - operation: "ADD", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -358,7 +351,7 @@ Name | Type | Description | Notes ### 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/typescript/WebhooksApi.md b/sdks/typescript/WebhooksApi.md new file mode 100644 index 000000000..96cbfad20 --- /dev/null +++ b/sdks/typescript/WebhooksApi.md @@ -0,0 +1,286 @@ +# ThoughtSpotRestApiSdk.WebhooksApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createWebhookConfiguration**](WebhooksApi.md#createWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/create | +[**deleteWebhookConfigurations**](WebhooksApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | +[**searchWebhookConfigurations**](WebhooksApi.md#searchWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/search | +[**updateWebhookConfiguration**](WebhooksApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | + + +# **createWebhookConfiguration** +> WebhookResponse createWebhookConfiguration(createWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, CreateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.createWebhookConfiguration( + // CreateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWebhookConfigurationRequest** | **CreateWebhookConfigurationRequest**| | + + +### Return type + +**WebhookResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configuration created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteWebhookConfigurations** +> WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, DeleteWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.deleteWebhookConfigurations( + // DeleteWebhookConfigurationsRequest + { + webhook_identifiers: [ + "webhook_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteWebhookConfigurationsRequest** | **DeleteWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations deleted successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchWebhookConfigurations** +> WebhookSearchResponse searchWebhookConfigurations(searchWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, SearchWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.searchWebhookConfigurations( + // SearchWebhookConfigurationsRequest + { + org_identifier: "org_identifier_example", + webhook_identifier: "webhook_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + record_offset: 0, + record_size: 50, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchWebhookConfigurationsRequest** | **SearchWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations retrieved successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateWebhookConfiguration** +> void updateWebhookConfiguration(updateWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, UpdateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.updateWebhookConfiguration( + // string | Unique ID or name of the webhook configuration. + "webhook_identifier_example" , + // UpdateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateWebhookConfigurationRequest** | **UpdateWebhookConfigurationRequest**| | + **webhookIdentifier** | [**string**] | Unique ID or name of the webhook configuration. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Webhook configuration updated successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/apis/AIApi.ts b/sdks/typescript/apis/AIApi.ts index 8b077dbdd..471816800 100644 --- a/sdks/typescript/apis/AIApi.ts +++ b/sdks/typescript/apis/AIApi.ts @@ -8,12 +8,21 @@ import {canConsumeForm, isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; +import { AgentConversation } from '../models/AgentConversation'; import { Conversation } from '../models/Conversation'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; import { CreateConversationRequest } from '../models/CreateConversationRequest'; import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; import { ResponseMessage } from '../models/ResponseMessage'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; import { SendMessageRequest } from '../models/SendMessageRequest'; import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; @@ -22,6 +31,56 @@ import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; */ export class AIApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + public async createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createAgentConversationRequest' is not null or undefined + if (createAgentConversationRequest === null || createAgentConversationRequest === undefined) { + throw new RequiredError("AIApi", "createAgentConversation", "createAgentConversationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -41,7 +100,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -72,6 +131,106 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public async getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getDataSourceSuggestionsRequest' is not null or undefined + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === undefined) { + throw new RequiredError("AIApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/data-source-suggestions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public async getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getRelevantQuestionsRequest' is not null or undefined + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === undefined) { + throw new RequiredError("AIApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/relevant-questions/'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -91,7 +250,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -122,6 +281,114 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * 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) + * @param sendAgentMessageRequest + */ + public async sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("AIApi", "sendAgentMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentMessageRequest' is not null or undefined + if (sendAgentMessageRequest === null || sendAgentMessageRequest === undefined) { + throw new RequiredError("AIApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/{conversation_identifier}/converse' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + public async sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'sendAgentMessageStreamingRequest' is not null or undefined + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === undefined) { + throw new RequiredError("AIApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/converse/sse'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -149,7 +416,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -199,7 +466,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -234,6 +501,56 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { export class AIApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createAgentConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -284,6 +601,106 @@ export class AIApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDataSourceSuggestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRelevantQuestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -334,6 +751,106 @@ export class AIApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessage(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessageStreaming(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/sdks/typescript/apis/AuthenticationApi.ts b/sdks/typescript/apis/AuthenticationApi.ts index c1e7ec62b..ffc829d2a 100644 --- a/sdks/typescript/apis/AuthenticationApi.ts +++ b/sdks/typescript/apis/AuthenticationApi.ts @@ -38,7 +38,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -70,7 +70,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -91,7 +91,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. * @param getCustomAccessTokenRequest */ public async getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { @@ -109,7 +109,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -153,7 +153,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -197,7 +197,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -241,7 +241,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -284,7 +284,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -323,7 +323,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -373,7 +373,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/ConnectionConfigurationsApi.ts b/sdks/typescript/apis/ConnectionConfigurationsApi.ts index 535b9dcb6..531d94ab1 100644 --- a/sdks/typescript/apis/ConnectionConfigurationsApi.ts +++ b/sdks/typescript/apis/ConnectionConfigurationsApi.ts @@ -39,7 +39,7 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -89,7 +89,7 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -139,7 +139,7 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -197,7 +197,7 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/ConnectionsApi.ts b/sdks/typescript/apis/ConnectionsApi.ts index e29c17400..a13587ba6 100644 --- a/sdks/typescript/apis/ConnectionsApi.ts +++ b/sdks/typescript/apis/ConnectionsApi.ts @@ -42,7 +42,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -92,7 +92,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -143,7 +143,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -183,7 +183,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -223,7 +223,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -262,7 +262,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -312,7 +312,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -344,7 +344,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -370,7 +370,7 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/CustomActionApi.ts b/sdks/typescript/apis/CustomActionApi.ts index 2b8d7a0e3..fdee7e5be 100644 --- a/sdks/typescript/apis/CustomActionApi.ts +++ b/sdks/typescript/apis/CustomActionApi.ts @@ -38,7 +38,7 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -89,7 +89,7 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -128,7 +128,7 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -186,7 +186,7 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/CustomCalendarsApi.ts b/sdks/typescript/apis/CustomCalendarsApi.ts index 3c4f6b65d..4cc3178ff 100644 --- a/sdks/typescript/apis/CustomCalendarsApi.ts +++ b/sdks/typescript/apis/CustomCalendarsApi.ts @@ -39,7 +39,7 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -90,7 +90,7 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -129,7 +129,7 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -179,7 +179,7 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -237,7 +237,7 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/DBTApi.ts b/sdks/typescript/apis/DBTApi.ts index dc8f7e221..f65d7b1c6 100644 --- a/sdks/typescript/apis/DBTApi.ts +++ b/sdks/typescript/apis/DBTApi.ts @@ -58,7 +58,7 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -162,7 +162,7 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -216,12 +216,12 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - public async dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + public async dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'dbtConnectionIdentifier' is not null or undefined @@ -230,6 +230,12 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { } + // verify required parameter 'modelTables' is not null or undefined + if (modelTables === null || modelTables === undefined) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "modelTables"); + } + + // verify required parameter 'importWorksheets' is not null or undefined if (importWorksheets === null || importWorksheets === undefined) { throw new RequiredError("DBTApi", "dbtGenerateTml", "importWorksheets"); @@ -238,14 +244,13 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { - // Path Params const localVarPath = '/api/rest/2.0/dbt/generate-tml'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -320,7 +325,7 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -360,7 +365,7 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -419,7 +424,7 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/DataApi.ts b/sdks/typescript/apis/DataApi.ts index ff473ed4f..2718cdb05 100644 --- a/sdks/typescript/apis/DataApi.ts +++ b/sdks/typescript/apis/DataApi.ts @@ -40,7 +40,7 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -90,7 +90,7 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -140,7 +140,7 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/EmailCustomizationApi.ts b/sdks/typescript/apis/EmailCustomizationApi.ts index bff3ce125..9c834388f 100644 --- a/sdks/typescript/apis/EmailCustomizationApi.ts +++ b/sdks/typescript/apis/EmailCustomizationApi.ts @@ -39,7 +39,7 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -90,7 +90,7 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -129,7 +129,7 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -179,7 +179,7 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -229,7 +229,7 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -272,7 +272,7 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/GroupsApi.ts b/sdks/typescript/apis/GroupsApi.ts index 8aa3cbfff..7a96aa294 100644 --- a/sdks/typescript/apis/GroupsApi.ts +++ b/sdks/typescript/apis/GroupsApi.ts @@ -40,7 +40,7 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -91,7 +91,7 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -130,7 +130,7 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -180,7 +180,7 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -238,7 +238,7 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/LogApi.ts b/sdks/typescript/apis/LogApi.ts index c6afa1a23..93b01d142 100644 --- a/sdks/typescript/apis/LogApi.ts +++ b/sdks/typescript/apis/LogApi.ts @@ -36,7 +36,7 @@ export class LogApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/MetadataApi.ts b/sdks/typescript/apis/MetadataApi.ts index 99b426199..e85b96185 100644 --- a/sdks/typescript/apis/MetadataApi.ts +++ b/sdks/typescript/apis/MetadataApi.ts @@ -55,7 +55,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -87,7 +87,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. * @param copyObjectRequest */ public async copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { @@ -105,7 +105,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -155,7 +155,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -205,7 +205,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -255,7 +255,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -305,7 +305,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -355,7 +355,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -405,7 +405,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -455,7 +455,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -505,7 +505,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -555,7 +555,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -605,7 +605,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -655,7 +655,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -705,7 +705,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -755,7 +755,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/OrgsApi.ts b/sdks/typescript/apis/OrgsApi.ts index a5b21ff10..c6f52d146 100644 --- a/sdks/typescript/apis/OrgsApi.ts +++ b/sdks/typescript/apis/OrgsApi.ts @@ -38,7 +38,7 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -89,7 +89,7 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -128,7 +128,7 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -186,7 +186,7 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/ReportsApi.ts b/sdks/typescript/apis/ReportsApi.ts index 8f4586598..72519dfe2 100644 --- a/sdks/typescript/apis/ReportsApi.ts +++ b/sdks/typescript/apis/ReportsApi.ts @@ -36,7 +36,7 @@ export class ReportsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -86,7 +86,7 @@ export class ReportsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/RolesApi.ts b/sdks/typescript/apis/RolesApi.ts index 81008cb4a..81ca64fab 100644 --- a/sdks/typescript/apis/RolesApi.ts +++ b/sdks/typescript/apis/RolesApi.ts @@ -39,7 +39,7 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -90,7 +90,7 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -129,7 +129,7 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -187,7 +187,7 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/SchedulesApi.ts b/sdks/typescript/apis/SchedulesApi.ts index 142bc2560..3dcbb3167 100644 --- a/sdks/typescript/apis/SchedulesApi.ts +++ b/sdks/typescript/apis/SchedulesApi.ts @@ -38,7 +38,7 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -89,7 +89,7 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -128,7 +128,7 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -186,7 +186,7 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/SecurityApi.ts b/sdks/typescript/apis/SecurityApi.ts index af4aba9cd..5bac3580c 100644 --- a/sdks/typescript/apis/SecurityApi.ts +++ b/sdks/typescript/apis/SecurityApi.ts @@ -45,7 +45,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -95,7 +95,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -145,7 +145,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -195,7 +195,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -245,7 +245,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -295,7 +295,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -345,7 +345,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -395,7 +395,7 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/SystemApi.ts b/sdks/typescript/apis/SystemApi.ts index 4132de71b..5266c0674 100644 --- a/sdks/typescript/apis/SystemApi.ts +++ b/sdks/typescript/apis/SystemApi.ts @@ -8,7 +8,10 @@ import {canConsumeForm, isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SystemConfig } from '../models/SystemConfig'; import { SystemInfo } from '../models/SystemInfo'; import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; @@ -19,6 +22,56 @@ import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; */ export class SystemApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public async configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureCommunicationChannelPreferencesRequest' is not null or undefined + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("SystemApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -31,7 +84,7 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -63,7 +116,7 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -95,11 +148,61 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public async searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCommunicationChannelPreferencesRequest' is not null or undefined + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("SystemApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -134,7 +237,7 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -169,6 +272,59 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { export class SystemApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -340,6 +496,63 @@ export class SystemApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/sdks/typescript/apis/TagsApi.ts b/sdks/typescript/apis/TagsApi.ts index 01234b1e5..284a453e0 100644 --- a/sdks/typescript/apis/TagsApi.ts +++ b/sdks/typescript/apis/TagsApi.ts @@ -39,7 +39,7 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -89,7 +89,7 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -140,7 +140,7 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -179,7 +179,7 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -229,7 +229,7 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -287,7 +287,7 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/ThoughtSpotRestApi.ts b/sdks/typescript/apis/ThoughtSpotRestApi.ts index 30e0f8364..3775a06df 100644 --- a/sdks/typescript/apis/ThoughtSpotRestApi.ts +++ b/sdks/typescript/apis/ThoughtSpotRestApi.ts @@ -10,6 +10,7 @@ import {SecurityAuthentication} from '../auth/auth'; import { AccessToken } from '../models/AccessToken'; import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; import { AnswerDataResponse } from '../models/AnswerDataResponse'; import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; import { AssignTagRequest } from '../models/AssignTagRequest'; @@ -19,11 +20,14 @@ import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse import { CommitBranchRequest } from '../models/CommitBranchRequest'; import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; import { Conversation } from '../models/Conversation'; import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; @@ -40,6 +44,7 @@ import { CreateTagRequest } from '../models/CreateTagRequest'; import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; import { CreateUserRequest } from '../models/CreateUserRequest'; import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; import { DbtSearchResponse } from '../models/DbtSearchResponse'; import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; @@ -47,10 +52,13 @@ import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnection import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; import { ExportLiveboardReportRequest } from '../models/ExportLiveboardReportRequest'; import { ExportMetadataTMLBatchedRequest } from '../models/ExportMetadataTMLBatchedRequest'; @@ -69,8 +77,10 @@ import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; import { GetTokenResponse } from '../models/GetTokenResponse'; import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; @@ -103,6 +113,7 @@ import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; import { RoleResponse } from '../models/RoleResponse'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; import { SearchConnectionResponse } from '../models/SearchConnectionResponse'; @@ -119,6 +130,10 @@ import { SearchTagsRequest } from '../models/SearchTagsRequest'; import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; import { SearchUsersRequest } from '../models/SearchUsersRequest'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; import { SendMessageRequest } from '../models/SendMessageRequest'; import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; @@ -150,11 +165,15 @@ import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; import { UpdateUserRequest } from '../models/UpdateUserRequest'; import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; import { User } from '../models/User'; import { UserGroupResponse } from '../models/UserGroupResponse'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; import { Variable } from '../models/Variable'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; /** * no description @@ -180,7 +199,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -230,7 +249,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -280,7 +299,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -330,7 +349,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -380,7 +399,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -411,6 +430,56 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public async configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureCommunicationChannelPreferencesRequest' is not null or undefined + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -430,7 +499,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -480,7 +549,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -512,7 +581,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. * @param copyObjectRequest */ public async copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { @@ -530,7 +599,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -561,6 +630,56 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + public async createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createAgentConversationRequest' is not null or undefined + if (createAgentConversationRequest === null || createAgentConversationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createAgentConversation", "createAgentConversationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -580,7 +699,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -630,7 +749,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -680,7 +799,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -730,7 +849,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -780,7 +899,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -830,7 +949,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -880,7 +999,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -930,7 +1049,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -980,7 +1099,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1030,7 +1149,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1080,7 +1199,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1130,7 +1249,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1180,7 +1299,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1212,7 +1331,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. 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 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 */ public async createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { @@ -1230,7 +1349,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1261,6 +1380,56 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public async createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createWebhookConfigurationRequest' is not null or undefined + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -1303,7 +1472,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1407,7 +1576,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1461,12 +1630,12 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - public async dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + public async dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'dbtConnectionIdentifier' is not null or undefined @@ -1475,6 +1644,12 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } + // verify required parameter 'modelTables' is not null or undefined + if (modelTables === null || modelTables === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "modelTables"); + } + + // verify required parameter 'importWorksheets' is not null or undefined if (importWorksheets === null || importWorksheets === undefined) { throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "importWorksheets"); @@ -1483,14 +1658,13 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { - // Path Params const localVarPath = '/api/rest/2.0/dbt/generate-tml'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1565,7 +1739,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1604,7 +1778,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1655,7 +1829,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1694,7 +1868,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1744,7 +1918,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1794,7 +1968,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1845,7 +2019,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1885,7 +2059,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1925,7 +2099,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -1965,7 +2139,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2004,7 +2178,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2055,7 +2229,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2094,7 +2268,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2145,7 +2319,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2185,7 +2359,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2225,7 +2399,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2265,7 +2439,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2305,7 +2479,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2326,7 +2500,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 */ public async deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -2345,11 +2519,61 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public async deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteWebhookConfigurationsRequest' is not null or undefined + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -2384,7 +2608,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2435,7 +2659,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2474,7 +2698,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2524,7 +2748,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2574,7 +2798,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2624,7 +2848,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2674,7 +2898,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2724,7 +2948,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2774,7 +2998,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2824,7 +3048,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2875,7 +3099,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2914,7 +3138,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -2964,7 +3188,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3014,7 +3238,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3064,7 +3288,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3114,7 +3338,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3164,7 +3388,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3214,7 +3438,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3257,7 +3481,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3289,7 +3513,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3310,7 +3534,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. * @param getCustomAccessTokenRequest */ public async getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { @@ -3328,7 +3552,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3353,6 +3577,56 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public async getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getDataSourceSuggestionsRequest' is not null or undefined + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/data-source-suggestions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -3372,7 +3646,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3416,7 +3690,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3441,6 +3715,56 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public async getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getRelevantQuestionsRequest' is not null or undefined + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/relevant-questions/'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -3453,7 +3777,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3485,7 +3809,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3517,7 +3841,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3556,7 +3880,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3606,7 +3930,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3656,7 +3980,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3706,7 +4030,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3756,7 +4080,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3799,7 +4123,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3838,7 +4162,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3888,7 +4212,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3938,7 +4262,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -3988,7 +4312,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4046,7 +4370,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4096,7 +4420,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4146,7 +4470,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4196,7 +4520,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4228,15 +4552,65 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest */ - public async searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise { + public async searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'searchConfigRequest' is not null or undefined - if (searchConfigRequest === null || searchConfigRequest === undefined) { - throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); + // verify required parameter 'searchCommunicationChannelPreferencesRequest' is not null or undefined + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public async searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConfigRequest' is not null or undefined + if (searchConfigRequest === null || searchConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); } @@ -4246,7 +4620,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4296,7 +4670,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4346,7 +4720,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4396,7 +4770,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4446,7 +4820,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4496,7 +4870,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4546,7 +4920,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4596,7 +4970,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4646,7 +5020,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4696,7 +5070,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4746,7 +5120,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4796,7 +5170,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4828,7 +5202,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 */ public async searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise { @@ -4846,7 +5220,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4877,6 +5251,164 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public async searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchWebhookConfigurationsRequest' is not null or undefined + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.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) + * @param sendAgentMessageRequest + */ + public async sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentMessageRequest' is not null or undefined + if (sendAgentMessageRequest === null || sendAgentMessageRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/{conversation_identifier}/converse' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + public async sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'sendAgentMessageStreamingRequest' is not null or undefined + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/converse/sse'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -4904,7 +5436,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -4954,7 +5486,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5004,7 +5536,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5054,7 +5586,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5104,7 +5636,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5154,7 +5686,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5212,7 +5744,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5262,7 +5794,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5312,7 +5844,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5362,7 +5894,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5420,7 +5952,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5452,7 +5984,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -5478,7 +6010,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5536,7 +6068,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5606,7 +6138,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5712,7 +6244,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5762,7 +6294,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5812,7 +6344,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5870,7 +6402,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5928,7 +6460,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -5986,7 +6518,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6036,7 +6568,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6094,7 +6626,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6152,7 +6684,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6210,7 +6742,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6242,7 +6774,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. * @param updateVariableRequest */ @@ -6268,7 +6800,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6300,7 +6832,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 */ public async updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -6313,12 +6845,12 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/api/rest/2.0/template/variables/update'; + const localVarPath = '/api/rest/2.0/template/variables/update-values'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6349,6 +6881,64 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public async updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'webhookIdentifier' is not null or undefined + if (webhookIdentifier === null || webhookIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + + + // verify required parameter 'updateWebhookConfigurationRequest' is not null or undefined + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/{webhook_identifier}/update' + .replace('{' + 'webhook_identifier' + '}', encodeURIComponent(String(webhookIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -6361,7 +6951,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6400,7 +6990,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6450,7 +7040,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -6758,6 +7348,59 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -6936,6 +7579,56 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createAgentConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -7720,6 +8413,63 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createWebhookConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookResponse", "" + ) as WebhookResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookResponse", "" + ) as WebhookResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -8899,6 +9649,63 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteWebhookConfigurations(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -10083,6 +10890,56 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDataSourceSuggestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -10159,38 +11016,88 @@ export class ThoughtSpotRestApiResponseProcessor { if (isCodeInRange("400", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ErrorResponse", "" - ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRelevantQuestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; } - if (isCodeInRange("401", response.httpStatusCode)) { - const body: ErrorResponse = ObjectSerializer.deserialize( + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ErrorResponse", "" - ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: Token = ObjectSerializer.deserialize( + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "Token", "" - ) as Token; + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; return body; } @@ -11135,6 +12042,63 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -11869,6 +12833,163 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchWebhookConfigurations(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessage(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessageStreaming(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -13253,6 +14374,59 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateWebhookConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/sdks/typescript/apis/UsersApi.ts b/sdks/typescript/apis/UsersApi.ts index a6f2945e4..87849f343 100644 --- a/sdks/typescript/apis/UsersApi.ts +++ b/sdks/typescript/apis/UsersApi.ts @@ -46,7 +46,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -96,7 +96,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -146,7 +146,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -196,7 +196,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -247,7 +247,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -286,7 +286,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -336,7 +336,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -386,7 +386,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -436,7 +436,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -494,7 +494,7 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/VariableApi.ts b/sdks/typescript/apis/VariableApi.ts index c680e1c16..1c968a748 100644 --- a/sdks/typescript/apis/VariableApi.ts +++ b/sdks/typescript/apis/VariableApi.ts @@ -21,7 +21,7 @@ import { Variable } from '../models/Variable'; export class VariableApiRequestFactory extends BaseAPIRequestFactory { /** - * 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. 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 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 */ public async createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { @@ -39,7 +39,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -71,7 +71,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 */ public async deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -90,7 +90,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -111,7 +111,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 */ public async searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise { @@ -129,7 +129,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -161,7 +161,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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. * @param updateVariableRequest */ @@ -187,7 +187,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -219,7 +219,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { } /** - * 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 */ public async updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -232,12 +232,12 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/api/rest/2.0/template/variables/update'; + const localVarPath = '/api/rest/2.0/template/variables/update-values'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/VersionControlApi.ts b/sdks/typescript/apis/VersionControlApi.ts index f449f8e21..748ee263f 100644 --- a/sdks/typescript/apis/VersionControlApi.ts +++ b/sdks/typescript/apis/VersionControlApi.ts @@ -48,7 +48,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -98,7 +98,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -148,7 +148,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -198,7 +198,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -256,7 +256,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -306,7 +306,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -356,7 +356,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -406,7 +406,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -456,7 +456,7 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") diff --git a/sdks/typescript/apis/EmailCustomisationApi.ts b/sdks/typescript/apis/WebhooksApi.ts similarity index 56% rename from sdks/typescript/apis/EmailCustomisationApi.ts rename to sdks/typescript/apis/WebhooksApi.ts index e9c6d563a..9af49413f 100644 --- a/sdks/typescript/apis/EmailCustomisationApi.ts +++ b/sdks/typescript/apis/WebhooksApi.ts @@ -8,35 +8,40 @@ import {canConsumeForm, isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { CreateEmailCustomisationRequest } from '../models/CreateEmailCustomisationRequest'; -import { CreateEmailCustomisationResponse } from '../models/CreateEmailCustomisationResponse'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; /** * no description */ -export class EmailCustomisationApiRequestFactory extends BaseAPIRequestFactory { +export class WebhooksApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 10.10.0.cl or later Creates a custom configuration for the email customisation #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines To create a custom confuguration: 1. Pass these parameters in your API request. - A JSON map of configuration attributes `template_properties`. The following example shows the configuration attribures for a csutom configuration: ``` { { \"logoUrl\": \"\", \"homeUrl\": \"\", \"productName\": \"\", \"footerAddress\": \"
\", \"ctaButtonBgColor\": \"#444DEA\", \"ctaTextFontColor\": \"#FFFFFF\", \"primaryBgColor\": \"#D3DEF0\", \"hideMobileAppNudge\": , \"hideTsVocabularyDefinitions\": e, \"hideProductName\": , \"hideFooterPhone\": , \"hideFooterAddress\": , \"hidePrivacyPolicy\": , \"hideManageNotification\": , \"fontfamily\": \"\" } } ``` - * @param createEmailCustomisationRequest + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest */ - public async createEmailCustomisation(createEmailCustomisationRequest: CreateEmailCustomisationRequest, _options?: Configuration): Promise { + public async createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'createEmailCustomisationRequest' is not null or undefined - if (createEmailCustomisationRequest === null || createEmailCustomisationRequest === undefined) { - throw new RequiredError("EmailCustomisationApi", "createEmailCustomisation", "createEmailCustomisationRequest"); + // verify required parameter 'createWebhookConfigurationRequest' is not null or undefined + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === undefined) { + throw new RequiredError("WebhooksApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); } // Path Params - const localVarPath = '/api/rest/2.0/customization/email'; + const localVarPath = '/api/rest/2.0/webhooks/create'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.15.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") @@ -47,7 +52,7 @@ export class EmailCustomisationApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(createEmailCustomisationRequest, "CreateEmailCustomisationRequest", ""), + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -68,30 +73,40 @@ export class EmailCustomisationApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.10.0.cl or later Deletes the configuration for the email customisation. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines Deletes the configuration available for the cluster/org. Pass the `template_identifier` in the API request. Note: `template_identifier` can be fetched from search API request. - * @param templateIdentifier Unique ID or name of the email customization. + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest */ - public async deleteEmailCustomisation(templateIdentifier: string, _options?: Configuration): Promise { + public async deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'templateIdentifier' is not null or undefined - if (templateIdentifier === null || templateIdentifier === undefined) { - throw new RequiredError("EmailCustomisationApi", "deleteEmailCustomisation", "templateIdentifier"); + // verify required parameter 'deleteWebhookConfigurationsRequest' is not null or undefined + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === undefined) { + throw new RequiredError("WebhooksApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); } // Path Params - const localVarPath = '/api/rest/2.0/customization/email/{template_identifier}/delete' - .replace('{' + 'template_identifier' + '}', encodeURIComponent(String(templateIdentifier))); + const localVarPath = '/api/rest/2.0/webhooks/delete'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.15.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -108,22 +123,40 @@ export class EmailCustomisationApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.10.0.cl or later Search the email customisation configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. #### Usage guidelines To get the list of configurations set in the cluster/org. + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest */ - public async searchEmailCustomisation(_options?: Configuration): Promise { + public async searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; + // verify required parameter 'searchWebhookConfigurationsRequest' is not null or undefined + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === undefined) { + throw new RequiredError("WebhooksApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + + // Path Params - const localVarPath = '/api/rest/2.0/customization/email/search'; + const localVarPath = '/api/rest/2.0/webhooks/search'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.15.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -140,22 +173,48 @@ export class EmailCustomisationApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.10.0.cl or later Validates the email customisation configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `_Has developer privilege` privilege is required. Coms should be enabled on the cluster. + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest */ - public async validateEmailCustomisation(_options?: Configuration): Promise { + public async updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; + // verify required parameter 'webhookIdentifier' is not null or undefined + if (webhookIdentifier === null || webhookIdentifier === undefined) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + + + // verify required parameter 'updateWebhookConfigurationRequest' is not null or undefined + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === undefined) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + + // Path Params - const localVarPath = '/api/rest/2.0/customization/email/validate'; + const localVarPath = '/api/rest/2.0/webhooks/{webhook_identifier}/update' + .replace('{' + 'webhook_identifier' + '}', encodeURIComponent(String(webhookIdentifier))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.15.1") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -173,22 +232,22 @@ export class EmailCustomisationApiRequestFactory extends BaseAPIRequestFactory { } -export class EmailCustomisationApiResponseProcessor { +export class WebhooksApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createEmailCustomisation + * @params response Response returned by the server for a request to createWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - public async createEmailCustomisation(response: ResponseContext): Promise { + public async createWebhookConfiguration(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CreateEmailCustomisationResponse = ObjectSerializer.deserialize( + const body: WebhookResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CreateEmailCustomisationResponse", "" - ) as CreateEmailCustomisationResponse; + "WebhookResponse", "" + ) as WebhookResponse; return body; } if (isCodeInRange("400", response.httpStatusCode)) { @@ -198,13 +257,20 @@ export class EmailCustomisationApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -215,10 +281,10 @@ export class EmailCustomisationApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CreateEmailCustomisationResponse = ObjectSerializer.deserialize( + const body: WebhookResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CreateEmailCustomisationResponse", "" - ) as CreateEmailCustomisationResponse; + "WebhookResponse", "" + ) as WebhookResponse; return body; } @@ -229,13 +295,17 @@ export class EmailCustomisationApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteEmailCustomisation + * @params response Response returned by the server for a request to deleteWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - public async deleteEmailCustomisation(response: ResponseContext): Promise { + public async deleteWebhookConfigurations(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( @@ -244,13 +314,20 @@ export class EmailCustomisationApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -261,10 +338,10 @@ export class EmailCustomisationApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; return body; } @@ -275,16 +352,16 @@ export class EmailCustomisationApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchEmailCustomisation + * @params response Response returned by the server for a request to searchWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - public async searchEmailCustomisation(response: ResponseContext): Promise > { + public async searchWebhookConfigurations(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: Array = ObjectSerializer.deserialize( + const body: WebhookSearchResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "Array", "" - ) as Array; + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; return body; } if (isCodeInRange("400", response.httpStatusCode)) { @@ -294,13 +371,20 @@ export class EmailCustomisationApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -311,10 +395,10 @@ export class EmailCustomisationApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: Array = ObjectSerializer.deserialize( + const body: WebhookSearchResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "Array", "" - ) as Array; + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; return body; } @@ -325,10 +409,10 @@ export class EmailCustomisationApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to validateEmailCustomisation + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - public async validateEmailCustomisation(response: ResponseContext): Promise { + public async updateWebhookConfiguration(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { return; @@ -340,13 +424,20 @@ export class EmailCustomisationApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), diff --git a/sdks/typescript/dist/index.cjs b/sdks/typescript/dist/index.cjs index 3968c999e..b7a194d8d 100644 --- a/sdks/typescript/dist/index.cjs +++ b/sdks/typescript/dist/index.cjs @@ -41,6 +41,7 @@ var __async = (__this, __arguments, generator) => { var typescript_exports = {}; __export(typescript_exports, { AIApi: () => PromiseAIApi, + AIContext: () => AIContext, APIKey: () => APIKey, APIKeyInput: () => APIKeyInput, AccessToken: () => AccessToken, @@ -51,7 +52,9 @@ __export(typescript_exports, { ActionDetailsInput: () => ActionDetailsInput, ActionDetailsInputCreate: () => ActionDetailsInputCreate, ActivateUserRequest: () => ActivateUserRequest, + AgentConversation: () => AgentConversation, AnswerContent: () => AnswerContent, + AnswerContextInput: () => AnswerContextInput, AnswerDataResponse: () => AnswerDataResponse, ApiException: () => ApiException, AssignChangeAuthorRequest: () => AssignChangeAuthorRequest, @@ -86,14 +89,21 @@ __export(typescript_exports, { CommitHistoryResponse: () => CommitHistoryResponse, CommitResponse: () => CommitResponse, CommiterType: () => CommiterType, + CommunicationChannelPreferencesResponse: () => CommunicationChannelPreferencesResponse, + ConfigureCommunicationChannelPreferencesRequest: () => ConfigureCommunicationChannelPreferencesRequest, ConnectionConfigurationResponse: () => ConnectionConfigurationResponse, ConnectionConfigurationSearchRequest: () => ConnectionConfigurationSearchRequest, ConnectionConfigurationsApi: () => PromiseConnectionConfigurationsApi, ConnectionInput: () => ConnectionInput, ConnectionsApi: () => PromiseConnectionsApi, + ContextPayloadV2Input: () => ContextPayloadV2Input, Conversation: () => Conversation, + ConversationSettingsInput: () => ConversationSettingsInput, ConvertWorksheetToModelRequest: () => ConvertWorksheetToModelRequest, CopyObjectRequest: () => CopyObjectRequest, + CreateAgentConversationRequest: () => CreateAgentConversationRequest, + CreateAgentConversationRequestConversationSettings: () => CreateAgentConversationRequestConversationSettings, + CreateAgentConversationRequestMetadataContext: () => CreateAgentConversationRequestMetadataContext, CreateCalendarRequest: () => CreateCalendarRequest, CreateCalendarRequestTableReference: () => CreateCalendarRequestTableReference, CreateConfigRequest: () => CreateConfigRequest, @@ -118,6 +128,9 @@ __export(typescript_exports, { CreateUserGroupRequest: () => CreateUserGroupRequest, CreateUserRequest: () => CreateUserRequest, CreateVariableRequest: () => CreateVariableRequest, + CreateWebhookConfigurationRequest: () => CreateWebhookConfigurationRequest, + CreateWebhookConfigurationRequestAuthentication: () => CreateWebhookConfigurationRequestAuthentication, + CreateWebhookConfigurationRequestSignatureVerification: () => CreateWebhookConfigurationRequestSignatureVerification, CronExpression: () => CronExpression, CronExpressionInput: () => CronExpressionInput, CustomActionApi: () => PromiseCustomActionApi, @@ -125,6 +138,8 @@ __export(typescript_exports, { CustomCalendarsApi: () => PromiseCustomCalendarsApi, DBTApi: () => PromiseDBTApi, DataApi: () => PromiseDataApi, + DataSource: () => DataSource, + DataSourceContextInput: () => DataSourceContextInput, DataWarehouseObjectInput: () => DataWarehouseObjectInput, DataWarehouseObjects: () => DataWarehouseObjects, Database: () => Database, @@ -140,13 +155,20 @@ __export(typescript_exports, { DeleteMetadataRequest: () => DeleteMetadataRequest, DeleteMetadataTypeInput: () => DeleteMetadataTypeInput, DeleteOrgEmailCustomizationRequest: () => DeleteOrgEmailCustomizationRequest, + DeleteWebhookConfigurationsRequest: () => DeleteWebhookConfigurationsRequest, DeployCommitRequest: () => DeployCommitRequest, DeployResponse: () => DeployResponse, EmailCustomizationApi: () => PromiseEmailCustomizationApi, + EntityHeader: () => EntityHeader, ErrorResponse: () => ErrorResponse, + EurekaDataSourceSuggestionResponse: () => EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse: () => EurekaDecomposeQueryResponse, + EurekaGetRelevantQuestionsResponse: () => EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse: () => EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery: () => EurekaLLMSuggestedQuery, + EurekaRelevantQuestion: () => EurekaRelevantQuestion, + EventChannelConfig: () => EventChannelConfig, + EventChannelConfigInput: () => EventChannelConfigInput, ExcludeMetadataListItemInput: () => ExcludeMetadataListItemInput, ExportAnswerReportRequest: () => ExportAnswerReportRequest, ExportAnswerReportRequestRegionalSettings: () => ExportAnswerReportRequestRegionalSettings, @@ -180,9 +202,13 @@ __export(typescript_exports, { GenericInfo: () => GenericInfo, GetAsyncImportStatusResponse: () => GetAsyncImportStatusResponse, GetCustomAccessTokenRequest: () => GetCustomAccessTokenRequest, + GetDataSourceSuggestionsRequest: () => GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest: () => GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters: () => GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest: () => GetObjectAccessTokenRequest, + GetRelevantQuestionsRequest: () => GetRelevantQuestionsRequest, + GetRelevantQuestionsRequestAiContext: () => GetRelevantQuestionsRequestAiContext, + GetRelevantQuestionsRequestMetadataContext: () => GetRelevantQuestionsRequestMetadataContext, GetTokenResponse: () => GetTokenResponse, GroupObject: () => GroupObject, GroupsApi: () => PromiseGroupsApi, @@ -201,12 +227,12 @@ __export(typescript_exports, { ImportUsersRequest: () => ImportUsersRequest, ImportUsersResponse: () => ImportUsersResponse, InputEurekaNLSRequest: () => InputEurekaNLSRequest, - InputVariableValue: () => InputVariableValue, IsomorphicFetchHttpLibrary: () => IsomorphicFetchHttpLibrary, JWTMetadataObject: () => JWTMetadataObject, JWTParameter: () => JWTParameter, JWTUserOptions: () => JWTUserOptions, JWTUserOptionsFull: () => JWTUserOptionsFull, + LBContextInput: () => LBContextInput, LiveboardContent: () => LiveboardContent, LiveboardDataResponse: () => LiveboardDataResponse, LiveboardOptions: () => LiveboardOptions, @@ -216,6 +242,7 @@ __export(typescript_exports, { LoginRequest: () => LoginRequest, MetadataApi: () => PromiseMetadataApi, MetadataAssociationItem: () => MetadataAssociationItem, + MetadataContext: () => MetadataContext, MetadataInput: () => MetadataInput, MetadataListItemInput: () => MetadataListItemInput, MetadataObject: () => MetadataObject, @@ -225,7 +252,11 @@ __export(typescript_exports, { ModelTableList: () => ModelTableList, ObjectIDAndName: () => ObjectIDAndName, Org: () => Org, + OrgChannelConfigInput: () => OrgChannelConfigInput, + OrgChannelConfigResponse: () => OrgChannelConfigResponse, + OrgDetails: () => OrgDetails, OrgInfo: () => OrgInfo, + OrgPreferenceSearchCriteriaInput: () => OrgPreferenceSearchCriteriaInput, OrgResponse: () => OrgResponse, OrgType: () => OrgType, OrgsApi: () => PromiseOrgsApi, @@ -294,6 +325,7 @@ __export(typescript_exports, { SearchCalendarsRequest: () => SearchCalendarsRequest, SearchCalendarsRequestSortOptions: () => SearchCalendarsRequestSortOptions, SearchCommitsRequest: () => SearchCommitsRequest, + SearchCommunicationChannelPreferencesRequest: () => SearchCommunicationChannelPreferencesRequest, SearchConfigRequest: () => SearchConfigRequest, SearchConnectionRequest: () => SearchConnectionRequest, SearchConnectionRequestSortOptions: () => SearchConnectionRequestSortOptions, @@ -318,8 +350,13 @@ __export(typescript_exports, { SearchUsersRequest: () => SearchUsersRequest, SearchUsersRequestSortOptions: () => SearchUsersRequestSortOptions, SearchVariablesRequest: () => SearchVariablesRequest, + SearchWebhookConfigurationsRequest: () => SearchWebhookConfigurationsRequest, + SearchWebhookConfigurationsRequestSortOptions: () => SearchWebhookConfigurationsRequestSortOptions, SecurityApi: () => PromiseSecurityApi, SelfDecodingBody: () => SelfDecodingBody, + SendAgentMessageRequest: () => SendAgentMessageRequest, + SendAgentMessageResponse: () => SendAgentMessageResponse, + SendAgentMessageStreamingRequest: () => SendAgentMessageStreamingRequest, SendMessageRequest: () => SendMessageRequest, ServerConfiguration: () => ServerConfiguration, ShareMetadataRequest: () => ShareMetadataRequest, @@ -377,6 +414,7 @@ __export(typescript_exports, { UpdateUserRequest: () => UpdateUserRequest, UpdateVariableRequest: () => UpdateVariableRequest, UpdateVariableValuesRequest: () => UpdateVariableValuesRequest, + UpdateWebhookConfigurationRequest: () => UpdateWebhookConfigurationRequest, User: () => User, UserGroup: () => UserGroup, UserGroupResponse: () => UserGroupResponse, @@ -387,12 +425,33 @@ __export(typescript_exports, { UsersApi: () => PromiseUsersApi, ValidateMergeRequest: () => ValidateMergeRequest, ValidateTokenRequest: () => ValidateTokenRequest, + ValueScopeInput: () => ValueScopeInput, Variable: () => Variable, VariableApi: () => PromiseVariableApi, VariableDetailInput: () => VariableDetailInput, + VariableUpdateAssignmentInput: () => VariableUpdateAssignmentInput, + VariableUpdateScopeInput: () => VariableUpdateScopeInput, VariableValue: () => VariableValue, - VariableValueInput: () => VariableValueInput, VersionControlApi: () => PromiseVersionControlApi, + WebhookAuthApiKey: () => WebhookAuthApiKey, + WebhookAuthApiKeyInput: () => WebhookAuthApiKeyInput, + WebhookAuthBasicAuth: () => WebhookAuthBasicAuth, + WebhookAuthBasicAuthInput: () => WebhookAuthBasicAuthInput, + WebhookAuthOAuth2: () => WebhookAuthOAuth2, + WebhookAuthOAuth2Input: () => WebhookAuthOAuth2Input, + WebhookAuthentication: () => WebhookAuthentication, + WebhookAuthenticationInput: () => WebhookAuthenticationInput, + WebhookDeleteFailure: () => WebhookDeleteFailure, + WebhookDeleteResponse: () => WebhookDeleteResponse, + WebhookOrg: () => WebhookOrg, + WebhookPagination: () => WebhookPagination, + WebhookResponse: () => WebhookResponse, + WebhookSearchResponse: () => WebhookSearchResponse, + WebhookSignatureVerification: () => WebhookSignatureVerification, + WebhookSignatureVerificationInput: () => WebhookSignatureVerificationInput, + WebhookSortOptionsInput: () => WebhookSortOptionsInput, + WebhookUser: () => WebhookUser, + WebhooksApi: () => PromiseWebhooksApi, configureAuthMethods: () => configureAuthMethods, createBasicConfig: () => createBasicConfig, createBearerAuthenticationConfig: () => createBearerAuthenticationConfig, @@ -665,6 +724,31 @@ function configureAuthMethods(config) { return authMethods; } +// models/AIContext.ts +var _AIContext = class _AIContext { + static getAttributeTypeMap() { + return _AIContext.attributeTypeMap; + } + constructor() { + } +}; +_AIContext.discriminator = void 0; +_AIContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var AIContext = _AIContext; + // models/APIKey.ts var _APIKey = class _APIKey { static getAttributeTypeMap() { @@ -951,6 +1035,25 @@ _ActivateUserRequest.attributeTypeMap = [ ]; var ActivateUserRequest = _ActivateUserRequest; +// models/AgentConversation.ts +var _AgentConversation = class _AgentConversation { + static getAttributeTypeMap() { + return _AgentConversation.attributeTypeMap; + } + constructor() { + } +}; +_AgentConversation.discriminator = void 0; +_AgentConversation.attributeTypeMap = [ + { + "name": "conversation_id", + "baseName": "conversation_id", + "type": "string", + "format": "" + } +]; +var AgentConversation = _AgentConversation; + // models/AnswerContent.ts var _AnswerContent = class _AnswerContent { static getAttributeTypeMap() { @@ -1006,6 +1109,31 @@ _AnswerContent.attributeTypeMap = [ ]; var AnswerContent = _AnswerContent; +// models/AnswerContextInput.ts +var _AnswerContextInput = class _AnswerContextInput { + static getAttributeTypeMap() { + return _AnswerContextInput.attributeTypeMap; + } + constructor() { + } +}; +_AnswerContextInput.discriminator = void 0; +_AnswerContextInput.attributeTypeMap = [ + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + } +]; +var AnswerContextInput = _AnswerContextInput; + // models/AnswerDataResponse.ts var _AnswerDataResponse = class _AnswerDataResponse { static getAttributeTypeMap() { @@ -1569,8 +1697,8 @@ _ColumnSecurityRule.attributeTypeMap = [ "format": "" }, { - "name": "sourceTableDetails", - "baseName": "sourceTableDetails", + "name": "source_table_details", + "baseName": "source_table_details", "type": "ColumnSecurityRuleSourceTable", "format": "" } @@ -1663,20 +1791,20 @@ var _ColumnSecurityRuleResponse = class _ColumnSecurityRuleResponse { _ColumnSecurityRuleResponse.discriminator = void 0; _ColumnSecurityRuleResponse.attributeTypeMap = [ { - "name": "guid", - "baseName": "guid", + "name": "table_guid", + "baseName": "table_guid", "type": "string", "format": "" }, { - "name": "objId", - "baseName": "objId", + "name": "obj_id", + "baseName": "obj_id", "type": "string", "format": "" }, { - "name": "columnSecurityRules", - "baseName": "columnSecurityRules", + "name": "column_security_rules", + "baseName": "column_security_rules", "type": "Array", "format": "" } @@ -1961,6 +2089,56 @@ _CommiterType.attributeTypeMap = [ ]; var CommiterType = _CommiterType; +// models/CommunicationChannelPreferencesResponse.ts +var _CommunicationChannelPreferencesResponse = class _CommunicationChannelPreferencesResponse { + static getAttributeTypeMap() { + return _CommunicationChannelPreferencesResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelPreferencesResponse.discriminator = void 0; +_CommunicationChannelPreferencesResponse.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelPreferencesResponse = _CommunicationChannelPreferencesResponse; + +// models/ConfigureCommunicationChannelPreferencesRequest.ts +var _ConfigureCommunicationChannelPreferencesRequest = class _ConfigureCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureCommunicationChannelPreferencesRequest.discriminator = void 0; +_ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureCommunicationChannelPreferencesRequest = _ConfigureCommunicationChannelPreferencesRequest; + // models/ConnectionConfigurationResponse.ts var _ConnectionConfigurationResponse = class _ConnectionConfigurationResponse { static getAttributeTypeMap() { @@ -2090,6 +2268,43 @@ _ConnectionInput.attributeTypeMap = [ ]; var ConnectionInput = _ConnectionInput; +// models/ContextPayloadV2Input.ts +var _ContextPayloadV2Input = class _ContextPayloadV2Input { + static getAttributeTypeMap() { + return _ContextPayloadV2Input.attributeTypeMap; + } + constructor() { + } +}; +_ContextPayloadV2Input.discriminator = void 0; +_ContextPayloadV2Input.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ContextPayloadV2InputTypeEnum", + "format": "" + }, + { + "name": "answer_context", + "baseName": "answer_context", + "type": "AnswerContextInput", + "format": "" + }, + { + "name": "liveboard_context", + "baseName": "liveboard_context", + "type": "LBContextInput", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var ContextPayloadV2Input = _ContextPayloadV2Input; + // models/Conversation.ts var _Conversation = class _Conversation { static getAttributeTypeMap() { @@ -2109,6 +2324,37 @@ _Conversation.attributeTypeMap = [ ]; var Conversation = _Conversation; +// models/ConversationSettingsInput.ts +var _ConversationSettingsInput = class _ConversationSettingsInput { + static getAttributeTypeMap() { + return _ConversationSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_ConversationSettingsInput.discriminator = void 0; +_ConversationSettingsInput.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + } +]; +var ConversationSettingsInput = _ConversationSettingsInput; + // models/ConvertWorksheetToModelRequest.ts var _ConvertWorksheetToModelRequest = class _ConvertWorksheetToModelRequest { static getAttributeTypeMap() { @@ -2183,6 +2429,99 @@ _CopyObjectRequest.attributeTypeMap = [ ]; var CopyObjectRequest = _CopyObjectRequest; +// models/CreateAgentConversationRequest.ts +var _CreateAgentConversationRequest = class _CreateAgentConversationRequest { + static getAttributeTypeMap() { + return _CreateAgentConversationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequest.discriminator = void 0; +_CreateAgentConversationRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "CreateAgentConversationRequestMetadataContext", + "format": "" + }, + { + "name": "conversation_settings", + "baseName": "conversation_settings", + "type": "CreateAgentConversationRequestConversationSettings", + "format": "" + } +]; +var CreateAgentConversationRequest = _CreateAgentConversationRequest; + +// models/CreateAgentConversationRequestConversationSettings.ts +var _CreateAgentConversationRequestConversationSettings = class _CreateAgentConversationRequestConversationSettings { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestConversationSettings.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestConversationSettings.discriminator = void 0; +_CreateAgentConversationRequestConversationSettings.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + } +]; +var CreateAgentConversationRequestConversationSettings = _CreateAgentConversationRequestConversationSettings; + +// models/CreateAgentConversationRequestMetadataContext.ts +var _CreateAgentConversationRequestMetadataContext = class _CreateAgentConversationRequestMetadataContext { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestMetadataContext.discriminator = void 0; +_CreateAgentConversationRequestMetadataContext.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateAgentConversationRequestMetadataContextTypeEnum", + "format": "" + }, + { + "name": "answer_context", + "baseName": "answer_context", + "type": "AnswerContextInput", + "format": "" + }, + { + "name": "liveboard_context", + "baseName": "liveboard_context", + "type": "LBContextInput", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var CreateAgentConversationRequestMetadataContext = _CreateAgentConversationRequestMetadataContext; + // models/CreateCalendarRequest.ts var _CreateCalendarRequest = class _CreateCalendarRequest { static getAttributeTypeMap() { @@ -2779,6 +3118,18 @@ _CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap = [ "baseName": "hide_modify_alert", "type": "boolean", "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" } ]; var CreateEmailCustomizationRequestTemplateProperties = _CreateEmailCustomizationRequestTemplateProperties; @@ -3339,79 +3690,208 @@ _CreateVariableRequest.attributeTypeMap = [ "format": "" }, { - "name": "sensitive", - "baseName": "sensitive", + "name": "is_sensitive", + "baseName": "is_sensitive", "type": "boolean", "format": "" }, { - "name": "values", - "baseName": "values", - "type": "Array", + "name": "data_type", + "baseName": "data_type", + "type": "CreateVariableRequestDataTypeEnum", "format": "" } ]; var CreateVariableRequest = _CreateVariableRequest; -// models/CronExpression.ts -var _CronExpression = class _CronExpression { +// models/CreateWebhookConfigurationRequest.ts +var _CreateWebhookConfigurationRequest = class _CreateWebhookConfigurationRequest { static getAttributeTypeMap() { - return _CronExpression.attributeTypeMap; + return _CreateWebhookConfigurationRequest.attributeTypeMap; } constructor() { } }; -_CronExpression.discriminator = void 0; -_CronExpression.attributeTypeMap = [ +_CreateWebhookConfigurationRequest.discriminator = void 0; +_CreateWebhookConfigurationRequest.attributeTypeMap = [ { - "name": "day_of_month", - "baseName": "day_of_month", + "name": "name", + "baseName": "name", "type": "string", "format": "" }, { - "name": "day_of_week", - "baseName": "day_of_week", + "name": "description", + "baseName": "description", "type": "string", "format": "" }, { - "name": "hour", - "baseName": "hour", + "name": "url", + "baseName": "url", "type": "string", "format": "" }, { - "name": "minute", - "baseName": "minute", + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + } +]; +var CreateWebhookConfigurationRequest = _CreateWebhookConfigurationRequest; + +// models/CreateWebhookConfigurationRequestAuthentication.ts +var _CreateWebhookConfigurationRequestAuthentication = class _CreateWebhookConfigurationRequestAuthentication { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestAuthentication.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestAuthentication.discriminator = void 0; +_CreateWebhookConfigurationRequestAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", "type": "string", "format": "" }, { - "name": "month", - "baseName": "month", + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var CreateWebhookConfigurationRequestAuthentication = _CreateWebhookConfigurationRequestAuthentication; + +// models/CreateWebhookConfigurationRequestSignatureVerification.ts +var _CreateWebhookConfigurationRequestSignatureVerification = class _CreateWebhookConfigurationRequestSignatureVerification { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestSignatureVerification.discriminator = void 0; +_CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", "type": "string", "format": "" }, { - "name": "second", - "baseName": "second", + "name": "algorithm", + "baseName": "algorithm", + "type": "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", "type": "string", "format": "" } ]; -var CronExpression = _CronExpression; +var CreateWebhookConfigurationRequestSignatureVerification = _CreateWebhookConfigurationRequestSignatureVerification; -// models/CronExpressionInput.ts -var _CronExpressionInput = class _CronExpressionInput { +// models/CronExpression.ts +var _CronExpression = class _CronExpression { static getAttributeTypeMap() { - return _CronExpressionInput.attributeTypeMap; + return _CronExpression.attributeTypeMap; } constructor() { } }; -_CronExpressionInput.discriminator = void 0; -_CronExpressionInput.attributeTypeMap = [ +_CronExpression.discriminator = void 0; +_CronExpression.attributeTypeMap = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } +]; +var CronExpression = _CronExpression; + +// models/CronExpressionInput.ts +var _CronExpressionInput = class _CronExpressionInput { + static getAttributeTypeMap() { + return _CronExpressionInput.attributeTypeMap; + } + constructor() { + } +}; +_CronExpressionInput.discriminator = void 0; +_CronExpressionInput.attributeTypeMap = [ { "name": "day_of_month", "baseName": "day_of_month", @@ -3476,6 +3956,56 @@ _CustomActionMetadataTypeInput.attributeTypeMap = [ ]; var CustomActionMetadataTypeInput = _CustomActionMetadataTypeInput; +// models/DataSource.ts +var _DataSource = class _DataSource { + static getAttributeTypeMap() { + return _DataSource.attributeTypeMap; + } + constructor() { + } +}; +_DataSource.discriminator = void 0; +_DataSource.attributeTypeMap = [ + { + "name": "confidence", + "baseName": "confidence", + "type": "number", + "format": "float" + }, + { + "name": "details", + "baseName": "details", + "type": "EntityHeader", + "format": "" + }, + { + "name": "reasoning", + "baseName": "reasoning", + "type": "string", + "format": "" + } +]; +var DataSource = _DataSource; + +// models/DataSourceContextInput.ts +var _DataSourceContextInput = class _DataSourceContextInput { + static getAttributeTypeMap() { + return _DataSourceContextInput.attributeTypeMap; + } + constructor() { + } +}; +_DataSourceContextInput.discriminator = void 0; +_DataSourceContextInput.attributeTypeMap = [ + { + "name": "guid", + "baseName": "guid", + "type": "string", + "format": "" + } +]; +var DataSourceContextInput = _DataSourceContextInput; + // models/DataWarehouseObjectInput.ts var _DataWarehouseObjectInput = class _DataWarehouseObjectInput { static getAttributeTypeMap() { @@ -3851,6 +4381,25 @@ _DeleteOrgEmailCustomizationRequest.attributeTypeMap = [ ]; var DeleteOrgEmailCustomizationRequest = _DeleteOrgEmailCustomizationRequest; +// models/DeleteWebhookConfigurationsRequest.ts +var _DeleteWebhookConfigurationsRequest = class _DeleteWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _DeleteWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteWebhookConfigurationsRequest.discriminator = void 0; +_DeleteWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "webhook_identifiers", + "baseName": "webhook_identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteWebhookConfigurationsRequest = _DeleteWebhookConfigurationsRequest; + // models/DeployCommitRequest.ts var _DeployCommitRequest = class _DeployCommitRequest { static getAttributeTypeMap() { @@ -3931,6 +4480,37 @@ _DeployResponse.attributeTypeMap = [ ]; var DeployResponse = _DeployResponse; +// models/EntityHeader.ts +var _EntityHeader = class _EntityHeader { + static getAttributeTypeMap() { + return _EntityHeader.attributeTypeMap; + } + constructor() { + } +}; +_EntityHeader.discriminator = void 0; +_EntityHeader.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } +]; +var EntityHeader = _EntityHeader; + // models/ErrorResponse.ts var _ErrorResponse = class _ErrorResponse { static getAttributeTypeMap() { @@ -3950,6 +4530,25 @@ _ErrorResponse.attributeTypeMap = [ ]; var ErrorResponse = _ErrorResponse; +// models/EurekaDataSourceSuggestionResponse.ts +var _EurekaDataSourceSuggestionResponse = class _EurekaDataSourceSuggestionResponse { + static getAttributeTypeMap() { + return _EurekaDataSourceSuggestionResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaDataSourceSuggestionResponse.discriminator = void 0; +_EurekaDataSourceSuggestionResponse.attributeTypeMap = [ + { + "name": "data_sources", + "baseName": "data_sources", + "type": "Array", + "format": "" + } +]; +var EurekaDataSourceSuggestionResponse = _EurekaDataSourceSuggestionResponse; + // models/EurekaDecomposeQueryResponse.ts var _EurekaDecomposeQueryResponse = class _EurekaDecomposeQueryResponse { static getAttributeTypeMap() { @@ -3969,6 +4568,25 @@ _EurekaDecomposeQueryResponse.attributeTypeMap = [ ]; var EurekaDecomposeQueryResponse = _EurekaDecomposeQueryResponse; +// models/EurekaGetRelevantQuestionsResponse.ts +var _EurekaGetRelevantQuestionsResponse = class _EurekaGetRelevantQuestionsResponse { + static getAttributeTypeMap() { + return _EurekaGetRelevantQuestionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaGetRelevantQuestionsResponse.discriminator = void 0; +_EurekaGetRelevantQuestionsResponse.attributeTypeMap = [ + { + "name": "relevant_questions", + "baseName": "relevant_questions", + "type": "Array", + "format": "" + } +]; +var EurekaGetRelevantQuestionsResponse = _EurekaGetRelevantQuestionsResponse; + // models/EurekaLLMDecomposeQueryResponse.ts var _EurekaLLMDecomposeQueryResponse = class _EurekaLLMDecomposeQueryResponse { static getAttributeTypeMap() { @@ -4019,6 +4637,87 @@ _EurekaLLMSuggestedQuery.attributeTypeMap = [ ]; var EurekaLLMSuggestedQuery = _EurekaLLMSuggestedQuery; +// models/EurekaRelevantQuestion.ts +var _EurekaRelevantQuestion = class _EurekaRelevantQuestion { + static getAttributeTypeMap() { + return _EurekaRelevantQuestion.attributeTypeMap; + } + constructor() { + } +}; +_EurekaRelevantQuestion.discriminator = void 0; +_EurekaRelevantQuestion.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + } +]; +var EurekaRelevantQuestion = _EurekaRelevantQuestion; + +// models/EventChannelConfig.ts +var _EventChannelConfig = class _EventChannelConfig { + static getAttributeTypeMap() { + return _EventChannelConfig.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfig.discriminator = void 0; +_EventChannelConfig.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfig = _EventChannelConfig; + +// models/EventChannelConfigInput.ts +var _EventChannelConfigInput = class _EventChannelConfigInput { + static getAttributeTypeMap() { + return _EventChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfigInput.discriminator = void 0; +_EventChannelConfigInput.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigInputEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfigInput = _EventChannelConfigInput; + // models/ExcludeMetadataListItemInput.ts var _ExcludeMetadataListItemInput = class _ExcludeMetadataListItemInput { static getAttributeTypeMap() { @@ -4492,6 +5191,12 @@ _ExportMetadataTMLRequestExportOptions.attributeTypeMap = [ "baseName": "export_column_security_rules", "type": "boolean", "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" } ]; var ExportMetadataTMLRequestExportOptions = _ExportMetadataTMLRequestExportOptions; @@ -4572,6 +5277,12 @@ _ExportOptions.attributeTypeMap = [ "baseName": "export_column_security_rules", "type": "boolean", "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" } ]; var ExportOptions = _ExportOptions; @@ -5360,6 +6071,25 @@ _GetCustomAccessTokenRequest.attributeTypeMap = [ ]; var GetCustomAccessTokenRequest = _GetCustomAccessTokenRequest; +// models/GetDataSourceSuggestionsRequest.ts +var _GetDataSourceSuggestionsRequest = class _GetDataSourceSuggestionsRequest { + static getAttributeTypeMap() { + return _GetDataSourceSuggestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetDataSourceSuggestionsRequest.discriminator = void 0; +_GetDataSourceSuggestionsRequest.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var GetDataSourceSuggestionsRequest = _GetDataSourceSuggestionsRequest; + // models/GetFullAccessTokenRequest.ts var _GetFullAccessTokenRequest = class _GetFullAccessTokenRequest { static getAttributeTypeMap() { @@ -5549,6 +6279,111 @@ _GetObjectAccessTokenRequest.attributeTypeMap = [ ]; var GetObjectAccessTokenRequest = _GetObjectAccessTokenRequest; +// models/GetRelevantQuestionsRequest.ts +var _GetRelevantQuestionsRequest = class _GetRelevantQuestionsRequest { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequest.discriminator = void 0; +_GetRelevantQuestionsRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "GetRelevantQuestionsRequestMetadataContext", + "format": "" + }, + { + "name": "limit_relevant_questions", + "baseName": "limit_relevant_questions", + "type": "number", + "format": "int32" + }, + { + "name": "bypass_cache", + "baseName": "bypass_cache", + "type": "boolean", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "ai_context", + "baseName": "ai_context", + "type": "GetRelevantQuestionsRequestAiContext", + "format": "" + } +]; +var GetRelevantQuestionsRequest = _GetRelevantQuestionsRequest; + +// models/GetRelevantQuestionsRequestAiContext.ts +var _GetRelevantQuestionsRequestAiContext = class _GetRelevantQuestionsRequestAiContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestAiContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestAiContext.discriminator = void 0; +_GetRelevantQuestionsRequestAiContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestAiContext = _GetRelevantQuestionsRequestAiContext; + +// models/GetRelevantQuestionsRequestMetadataContext.ts +var _GetRelevantQuestionsRequestMetadataContext = class _GetRelevantQuestionsRequestMetadataContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestMetadataContext.discriminator = void 0; +_GetRelevantQuestionsRequestMetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestMetadataContext = _GetRelevantQuestionsRequestMetadataContext; + // models/GetTokenResponse.ts var _GetTokenResponse = class _GetTokenResponse { static getAttributeTypeMap() { @@ -6230,49 +7065,6 @@ _InputEurekaNLSRequest.attributeTypeMap = [ ]; var InputEurekaNLSRequest = _InputEurekaNLSRequest; -// models/InputVariableValue.ts -var _InputVariableValue = class _InputVariableValue { - static getAttributeTypeMap() { - return _InputVariableValue.attributeTypeMap; - } - constructor() { - } -}; -_InputVariableValue.discriminator = void 0; -_InputVariableValue.attributeTypeMap = [ - { - "name": "value", - "baseName": "value", - "type": "string", - "format": "" - }, - { - "name": "org_identifier", - "baseName": "org_identifier", - "type": "string", - "format": "" - }, - { - "name": "principal_type", - "baseName": "principal_type", - "type": "InputVariableValuePrincipalTypeEnum", - "format": "" - }, - { - "name": "principal_identifier", - "baseName": "principal_identifier", - "type": "string", - "format": "" - }, - { - "name": "priority", - "baseName": "priority", - "type": "number", - "format": "int32" - } -]; -var InputVariableValue = _InputVariableValue; - // models/JWTMetadataObject.ts var _JWTMetadataObject = class _JWTMetadataObject { static getAttributeTypeMap() { @@ -6373,6 +7165,31 @@ _JWTUserOptionsFull.attributeTypeMap = [ ]; var JWTUserOptionsFull = _JWTUserOptionsFull; +// models/LBContextInput.ts +var _LBContextInput = class _LBContextInput { + static getAttributeTypeMap() { + return _LBContextInput.attributeTypeMap; + } + constructor() { + } +}; +_LBContextInput.discriminator = void 0; +_LBContextInput.attributeTypeMap = [ + { + "name": "liveboard_identifier", + "baseName": "liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifier", + "baseName": "visualization_identifier", + "type": "string", + "format": "" + } +]; +var LBContextInput = _LBContextInput; + // models/LiveboardContent.ts var _LiveboardContent = class _LiveboardContent { static getAttributeTypeMap() { @@ -6602,6 +7419,43 @@ _MetadataAssociationItem.attributeTypeMap = [ ]; var MetadataAssociationItem = _MetadataAssociationItem; +// models/MetadataContext.ts +var _MetadataContext = class _MetadataContext { + static getAttributeTypeMap() { + return _MetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_MetadataContext.discriminator = void 0; +_MetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var MetadataContext = _MetadataContext; + // models/MetadataInput.ts var _MetadataInput = class _MetadataInput { static getAttributeTypeMap() { @@ -6905,6 +7759,93 @@ _Org.attributeTypeMap = [ ]; var Org = _Org; +// models/OrgChannelConfigInput.ts +var _OrgChannelConfigInput = class _OrgChannelConfigInput { + static getAttributeTypeMap() { + return _OrgChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigInput.discriminator = void 0; +_OrgChannelConfigInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "OrgChannelConfigInputOperationEnum", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + }, + { + "name": "reset_events", + "baseName": "reset_events", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigInput = _OrgChannelConfigInput; + +// models/OrgChannelConfigResponse.ts +var _OrgChannelConfigResponse = class _OrgChannelConfigResponse { + static getAttributeTypeMap() { + return _OrgChannelConfigResponse.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigResponse.discriminator = void 0; +_OrgChannelConfigResponse.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "OrgDetails", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigResponse = _OrgChannelConfigResponse; + +// models/OrgDetails.ts +var _OrgDetails = class _OrgDetails { + static getAttributeTypeMap() { + return _OrgDetails.attributeTypeMap; + } + constructor() { + } +}; +_OrgDetails.discriminator = void 0; +_OrgDetails.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var OrgDetails = _OrgDetails; + // models/OrgInfo.ts var _OrgInfo = class _OrgInfo { static getAttributeTypeMap() { @@ -6930,6 +7871,31 @@ _OrgInfo.attributeTypeMap = [ ]; var OrgInfo = _OrgInfo; +// models/OrgPreferenceSearchCriteriaInput.ts +var _OrgPreferenceSearchCriteriaInput = class _OrgPreferenceSearchCriteriaInput { + static getAttributeTypeMap() { + return _OrgPreferenceSearchCriteriaInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgPreferenceSearchCriteriaInput.discriminator = void 0; +_OrgPreferenceSearchCriteriaInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_types", + "baseName": "event_types", + "type": "Array", + "format": "" + } +]; +var OrgPreferenceSearchCriteriaInput = _OrgPreferenceSearchCriteriaInput; + // models/OrgResponse.ts var _OrgResponse = class _OrgResponse { static getAttributeTypeMap() { @@ -9103,6 +10069,31 @@ _SearchCommitsRequest.attributeTypeMap = [ ]; var SearchCommitsRequest = _SearchCommitsRequest; +// models/SearchCommunicationChannelPreferencesRequest.ts +var _SearchCommunicationChannelPreferencesRequest = class _SearchCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _SearchCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCommunicationChannelPreferencesRequest.discriminator = void 0; +_SearchCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SearchCommunicationChannelPreferencesRequest = _SearchCommunicationChannelPreferencesRequest; + // models/SearchConfigRequest.ts var _SearchConfigRequest = class _SearchConfigRequest { static getAttributeTypeMap() { @@ -10330,6 +11321,12 @@ _SearchVariablesRequest.attributeTypeMap = [ "type": "Array", "format": "" }, + { + "name": "value_scope", + "baseName": "value_scope", + "type": "Array", + "format": "" + }, { "name": "record_offset", "baseName": "record_offset", @@ -10351,6 +11348,149 @@ _SearchVariablesRequest.attributeTypeMap = [ ]; var SearchVariablesRequest = _SearchVariablesRequest; +// models/SearchWebhookConfigurationsRequest.ts +var _SearchWebhookConfigurationsRequest = class _SearchWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequest.discriminator = void 0; +_SearchWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "webhook_identifier", + "baseName": "webhook_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "SearchWebhookConfigurationsRequestEventTypeEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchWebhookConfigurationsRequestSortOptions", + "format": "" + } +]; +var SearchWebhookConfigurationsRequest = _SearchWebhookConfigurationsRequest; + +// models/SearchWebhookConfigurationsRequestSortOptions.ts +var _SearchWebhookConfigurationsRequestSortOptions = class _SearchWebhookConfigurationsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequestSortOptions.discriminator = void 0; +_SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchWebhookConfigurationsRequestSortOptions = _SearchWebhookConfigurationsRequestSortOptions; + +// models/SendAgentMessageRequest.ts +var _SendAgentMessageRequest = class _SendAgentMessageRequest { + static getAttributeTypeMap() { + return _SendAgentMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageRequest.discriminator = void 0; +_SendAgentMessageRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageRequest = _SendAgentMessageRequest; + +// models/SendAgentMessageResponse.ts +var _SendAgentMessageResponse = class _SendAgentMessageResponse { + static getAttributeTypeMap() { + return _SendAgentMessageResponse.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageResponse.discriminator = void 0; +_SendAgentMessageResponse.attributeTypeMap = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SendAgentMessageResponse = _SendAgentMessageResponse; + +// models/SendAgentMessageStreamingRequest.ts +var _SendAgentMessageStreamingRequest = class _SendAgentMessageStreamingRequest { + static getAttributeTypeMap() { + return _SendAgentMessageStreamingRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageStreamingRequest.discriminator = void 0; +_SendAgentMessageStreamingRequest.attributeTypeMap = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageStreamingRequest = _SendAgentMessageStreamingRequest; + // models/SendMessageRequest.ts var _SendMessageRequest = class _SendMessageRequest { static getAttributeTypeMap() { @@ -11193,6 +12333,18 @@ _TemplatePropertiesInputCreate.attributeTypeMap = [ "baseName": "hide_modify_alert", "type": "boolean", "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" } ]; var TemplatePropertiesInputCreate = _TemplatePropertiesInputCreate; @@ -12589,18 +13741,6 @@ _UpdateVariableRequest.attributeTypeMap = [ "baseName": "name", "type": "string", "format": "" - }, - { - "name": "operation", - "baseName": "operation", - "type": "UpdateVariableRequestOperationEnum", - "format": "" - }, - { - "name": "values", - "baseName": "values", - "type": "Array", - "format": "" } ]; var UpdateVariableRequest = _UpdateVariableRequest; @@ -12616,20 +13756,75 @@ var _UpdateVariableValuesRequest = class _UpdateVariableValuesRequest { _UpdateVariableValuesRequest.discriminator = void 0; _UpdateVariableValuesRequest.attributeTypeMap = [ { - "name": "variable_updates", - "baseName": "variable_updates", - "type": "Array", + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", "format": "" }, { - "name": "operation", - "baseName": "operation", - "type": "UpdateVariableValuesRequestOperationEnum", + "name": "variable_value_scope", + "baseName": "variable_value_scope", + "type": "Array", "format": "" } ]; var UpdateVariableValuesRequest = _UpdateVariableValuesRequest; +// models/UpdateWebhookConfigurationRequest.ts +var _UpdateWebhookConfigurationRequest = class _UpdateWebhookConfigurationRequest { + static getAttributeTypeMap() { + return _UpdateWebhookConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateWebhookConfigurationRequest.discriminator = void 0; +_UpdateWebhookConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + } +]; +var UpdateWebhookConfigurationRequest = _UpdateWebhookConfigurationRequest; + // models/User.ts var _User = class _User { static getAttributeTypeMap() { @@ -12909,6 +14104,12 @@ _User.attributeTypeMap = [ "baseName": "access_control_properties", "type": "any", "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "any", + "format": "" } ]; var User = _User; @@ -13293,6 +14494,43 @@ _ValidateTokenRequest.attributeTypeMap = [ ]; var ValidateTokenRequest = _ValidateTokenRequest; +// models/ValueScopeInput.ts +var _ValueScopeInput = class _ValueScopeInput { + static getAttributeTypeMap() { + return _ValueScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_ValueScopeInput.discriminator = void 0; +_ValueScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "ValueScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + } +]; +var ValueScopeInput = _ValueScopeInput; + // models/Variable.ts var _Variable = class _Variable { static getAttributeTypeMap() { @@ -13367,6 +14605,80 @@ _VariableDetailInput.attributeTypeMap = [ ]; var VariableDetailInput = _VariableDetailInput; +// models/VariableUpdateAssignmentInput.ts +var _VariableUpdateAssignmentInput = class _VariableUpdateAssignmentInput { + static getAttributeTypeMap() { + return _VariableUpdateAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateAssignmentInput.discriminator = void 0; +_VariableUpdateAssignmentInput.attributeTypeMap = [ + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "VariableUpdateAssignmentInputOperationEnum", + "format": "" + } +]; +var VariableUpdateAssignmentInput = _VariableUpdateAssignmentInput; + +// models/VariableUpdateScopeInput.ts +var _VariableUpdateScopeInput = class _VariableUpdateScopeInput { + static getAttributeTypeMap() { + return _VariableUpdateScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateScopeInput.discriminator = void 0; +_VariableUpdateScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableUpdateScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariableUpdateScopeInput = _VariableUpdateScopeInput; + // models/VariableValue.ts var _VariableValue = class _VariableValue { static getAttributeTypeMap() { @@ -13383,6 +14695,12 @@ _VariableValue.attributeTypeMap = [ "type": "string", "format": "" }, + { + "name": "value_list", + "baseName": "value_list", + "type": "Array", + "format": "" + }, { "name": "org_identifier", "baseName": "org_identifier", @@ -13410,241 +14728,834 @@ _VariableValue.attributeTypeMap = [ ]; var VariableValue = _VariableValue; -// models/VariableValueInput.ts -var _VariableValueInput = class _VariableValueInput { +// models/WebhookAuthApiKey.ts +var _WebhookAuthApiKey = class _WebhookAuthApiKey { static getAttributeTypeMap() { - return _VariableValueInput.attributeTypeMap; + return _WebhookAuthApiKey.attributeTypeMap; } constructor() { } }; -_VariableValueInput.discriminator = void 0; -_VariableValueInput.attributeTypeMap = [ +_WebhookAuthApiKey.discriminator = void 0; +_WebhookAuthApiKey.attributeTypeMap = [ { - "name": "variable_identifier", - "baseName": "variable_identifier", + "name": "key", + "baseName": "key", "type": "string", "format": "" }, { - "name": "variable_values", - "baseName": "variable_values", - "type": "Array", + "name": "value", + "baseName": "value", + "type": "string", "format": "" } ]; -var VariableValueInput = _VariableValueInput; +var WebhookAuthApiKey = _WebhookAuthApiKey; -// middleware.ts -var PromiseMiddlewareWrapper = class { - constructor(middleware) { - this.middleware = middleware; +// models/WebhookAuthApiKeyInput.ts +var _WebhookAuthApiKeyInput = class _WebhookAuthApiKeyInput { + static getAttributeTypeMap() { + return _WebhookAuthApiKeyInput.attributeTypeMap; } - pre(context) { - return from(this.middleware.pre(context)); + constructor() { } - post(context) { - return from(this.middleware.post(context)); +}; +_WebhookAuthApiKeyInput.discriminator = void 0; +_WebhookAuthApiKeyInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookAuthApiKeyInput = _WebhookAuthApiKeyInput; + +// models/WebhookAuthBasicAuth.ts +var _WebhookAuthBasicAuth = class _WebhookAuthBasicAuth { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuth.attributeTypeMap; + } + constructor() { } }; +_WebhookAuthBasicAuth.discriminator = void 0; +_WebhookAuthBasicAuth.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } +]; +var WebhookAuthBasicAuth = _WebhookAuthBasicAuth; -// servers.ts -var ServerConfiguration = class { - constructor(url, variableConfiguration) { - this.url = url; - this.variableConfiguration = variableConfiguration; +// models/WebhookAuthBasicAuthInput.ts +var _WebhookAuthBasicAuthInput = class _WebhookAuthBasicAuthInput { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuthInput.attributeTypeMap; } - /** - * Sets the value of the variables of this server. Variables are included in - * the `url` of this ServerConfiguration in the form `{variableName}` - * - * @param variableConfiguration a partial variable configuration for the - * variables contained in the url - */ - setVariables(variableConfiguration) { - Object.assign(this.variableConfiguration, variableConfiguration); + constructor() { } - getConfiguration() { - return this.variableConfiguration; +}; +_WebhookAuthBasicAuthInput.discriminator = void 0; +_WebhookAuthBasicAuthInput.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" } - getUrl() { - let replacedUrl = this.url; - for (const key in this.variableConfiguration) { - var re = new RegExp("{" + key + "}", "g"); - replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); - } - return replacedUrl; +]; +var WebhookAuthBasicAuthInput = _WebhookAuthBasicAuthInput; + +// models/WebhookAuthOAuth2.ts +var _WebhookAuthOAuth2 = class _WebhookAuthOAuth2 { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2.attributeTypeMap; } - /** - * Creates a new request context for this server using the url with variables - * replaced with their respective values and the endpoint of the request appended. - * - * @param endpoint the endpoint to be queried on the server - * @param httpMethod httpMethod to be used - * - */ - makeRequestContext(endpoint, httpMethod) { - return new RequestContext2(this.getUrl() + endpoint, httpMethod); + constructor() { } }; -var server1 = new ServerConfiguration("{base-url}", { "base-url": "https://localhost:443" }); -var servers = [server1]; +_WebhookAuthOAuth2.discriminator = void 0; +_WebhookAuthOAuth2.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2 = _WebhookAuthOAuth2; -// configuration.ts -function createConfiguration(conf = {}) { - const configuration = { - baseServer: conf.baseServer !== void 0 ? conf.baseServer : server1, - httpApi: conf.httpApi || new IsomorphicFetchHttpLibrary(), - middleware: conf.middleware || [], - authMethods: configureAuthMethods(conf.authMethods) - }; - if (conf.promiseMiddleware) { - conf.promiseMiddleware.forEach( - (m) => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) - ); +// models/WebhookAuthOAuth2Input.ts +var _WebhookAuthOAuth2Input = class _WebhookAuthOAuth2Input { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2Input.attributeTypeMap; } - return configuration; -} + constructor() { + } +}; +_WebhookAuthOAuth2Input.discriminator = void 0; +_WebhookAuthOAuth2Input.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2Input = _WebhookAuthOAuth2Input; -// apis/exception.ts -var ApiException = class extends Error { - constructor(code, message, body, headers) { - super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + JSON.stringify(headers)); - this.code = code; - this.body = body; - this.headers = headers; +// models/WebhookAuthentication.ts +var _WebhookAuthentication = class _WebhookAuthentication { + static getAttributeTypeMap() { + return _WebhookAuthentication.attributeTypeMap; + } + constructor() { } }; +_WebhookAuthentication.discriminator = void 0; +_WebhookAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKey", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuth", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2", + "format": "" + } +]; +var WebhookAuthentication = _WebhookAuthentication; -// apis/baseapi.ts -var BaseAPIRequestFactory = class { - constructor(configuration) { - this.configuration = configuration; +// models/WebhookAuthenticationInput.ts +var _WebhookAuthenticationInput = class _WebhookAuthenticationInput { + static getAttributeTypeMap() { + return _WebhookAuthenticationInput.attributeTypeMap; + } + constructor() { } }; -var RequiredError = class extends Error { - constructor(api, method, field) { - super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); - this.api = api; - this.method = method; - this.field = field; - this.name = "RequiredError"; +_WebhookAuthenticationInput.discriminator = void 0; +_WebhookAuthenticationInput.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var WebhookAuthenticationInput = _WebhookAuthenticationInput; + +// models/WebhookDeleteFailure.ts +var _WebhookDeleteFailure = class _WebhookDeleteFailure { + static getAttributeTypeMap() { + return _WebhookDeleteFailure.attributeTypeMap; + } + constructor() { } }; +_WebhookDeleteFailure.discriminator = void 0; +_WebhookDeleteFailure.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var WebhookDeleteFailure = _WebhookDeleteFailure; -// models/ObjectSerializer.ts -var primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" +// models/WebhookDeleteResponse.ts +var _WebhookDeleteResponse = class _WebhookDeleteResponse { + static getAttributeTypeMap() { + return _WebhookDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookDeleteResponse.discriminator = void 0; +_WebhookDeleteResponse.attributeTypeMap = [ + { + "name": "deleted_count", + "baseName": "deleted_count", + "type": "number", + "format": "int32" + }, + { + "name": "failed_count", + "baseName": "failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "deleted_webhooks", + "baseName": "deleted_webhooks", + "type": "Array", + "format": "" + }, + { + "name": "failed_webhooks", + "baseName": "failed_webhooks", + "type": "Array", + "format": "" + } ]; -var supportedMediaTypes = { - "application/json": Infinity, - "application/octet-stream": 0, - "application/x-www-form-urlencoded": 0 +var WebhookDeleteResponse = _WebhookDeleteResponse; + +// models/WebhookOrg.ts +var _WebhookOrg = class _WebhookOrg { + static getAttributeTypeMap() { + return _WebhookOrg.attributeTypeMap; + } + constructor() { + } }; -var enumsMap = /* @__PURE__ */ new Set([ - "ActionConfigInputPositionEnum", - "ActionConfigInputCreatePositionEnum", - "AssociateMetadataInputTypeEnum", - "AssociateMetadataInputCreateTypeEnum", - "AuthorMetadataTypeInputTypeEnum", - "ColumnSecurityRuleGroupOperationOperationEnum", - "ConnectionConfigurationResponsePolicyProcessesEnum", - "ConnectionConfigurationResponseDataWarehouseTypeEnum", - "ConnectionConfigurationResponsePolicyTypeEnum", - "ConnectionConfigurationSearchRequestPolicyTypeEnum", - "CopyObjectRequestTypeEnum", - "CreateCalendarRequestCreationMethodEnum", - "CreateCalendarRequestCalendarTypeEnum", - "CreateCalendarRequestMonthOffsetEnum", - "CreateCalendarRequestStartDayOfWeekEnum", - "CreateConnectionConfigurationRequestAuthenticationTypeEnum", - "CreateConnectionConfigurationRequestPolicyTypeEnum", - "CreateConnectionConfigurationRequestPolicyProcessesEnum", - "CreateConnectionRequestDataWarehouseTypeEnum", - "CreateConnectionResponseDataWarehouseTypeEnum", - "CreateRoleRequestPrivilegesEnum", - "CreateScheduleRequestMetadataTypeEnum", - "CreateScheduleRequestFileFormatEnum", - "CreateScheduleRequestTimeZoneEnum", - "CreateScheduleRequestPdfOptionsPageSizeEnum", - "CreateUserGroupRequestPrivilegesEnum", - "CreateUserGroupRequestTypeEnum", - "CreateUserGroupRequestVisibilityEnum", - "CreateUserRequestAccountTypeEnum", - "CreateUserRequestAccountStatusEnum", - "CreateUserRequestVisibilityEnum", - "CreateUserRequestPreferredLocaleEnum", - "CreateVariableRequestTypeEnum", - "CustomActionMetadataTypeInputTypeEnum", - "DeleteMetadataTypeInputTypeEnum", - "DeployCommitRequestDeployTypeEnum", - "DeployCommitRequestDeployPolicyEnum", - "ExcludeMetadataListItemInputTypeEnum", - "ExportAnswerReportRequestFileFormatEnum", - "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", - "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", - "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", - "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", - "ExportLiveboardReportRequestFileFormatEnum", - "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", - "ExportMetadataTMLBatchedRequestMetadataTypeEnum", - "ExportMetadataTMLBatchedRequestEdocFormatEnum", - "ExportMetadataTMLRequestEdocFormatEnum", - "ExportMetadataTMLRequestExportSchemaVersionEnum", - "ExportMetadataTypeInputTypeEnum", - "FavoriteMetadataInputTypeEnum", - "FavoriteMetadataItemTypeEnum", - "FetchAnswerDataRequestDataFormatEnum", - "FetchAsyncImportTaskStatusRequestTaskStatusEnum", - "FetchLiveboardDataRequestDataFormatEnum", - "FetchLogsRequestLogTypeEnum", - "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", - "FilterRulesOperatorEnum", - "GenerateCSVRequestCalendarTypeEnum", - "GenerateCSVRequestMonthOffsetEnum", - "GenerateCSVRequestStartDayOfWeekEnum", - "GetCustomAccessTokenRequestPersistOptionEnum", - "GroupsImportListInputPrivilegesEnum", - "GroupsImportListInputTypeEnum", - "GroupsImportListInputVisibilityEnum", - "HeaderUpdateInputTypeEnum", - "ImportEPackAsyncTaskStatusTaskStatusEnum", - "ImportEPackAsyncTaskStatusImportPolicyEnum", - "ImportMetadataTMLAsyncRequestImportPolicyEnum", - "ImportMetadataTMLRequestImportPolicyEnum", - "ImportUserAccountTypeEnum", - "ImportUserAccountStatusEnum", - "ImportUserVisibilityEnum", - "InputVariableValuePrincipalTypeEnum", - "JWTMetadataObjectTypeEnum", - "MetadataInputTypeEnum", - "MetadataListItemInputTypeEnum", - "MetadataListItemInputSubtypesEnum", - "MetadataObjectTypeEnum", - "MetadataResponseTypeEnum", - "MetadataSearchResponseMetadataTypeEnum", - "MetadataSearchSortOptionsFieldNameEnum", - "MetadataSearchSortOptionsOrderEnum", - "OrgResponseStatusEnum", - "OrgResponseVisibilityEnum", - "ParameterizeMetadataRequestMetadataTypeEnum", - "ParameterizeMetadataRequestFieldTypeEnum", - "PdfOptionsPageSizeEnum", - "PdfOptionsInputPageOrientationEnum", - "PermissionInputShareModeEnum", - "PermissionsMetadataTypeInputTypeEnum", - "PrincipalsInputTypeEnum", - "PublishMetadataListItemTypeEnum", - "RegionalSettingsInputCurrencyFormatEnum", - "RegionalSettingsInputUserLocaleEnum", - "RegionalSettingsInputNumberFormatLocaleEnum", +_WebhookOrg.discriminator = void 0; +_WebhookOrg.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookOrg = _WebhookOrg; + +// models/WebhookPagination.ts +var _WebhookPagination = class _WebhookPagination { + static getAttributeTypeMap() { + return _WebhookPagination.attributeTypeMap; + } + constructor() { + } +}; +_WebhookPagination.discriminator = void 0; +_WebhookPagination.attributeTypeMap = [ + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "total_count", + "baseName": "total_count", + "type": "number", + "format": "int32" + }, + { + "name": "has_more", + "baseName": "has_more", + "type": "boolean", + "format": "" + } +]; +var WebhookPagination = _WebhookPagination; + +// models/WebhookResponse.ts +var _WebhookResponse = class _WebhookResponse { + static getAttributeTypeMap() { + return _WebhookResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookResponse.discriminator = void 0; +_WebhookResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "WebhookOrg", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "WebhookAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "WebhookSignatureVerification", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "created_by", + "baseName": "created_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "last_modified_by", + "baseName": "last_modified_by", + "type": "WebhookUser", + "format": "" + } +]; +var WebhookResponse = _WebhookResponse; + +// models/WebhookSearchResponse.ts +var _WebhookSearchResponse = class _WebhookSearchResponse { + static getAttributeTypeMap() { + return _WebhookSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSearchResponse.discriminator = void 0; +_WebhookSearchResponse.attributeTypeMap = [ + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array", + "format": "" + }, + { + "name": "pagination", + "baseName": "pagination", + "type": "WebhookPagination", + "format": "" + } +]; +var WebhookSearchResponse = _WebhookSearchResponse; + +// models/WebhookSignatureVerification.ts +var _WebhookSignatureVerification = class _WebhookSignatureVerification { + static getAttributeTypeMap() { + return _WebhookSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerification.discriminator = void 0; +_WebhookSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerification = _WebhookSignatureVerification; + +// models/WebhookSignatureVerificationInput.ts +var _WebhookSignatureVerificationInput = class _WebhookSignatureVerificationInput { + static getAttributeTypeMap() { + return _WebhookSignatureVerificationInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerificationInput.discriminator = void 0; +_WebhookSignatureVerificationInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationInputTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationInputAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerificationInput = _WebhookSignatureVerificationInput; + +// models/WebhookSortOptionsInput.ts +var _WebhookSortOptionsInput = class _WebhookSortOptionsInput { + static getAttributeTypeMap() { + return _WebhookSortOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSortOptionsInput.discriminator = void 0; +_WebhookSortOptionsInput.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "WebhookSortOptionsInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "WebhookSortOptionsInputOrderEnum", + "format": "" + } +]; +var WebhookSortOptionsInput = _WebhookSortOptionsInput; + +// models/WebhookUser.ts +var _WebhookUser = class _WebhookUser { + static getAttributeTypeMap() { + return _WebhookUser.attributeTypeMap; + } + constructor() { + } +}; +_WebhookUser.discriminator = void 0; +_WebhookUser.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookUser = _WebhookUser; + +// middleware.ts +var PromiseMiddlewareWrapper = class { + constructor(middleware) { + this.middleware = middleware; + } + pre(context) { + return from(this.middleware.pre(context)); + } + post(context) { + return from(this.middleware.post(context)); + } +}; + +// servers.ts +var ServerConfiguration = class { + constructor(url, variableConfiguration) { + this.url = url; + this.variableConfiguration = variableConfiguration; + } + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + setVariables(variableConfiguration) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + getConfiguration() { + return this.variableConfiguration; + } + getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}", "g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl; + } + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + makeRequestContext(endpoint, httpMethod) { + return new RequestContext2(this.getUrl() + endpoint, httpMethod); + } +}; +var server1 = new ServerConfiguration("{base-url}", { "base-url": "https://localhost:443" }); +var servers = [server1]; + +// configuration.ts +function createConfiguration(conf = {}) { + const configuration = { + baseServer: conf.baseServer !== void 0 ? conf.baseServer : server1, + httpApi: conf.httpApi || new IsomorphicFetchHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + (m) => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} + +// apis/exception.ts +var ApiException = class extends Error { + constructor(code, message, body, headers) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + JSON.stringify(headers)); + this.code = code; + this.body = body; + this.headers = headers; + } +}; + +// apis/baseapi.ts +var BaseAPIRequestFactory = class { + constructor(configuration) { + this.configuration = configuration; + } +}; +var RequiredError = class extends Error { + constructor(api, method, field) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + this.api = api; + this.method = method; + this.field = field; + this.name = "RequiredError"; + } +}; + +// models/ObjectSerializer.ts +var primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" +]; +var supportedMediaTypes = { + "application/json": Infinity, + "application/octet-stream": 0, + "application/x-www-form-urlencoded": 0 +}; +var enumsMap = /* @__PURE__ */ new Set([ + "ActionConfigInputPositionEnum", + "ActionConfigInputCreatePositionEnum", + "AssociateMetadataInputTypeEnum", + "AssociateMetadataInputCreateTypeEnum", + "AuthorMetadataTypeInputTypeEnum", + "ColumnSecurityRuleGroupOperationOperationEnum", + "ConnectionConfigurationResponsePolicyProcessesEnum", + "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "ConnectionConfigurationResponsePolicyTypeEnum", + "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "ContextPayloadV2InputTypeEnum", + "CopyObjectRequestTypeEnum", + "CreateAgentConversationRequestMetadataContextTypeEnum", + "CreateCalendarRequestCreationMethodEnum", + "CreateCalendarRequestCalendarTypeEnum", + "CreateCalendarRequestMonthOffsetEnum", + "CreateCalendarRequestStartDayOfWeekEnum", + "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "CreateConnectionConfigurationRequestPolicyTypeEnum", + "CreateConnectionConfigurationRequestPolicyProcessesEnum", + "CreateConnectionRequestDataWarehouseTypeEnum", + "CreateConnectionResponseDataWarehouseTypeEnum", + "CreateRoleRequestPrivilegesEnum", + "CreateScheduleRequestMetadataTypeEnum", + "CreateScheduleRequestFileFormatEnum", + "CreateScheduleRequestTimeZoneEnum", + "CreateScheduleRequestPdfOptionsPageSizeEnum", + "CreateUserGroupRequestPrivilegesEnum", + "CreateUserGroupRequestTypeEnum", + "CreateUserGroupRequestVisibilityEnum", + "CreateUserRequestAccountTypeEnum", + "CreateUserRequestAccountStatusEnum", + "CreateUserRequestVisibilityEnum", + "CreateUserRequestPreferredLocaleEnum", + "CreateVariableRequestTypeEnum", + "CreateVariableRequestDataTypeEnum", + "CreateWebhookConfigurationRequestEventsEnum", + "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "CustomActionMetadataTypeInputTypeEnum", + "DeleteMetadataTypeInputTypeEnum", + "DeployCommitRequestDeployTypeEnum", + "DeployCommitRequestDeployPolicyEnum", + "EventChannelConfigEventTypeEnum", + "EventChannelConfigChannelsEnum", + "EventChannelConfigInputEventTypeEnum", + "EventChannelConfigInputChannelsEnum", + "ExcludeMetadataListItemInputTypeEnum", + "ExportAnswerReportRequestFileFormatEnum", + "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "ExportLiveboardReportRequestFileFormatEnum", + "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "ExportMetadataTMLRequestEdocFormatEnum", + "ExportMetadataTMLRequestExportSchemaVersionEnum", + "ExportMetadataTypeInputTypeEnum", + "FavoriteMetadataInputTypeEnum", + "FavoriteMetadataItemTypeEnum", + "FetchAnswerDataRequestDataFormatEnum", + "FetchAsyncImportTaskStatusRequestTaskStatusEnum", + "FetchLiveboardDataRequestDataFormatEnum", + "FetchLogsRequestLogTypeEnum", + "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "FilterRulesOperatorEnum", + "GenerateCSVRequestCalendarTypeEnum", + "GenerateCSVRequestMonthOffsetEnum", + "GenerateCSVRequestStartDayOfWeekEnum", + "GetCustomAccessTokenRequestPersistOptionEnum", + "GroupsImportListInputPrivilegesEnum", + "GroupsImportListInputTypeEnum", + "GroupsImportListInputVisibilityEnum", + "HeaderUpdateInputTypeEnum", + "ImportEPackAsyncTaskStatusTaskStatusEnum", + "ImportEPackAsyncTaskStatusImportPolicyEnum", + "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "ImportMetadataTMLRequestImportPolicyEnum", + "ImportUserAccountTypeEnum", + "ImportUserAccountStatusEnum", + "ImportUserVisibilityEnum", + "JWTMetadataObjectTypeEnum", + "MetadataInputTypeEnum", + "MetadataListItemInputTypeEnum", + "MetadataListItemInputSubtypesEnum", + "MetadataObjectTypeEnum", + "MetadataResponseTypeEnum", + "MetadataSearchResponseMetadataTypeEnum", + "MetadataSearchSortOptionsFieldNameEnum", + "MetadataSearchSortOptionsOrderEnum", + "OrgChannelConfigInputOperationEnum", + "OrgChannelConfigInputResetEventsEnum", + "OrgPreferenceSearchCriteriaInputEventTypesEnum", + "OrgResponseStatusEnum", + "OrgResponseVisibilityEnum", + "ParameterizeMetadataRequestMetadataTypeEnum", + "ParameterizeMetadataRequestFieldTypeEnum", + "PdfOptionsPageSizeEnum", + "PdfOptionsInputPageOrientationEnum", + "PermissionInputShareModeEnum", + "PermissionsMetadataTypeInputTypeEnum", + "PrincipalsInputTypeEnum", + "PublishMetadataListItemTypeEnum", + "RegionalSettingsInputCurrencyFormatEnum", + "RegionalSettingsInputUserLocaleEnum", + "RegionalSettingsInputNumberFormatLocaleEnum", "RegionalSettingsInputDateFormatLocaleEnum", "ResponseMessageMessageTypeEnum", "ResponseMessageVisualizationTypeEnum", @@ -13657,6 +15568,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "SearchCalendarsRequestSortOptionsFieldNameEnum", "SearchCalendarsRequestSortOptionsOrderEnum", "SearchCommitsRequestMetadataTypeEnum", + "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", "SearchConnectionRequestDataWarehouseTypesEnum", "SearchConnectionRequestDataWarehouseObjectTypeEnum", "SearchConnectionRequestAuthenticationTypeEnum", @@ -13687,6 +15599,9 @@ var enumsMap = /* @__PURE__ */ new Set([ "SearchUsersRequestSortOptionsFieldNameEnum", "SearchUsersRequestSortOptionsOrderEnum", "SearchVariablesRequestOutputFormatEnum", + "SearchWebhookConfigurationsRequestEventTypeEnum", + "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", "ShareMetadataRequestMetadataTypeEnum", "ShareMetadataTypeInputTypeEnum", "SharePermissionsInputShareModeEnum", @@ -13726,8 +15641,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "UpdateUserRequestAccountTypeEnum", "UpdateUserRequestOperationEnum", "UpdateUserRequestPreferredLocaleEnum", - "UpdateVariableRequestOperationEnum", - "UpdateVariableValuesRequestOperationEnum", + "UpdateWebhookConfigurationRequestEventsEnum", "UserVisibilityEnum", "UserAccountTypeEnum", "UserAccountStatusEnum", @@ -13736,11 +15650,22 @@ var enumsMap = /* @__PURE__ */ new Set([ "UserGroupResponseTypeEnum", "UserGroupResponseVisibilityEnum", "UserObjectTypeEnum", + "ValueScopeInputPrincipalTypeEnum", "VariableVariableTypeEnum", "VariableDetailInputTypeEnum", - "VariableValuePrincipalTypeEnum" + "VariableUpdateAssignmentInputOperationEnum", + "VariableUpdateScopeInputPrincipalTypeEnum", + "VariableValuePrincipalTypeEnum", + "WebhookResponseEventsEnum", + "WebhookSignatureVerificationTypeEnum", + "WebhookSignatureVerificationAlgorithmEnum", + "WebhookSignatureVerificationInputTypeEnum", + "WebhookSignatureVerificationInputAlgorithmEnum", + "WebhookSortOptionsInputFieldNameEnum", + "WebhookSortOptionsInputOrderEnum" ]); var typeMap = { + "AIContext": AIContext, "APIKey": APIKey, "APIKeyInput": APIKeyInput, "AccessToken": AccessToken, @@ -13751,7 +15676,9 @@ var typeMap = { "ActionDetailsInput": ActionDetailsInput, "ActionDetailsInputCreate": ActionDetailsInputCreate, "ActivateUserRequest": ActivateUserRequest, + "AgentConversation": AgentConversation, "AnswerContent": AnswerContent, + "AnswerContextInput": AnswerContextInput, "AnswerDataResponse": AnswerDataResponse, "AssignChangeAuthorRequest": AssignChangeAuthorRequest, "AssignTagRequest": AssignTagRequest, @@ -13783,12 +15710,19 @@ var typeMap = { "CommitHistoryResponse": CommitHistoryResponse, "CommitResponse": CommitResponse, "CommiterType": CommiterType, + "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, "ConnectionConfigurationResponse": ConnectionConfigurationResponse, "ConnectionConfigurationSearchRequest": ConnectionConfigurationSearchRequest, "ConnectionInput": ConnectionInput, + "ContextPayloadV2Input": ContextPayloadV2Input, "Conversation": Conversation, + "ConversationSettingsInput": ConversationSettingsInput, "ConvertWorksheetToModelRequest": ConvertWorksheetToModelRequest, "CopyObjectRequest": CopyObjectRequest, + "CreateAgentConversationRequest": CreateAgentConversationRequest, + "CreateAgentConversationRequestConversationSettings": CreateAgentConversationRequestConversationSettings, + "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, "CreateCalendarRequest": CreateCalendarRequest, "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, "CreateConfigRequest": CreateConfigRequest, @@ -13813,9 +15747,14 @@ var typeMap = { "CreateUserGroupRequest": CreateUserGroupRequest, "CreateUserRequest": CreateUserRequest, "CreateVariableRequest": CreateVariableRequest, + "CreateWebhookConfigurationRequest": CreateWebhookConfigurationRequest, + "CreateWebhookConfigurationRequestAuthentication": CreateWebhookConfigurationRequestAuthentication, + "CreateWebhookConfigurationRequestSignatureVerification": CreateWebhookConfigurationRequestSignatureVerification, "CronExpression": CronExpression, "CronExpressionInput": CronExpressionInput, "CustomActionMetadataTypeInput": CustomActionMetadataTypeInput, + "DataSource": DataSource, + "DataSourceContextInput": DataSourceContextInput, "DataWarehouseObjectInput": DataWarehouseObjectInput, "DataWarehouseObjects": DataWarehouseObjects, "Database": Database, @@ -13831,12 +15770,19 @@ var typeMap = { "DeleteMetadataRequest": DeleteMetadataRequest, "DeleteMetadataTypeInput": DeleteMetadataTypeInput, "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, "DeployCommitRequest": DeployCommitRequest, "DeployResponse": DeployResponse, + "EntityHeader": EntityHeader, "ErrorResponse": ErrorResponse, + "EurekaDataSourceSuggestionResponse": EurekaDataSourceSuggestionResponse, "EurekaDecomposeQueryResponse": EurekaDecomposeQueryResponse, + "EurekaGetRelevantQuestionsResponse": EurekaGetRelevantQuestionsResponse, "EurekaLLMDecomposeQueryResponse": EurekaLLMDecomposeQueryResponse, "EurekaLLMSuggestedQuery": EurekaLLMSuggestedQuery, + "EurekaRelevantQuestion": EurekaRelevantQuestion, + "EventChannelConfig": EventChannelConfig, + "EventChannelConfigInput": EventChannelConfigInput, "ExcludeMetadataListItemInput": ExcludeMetadataListItemInput, "ExportAnswerReportRequest": ExportAnswerReportRequest, "ExportAnswerReportRequestRegionalSettings": ExportAnswerReportRequestRegionalSettings, @@ -13870,9 +15816,13 @@ var typeMap = { "GenericInfo": GenericInfo, "GetAsyncImportStatusResponse": GetAsyncImportStatusResponse, "GetCustomAccessTokenRequest": GetCustomAccessTokenRequest, + "GetDataSourceSuggestionsRequest": GetDataSourceSuggestionsRequest, "GetFullAccessTokenRequest": GetFullAccessTokenRequest, "GetFullAccessTokenRequestUserParameters": GetFullAccessTokenRequestUserParameters, "GetObjectAccessTokenRequest": GetObjectAccessTokenRequest, + "GetRelevantQuestionsRequest": GetRelevantQuestionsRequest, + "GetRelevantQuestionsRequestAiContext": GetRelevantQuestionsRequestAiContext, + "GetRelevantQuestionsRequestMetadataContext": GetRelevantQuestionsRequestMetadataContext, "GetTokenResponse": GetTokenResponse, "GroupObject": GroupObject, "GroupsImportListInput": GroupsImportListInput, @@ -13888,11 +15838,11 @@ var typeMap = { "ImportUsersRequest": ImportUsersRequest, "ImportUsersResponse": ImportUsersResponse, "InputEurekaNLSRequest": InputEurekaNLSRequest, - "InputVariableValue": InputVariableValue, "JWTMetadataObject": JWTMetadataObject, "JWTParameter": JWTParameter, "JWTUserOptions": JWTUserOptions, "JWTUserOptionsFull": JWTUserOptionsFull, + "LBContextInput": LBContextInput, "LiveboardContent": LiveboardContent, "LiveboardDataResponse": LiveboardDataResponse, "LiveboardOptions": LiveboardOptions, @@ -13900,6 +15850,7 @@ var typeMap = { "LogResponse": LogResponse, "LoginRequest": LoginRequest, "MetadataAssociationItem": MetadataAssociationItem, + "MetadataContext": MetadataContext, "MetadataInput": MetadataInput, "MetadataListItemInput": MetadataListItemInput, "MetadataObject": MetadataObject, @@ -13909,7 +15860,11 @@ var typeMap = { "ModelTableList": ModelTableList, "ObjectIDAndName": ObjectIDAndName, "Org": Org, + "OrgChannelConfigInput": OrgChannelConfigInput, + "OrgChannelConfigResponse": OrgChannelConfigResponse, + "OrgDetails": OrgDetails, "OrgInfo": OrgInfo, + "OrgPreferenceSearchCriteriaInput": OrgPreferenceSearchCriteriaInput, "OrgResponse": OrgResponse, "OrgType": OrgType, "ParameterValues": ParameterValues, @@ -13971,6 +15926,7 @@ var typeMap = { "SearchCalendarsRequest": SearchCalendarsRequest, "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, "SearchCommitsRequest": SearchCommitsRequest, + "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, "SearchConfigRequest": SearchConfigRequest, "SearchConnectionRequest": SearchConnectionRequest, "SearchConnectionRequestSortOptions": SearchConnectionRequestSortOptions, @@ -13995,6 +15951,11 @@ var typeMap = { "SearchUsersRequest": SearchUsersRequest, "SearchUsersRequestSortOptions": SearchUsersRequestSortOptions, "SearchVariablesRequest": SearchVariablesRequest, + "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, + "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, + "SendAgentMessageRequest": SendAgentMessageRequest, + "SendAgentMessageResponse": SendAgentMessageResponse, + "SendAgentMessageStreamingRequest": SendAgentMessageStreamingRequest, "SendMessageRequest": SendMessageRequest, "ShareMetadataRequest": ShareMetadataRequest, "ShareMetadataTypeInput": ShareMetadataTypeInput, @@ -14048,6 +16009,7 @@ var typeMap = { "UpdateUserRequest": UpdateUserRequest, "UpdateVariableRequest": UpdateVariableRequest, "UpdateVariableValuesRequest": UpdateVariableValuesRequest, + "UpdateWebhookConfigurationRequest": UpdateWebhookConfigurationRequest, "User": User, "UserGroup": UserGroup, "UserGroupResponse": UserGroupResponse, @@ -14057,10 +16019,30 @@ var typeMap = { "UserPrincipal": UserPrincipal, "ValidateMergeRequest": ValidateMergeRequest, "ValidateTokenRequest": ValidateTokenRequest, + "ValueScopeInput": ValueScopeInput, "Variable": Variable, "VariableDetailInput": VariableDetailInput, + "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, + "VariableUpdateScopeInput": VariableUpdateScopeInput, "VariableValue": VariableValue, - "VariableValueInput": VariableValueInput + "WebhookAuthApiKey": WebhookAuthApiKey, + "WebhookAuthApiKeyInput": WebhookAuthApiKeyInput, + "WebhookAuthBasicAuth": WebhookAuthBasicAuth, + "WebhookAuthBasicAuthInput": WebhookAuthBasicAuthInput, + "WebhookAuthOAuth2": WebhookAuthOAuth2, + "WebhookAuthOAuth2Input": WebhookAuthOAuth2Input, + "WebhookAuthentication": WebhookAuthentication, + "WebhookAuthenticationInput": WebhookAuthenticationInput, + "WebhookDeleteFailure": WebhookDeleteFailure, + "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookOrg": WebhookOrg, + "WebhookPagination": WebhookPagination, + "WebhookResponse": WebhookResponse, + "WebhookSearchResponse": WebhookSearchResponse, + "WebhookSignatureVerification": WebhookSignatureVerification, + "WebhookSignatureVerificationInput": WebhookSignatureVerificationInput, + "WebhookSortOptionsInput": WebhookSortOptionsInput, + "WebhookUser": WebhookUser }; var ObjectSerializer = class _ObjectSerializer { static findCorrectType(data, expectedType) { @@ -14261,6 +16243,42 @@ function canConsumeForm(contentTypes) { // apis/AIApi.ts var AIApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("AIApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -14275,7 +16293,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14298,26 +16316,26 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.7.0.cl or later - * @param queryGetDecomposedQueryRequest + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest */ - queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; - if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { - throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("AIApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); } - const localVarPath = "/api/rest/2.0/ai/analytical-questions"; + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -14334,30 +16352,26 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. - * @param sendMessageRequest + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest */ - sendMessage(conversationIdentifier, sendMessageRequest, _options) { + getRelevantQuestions(getRelevantQuestionsRequest, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; - if (conversationIdentifier === null || conversationIdentifier === void 0) { - throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); - } - if (sendMessageRequest === null || sendMessageRequest === void 0) { - throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("AIApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); } - const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -14374,26 +16388,26 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * @param singleAnswerRequest + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest */ - singleAnswer(singleAnswerRequest, _options) { + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; - if (singleAnswerRequest === null || singleAnswerRequest === void 0) { - throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { + throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); } - const localVarPath = "/api/rest/2.0/ai/answer/create"; + const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -14409,51 +16423,224 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } -}; -var AIApiResponseProcessor = class { /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createConversation - * @throws ApiException if the response code was not in [200, 299] + * 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) + * @param sendAgentMessageRequest */ - createConversation(response) { + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "conversationIdentifier"); } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "sendAgentMessageRequest"); } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); + } + if (sendMessageRequest === null || sendMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (singleAnswerRequest === null || singleAnswerRequest === void 0) { + throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + } + const localVarPath = "/api/rest/2.0/ai/answer/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var AIApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", "" ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "Conversation", @@ -14461,6 +16648,144 @@ var AIApiResponseProcessor = class { ); return body; } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } @@ -14517,6 +16842,112 @@ var AIApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -14637,7 +17068,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -14660,7 +17091,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -14674,7 +17105,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -14687,7 +17118,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14718,7 +17149,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14749,7 +17180,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14780,7 +17211,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14812,7 +17243,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -14839,7 +17270,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14875,7 +17306,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15451,7 +17882,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15487,7 +17918,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15523,7 +17954,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15563,7 +17994,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15839,7 +18270,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15875,7 +18306,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15911,7 +18342,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -15938,7 +18369,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -15965,7 +18396,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -15992,7 +18423,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16028,7 +18459,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16051,7 +18482,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -16068,7 +18499,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16574,7 +19005,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16610,7 +19041,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -16637,7 +19068,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16677,7 +19108,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16953,7 +19384,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16989,7 +19420,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -17016,7 +19447,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17052,7 +19483,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17092,7 +19523,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17441,7 +19872,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17517,7 +19948,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17557,25 +19988,28 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { throw new RequiredError("DBTApi", "dbtGenerateTml", "dbtConnectionIdentifier"); } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "modelTables"); + } if (importWorksheets === null || importWorksheets === void 0) { throw new RequiredError("DBTApi", "dbtGenerateTml", "importWorksheets"); } const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17631,7 +20065,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -17658,7 +20092,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -17695,7 +20129,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -18140,7 +20574,7 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18176,7 +20610,7 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18212,7 +20646,7 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18437,7 +20871,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18473,7 +20907,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18500,7 +20934,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18536,7 +20970,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18572,7 +21006,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18604,7 +21038,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18951,7 +21385,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18987,7 +21421,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -19014,7 +21448,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19050,7 +21484,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19090,7 +21524,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19427,7 +21861,7 @@ var LogApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19530,7 +21964,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19553,7 +21987,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -19566,7 +22000,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19602,7 +22036,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19638,7 +22072,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19674,7 +22108,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19710,7 +22144,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19746,7 +22180,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19782,7 +22216,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19818,7 +22252,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19854,7 +22288,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19890,7 +22324,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19926,7 +22360,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19962,7 +22396,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19998,7 +22432,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20034,7 +22468,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20974,7 +23408,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21010,7 +23444,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21037,7 +23471,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21077,7 +23511,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21353,7 +23787,7 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21389,7 +23823,7 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21545,7 +23979,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21581,7 +24015,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21608,7 +24042,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21648,7 +24082,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21929,7 +24363,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21965,7 +24399,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21992,7 +24426,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22032,7 +24466,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22308,7 +24742,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22344,7 +24778,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22380,7 +24814,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22416,7 +24850,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22452,7 +24886,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22488,7 +24922,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22524,7 +24958,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22560,7 +24994,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23051,6 +25485,42 @@ var SecurityApiResponseProcessor = class { // apis/SystemApi.ts var SystemApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -23061,7 +25531,7 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23084,7 +25554,7 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23107,7 +25577,43 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23134,7 +25640,7 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23158,6 +25664,62 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { } }; var SystemApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23341,6 +25903,67 @@ var SystemApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23415,7 +26038,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23451,7 +26074,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23487,7 +26110,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23514,7 +26137,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23550,7 +26173,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23590,7 +26213,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23978,7 +26601,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24014,7 +26637,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24050,7 +26673,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24086,7 +26709,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24122,7 +26745,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24144,6 +26767,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -24158,7 +26817,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24194,7 +26853,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24217,7 +26876,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -24230,7 +26889,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24252,6 +26911,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -24266,7 +26961,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24302,7 +26997,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24338,7 +27033,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24374,7 +27069,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24410,7 +27105,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24446,7 +27141,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24482,7 +27177,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24518,7 +27213,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24554,7 +27249,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24590,7 +27285,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24626,7 +27321,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24662,7 +27357,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24698,7 +27393,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24721,7 +27416,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -24734,7 +27429,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24756,6 +27451,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -24782,7 +27513,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -24858,7 +27589,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -24898,25 +27629,28 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "dbtConnectionIdentifier"); } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "modelTables"); + } if (importWorksheets === null || importWorksheets === void 0) { throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "importWorksheets"); } const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -24972,7 +27706,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24999,7 +27733,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25035,7 +27769,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25062,7 +27796,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25098,7 +27832,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25134,7 +27868,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25170,7 +27904,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25197,7 +27931,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25224,7 +27958,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25251,7 +27985,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25278,7 +28012,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25314,7 +28048,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25341,7 +28075,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25377,7 +28111,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25404,7 +28138,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25431,7 +28165,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25458,7 +28192,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25485,7 +28219,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25499,7 +28233,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -25512,7 +28246,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25539,7 +28309,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25575,7 +28345,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25602,7 +28372,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25638,7 +28408,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25674,7 +28444,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25710,7 +28480,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25746,7 +28516,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25782,7 +28552,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25818,7 +28588,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25854,7 +28624,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25890,7 +28660,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25917,7 +28687,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25953,7 +28723,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25989,7 +28759,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26025,7 +28795,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26061,7 +28831,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26097,7 +28867,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26133,7 +28903,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26165,7 +28935,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26188,7 +28958,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26202,7 +28972,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -26215,7 +28985,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26232,6 +29002,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -26246,7 +29052,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26277,7 +29083,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26294,6 +29100,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -26304,7 +29146,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26327,7 +29169,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26350,7 +29192,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26377,7 +29219,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26413,7 +29255,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26449,7 +29291,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26485,7 +29327,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26521,7 +29363,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26553,7 +29395,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26580,7 +29422,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26616,7 +29458,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26652,7 +29494,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26688,7 +29530,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26728,7 +29570,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26764,7 +29606,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26800,7 +29642,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26836,7 +29678,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26858,6 +29700,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -26872,7 +29750,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26908,7 +29786,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26944,7 +29822,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26980,7 +29858,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27016,7 +29894,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27052,7 +29930,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27088,7 +29966,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27124,7 +30002,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27160,7 +30038,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27196,7 +30074,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27232,7 +30110,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27268,7 +30146,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27291,7 +30169,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -27304,7 +30182,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27326,6 +30204,118 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "conversationIdentifier"); + } + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -27344,7 +30334,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27380,7 +30370,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27416,7 +30406,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/answer/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27452,7 +30442,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27488,7 +30478,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27524,7 +30514,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27564,7 +30554,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27600,7 +30590,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27636,7 +30626,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27672,7 +30662,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27712,7 +30702,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27735,7 +30725,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -27752,7 +30742,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27792,7 +30782,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27838,7 +30828,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -27916,7 +30906,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27952,7 +30942,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27988,7 +30978,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28028,7 +31018,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28068,7 +31058,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28108,7 +31098,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28144,7 +31134,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28184,7 +31174,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28224,7 +31214,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28264,7 +31254,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28287,7 +31277,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param updateVariableRequest */ @@ -28304,7 +31294,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28327,7 +31317,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -28337,10 +31327,10 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { throw new RequiredError("ThoughtSpotRestApi", "updateVariableValues", "updateVariableValuesRequest"); } - const localVarPath = "/api/rest/2.0/template/variables/update"; + const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28362,6 +31352,46 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -28372,7 +31402,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -28399,7 +31429,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28435,7 +31465,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28749,6 +31779,62 @@ var ThoughtSpotRestApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -28802,7 +31888,662 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", "" ); return body; @@ -28814,16 +32555,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to convertWorksheetToModel + * @params response Response returned by the server for a request to createRole * @throws ApiException if the response code was not in [200, 299] */ - convertWorksheetToModel(response) { + createRole(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseWorksheetToModelConversion", + "RoleResponse", "" ); return body; @@ -28834,7 +32575,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -28858,12 +32599,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseWorksheetToModelConversion", + "RoleResponse", "" ); return body; @@ -28875,16 +32616,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to copyObject + * @params response Response returned by the server for a request to createSchedule * @throws ApiException if the response code was not in [200, 299] */ - copyObject(response) { + createSchedule(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCopyObject", + "ResponseSchedule", "" ); return body; @@ -28913,14 +32654,6 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("404", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); - } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -28932,7 +32665,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCopyObject", + "ResponseSchedule", "" ); return body; @@ -28944,16 +32677,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createCalendar + * @params response Response returned by the server for a request to createTag * @throws ApiException if the response code was not in [200, 299] */ - createCalendar(response) { + createTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CalendarResponse", + "Tag", "" ); return body; @@ -28993,7 +32726,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CalendarResponse", + "Tag", "" ); return body; @@ -29005,16 +32738,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createConfig + * @params response Response returned by the server for a request to createUser * @throws ApiException if the response code was not in [200, 299] */ - createConfig(response) { + createUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "User", "" ); return body; @@ -29054,7 +32787,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "User", "" ); return body; @@ -29066,16 +32799,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createConnection + * @params response Response returned by the server for a request to createUserGroup * @throws ApiException if the response code was not in [200, 299] */ - createConnection(response) { + createUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateConnectionResponse", + "UserGroupResponse", "" ); return body; @@ -29115,7 +32848,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateConnectionResponse", + "UserGroupResponse", "" ); return body; @@ -29127,16 +32860,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createConnectionConfiguration + * @params response Response returned by the server for a request to createVariable * @throws ApiException if the response code was not in [200, 299] */ - createConnectionConfiguration(response) { + createVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ConnectionConfigurationResponse", + "Variable", "" ); return body; @@ -29176,60 +32909,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ConnectionConfigurationResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createConversation - * @throws ApiException if the response code was not in [200, 299] - */ - createConversation(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", + "Variable", "" ); return body; @@ -29241,16 +32921,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createCustomAction + * @params response Response returned by the server for a request to createWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - createCustomAction(response) { + createWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCustomAction", + "WebhookResponse", "" ); return body; @@ -29290,7 +32970,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCustomAction", + "WebhookResponse", "" ); return body; @@ -29302,69 +32982,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createEmailCustomization - * @throws ApiException if the response code was not in [200, 299] - */ - createEmailCustomization(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateEmailCustomizationResponse", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateEmailCustomizationResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createOrg + * @params response Response returned by the server for a request to dbtConnection * @throws ApiException if the response code was not in [200, 299] */ - createOrg(response) { + dbtConnection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "OrgResponse", + "any", "" ); return body; @@ -29404,68 +33031,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "OrgResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createRole - * @throws ApiException if the response code was not in [200, 299] - */ - createRole(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "RoleResponse", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "RoleResponse", + "any", "" ); return body; @@ -29477,16 +33043,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createSchedule + * @params response Response returned by the server for a request to dbtGenerateSyncTml * @throws ApiException if the response code was not in [200, 299] */ - createSchedule(response) { + dbtGenerateSyncTml(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseSchedule", + "any", "" ); return body; @@ -29526,7 +33092,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseSchedule", + "any", "" ); return body; @@ -29538,16 +33104,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createTag + * @params response Response returned by the server for a request to dbtGenerateTml * @throws ApiException if the response code was not in [200, 299] */ - createTag(response) { + dbtGenerateTml(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Tag", + "any", "" ); return body; @@ -29587,7 +33153,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Tag", + "any", "" ); return body; @@ -29599,16 +33165,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createUser + * @params response Response returned by the server for a request to dbtSearch * @throws ApiException if the response code was not in [200, 299] */ - createUser(response) { + dbtSearch(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "Array", "" ); return body; @@ -29648,7 +33214,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "Array", "" ); return body; @@ -29660,16 +33226,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createUserGroup + * @params response Response returned by the server for a request to deactivateUser * @throws ApiException if the response code was not in [200, 299] */ - createUserGroup(response) { + deactivateUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "UserGroupResponse", + "ResponseActivationURL", "" ); return body; @@ -29709,7 +33275,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "UserGroupResponse", + "ResponseActivationURL", "" ); return body; @@ -29721,19 +33287,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createVariable + * @params response Response returned by the server for a request to deleteCalendar * @throws ApiException if the response code was not in [200, 299] */ - createVariable(response) { + deleteCalendar(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Variable", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29770,7 +33331,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Variable", + "void", "" ); return body; @@ -29782,19 +33343,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtConnection + * @params response Response returned by the server for a request to deleteConfig * @throws ApiException if the response code was not in [200, 299] */ - dbtConnection(response) { + deleteConfig(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "any", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29831,7 +33387,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "void", "" ); return body; @@ -29843,19 +33399,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @params response Response returned by the server for a request to deleteConnection * @throws ApiException if the response code was not in [200, 299] */ - dbtGenerateSyncTml(response) { + deleteConnection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "any", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29892,7 +33443,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "void", "" ); return body; @@ -29904,20 +33455,71 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtGenerateTml + * @params response Response returned by the server for a request to deleteConnectionConfiguration * @throws ApiException if the response code was not in [200, 299] */ - dbtGenerateTml(response) { + deleteConnectionConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -29953,7 +33555,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "void", "" ); return body; @@ -29965,20 +33567,71 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtSearch + * @params response Response returned by the server for a request to deleteCustomAction * @throws ApiException if the response code was not in [200, 299] */ - dbtSearch(response) { + deleteCustomAction(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -30014,7 +33667,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -30026,20 +33679,63 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deactivateUser + * @params response Response returned by the server for a request to deleteEmailCustomization * @throws ApiException if the response code was not in [200, 299] */ - deactivateUser(response) { + deleteEmailCustomization(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseActivationURL", + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -30075,7 +33771,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseActivationURL", + "void", "" ); return body; @@ -30087,10 +33783,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteCalendar + * @params response Response returned by the server for a request to deleteOrg * @throws ApiException if the response code was not in [200, 299] */ - deleteCalendar(response) { + deleteOrg(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30143,10 +33839,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConfig + * @params response Response returned by the server for a request to deleteOrgEmailCustomization * @throws ApiException if the response code was not in [200, 299] */ - deleteConfig(response) { + deleteOrgEmailCustomization(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30174,7 +33870,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30199,10 +33895,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConnection + * @params response Response returned by the server for a request to deleteRole * @throws ApiException if the response code was not in [200, 299] */ - deleteConnection(response) { + deleteRole(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30238,7 +33934,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( @@ -30255,10 +33951,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @params response Response returned by the server for a request to deleteSchedule * @throws ApiException if the response code was not in [200, 299] */ - deleteConnectionConfiguration(response) { + deleteSchedule(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30311,10 +34007,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConnectionV2 + * @params response Response returned by the server for a request to deleteTag * @throws ApiException if the response code was not in [200, 299] */ - deleteConnectionV2(response) { + deleteTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30367,10 +34063,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteCustomAction + * @params response Response returned by the server for a request to deleteUser * @throws ApiException if the response code was not in [200, 299] */ - deleteCustomAction(response) { + deleteUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30423,10 +34119,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteDbtConnection + * @params response Response returned by the server for a request to deleteUserGroup * @throws ApiException if the response code was not in [200, 299] */ - deleteDbtConnection(response) { + deleteUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30479,10 +34175,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteEmailCustomization + * @params response Response returned by the server for a request to deleteVariable * @throws ApiException if the response code was not in [200, 299] */ - deleteEmailCustomization(response) { + deleteVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30496,7 +34192,7 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", @@ -30504,6 +34200,14 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -30527,14 +34231,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteMetadata + * @params response Response returned by the server for a request to deleteWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - deleteMetadata(response) { + deleteWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30571,7 +34280,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "WebhookDeleteResponse", "" ); return body; @@ -30583,14 +34292,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteOrg + * @params response Response returned by the server for a request to deployCommit * @throws ApiException if the response code was not in [200, 299] */ - deleteOrg(response) { + deployCommit(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30627,7 +34341,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -30639,20 +34353,21 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges * @throws ApiException if the response code was not in [200, 299] */ - deleteOrgEmailCustomization(response) { + downloadConnectionMetadataChanges(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30660,7 +34375,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30668,23 +34383,23 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", - "" + "HttpFile", + "binary" ); return body; } @@ -30695,20 +34410,21 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteRole + * @params response Response returned by the server for a request to exportAnswerReport * @throws ApiException if the response code was not in [200, 299] */ - deleteRole(response) { + exportAnswerReport(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30716,7 +34432,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30724,7 +34440,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -30732,15 +34448,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); - throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", - "" + "HttpFile", + "binary" ); return body; } @@ -30751,20 +34467,21 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteSchedule + * @params response Response returned by the server for a request to exportLiveboardReport * @throws ApiException if the response code was not in [200, 299] */ - deleteSchedule(response) { + exportLiveboardReport(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30772,7 +34489,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30780,7 +34497,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -30788,15 +34505,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", - "" + "HttpFile", + "binary" ); return body; } @@ -30807,14 +34524,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteTag + * @params response Response returned by the server for a request to exportMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - deleteTag(response) { + exportMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30851,7 +34573,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -30863,14 +34585,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteUser + * @params response Response returned by the server for a request to exportMetadataTMLBatched * @throws ApiException if the response code was not in [200, 299] */ - deleteUser(response) { + exportMetadataTMLBatched(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30907,7 +34634,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "any", "" ); return body; @@ -30919,14 +34646,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteUserGroup + * @params response Response returned by the server for a request to fetchAnswerData * @throws ApiException if the response code was not in [200, 299] */ - deleteUserGroup(response) { + fetchAnswerData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30963,7 +34695,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "AnswerDataResponse", "" ); return body; @@ -30975,14 +34707,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteVariable + * @params response Response returned by the server for a request to fetchAnswerSqlQuery * @throws ApiException if the response code was not in [200, 299] */ - deleteVariable(response) { + fetchAnswerSqlQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31019,7 +34756,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "SqlQueryResponse", "" ); return body; @@ -31031,16 +34768,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deployCommit + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus * @throws ApiException if the response code was not in [200, 299] */ - deployCommit(response) { + fetchAsyncImportTaskStatus(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "GetAsyncImportStatusResponse", "" ); return body; @@ -31080,7 +34817,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "GetAsyncImportStatusResponse", "" ); return body; @@ -31092,29 +34829,33 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @params response Response returned by the server for a request to fetchColumnSecurityRules * @throws ApiException if the response code was not in [200, 299] */ - downloadConnectionMetadataChanges(response) { + fetchColumnSecurityRules(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body = yield response.getBodyAsFile(); + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -31122,23 +34863,23 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "HttpFile", - "binary" + "Array", + "" ); return body; } @@ -31149,21 +34890,25 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportAnswerReport + * @params response Response returned by the server for a request to fetchConnectionDiffStatus * @throws ApiException if the response code was not in [200, 299] */ - exportAnswerReport(response) { + fetchConnectionDiffStatus(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body = yield response.getBodyAsFile(); + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -31171,7 +34916,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -31179,7 +34924,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -31187,15 +34932,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "HttpFile", - "binary" + "FetchConnectionDiffStatusResponse", + "" ); return body; } @@ -31206,21 +34951,25 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportLiveboardReport + * @params response Response returned by the server for a request to fetchLiveboardData * @throws ApiException if the response code was not in [200, 299] */ - exportLiveboardReport(response) { + fetchLiveboardData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body = yield response.getBodyAsFile(); + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -31228,7 +34977,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -31236,7 +34985,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -31244,15 +34993,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "HttpFile", - "binary" + "LiveboardDataResponse", + "" ); return body; } @@ -31263,16 +35012,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportMetadataTML + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery * @throws ApiException if the response code was not in [200, 299] */ - exportMetadataTML(response) { + fetchLiveboardSqlQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -31312,7 +35061,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -31324,16 +35073,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @params response Response returned by the server for a request to fetchLogs * @throws ApiException if the response code was not in [200, 299] */ - exportMetadataTMLBatched(response) { + fetchLogs(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -31373,7 +35122,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -31385,16 +35134,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAnswerData + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals * @throws ApiException if the response code was not in [200, 299] */ - fetchAnswerData(response) { + fetchPermissionsOfPrincipals(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AnswerDataResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -31434,7 +35183,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AnswerDataResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -31446,16 +35195,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata * @throws ApiException if the response code was not in [200, 299] */ - fetchAnswerSqlQuery(response) { + fetchPermissionsOnMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfMetadataResponse", "" ); return body; @@ -31495,7 +35244,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfMetadataResponse", "" ); return body; @@ -31507,19 +35256,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @params response Response returned by the server for a request to forceLogoutUsers * @throws ApiException if the response code was not in [200, 299] */ - fetchAsyncImportTaskStatus(response) { + forceLogoutUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31556,7 +35300,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "void", "" ); return body; @@ -31568,16 +35312,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @params response Response returned by the server for a request to generateCSV * @throws ApiException if the response code was not in [200, 299] */ - fetchColumnSecurityRules(response) { + generateCSV(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -31588,7 +35332,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31604,7 +35348,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31612,12 +35356,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -31629,16 +35373,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @params response Response returned by the server for a request to getCurrentUserInfo * @throws ApiException if the response code was not in [200, 299] */ - fetchConnectionDiffStatus(response) { + getCurrentUserInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "User", "" ); return body; @@ -31678,7 +35422,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "User", "" ); return body; @@ -31690,16 +35434,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardData + * @params response Response returned by the server for a request to getCurrentUserToken * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardData(response) { + getCurrentUserToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "GetTokenResponse", "" ); return body; @@ -31739,7 +35483,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "GetTokenResponse", "" ); return body; @@ -31751,16 +35495,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @params response Response returned by the server for a request to getCustomAccessToken * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardSqlQuery(response) { + getCustomAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "AccessToken", "" ); return body; @@ -31771,7 +35515,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31779,7 +35523,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31787,7 +35531,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31795,12 +35539,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "AccessToken", "" ); return body; @@ -31812,43 +35556,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLogs + * @params response Response returned by the server for a request to getDataSourceSuggestions * @throws ApiException if the response code was not in [200, 299] */ - fetchLogs(response) { + getDataSourceSuggestions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "EurekaDataSourceSuggestionResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "EurekaDataSourceSuggestionResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31856,12 +35592,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "EurekaDataSourceSuggestionResponse", "" ); return body; @@ -31873,16 +35609,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @params response Response returned by the server for a request to getFullAccessToken * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOfPrincipals(response) { + getFullAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "Token", "" ); return body; @@ -31922,7 +35658,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "Token", "" ); return body; @@ -31934,16 +35670,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @params response Response returned by the server for a request to getObjectAccessToken * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOnMetadata(response) { + getObjectAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "Token", "" ); return body; @@ -31983,7 +35719,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "Token", "" ); return body; @@ -31995,14 +35731,72 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to forceLogoutUsers + * @params response Response returned by the server for a request to getRelevantQuestions * @throws ApiException if the response code was not in [200, 299] */ - forceLogoutUsers(response) { + getRelevantQuestions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32039,7 +35833,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "SystemConfig", "" ); return body; @@ -32051,16 +35845,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to generateCSV + * @params response Response returned by the server for a request to getSystemInformation * @throws ApiException if the response code was not in [200, 299] */ - generateCSV(response) { + getSystemInformation(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "SystemInfo", "" ); return body; @@ -32100,7 +35894,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "SystemInfo", "" ); return body; @@ -32112,16 +35906,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserInfo + * @params response Response returned by the server for a request to getSystemOverrideInfo * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserInfo(response) { + getSystemOverrideInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "SystemOverrideInfo", "" ); return body; @@ -32161,7 +35955,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "SystemOverrideInfo", "" ); return body; @@ -32173,16 +35967,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserToken + * @params response Response returned by the server for a request to importMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserToken(response) { + importMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Array", "" ); return body; @@ -32222,7 +36016,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Array", "" ); return body; @@ -32234,16 +36028,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCustomAccessToken + * @params response Response returned by the server for a request to importMetadataTMLAsync * @throws ApiException if the response code was not in [200, 299] */ - getCustomAccessToken(response) { + importMetadataTMLAsync(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -32254,7 +36048,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32262,7 +36056,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32270,7 +36064,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32278,12 +36072,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -32295,16 +36089,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getFullAccessToken + * @params response Response returned by the server for a request to importUserGroups * @throws ApiException if the response code was not in [200, 299] */ - getFullAccessToken(response) { + importUserGroups(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUserGroupsResponse", "" ); return body; @@ -32344,7 +36138,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUserGroupsResponse", "" ); return body; @@ -32356,16 +36150,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getObjectAccessToken + * @params response Response returned by the server for a request to importUsers * @throws ApiException if the response code was not in [200, 299] */ - getObjectAccessToken(response) { + importUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUsersResponse", "" ); return body; @@ -32405,7 +36199,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUsersResponse", "" ); return body; @@ -32417,19 +36211,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemConfig + * @params response Response returned by the server for a request to login * @throws ApiException if the response code was not in [200, 299] */ - getSystemConfig(response) { + login(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32466,7 +36255,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", + "void", "" ); return body; @@ -32478,19 +36267,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemInformation + * @params response Response returned by the server for a request to logout * @throws ApiException if the response code was not in [200, 299] */ - getSystemInformation(response) { + logout(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32527,7 +36311,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", + "void", "" ); return body; @@ -32539,19 +36323,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemOverrideInfo + * @params response Response returned by the server for a request to parameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - getSystemOverrideInfo(response) { + parameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32588,7 +36367,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", + "void", "" ); return body; @@ -32600,19 +36379,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTML + * @params response Response returned by the server for a request to publishMetadata * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTML(response) { + publishMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32649,7 +36423,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -32661,43 +36435,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTMLAsync + * @params response Response returned by the server for a request to queryGetDecomposedQuery * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTMLAsync(response) { + queryGetDecomposedQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "EurekaDecomposeQueryResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "EurekaDecomposeQueryResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32705,12 +36471,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "EurekaDecomposeQueryResponse", "" ); return body; @@ -32722,19 +36488,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUserGroups + * @params response Response returned by the server for a request to resetUserPassword * @throws ApiException if the response code was not in [200, 299] */ - importUserGroups(response) { + resetUserPassword(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32771,7 +36532,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", + "void", "" ); return body; @@ -32783,16 +36544,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUsers + * @params response Response returned by the server for a request to revertCommit * @throws ApiException if the response code was not in [200, 299] */ - importUsers(response) { + revertCommit(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", + "RevertResponse", "" ); return body; @@ -32832,7 +36593,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", + "RevertResponse", "" ); return body; @@ -32844,10 +36605,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to login + * @params response Response returned by the server for a request to revokeToken * @throws ApiException if the response code was not in [200, 299] */ - login(response) { + revokeToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -32900,71 +36661,20 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to logout + * @params response Response returned by the server for a request to searchCalendars * @throws ApiException if the response code was not in [200, 299] */ - logout(response) { + searchCalendars(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to parameterizeMetadata - * @throws ApiException if the response code was not in [200, 299] - */ - parameterizeMetadata(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -33000,7 +36710,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -33012,14 +36722,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to publishMetadata + * @params response Response returned by the server for a request to searchCommits * @throws ApiException if the response code was not in [200, 299] */ - publishMetadata(response) { + searchCommits(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -33056,7 +36771,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -33068,68 +36783,20 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences * @throws ApiException if the response code was not in [200, 299] */ - queryGetDecomposedQuery(response) { + searchCommunicationChannelPreferences(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", + "CommunicationChannelPreferencesResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to resetUserPassword - * @throws ApiException if the response code was not in [200, 299] - */ - resetUserPassword(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -33165,7 +36832,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CommunicationChannelPreferencesResponse", "" ); return body; @@ -33177,16 +36844,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revertCommit + * @params response Response returned by the server for a request to searchConfig * @throws ApiException if the response code was not in [200, 299] */ - revertCommit(response) { + searchConfig(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "Array", "" ); return body; @@ -33226,7 +36893,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "Array", "" ); return body; @@ -33238,14 +36905,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeToken + * @params response Response returned by the server for a request to searchConnection * @throws ApiException if the response code was not in [200, 299] */ - revokeToken(response) { + searchConnection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -33282,7 +36954,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -33294,16 +36966,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCalendars + * @params response Response returned by the server for a request to searchCustomActions * @throws ApiException if the response code was not in [200, 299] */ - searchCalendars(response) { + searchCustomActions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33343,7 +37015,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33355,16 +37027,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCommits + * @params response Response returned by the server for a request to searchData * @throws ApiException if the response code was not in [200, 299] */ - searchCommits(response) { + searchData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SearchDataResponse", "" ); return body; @@ -33404,7 +37076,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SearchDataResponse", "" ); return body; @@ -33416,16 +37088,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchConfig + * @params response Response returned by the server for a request to searchEmailCustomization * @throws ApiException if the response code was not in [200, 299] */ - searchConfig(response) { + searchEmailCustomization(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33438,21 +37110,13 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("401", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -33465,7 +37129,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33477,16 +37141,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchConnection + * @params response Response returned by the server for a request to searchMetadata * @throws ApiException if the response code was not in [200, 299] */ - searchConnection(response) { + searchMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33526,7 +37190,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33538,16 +37202,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCustomActions + * @params response Response returned by the server for a request to searchOrgs * @throws ApiException if the response code was not in [200, 299] */ - searchCustomActions(response) { + searchOrgs(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33587,7 +37251,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33599,16 +37263,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchData + * @params response Response returned by the server for a request to searchRoles * @throws ApiException if the response code was not in [200, 299] */ - searchData(response) { + searchRoles(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SearchDataResponse", + "Array", "" ); return body; @@ -33643,65 +37307,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SearchDataResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to searchEmailCustomization - * @throws ApiException if the response code was not in [200, 299] - */ - searchEmailCustomization(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33713,16 +37324,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchMetadata + * @params response Response returned by the server for a request to searchSchedules * @throws ApiException if the response code was not in [200, 299] */ - searchMetadata(response) { + searchSchedules(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33762,7 +37373,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33774,16 +37385,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchOrgs + * @params response Response returned by the server for a request to searchTags * @throws ApiException if the response code was not in [200, 299] */ - searchOrgs(response) { + searchTags(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33823,7 +37434,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33835,16 +37446,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchRoles + * @params response Response returned by the server for a request to searchUserGroups * @throws ApiException if the response code was not in [200, 299] */ - searchRoles(response) { + searchUserGroups(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33879,12 +37490,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33896,16 +37507,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchSchedules + * @params response Response returned by the server for a request to searchUsers * @throws ApiException if the response code was not in [200, 299] */ - searchSchedules(response) { + searchUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33945,7 +37556,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33957,16 +37568,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchTags + * @params response Response returned by the server for a request to searchVariables * @throws ApiException if the response code was not in [200, 299] */ - searchTags(response) { + searchVariables(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -34006,7 +37617,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -34018,16 +37629,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchUserGroups + * @params response Response returned by the server for a request to searchWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - searchUserGroups(response) { + searchWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookSearchResponse", "" ); return body; @@ -34067,7 +37678,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookSearchResponse", "" ); return body; @@ -34079,43 +37690,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchUsers + * @params response Response returned by the server for a request to sendAgentMessage * @throws ApiException if the response code was not in [200, 299] */ - searchUsers(response) { + sendAgentMessage(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "any", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -34123,12 +37726,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -34140,43 +37743,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchVariables + * @params response Response returned by the server for a request to sendAgentMessageStreaming * @throws ApiException if the response code was not in [200, 299] */ - searchVariables(response) { + sendAgentMessageStreaming(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SendAgentMessageResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "SendAgentMessageResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -34184,12 +37779,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SendAgentMessageResponse", "" ); return body; @@ -35442,10 +39037,66 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUser + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup * @throws ApiException if the response code was not in [200, 299] */ - updateUser(response) { + updateUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35498,10 +39149,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUserGroup + * @params response Response returned by the server for a request to updateVariable * @throws ApiException if the response code was not in [200, 299] */ - updateUserGroup(response) { + updateVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35554,10 +39205,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariable + * @params response Response returned by the server for a request to updateVariableValues * @throws ApiException if the response code was not in [200, 299] */ - updateVariable(response) { + updateVariableValues(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35610,10 +39261,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariableValues + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - updateVariableValues(response) { + updateWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35850,7 +39501,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35886,7 +39537,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35922,7 +39573,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35958,7 +39609,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35994,7 +39645,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -36021,7 +39672,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36057,7 +39708,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36093,7 +39744,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36129,7 +39780,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36169,7 +39820,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36783,7 +40434,7 @@ var UsersApiResponseProcessor = class { // apis/VariableApi.ts var VariableApiRequestFactory = class extends BaseAPIRequestFactory { /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -36796,7 +40447,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36819,7 +40470,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -36832,7 +40483,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -36846,7 +40497,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -36859,7 +40510,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36882,7 +40533,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param updateVariableRequest */ @@ -36899,7 +40550,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36922,7 +40573,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -36932,10 +40583,10 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { throw new RequiredError("VariableApi", "updateVariableValues", "updateVariableValuesRequest"); } - const localVarPath = "/api/rest/2.0/template/variables/update"; + const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37267,7 +40918,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37303,7 +40954,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37339,7 +40990,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37375,7 +41026,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37415,7 +41066,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37451,7 +41102,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37487,7 +41138,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37523,7 +41174,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37559,7 +41210,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37875,7 +41526,251 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "RevertResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", "" ); return body; @@ -37883,20 +41778,174 @@ var VersionControlApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } +}; + +// apis/WebhooksApi.ts +var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var WebhooksApiResponseProcessor = class { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCommits + * @params response Response returned by the server for a request to createWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - searchCommits(response) { + createWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookResponse", "" ); return body; @@ -37936,7 +41985,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookResponse", "" ); return body; @@ -37948,16 +41997,16 @@ var VersionControlApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchConfig + * @params response Response returned by the server for a request to deleteWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - searchConfig(response) { + deleteWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookDeleteResponse", "" ); return body; @@ -37997,7 +42046,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookDeleteResponse", "" ); return body; @@ -38009,16 +42058,16 @@ var VersionControlApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateConfig + * @params response Response returned by the server for a request to searchWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - updateConfig(response) { + searchWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "WebhookSearchResponse", "" ); return body; @@ -38058,7 +42107,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "WebhookSearchResponse", "" ); return body; @@ -38070,19 +42119,14 @@ var VersionControlApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to validateMerge + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - validateMerge(response) { + updateWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38119,7 +42163,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -38136,6 +42180,24 @@ var ObservableAIApi = class { this.requestFactory = requestFactory || new AIApiRequestFactory(configuration); this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -38154,6 +42216,42 @@ var ObservableAIApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConversation(rsp))); })); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -38172,6 +42270,43 @@ var ObservableAIApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.queryGetDecomposedQuery(rsp))); })); } + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -38251,7 +42386,7 @@ var ObservableAuthenticationApi = class { })); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -38589,7 +42724,7 @@ var ObservableConnectionsApi = class { })); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -38841,13 +42976,13 @@ var ObservableDBTApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); let middlewarePreObservable = from(requestContextPromise); for (let middleware of this.configuration.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); @@ -39247,7 +43382,7 @@ var ObservableMetadataApi = class { })); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -39939,6 +44074,24 @@ var ObservableSystemApi = class { this.requestFactory = requestFactory || new SystemApiRequestFactory(configuration); this.responseProcessor = responseProcessor || new SystemApiResponseProcessor(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -39990,6 +44143,24 @@ var ObservableSystemApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemOverrideInfo(rsp))); })); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -40221,6 +44392,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.commitBranch(rsp))); })); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -40258,7 +44447,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -40275,6 +44464,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.copyObject(rsp))); })); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -40510,7 +44717,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -40527,6 +44734,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createVariable(rsp))); })); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -40576,13 +44801,13 @@ var ObservableThoughtSpotRestApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); let middlewarePreObservable = from(requestContextPromise); for (let middleware of this.configuration.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); @@ -40919,7 +45144,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -40936,6 +45161,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); })); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -41295,7 +45538,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -41312,6 +45555,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCustomAccessToken(rsp))); })); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -41348,6 +45609,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getObjectAccessToken(rsp))); })); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -41651,6 +45930,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommits(rsp))); })); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -41868,7 +46165,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -41885,6 +46182,61 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchVariables(rsp))); })); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -42087,7 +46439,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -42339,7 +46691,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. * @param updateVariableRequest */ @@ -42358,7 +46710,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -42375,6 +46727,25 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariableValues(rsp))); })); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -42624,7 +46995,7 @@ var ObservableVariableApi = class { this.responseProcessor = responseProcessor || new VariableApiResponseProcessor(); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -42642,7 +47013,7 @@ var ObservableVariableApi = class { })); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -42660,7 +47031,7 @@ var ObservableVariableApi = class { })); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -42678,7 +47049,7 @@ var ObservableVariableApi = class { })); } /** - * 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. * @param updateVariableRequest */ @@ -42697,7 +47068,7 @@ var ObservableVariableApi = class { })); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -42885,12 +47256,100 @@ var ObservableVersionControlApi = class { })); } }; +var ObservableWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebhooksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebhooksApiResponseProcessor(); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } +}; // types/PromiseAPI.ts var PromiseAIApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -42899,6 +47358,22 @@ var PromiseAIApi = class { const result = this.api.createConversation(createConversationRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -42907,6 +47382,23 @@ var PromiseAIApi = class { const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); return result.toPromise(); } + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -42944,7 +47436,7 @@ var PromiseAuthenticationApi = class { return result.toPromise(); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -43098,7 +47590,7 @@ var PromiseConnectionsApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -43224,13 +47716,13 @@ var PromiseDBTApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); return result.toPromise(); } /** @@ -43420,7 +47912,7 @@ var PromiseMetadataApi = class { return result.toPromise(); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -43740,6 +48232,14 @@ var PromiseSystemApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -43761,6 +48261,14 @@ var PromiseSystemApi = class { const result = this.api.getSystemOverrideInfo(_options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -43868,6 +48376,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.commitBranch(commitBranchRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -43885,13 +48401,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { const result = this.api.copyObject(copyObjectRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -43997,13 +48521,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { const result = this.api.createVariable(createVariableRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -44033,13 +48565,13 @@ var PromiseThoughtSpotRestApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); return result.toPromise(); } /** @@ -44186,13 +48718,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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 */ deleteVariable(identifier, _options) { const result = this.api.deleteVariable(identifier, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -44352,13 +48892,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -44375,6 +48923,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -44508,6 +49064,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.searchCommits(searchCommitsRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -44605,13 +49169,38 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { const result = this.api.searchVariables(searchVariablesRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -44704,7 +49293,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -44826,7 +49415,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. * @param updateVariableRequest */ @@ -44835,13 +49424,22 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -44957,7 +49555,7 @@ var PromiseVariableApi = class { this.api = new ObservableVariableApi(configuration, requestFactory, responseProcessor); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -44965,7 +49563,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -44973,7 +49571,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -44981,7 +49579,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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. * @param updateVariableRequest */ @@ -44990,7 +49588,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -45076,15 +49674,78 @@ var PromiseVersionControlApi = class { return result.toPromise(); } }; +var PromiseWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } +}; // utils/config.ts -var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider) => { +var createAdditionalHeadersMiddleware = (additionalHeaders) => { + return { + /** + * Pre-request middleware to add custom headers to every API call + * @param requestContext - The request context to modify + */ + pre: (requestContext) => { + Object.entries(additionalHeaders).forEach(([headerName, headerValue]) => { + requestContext.setHeaderParam(headerName, headerValue); + }); + return Promise.resolve(requestContext); + }, + /** + * Post-request middleware for response processing + * @param responseContext - The response context + */ + post: (responseContext) => Promise.resolve(responseContext) + }; +}; +var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider, options) => { const serverConfig = new ServerConfiguration( thoughtSpotHost, {} ); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } const config = createConfiguration({ - baseServer: serverConfig + baseServer: serverConfig, + promiseMiddleware: middleware }); const authApiClient = new PromiseAuthenticationApi(config); let configTokenProvider; @@ -45109,20 +49770,28 @@ var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider) = }; const globalConfig = createConfiguration({ authMethods: authConfig, - baseServer: serverConfig + baseServer: serverConfig, + promiseMiddleware: middleware }); return globalConfig; }; -var createBasicConfig = (thoughtSpotHost) => { +var createBasicConfig = (thoughtSpotHost, options) => { const thoughtSpotServer = new ServerConfiguration(thoughtSpotHost, {}); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } const basicClientConfig = createConfiguration({ - baseServer: thoughtSpotServer + baseServer: thoughtSpotServer, + promiseMiddleware: middleware }); return basicClientConfig; }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { AIApi, + AIContext, APIKey, APIKeyInput, AccessToken, @@ -45133,7 +49802,9 @@ var createBasicConfig = (thoughtSpotHost) => { ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, + AgentConversation, AnswerContent, + AnswerContextInput, AnswerDataResponse, ApiException, AssignChangeAuthorRequest, @@ -45168,14 +49839,21 @@ var createBasicConfig = (thoughtSpotHost) => { CommitHistoryResponse, CommitResponse, CommiterType, + CommunicationChannelPreferencesResponse, + ConfigureCommunicationChannelPreferencesRequest, ConnectionConfigurationResponse, ConnectionConfigurationSearchRequest, ConnectionConfigurationsApi, ConnectionInput, ConnectionsApi, + ContextPayloadV2Input, Conversation, + ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, + CreateAgentConversationRequest, + CreateAgentConversationRequestConversationSettings, + CreateAgentConversationRequestMetadataContext, CreateCalendarRequest, CreateCalendarRequestTableReference, CreateConfigRequest, @@ -45200,6 +49878,9 @@ var createBasicConfig = (thoughtSpotHost) => { CreateUserGroupRequest, CreateUserRequest, CreateVariableRequest, + CreateWebhookConfigurationRequest, + CreateWebhookConfigurationRequestAuthentication, + CreateWebhookConfigurationRequestSignatureVerification, CronExpression, CronExpressionInput, CustomActionApi, @@ -45207,6 +49888,8 @@ var createBasicConfig = (thoughtSpotHost) => { CustomCalendarsApi, DBTApi, DataApi, + DataSource, + DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, @@ -45222,13 +49905,20 @@ var createBasicConfig = (thoughtSpotHost) => { DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteOrgEmailCustomizationRequest, + DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployResponse, EmailCustomizationApi, + EntityHeader, ErrorResponse, + EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, + EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, + EurekaRelevantQuestion, + EventChannelConfig, + EventChannelConfigInput, ExcludeMetadataListItemInput, ExportAnswerReportRequest, ExportAnswerReportRequestRegionalSettings, @@ -45262,9 +49952,13 @@ var createBasicConfig = (thoughtSpotHost) => { GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, + GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest, + GetRelevantQuestionsRequest, + GetRelevantQuestionsRequestAiContext, + GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupObject, GroupsApi, @@ -45283,12 +49977,12 @@ var createBasicConfig = (thoughtSpotHost) => { ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, - InputVariableValue, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTParameter, JWTUserOptions, JWTUserOptionsFull, + LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, @@ -45298,6 +49992,7 @@ var createBasicConfig = (thoughtSpotHost) => { LoginRequest, MetadataApi, MetadataAssociationItem, + MetadataContext, MetadataInput, MetadataListItemInput, MetadataObject, @@ -45307,7 +50002,11 @@ var createBasicConfig = (thoughtSpotHost) => { ModelTableList, ObjectIDAndName, Org, + OrgChannelConfigInput, + OrgChannelConfigResponse, + OrgDetails, OrgInfo, + OrgPreferenceSearchCriteriaInput, OrgResponse, OrgType, OrgsApi, @@ -45376,6 +50075,7 @@ var createBasicConfig = (thoughtSpotHost) => { SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCommitsRequest, + SearchCommunicationChannelPreferencesRequest, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestSortOptions, @@ -45400,8 +50100,13 @@ var createBasicConfig = (thoughtSpotHost) => { SearchUsersRequest, SearchUsersRequestSortOptions, SearchVariablesRequest, + SearchWebhookConfigurationsRequest, + SearchWebhookConfigurationsRequestSortOptions, SecurityApi, SelfDecodingBody, + SendAgentMessageRequest, + SendAgentMessageResponse, + SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, ShareMetadataRequest, @@ -45459,6 +50164,7 @@ var createBasicConfig = (thoughtSpotHost) => { UpdateUserRequest, UpdateVariableRequest, UpdateVariableValuesRequest, + UpdateWebhookConfigurationRequest, User, UserGroup, UserGroupResponse, @@ -45469,12 +50175,33 @@ var createBasicConfig = (thoughtSpotHost) => { UsersApi, ValidateMergeRequest, ValidateTokenRequest, + ValueScopeInput, Variable, VariableApi, VariableDetailInput, + VariableUpdateAssignmentInput, + VariableUpdateScopeInput, VariableValue, - VariableValueInput, VersionControlApi, + WebhookAuthApiKey, + WebhookAuthApiKeyInput, + WebhookAuthBasicAuth, + WebhookAuthBasicAuthInput, + WebhookAuthOAuth2, + WebhookAuthOAuth2Input, + WebhookAuthentication, + WebhookAuthenticationInput, + WebhookDeleteFailure, + WebhookDeleteResponse, + WebhookOrg, + WebhookPagination, + WebhookResponse, + WebhookSearchResponse, + WebhookSignatureVerification, + WebhookSignatureVerificationInput, + WebhookSortOptionsInput, + WebhookUser, + WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, diff --git a/sdks/typescript/dist/index.d.cts b/sdks/typescript/dist/index.d.cts index 2c80cc620..d381ef890 100644 --- a/sdks/typescript/dist/index.d.cts +++ b/sdks/typescript/dist/index.d.cts @@ -181,6 +181,42 @@ type AuthMethodsConfiguration = { */ declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AIContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1117,6 +1153,38 @@ declare class ActivateUserRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AgentConversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_id': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1173,6 +1241,42 @@ declare class AnswerContent { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AnswerContextInput { + /** + * Unique identifier of the answer session. + */ + 'session_identifier': string; + /** + * Generation number of the answer. + */ + 'generation_number': number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1799,7 +1903,7 @@ declare class ColumnSecurityRule { * Array of groups that have access to this column */ 'groups'?: Array | null; - 'sourceTableDetails'?: ColumnSecurityRuleSourceTable; + 'source_table_details'?: ColumnSecurityRuleSourceTable; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -1869,15 +1973,15 @@ declare class ColumnSecurityRuleResponse { /** * GUID of the table for which the column security rules are fetched */ - 'guid'?: string | null; + 'table_guid'?: string | null; /** * Object ID of the table for which the column security rules are fetched */ - 'objId'?: string | null; + 'obj_id'?: string | null; /** * Array containing column security rule objects */ - 'columnSecurityRules'?: Array | null; + 'column_security_rules'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2238,10 +2342,15 @@ declare class CommitResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UserPrincipal { - 'id'?: string | null; - 'name'?: string | null; - 'type'?: string | null; +declare class EventChannelConfig { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array indicates no channels are enabled. + */ + 'channels': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2257,6 +2366,8 @@ declare class UserPrincipal { }[]; constructor(); } +type EventChannelConfigEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigChannelsEnum = "EMAIL" | "WEBHOOK"; /** * ThoughtSpot Public REST API @@ -2269,17 +2380,15 @@ declare class UserPrincipal { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ConnectionConfigurationResponse { - 'configuration_identifier'?: string | null; - 'name'?: string | null; - 'description'?: string | null; - 'configuration'?: any | null; - 'policy_principals'?: Array | null; - 'policy_processes'?: Array | null; - 'disabled'?: boolean | null; - 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; - 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; +declare class OrgDetails { + /** + * Unique id of the org + */ + 'id': string; + /** + * Name of the org + */ + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2295,9 +2404,6 @@ declare class ConnectionConfigurationResponse { }[]; constructor(); } -type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; -type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; -type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2310,19 +2416,13 @@ type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ConnectionConfigurationSearchRequest { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Unique ID or name of the configuration. - */ - 'configuration_identifier'?: string; + +declare class OrgChannelConfigResponse { + 'org': OrgDetails; /** - * Type of policy. + * Event-specific communication channel configurations for this org */ - 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; + 'preferences': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2338,7 +2438,6 @@ declare class ConnectionConfigurationSearchRequest { }[]; constructor(); } -type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2351,23 +2450,16 @@ type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIP * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DataWarehouseObjectInput { - /** - * Name of the database. - */ - 'database'?: string | null; - /** - * Name of the schema within the database. - */ - 'schema'?: string | null; + +declare class CommunicationChannelPreferencesResponse { /** - * Name of the table within the schema. + * Cluster-level default configurations. */ - 'table'?: string | null; + 'cluster_preferences'?: Array | null; /** - * Name of the column within the table. + * Org-specific configurations. */ - 'column'?: string | null; + 'org_preferences'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2395,20 +2487,15 @@ declare class DataWarehouseObjectInput { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ConnectionInput { - /** - * Unique ID or name of the connection. - */ - 'identifier'?: string | null; +declare class EventChannelConfigInput { /** - * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. + * Type of event for which communication channels are configured */ - 'name_pattern'?: string | null; + 'event_type': EventChannelConfigInputEventTypeEnum; /** - * Filter options for databases, schemas, tables and columns. + * Communication channels enabled for this event type. Empty array disables all channels for this event. */ - 'data_warehouse_objects'?: Array | null; + 'channels': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2424,6 +2511,8 @@ declare class ConnectionInput { }[]; constructor(); } +type EventChannelConfigInputEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigInputChannelsEnum = "EMAIL" | "WEBHOOK"; /** * ThoughtSpot Public REST API @@ -2436,11 +2525,24 @@ declare class ConnectionInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Conversation { + +declare class OrgChannelConfigInput { /** - * Unique identifier of the conversation. + * Unique identifier or name of the org */ - 'conversation_identifier': string; + 'org_identifier': string; + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. + */ + 'operation'?: OrgChannelConfigInputOperationEnum | null; + /** + * Event-specific configurations. Required for REPLACE operation. + */ + 'preferences'?: Array | null; + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. + */ + 'reset_events'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2456,6 +2558,8 @@ declare class Conversation { }[]; constructor(); } +type OrgChannelConfigInputOperationEnum = "REPLACE" | "RESET"; +type OrgChannelConfigInputResetEventsEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -2468,23 +2572,16 @@ declare class Conversation { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ConvertWorksheetToModelRequest { - /** - * List of Worksheet IDs. - */ - 'worksheet_ids'?: Array; - /** - * List of Worksheet IDs to be excluded. - */ - 'exclude_worksheet_ids'?: Array; + +declare class ConfigureCommunicationChannelPreferencesRequest { /** - * Indicates whether all the worksheet needs to be converted to models. + * Cluster-level default configurations. */ - 'convert_all'?: boolean | null; + 'cluster_preferences'?: Array; /** - * Indicates whether the changes should be applied to database. + * Org-specific configurations. */ - 'apply_changes'?: boolean | null; + 'org_preferences'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2512,23 +2609,10 @@ declare class ConvertWorksheetToModelRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CopyObjectRequest { - /** - * Description of the new object - */ - 'description'?: string; - /** - * GUID of metadata object to be copied (answer id or liveboard id) - */ - 'identifier': string; - /** - * Type of metadata object - */ - 'type'?: CopyObjectRequestTypeEnum; - /** - * Title of the new object - */ - 'title'?: string; +declare class UserPrincipal { + 'id'?: string | null; + 'name'?: string | null; + 'type'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2544,7 +2628,6 @@ declare class CopyObjectRequest { }[]; constructor(); } -type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; /** * ThoughtSpot Public REST API @@ -2557,26 +2640,17 @@ type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. -*/ -declare class CreateCalendarRequestTableReference { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Name of the database. - */ - 'database_name'?: string | null; - /** - * Name of the schema. - */ - 'schema_name'?: string | null; - /** - * Name of the table. Table names may be case-sensitive depending on the database system. - */ - 'table_name': string; + +declare class ConnectionConfigurationResponse { + 'configuration_identifier'?: string | null; + 'name'?: string | null; + 'description'?: string | null; + 'configuration'?: any | null; + 'policy_principals'?: Array | null; + 'policy_processes'?: Array | null; + 'disabled'?: boolean | null; + 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; + 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2592,6 +2666,9 @@ declare class CreateCalendarRequestTableReference { }[]; constructor(); } +type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; +type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; +type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2604,45 +2681,19 @@ declare class CreateCalendarRequestTableReference { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateCalendarRequest { +declare class ConnectionConfigurationSearchRequest { /** - * Name of the custom calendar. + * Unique ID or name of the connection. */ - 'name': string; + 'connection_identifier': string; /** - * Type of create operation. + * Unique ID or name of the configuration. */ - 'creation_method': CreateCalendarRequestCreationMethodEnum; - 'table_reference': CreateCalendarRequestTableReference; + 'configuration_identifier'?: string; /** - * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + * Type of policy. */ - 'start_date'?: string; - /** - * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. - */ - 'end_date'?: string; - /** - * Type of the calendar. - */ - 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; - /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). - */ - 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; - /** - * Specify the starting day of the week. - */ - 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; - /** - * Prefix to add before the quarter. - */ - 'quarter_name_prefix'?: string; - /** - * Prefix to add before the year. - */ - 'year_name_prefix'?: string; + 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2658,10 +2709,7 @@ declare class CreateCalendarRequest { }[]; constructor(); } -type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; -type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; -type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; -type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; +type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2674,39 +2722,23 @@ type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConfigRequest { - /** - * URL for connecting to remote repository - */ - 'repository_url': string; - /** - * Username to authenticate connection to remote repository - */ - 'username': string; - /** - * Access token corresponding to the user to authenticate connection to remote repository - */ - 'access_token': string; - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later - */ - 'org_identifier'?: string; +declare class DataWarehouseObjectInput { /** - * List the remote branches to configure. Example:[development, production] + * Name of the database. */ - 'branch_names'?: Array; + 'database'?: string | null; /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + * Name of the schema within the database. */ - 'commit_branch_name'?: string; + 'schema'?: string | null; /** - * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + * Name of the table within the schema. */ - 'enable_guid_mapping'?: boolean | null; + 'table'?: string | null; /** - * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + * Name of the column within the table. */ - 'configuration_branch_name'?: string; + 'column'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2734,39 +2766,20 @@ declare class CreateConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConnectionConfigurationRequest { - /** - * Unique name for the configuration. - */ - 'name': string; - /** - * Description of the configuration. - */ - 'description'?: string; + +declare class ConnectionInput { /** * Unique ID or name of the connection. */ - 'connection_identifier': string; - /** - * Type of authentication used for the connection. - */ - 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; - /** - * Configuration properties in JSON. - */ - 'configuration': any; - /** - * Type of policy. - */ - 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + 'identifier'?: string | null; /** - * Unique ID or name of the User and User Groups. + * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. */ - 'policy_principals'?: Array; + 'name_pattern'?: string | null; /** - * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + * Filter options for databases, schemas, tables and columns. */ - 'policy_processes'?: Array; + 'data_warehouse_objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2782,9 +2795,6 @@ declare class CreateConnectionConfigurationRequest { }[]; constructor(); } -type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL"; -type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; -type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; /** * ThoughtSpot Public REST API @@ -2797,27 +2807,11 @@ type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConnectionRequest { - /** - * Unique name for the connection. - */ - 'name': string; - /** - * Description of the connection. - */ - 'description'?: string; - /** - * Type of the data warehouse. - */ - 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; - /** - * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. - */ - 'data_warehouse_config': any; +declare class DataSourceContextInput { /** - * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + * Unique identifier of the data source. */ - 'validate'?: boolean | null; + 'guid': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2833,7 +2827,6 @@ declare class CreateConnectionRequest { }[]; constructor(); } -type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -2846,23 +2839,15 @@ type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHI * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConnectionResponse { - /** - * ID of the connection created. - */ - 'id': string; - /** - * Name of the connection. - */ - 'name': string; +declare class LBContextInput { /** - * Type of data warehouse. + * Unique identifier of the liveboard. */ - 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + 'liveboard_identifier': string; /** - * Details of the connection. + * Unique identifier of the visualization. */ - 'details'?: any | null; + 'visualization_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2878,7 +2863,6 @@ declare class CreateConnectionResponse { }[]; constructor(); } -type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -2891,15 +2875,15 @@ type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSH * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConversationRequest { - /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. - */ - 'metadata_identifier': string; + +declare class ContextPayloadV2Input { /** - * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. + * Type of the context. */ - 'tokens'?: string; + 'type'?: ContextPayloadV2InputTypeEnum | null; + 'answer_context'?: AnswerContextInput; + 'liveboard_context'?: LBContextInput; + 'data_source_context'?: DataSourceContextInput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2915,6 +2899,7 @@ declare class CreateConversationRequest { }[]; constructor(); } +type ContextPayloadV2InputTypeEnum = "answer" | "liveboard" | "data_source"; /** * ThoughtSpot Public REST API @@ -2927,13 +2912,11 @@ declare class CreateConversationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. -*/ -declare class CreateCustomActionRequestActionDetails { - 'CALLBACK'?: CALLBACKInputMandatory; - 'URL'?: URLInputMandatory; +declare class Conversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2961,14 +2944,19 @@ declare class CreateCustomActionRequestActionDetails { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. -*/ -declare class CreateCustomActionRequestDefaultActionConfig { +declare class ConversationSettingsInput { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + * Enable contextual change analysis. */ - 'visibility'?: boolean | null; + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. + */ + 'enable_reasoning'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2996,22 +2984,23 @@ declare class CreateCustomActionRequestDefaultActionConfig { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateCustomActionRequest { +declare class ConvertWorksheetToModelRequest { /** - * Name of the custom action. The custom action name must be unique. + * List of Worksheet IDs. */ - 'name': string; - 'action_details': CreateCustomActionRequestActionDetails; + 'worksheet_ids'?: Array; /** - * Metadata objects to which the custom action needs to be associated. + * List of Worksheet IDs to be excluded. */ - 'associate_metadata'?: Array; - 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; + 'exclude_worksheet_ids'?: Array; /** - * Unique ID or name of the groups that can view and access the custom action. + * Indicates whether all the worksheet needs to be converted to models. */ - 'group_identifiers'?: Array; + 'convert_all'?: boolean | null; + /** + * Indicates whether the changes should be applied to database. + */ + 'apply_changes'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3039,102 +3028,67 @@ declare class CreateCustomActionRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Email customization configuration as key value pair -*/ -declare class CreateEmailCustomizationRequestTemplateProperties { - /** - * Background color for call-to-action button in hex format - */ - 'cta_button_bg_color'?: string | null; - /** - * Text color for call-to-action button in hex format - */ - 'cta_text_font_color'?: string | null; - /** - * Primary background color in hex format - */ - 'primary_bg_color'?: string | null; - /** - * Home page URL (HTTP/HTTPS only) - */ - 'home_url'?: string | null; +declare class CopyObjectRequest { /** - * Logo image URL (HTTP/HTTPS only) + * Description of the new object */ - 'logo_url'?: string | null; + 'description'?: string; /** - * Font family for email content (e.g., Arial, sans-serif) + * GUID of metadata object to be copied (answer id or liveboard id) */ - 'font_family'?: string | null; + 'identifier': string; /** - * Product name to display + * Type of metadata object */ - 'product_name'?: string | null; + 'type'?: CopyObjectRequestTypeEnum; /** - * Footer address text + * Title of the new object */ - 'footer_address'?: string | null; + 'title'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Conversation settings. +*/ +declare class CreateAgentConversationRequestConversationSettings { /** - * Footer phone number + * Enable contextual change analysis. */ - 'footer_phone'?: string | null; + 'enable_contextual_change_analysis'?: boolean | null; /** - * Replacement value for Liveboard + * Enable natural language to answer generation. */ - 'replacement_value_for_liveboard'?: string | null; + 'enable_natural_language_answer_generation'?: boolean | null; /** - * Replacement value for Answer + * Enable reasoning. */ - 'replacement_value_for_answer'?: string | null; - /** - * Replacement value for SpotIQ - */ - 'replacement_value_for_spot_iq'?: string | null; - /** - * Whether to hide footer address - */ - 'hide_footer_address'?: boolean | null; - /** - * Whether to hide footer phone number - */ - 'hide_footer_phone'?: boolean | null; - /** - * Whether to hide manage notification link - */ - 'hide_manage_notification'?: boolean | null; - /** - * Whether to hide mobile app nudge - */ - 'hide_mobile_app_nudge'?: boolean | null; - /** - * Whether to hide privacy policy link - */ - 'hide_privacy_policy'?: boolean | null; - /** - * Whether to hide product name - */ - 'hide_product_name'?: boolean | null; - /** - * Whether to hide ThoughtSpot vocabulary definitions - */ - 'hide_ts_vocabulary_definitions'?: boolean | null; - /** - * Whether to hide notification status - */ - 'hide_notification_status'?: boolean | null; - /** - * Whether to hide error message - */ - 'hide_error_message'?: boolean | null; - /** - * Whether to hide unsubscribe link - */ - 'hide_unsubscribe_link'?: boolean | null; - /** - * Whether to hide modify alert - */ - 'hide_modify_alert'?: boolean | null; + 'enable_reasoning'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3163,12 +3117,17 @@ declare class CreateEmailCustomizationRequestTemplateProperties { * Do not edit the class manually. */ -declare class CreateEmailCustomizationRequest { - 'template_properties': CreateEmailCustomizationRequestTemplateProperties; +/** +* Context for the conversation. +*/ +declare class CreateAgentConversationRequestMetadataContext { /** - * Unique ID or name of org Version: 10.12.0.cl or later + * Type of the context. */ - 'org_identifier'?: string; + 'type'?: CreateAgentConversationRequestMetadataContextTypeEnum | null; + 'answer_context'?: AnswerContextInput; + 'liveboard_context'?: LBContextInput; + 'data_source_context'?: DataSourceContextInput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3184,6 +3143,7 @@ declare class CreateEmailCustomizationRequest { }[]; constructor(); } +type CreateAgentConversationRequestMetadataContextTypeEnum = "answer" | "liveboard" | "data_source"; /** * ThoughtSpot Public REST API @@ -3196,9 +3156,10 @@ declare class CreateEmailCustomizationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class OrgType { - 'name'?: string | null; - 'id'?: number | null; + +declare class CreateAgentConversationRequest { + 'metadata_context': CreateAgentConversationRequestMetadataContext; + 'conversation_settings': CreateAgentConversationRequestConversationSettings; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3226,21 +3187,26 @@ declare class OrgType { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateEmailCustomizationResponse { +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. +*/ +declare class CreateCalendarRequestTableReference { /** - * Tenant ID + * Unique ID or name of the connection. */ - 'tenant_id': string; - 'org': OrgType; + 'connection_identifier': string; /** - * Email customization name. + * Name of the database. */ - 'name': string; + 'database_name'?: string | null; /** - * Customization configuration for the email + * Name of the schema. */ - 'template_properties': any; + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3268,15 +3234,45 @@ declare class CreateEmailCustomizationResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateOrgRequest { + +declare class CreateCalendarRequest { /** - * Name of the Org. + * Name of the custom calendar. */ 'name': string; /** - * Description of the Org. + * Type of create operation. */ - 'description'?: string; + 'creation_method': CreateCalendarRequestCreationMethodEnum; + 'table_reference': CreateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3292,6 +3288,10 @@ declare class CreateOrgRequest { }[]; constructor(); } +type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -3304,23 +3304,39 @@ declare class CreateOrgRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateRoleRequest { +declare class CreateConfigRequest { /** - * Unique name of the Role. + * URL for connecting to remote repository */ - 'name': string; + 'repository_url': string; /** - * Description of the Role. + * Username to authenticate connection to remote repository */ - 'description'?: string; + 'username': string; /** - * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * Access token corresponding to the user to authenticate connection to remote repository */ - 'privileges'?: Array; + 'access_token': string; /** - *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later */ - 'read_only'?: boolean | null; + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3336,7 +3352,6 @@ declare class CreateRoleRequest { }[]; constructor(); } -type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE"; /** * ThoughtSpot Public REST API @@ -3349,34 +3364,39 @@ type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Schedule selected cron expression. -*/ -declare class CronExpressionInput { +declare class CreateConnectionConfigurationRequest { /** - * Day of month of the object. + * Unique name for the configuration. */ - 'day_of_month': string; + 'name': string; /** - * Day of Week of the object. + * Description of the configuration. */ - 'day_of_week': string; + 'description'?: string; /** - * Hour of the object. + * Unique ID or name of the connection. */ - 'hour': string; + 'connection_identifier': string; /** - * Minute of the object. + * Type of authentication used for the connection. */ - 'minute': string; + 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; /** - * Month of the object. + * Configuration properties in JSON. */ - 'month': string; + 'configuration': any; /** - * Second of the object. + * Type of policy. */ - 'second': string; + 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3392,6 +3412,9 @@ declare class CronExpressionInput { }[]; constructor(); } +type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "OAUTH_CLIENT_CREDENTIALS"; +type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; /** * ThoughtSpot Public REST API @@ -3404,12 +3427,27 @@ declare class CronExpressionInput { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Frequency settings for the scheduled job. -*/ -declare class CreateScheduleRequestFrequency { - 'cron_expression': CronExpressionInput; +declare class CreateConnectionRequest { + /** + * Unique name for the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string; + /** + * Type of the data warehouse. + */ + 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; + /** + * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. + */ + 'data_warehouse_config': any; + /** + * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + */ + 'validate'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3425,6 +3463,7 @@ declare class CreateScheduleRequestFrequency { }[]; constructor(); } +type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -3437,14 +3476,23 @@ declare class CreateScheduleRequestFrequency { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options to specify details of Liveboard. -*/ -declare class CreateScheduleRequestLiveboardOptions { +declare class CreateConnectionResponse { /** - * Unique ID or name of visualizations. + * ID of the connection created. */ - 'visualization_identifiers': Array; + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + /** + * Details of the connection. + */ + 'details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3460,6 +3508,7 @@ declare class CreateScheduleRequestLiveboardOptions { }[]; constructor(); } +type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -3472,46 +3521,15 @@ declare class CreateScheduleRequestLiveboardOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. -*/ -declare class CreateScheduleRequestPdfOptions { +declare class CreateConversationRequest { /** - * Indicates whether to include complete Liveboard. + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. */ - 'complete_liveboard'?: boolean | null; + 'metadata_identifier': string; /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page - */ - 'include_page_number'?: boolean | null; - /** - * Text to include in the footer of each page. - */ - 'page_footer_text'?: string | null; - /** - * Page orientation of the PDF. - */ - 'page_orientation'?: string | null; - /** - * Page size. - */ - 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; - /** - * Indicates whether to include only first page of the tables. + * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. */ - 'truncate_table'?: boolean | null; + 'tokens'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3527,7 +3545,6 @@ declare class CreateScheduleRequestPdfOptions { }[]; constructor(); } -type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -3540,15 +3557,13 @@ type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PrincipalsListItemInput { - /** - * Unique ID or name of the user or group. - */ - 'identifier': string; - /** - * Principal type. - */ - 'type': string; + +/** +* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. +*/ +declare class CreateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3576,19 +3591,14 @@ declare class PrincipalsListItemInput { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. */ -declare class CreateScheduleRequestRecipientDetails { - /** - * Emails of the recipients. - */ - 'emails'?: Array | null; +declare class CreateCustomActionRequestDefaultActionConfig { /** - * User or groups to be set as recipients of the schedule notifications. + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true */ - 'principals'?: Array | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3617,39 +3627,21 @@ declare class CreateScheduleRequestRecipientDetails { * Do not edit the class manually. */ -declare class CreateScheduleRequest { +declare class CreateCustomActionRequest { /** - * Name of the scheduled job. + * Name of the custom action. The custom action name must be unique. */ 'name': string; + 'action_details': CreateCustomActionRequestActionDetails; /** - * Description of the job. - */ - 'description': string; - /** - * Type of the metadata object. - */ - 'metadata_type': CreateScheduleRequestMetadataTypeEnum; - /** - * Unique ID or name of the metadata object. - */ - 'metadata_identifier': string; - /** - * Export file format. - */ - 'file_format'?: CreateScheduleRequestFileFormatEnum; - 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; - 'pdf_options'?: CreateScheduleRequestPdfOptions; - /** - * Time zone + * Metadata objects to which the custom action needs to be associated. */ - 'time_zone': CreateScheduleRequestTimeZoneEnum; - 'frequency'?: CreateScheduleRequestFrequency; - 'recipient_details': CreateScheduleRequestRecipientDetails; + 'associate_metadata'?: Array; + 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; /** - * Personalised view id of the liveboard to be scheduled. + * Unique ID or name of the groups that can view and access the custom action. */ - 'personalised_view_id'?: string; + 'group_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3665,9 +3657,6 @@ declare class CreateScheduleRequest { }[]; constructor(); } -type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; -type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; -type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; /** * ThoughtSpot Public REST API @@ -3680,83 +3669,110 @@ type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Af * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateTagRequest { +/** +* Email customization configuration as key value pair +*/ +declare class CreateEmailCustomizationRequestTemplateProperties { /** - * Name of the tag. + * Background color for call-to-action button in hex format */ - 'name': string; + 'cta_button_bg_color'?: string | null; /** - * Hex color code to be assigned to the tag. For example, #ff78a9. + * Text color for call-to-action button in hex format */ - 'color'?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -declare class CreateUserGroupRequest { + 'cta_text_font_color'?: string | null; /** - * Name of the group. The group name must be unique. + * Primary background color in hex format */ - 'name': string; + 'primary_bg_color'?: string | null; /** - * Display name for the group. + * Home page URL (HTTP/HTTPS only) */ - 'display_name': string; + 'home_url'?: string | null; /** - * GUID of the Liveboards to assign as default Liveboards to the users in the group. + * Logo image URL (HTTP/HTTPS only) */ - 'default_liveboard_identifiers'?: Array; + 'logo_url'?: string | null; /** - * Description of the group + * Font family for email content (e.g., Arial, sans-serif) */ - 'description'?: string; + 'font_family'?: string | null; /** - * Privileges to assign to the group + * Product name to display */ - 'privileges'?: Array; + 'product_name'?: string | null; /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * Footer address text */ - 'sub_group_identifiers'?: Array; + 'footer_address'?: string | null; /** - * Group type. + * Footer phone number */ - 'type'?: CreateUserGroupRequestTypeEnum; + 'footer_phone'?: string | null; /** - * GUID or name of the users to assign to the group. + * Replacement value for Liveboard */ - 'user_identifiers'?: Array; + 'replacement_value_for_liveboard'?: string | null; /** - * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + * Replacement value for Answer */ - 'visibility'?: CreateUserGroupRequestVisibilityEnum; + 'replacement_value_for_answer'?: string | null; /** - * Role identifiers of the roles that should be assigned to the group. + * Replacement value for SpotIQ */ - 'role_identifiers'?: Array; + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3772,9 +3788,6 @@ declare class CreateUserGroupRequest { }[]; constructor(); } -type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -3787,15 +3800,13 @@ type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FavoriteMetadataInput { - /** - * Unique ID or name of the metadata object. - */ - 'identifier'?: string | null; + +declare class CreateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Unique ID or name of org Version: 10.12.0.cl or later */ - 'type'?: FavoriteMetadataInputTypeEnum | null; + 'org_identifier'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3811,7 +3822,6 @@ declare class FavoriteMetadataInput { }[]; constructor(); } -type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; /** * ThoughtSpot Public REST API @@ -3824,84 +3834,9 @@ type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateUserRequest { - /** - * Name of the user. The username string must be unique. - */ - 'name': string; - /** - * A unique display name string for the user account, usually their first and last name - */ - 'display_name': string; - /** - * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. - */ - 'password'?: string; - /** - * Email of the user account - */ - 'email': string; - /** - * Type of the account. - */ - 'account_type'?: CreateUserRequestAccountTypeEnum; - /** - * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. - */ - 'account_status'?: CreateUserRequestAccountStatusEnum; - /** - * List of Org IDs to which the user belongs. - */ - 'org_identifiers'?: Array; - /** - * GUIDs or names of the groups to which the newly created user belongs. - */ - 'group_identifiers'?: Array; - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. - */ - 'visibility'?: CreateUserRequestVisibilityEnum; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. - */ - 'notify_on_share'?: boolean | null; - /** - * The user preference for revisiting the onboarding experience. - */ - 'show_onboarding_experience'?: boolean | null; - /** - * flag to get the on-boarding experience is completed or not. - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. - */ - 'home_liveboard_identifier'?: string; - /** - * Metadata objects to add to the user\'s favorites list. - */ - 'favorite_metadata'?: Array; - /** - * Locale for the user. - */ - 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; - /** - * Properties for the user - */ - 'extended_properties'?: any; - /** - * Preferences for the user - */ - 'extended_preferences'?: any; - /** - * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. - */ - 'trigger_welcome_email'?: boolean | null; - /** - * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. - */ - 'trigger_activation_email'?: boolean | null; +declare class OrgType { + 'name'?: string | null; + 'id'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3917,10 +3852,6 @@ declare class CreateUserRequest { }[]; constructor(); } -type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -3933,27 +3864,57 @@ type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE * https://openapi-generator.tech * Do not edit the class manually. */ -declare class InputVariableValue { + +declare class CreateEmailCustomizationResponse { /** - * The connection property value + * Tenant ID */ - 'value': string; + 'tenant_id': string; + 'org': OrgType; /** - * The unique name of the org + * Email customization name. */ - 'org_identifier': string; + 'name': string; /** - * Principal type + * Customization configuration for the email */ - 'principal_type'?: InputVariableValuePrincipalTypeEnum | null; + 'template_properties': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateOrgRequest { /** - * Unique ID or name of the principal + * Name of the Org. */ - 'principal_identifier'?: string | null; + 'name': string; /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + * Description of the Org. */ - 'priority'?: number | null; + 'description'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3969,7 +3930,6 @@ declare class InputVariableValue { }[]; constructor(); } -type InputVariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -3982,24 +3942,23 @@ type InputVariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateVariableRequest { +declare class CreateRoleRequest { /** - * Type of variable + * Unique name of the Role. */ - 'type': CreateVariableRequestTypeEnum; + 'name': string; /** - * Name of the variable. This is unique across the cluster. + * Description of the Role. */ - 'name': string; + 'description'?: string; /** - * If the variable contains sensitive values like passwords + * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. */ - 'sensitive'?: boolean | null; + 'privileges'?: Array; /** - * Values of variable + *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. */ - 'values'?: Array; + 'read_only'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4015,7 +3974,7 @@ declare class CreateVariableRequest { }[]; constructor(); } -type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; /** * ThoughtSpot Public REST API @@ -4031,7 +3990,7 @@ type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | " /** * Schedule selected cron expression. */ -declare class CronExpression { +declare class CronExpressionInput { /** * Day of month of the object. */ @@ -4083,18 +4042,47 @@ declare class CronExpression { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* MetadataType InputType used in Custom Action API\'s +* Frequency settings for the scheduled job. */ -declare class CustomActionMetadataTypeInput { - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - 'type'?: CustomActionMetadataTypeInputTypeEnum | null; +declare class CreateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class CreateScheduleRequestLiveboardOptions { /** - * Unique ID or name of the metadata object. + * Unique ID or name of visualizations. */ - 'identifier': string; + 'visualization_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4110,7 +4098,6 @@ declare class CustomActionMetadataTypeInput { }[]; constructor(); } -type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; /** * ThoughtSpot Public REST API @@ -4123,36 +4110,46 @@ type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKS * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class Table { +/** +* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. +*/ +declare class CreateScheduleRequestPdfOptions { /** - * Name of the table. + * Indicates whether to include complete Liveboard. */ - 'name': string; + 'complete_liveboard'?: boolean | null; /** - * Columns of the table. + * Indicates whether to include cover page with the Liveboard title. */ - 'columns'?: Array | null; + 'include_cover_page'?: boolean | null; /** - * Type of table. Either view or table + * Indicates whether to include customized wide logo in the footer if available. */ - 'type'?: string | null; + 'include_custom_logo'?: boolean | null; /** - * Description of the table + * Indicates whether to include a page with all applied filters. */ - 'description'?: string | null; + 'include_filter_page'?: boolean | null; /** - * Determines if the table is selected + * Indicates whether to include page number in the footer of each page */ - 'selected'?: boolean | null; + 'include_page_number'?: boolean | null; /** - * Determines if the table is linked + * Text to include in the footer of each page. */ - 'linked'?: boolean | null; + 'page_footer_text'?: string | null; /** - * List of relationships for the table + * Page orientation of the PDF. */ - 'relationships'?: Array | null; + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4168,6 +4165,7 @@ declare class Table { }[]; constructor(); } +type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -4180,16 +4178,15 @@ declare class Table { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SchemaObject { +declare class PrincipalsListItemInput { /** - * Name of the schema. + * Unique ID or name of the user or group. */ - 'name': string; + 'identifier': string; /** - * Tables in the schema. + * Principal type. */ - 'tables'?: Array
| null; + 'type': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4218,19 +4215,18 @@ declare class SchemaObject { * Do not edit the class manually. */ -declare class Database { - /** - * Name of the database. - */ - 'name': string; +/** +* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class CreateScheduleRequestRecipientDetails { /** - * Schemas of the database. + * Emails of the recipients. */ - 'schemas'?: Array | null; + 'emails'?: Array | null; /** - * Determines if the object is auto created. + * User or groups to be set as recipients of the schedule notifications. */ - 'auto_created'?: boolean | null; + 'principals'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4259,11 +4255,39 @@ declare class Database { * Do not edit the class manually. */ -declare class DataWarehouseObjects { +declare class CreateScheduleRequest { /** - * Databases of the connection. + * Name of the scheduled job. */ - 'databases': Array; + 'name': string; + /** + * Description of the job. + */ + 'description': string; + /** + * Type of the metadata object. + */ + 'metadata_type': CreateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier': string; + /** + * Export file format. + */ + 'file_format'?: CreateScheduleRequestFileFormatEnum; + 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; + 'pdf_options'?: CreateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone': CreateScheduleRequestTimeZoneEnum; + 'frequency'?: CreateScheduleRequestFrequency; + 'recipient_details': CreateScheduleRequestRecipientDetails; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4279,6 +4303,9 @@ declare class DataWarehouseObjects { }[]; constructor(); } +type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; /** * ThoughtSpot Public REST API @@ -4291,14 +4318,15 @@ declare class DataWarehouseObjects { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DbtSearchResponse { - 'dbt_connection_identifier'?: string | null; - 'project_name'?: string | null; - 'connection_id'?: string | null; - 'connection_name'?: string | null; - 'cdw_database'?: string | null; - 'import_type'?: string | null; - 'author_name'?: string | null; +declare class CreateTagRequest { + /** + * Name of the tag. + */ + 'name': string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4326,15 +4354,47 @@ declare class DbtSearchResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeactivateUserRequest { +declare class CreateUserGroupRequest { /** - * Unique ID or name of the user. + * Name of the group. The group name must be unique. */ - 'user_identifier': string; + 'name': string; /** - * Base url of the cluster. + * Display name for the group. */ - 'base_url': string; + 'display_name': string; + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Privileges to assign to the group + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: CreateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: CreateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4350,6 +4410,9 @@ declare class DeactivateUserRequest { }[]; constructor(); } +type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -4362,14 +4425,15 @@ declare class DeactivateUserRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfig { +declare class FavoriteMetadataInput { /** - * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Unique ID or name of the metadata object. */ - 'visibility'?: boolean | null; + 'identifier'?: string | null; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: FavoriteMetadataInputTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4385,6 +4449,7 @@ declare class DefaultActionConfig { }[]; constructor(); } +type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; /** * ThoughtSpot Public REST API @@ -4397,14 +4462,84 @@ declare class DefaultActionConfig { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfigInput { + +declare class CreateUserRequest { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Name of the user. The username string must be unique. */ - 'visibility'?: boolean | null; + 'name': string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name': string; + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. + */ + 'password'?: string; + /** + * Email of the user account + */ + 'email': string; + /** + * Type of the account. + */ + 'account_type'?: CreateUserRequestAccountTypeEnum; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: CreateUserRequestAccountStatusEnum; + /** + * List of Org IDs to which the user belongs. + */ + 'org_identifiers'?: Array; + /** + * GUIDs or names of the groups to which the newly created user belongs. + */ + 'group_identifiers'?: Array; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: CreateUserRequestVisibilityEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * flag to get the on-boarding experience is completed or not. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * Locale for the user. + */ + 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. + */ + 'trigger_welcome_email'?: boolean | null; + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. + */ + 'trigger_activation_email'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4420,6 +4555,10 @@ declare class DefaultActionConfigInput { }[]; constructor(); } +type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -4432,14 +4571,23 @@ declare class DefaultActionConfigInput { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfigInputCreate { +declare class CreateVariableRequest { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + * Type of variable */ - 'visibility'?: boolean | null; + 'type': CreateVariableRequestTypeEnum; + /** + * Name of the variable. This is unique across the cluster. + */ + 'name': string; + /** + * If the variable contains sensitive values like passwords + */ + 'is_sensitive'?: boolean | null; + /** + * Variable Data Type + */ + 'data_type'?: CreateVariableRequestDataTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4455,6 +4603,8 @@ declare class DefaultActionConfigInputCreate { }[]; constructor(); } +type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type CreateVariableRequestDataTypeEnum = "VARCHAR" | "INT32" | "INT64" | "DOUBLE" | "DATE" | "DATE_TIME"; /** * ThoughtSpot Public REST API @@ -4467,14 +4617,15 @@ declare class DefaultActionConfigInputCreate { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfigSearchInput { +declare class WebhookAuthApiKeyInput { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * The header or query parameter name for the API key. */ - 'visibility'?: boolean | null; + 'key': string; + /** + * The API key value. + */ + 'value': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4502,11 +4653,15 @@ declare class DefaultActionConfigSearchInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteConfigRequest { +declare class WebhookAuthBasicAuthInput { /** - * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later + * Username for basic authentication. */ - 'cluster_level'?: boolean | null; + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4534,15 +4689,19 @@ declare class DeleteConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteConnectionConfigurationRequest { +declare class WebhookAuthOAuth2Input { /** - * Unique ID or name of the configuration. + * OAuth2 authorization server URL. */ - 'configuration_identifier': string; + 'authorization_url': string; /** - * Unique ID or name of the connection. + * OAuth2 client identifier. */ - 'connection_identifier': string; + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4570,11 +4729,18 @@ declare class DeleteConnectionConfigurationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteConnectionRequest { + +/** +* Authorization configuration for the webhook. +*/ +declare class CreateWebhookConfigurationRequestAuthentication { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; /** - * Unique ID or name of the connection. + * Bearer token authentication configuration. */ - 'connection_identifier': string; + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4603,17 +4769,25 @@ declare class DeleteConnectionRequest { * Do not edit the class manually. */ /** -* MetadataType InputType used in Delete MetadataType API +* Configuration for webhook signature verification. */ -declare class DeleteMetadataTypeInput { +declare class CreateWebhookConfigurationRequestSignatureVerification { /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Signature verification method type. */ - 'type'?: DeleteMetadataTypeInputTypeEnum | null; + 'type': CreateWebhookConfigurationRequestSignatureVerificationTypeEnum; /** - * Unique ID or name of the metadata object. + * HTTP header where the signature is sent. */ - 'identifier': string; + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4629,7 +4803,8 @@ declare class DeleteMetadataTypeInput { }[]; constructor(); } -type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP"; +type CreateWebhookConfigurationRequestSignatureVerificationTypeEnum = "HMAC_SHA256"; +type CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum = "SHA256"; /** * ThoughtSpot Public REST API @@ -4643,15 +4818,29 @@ type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" * Do not edit the class manually. */ -declare class DeleteMetadataRequest { +declare class CreateWebhookConfigurationRequest { /** - * Metadata objects. + * Name of the webhook configuration. */ - 'metadata': Array; + 'name': string; /** - * Indicates whether to delete disabled metadata objects. + * Description of the webhook configuration. */ - 'delete_disabled_objects'?: boolean | null; + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events': Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4667,6 +4856,7 @@ declare class DeleteMetadataRequest { }[]; constructor(); } +type CreateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -4679,11 +4869,34 @@ declare class DeleteMetadataRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteOrgEmailCustomizationRequest { +/** +* Schedule selected cron expression. +*/ +declare class CronExpression { /** - * Unique identifier of the organization. + * Day of month of the object. */ - 'org_identifiers'?: Array; + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4711,23 +4924,18 @@ declare class DeleteOrgEmailCustomizationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeployCommitRequest { - /** - * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. - */ - 'commit_id'?: string; - /** - * Name of the remote branch where changes should be picked - */ - 'branch_name': string; +/** +* MetadataType InputType used in Custom Action API\'s +*/ +declare class CustomActionMetadataTypeInput { /** - * Indicates if all files or only modified file at specified commit point should be considered + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'deploy_type'?: DeployCommitRequestDeployTypeEnum; + 'type'?: CustomActionMetadataTypeInputTypeEnum | null; /** - * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + * Unique ID or name of the metadata object. */ - 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4743,8 +4951,7 @@ declare class DeployCommitRequest { }[]; constructor(); } -type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA"; -type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY"; +type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; /** * ThoughtSpot Public REST API @@ -4757,27 +4964,19 @@ type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeployResponse { - /** - * Name of the file deployed - */ - 'file_name'?: string | null; +declare class EntityHeader { /** - * Name of the metadata object - */ - 'metadata_name'?: string | null; - /** - * Type of the metadata object + * Description of the data source. */ - 'metadata_type'?: string | null; + 'description'?: string | null; /** - * Indicates the status of deployment for the file + * Display name of the data source. */ - 'status_code'?: string | null; + 'data_source_name'?: string | null; /** - * Any error or warning with the deployment + * Unique identifier of the data source. */ - 'status_message'?: string | null; + 'data_source_identifier'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4805,8 +5004,17 @@ declare class DeployResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ErrorResponse { - 'error'?: any | null; + +declare class DataSource { + /** + * Confidence score for the data source suggestion. + */ + 'confidence'?: number | null; + 'details'?: EntityHeader; + /** + * LLM reasoning for the data source. + */ + 'reasoning'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4834,19 +5042,36 @@ declare class ErrorResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class EurekaLLMSuggestedQuery { + +declare class Table { /** - * NL query that can be run using spotter aka natural language search to get an AI generated answer. + * Name of the table. */ - 'query'?: string | null; + 'name': string; /** - * Unique identifier of the worksheet on which this query can be run on. + * Columns of the table. */ - 'worksheetId'?: string | null; + 'columns'?: Array | null; /** - * Display name of the worksheet on which this query can be run on. + * Type of table. Either view or table */ - 'worksheetName'?: string | null; + 'type'?: string | null; + /** + * Description of the table + */ + 'description'?: string | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'linked'?: boolean | null; + /** + * List of relationships for the table + */ + 'relationships'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4875,11 +5100,15 @@ declare class EurekaLLMSuggestedQuery { * Do not edit the class manually. */ -declare class EurekaLLMDecomposeQueryResponse { +declare class SchemaObject { /** - * List of analytical questions that can be run on their respective worksheet/data sources. + * Name of the schema. */ - 'decomposedQueries'?: Array | null; + 'name': string; + /** + * Tables in the schema. + */ + 'tables'?: Array
| null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4908,8 +5137,19 @@ declare class EurekaLLMDecomposeQueryResponse { * Do not edit the class manually. */ -declare class EurekaDecomposeQueryResponse { - 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; +declare class Database { + /** + * Name of the database. + */ + 'name': string; + /** + * Schemas of the database. + */ + 'schemas'?: Array | null; + /** + * Determines if the object is auto created. + */ + 'auto_created'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4937,15 +5177,12 @@ declare class EurekaDecomposeQueryResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ExcludeMetadataListItemInput { - /** - * Unique ID or name of the metadata. - */ - 'identifier': string; + +declare class DataWarehouseObjects { /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + * Databases of the connection. */ - 'type': ExcludeMetadataListItemInputTypeEnum; + 'databases': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4961,7 +5198,6 @@ declare class ExcludeMetadataListItemInput { }[]; constructor(); } -type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; /** * ThoughtSpot Public REST API @@ -4974,26 +5210,14 @@ type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for specific region specific overrides to support date/number/string/currency formatting. -*/ -declare class ExportAnswerReportRequestRegionalSettings { - /** - * ISO code to be appended with currency values. - */ - 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; - /** - * Indicates the locale to be used for all formattings. - */ - 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; - /** - * Indicates the locale to be used for number formatting. - */ - 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; - /** - * Indicates the locale to be used for date formatting. - */ - 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; +declare class DbtSearchResponse { + 'dbt_connection_identifier'?: string | null; + 'project_name'?: string | null; + 'connection_id'?: string | null; + 'connection_name'?: string | null; + 'cdw_database'?: string | null; + 'import_type'?: string | null; + 'author_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5009,10 +5233,6 @@ declare class ExportAnswerReportRequestRegionalSettings { }[]; constructor(); } -type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; -type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -5025,37 +5245,15 @@ type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | " * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ExportAnswerReportRequest { - /** - * Unique ID or name of the metadata object. - */ - 'metadata_identifier'?: string; - /** - * Unique ID of the answer session. - */ - 'session_identifier'?: string; - /** - * Generation number of the answer session. - */ - 'generation_number'?: number; - /** - * Export file format. - */ - 'file_format'?: ExportAnswerReportRequestFileFormatEnum; - /** - * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } - */ - 'runtime_filter'?: any; +declare class DeactivateUserRequest { /** - * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + * Unique ID or name of the user. */ - 'runtime_sort'?: any; + 'user_identifier': string; /** - * JSON object for setting values of parameters in runtime. + * Base url of the cluster. */ - 'runtime_param_override'?: any; - 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'base_url': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5071,7 +5269,6 @@ declare class ExportAnswerReportRequest { }[]; constructor(); } -type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; /** * ThoughtSpot Public REST API @@ -5085,37 +5282,13 @@ type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; * Do not edit the class manually. */ /** -* Options for PDF export. +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -declare class ExportLiveboardReportRequestPdfOptions { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page. - */ - 'include_page_number'?: boolean | null; - /** - * Page orientation of the PDF. - */ - 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; - /** - * Indicates whether to include only the first page of the tables. - */ - 'truncate_table'?: boolean | null; +declare class DefaultActionConfig { /** - * Text to include in the footer of each page. + * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'page_footer_text'?: string | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5131,7 +5304,6 @@ declare class ExportLiveboardReportRequestPdfOptions { }[]; constructor(); } -type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -5145,33 +5317,13 @@ type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "L * Do not edit the class manually. */ /** -* Options for PNG export. +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -declare class ExportLiveboardReportRequestPngOptions { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates personalised view of the Liveboard in case of png - */ - 'personalised_view_id'?: string | null; - /** - * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later - */ - 'image_resolution'?: number | null; - /** - * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later - */ - 'image_scale'?: number | null; +declare class DefaultActionConfigInput { /** - * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'include_header'?: boolean | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5199,51 +5351,14 @@ declare class ExportLiveboardReportRequestPngOptions { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ExportLiveboardReportRequest { - /** - * GUID or name of the Liveboard object. - */ - 'metadata_identifier': string; - /** - * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later - */ - 'tab_identifiers'?: Array; - /** - * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later - */ - 'personalised_view_identifier'?: string; - /** - * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. - */ - 'visualization_identifiers'?: Array; - /** - * Transient content of the Liveboard. - */ - 'transient_content'?: string; - /** - * Export file format. - */ - 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; - /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - */ - 'runtime_filter'?: any; - /** - * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } - */ - 'override_filters'?: any; - /** - * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - */ - 'runtime_sort'?: any; - 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; - 'png_options'?: ExportLiveboardReportRequestPngOptions; +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigInputCreate { /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true */ - 'runtime_param_override'?: any; - 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5259,7 +5374,6 @@ declare class ExportLiveboardReportRequest { }[]; constructor(); } -type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG"; /** * ThoughtSpot Public REST API @@ -5272,31 +5386,14 @@ type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ExportMetadataTMLBatchedRequest { - /** - * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP - */ - 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; - /** - * Indicates the position within the complete set from where the API should begin returning objects. - */ - 'batch_offset'?: number; - /** - * Determines the number of objects or items to be retrieved in a single request. - */ - 'batch_size'?: number; - /** - * TML EDOC content format. - */ - 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; - /** - * Indicates whether to export dependent metadata objects of specified metadata objects. - */ - 'export_dependent'?: boolean | null; +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigSearchInput { /** - * Indicates whether to export is happening from all orgs context. + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'all_orgs_override'?: boolean | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5312,8 +5409,6 @@ declare class ExportMetadataTMLBatchedRequest { }[]; constructor(); } -type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE"; -type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; /** * ThoughtSpot Public REST API @@ -5326,30 +5421,11 @@ type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Flags to specify additional options for export. Version: 10.6.0.cl or later -*/ -declare class ExportMetadataTMLRequestExportOptions { - /** - * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id_ref'?: boolean | null; - /** - * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_guid'?: boolean | null; - /** - * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id'?: boolean | null; - /** - * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later - */ - 'export_with_associated_feedbacks'?: boolean | null; +declare class DeleteConfigRequest { /** - * 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 + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later */ - 'export_column_security_rules'?: boolean | null; + 'cluster_level'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5377,26 +5453,15 @@ declare class ExportMetadataTMLRequestExportOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* MetadataType InputType used in Export MetadataType API -*/ -declare class ExportMetadataTypeInput { - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - 'type'?: ExportMetadataTypeInputTypeEnum | null; - /** - * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. - */ - 'identifier'?: string | null; +declare class DeleteConnectionConfigurationRequest { /** - * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + * Unique ID or name of the configuration. */ - 'session_identifier'?: string | null; + 'configuration_identifier': string; /** - * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + * Unique ID or name of the connection. */ - 'generation_number'?: number | null; + 'connection_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5412,7 +5477,6 @@ declare class ExportMetadataTypeInput { }[]; constructor(); } -type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK"; /** * ThoughtSpot Public REST API @@ -5425,41 +5489,11 @@ type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ExportMetadataTMLRequest { - /** - * Metadata objects. - */ - 'metadata': Array; - /** - * Indicates whether to export associated metadata objects of specified metadata objects. - */ - 'export_associated'?: boolean | null; - /** - * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. - */ - 'export_fqn'?: boolean | null; - /** - * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - */ - 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; - /** - * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. - */ - 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; - /** - * Indicates whether to export table while exporting connection. - */ - 'export_dependent'?: boolean | null; - /** - * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. - */ - 'export_connection_as_dependent'?: boolean | null; +declare class DeleteConnectionRequest { /** - * Indicates whether to export is happening from all orgs context. + * Unique ID or name of the connection. */ - 'all_orgs_override'?: boolean | null; - 'export_options'?: ExportMetadataTMLRequestExportOptions; + 'connection_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5475,8 +5509,6 @@ declare class ExportMetadataTMLRequest { }[]; constructor(); } -type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML"; -type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; /** * ThoughtSpot Public REST API @@ -5490,29 +5522,17 @@ type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; * Do not edit the class manually. */ /** -* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +* MetadataType InputType used in Delete MetadataType API */ -declare class ExportOptions { - /** - * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id_ref'?: boolean | null; - /** - * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_guid'?: boolean | null; - /** - * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id'?: boolean | null; +declare class DeleteMetadataTypeInput { /** - * 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 + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'export_with_associated_feedbacks'?: boolean | null; + 'type'?: DeleteMetadataTypeInputTypeEnum | null; /** - * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + * Unique ID or name of the metadata object. */ - 'export_column_security_rules'?: boolean | null; + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5528,6 +5548,7 @@ declare class ExportOptions { }[]; constructor(); } +type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -5540,23 +5561,16 @@ declare class ExportOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ExternalTableInput { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Name of the database. - */ - 'database_name'?: string | null; + +declare class DeleteMetadataRequest { /** - * Name of the schema. + * Metadata objects. */ - 'schema_name'?: string | null; + 'metadata': Array; /** - * Name of the table. Table names may be case-sensitive depending on the database system. + * Indicates whether to delete disabled metadata objects. */ - 'table_name': string; + 'delete_disabled_objects'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5584,19 +5598,11 @@ declare class ExternalTableInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FavoriteMetadataItem { - /** - * Unique ID of the metadata object. - */ - 'id': string; - /** - * name of the metadata object. - */ - 'name': string; +declare class DeleteOrgEmailCustomizationRequest { /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Unique identifier of the organization. */ - 'type': FavoriteMetadataItemTypeEnum; + 'org_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5612,7 +5618,6 @@ declare class FavoriteMetadataItem { }[]; constructor(); } -type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -5625,18 +5630,11 @@ type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | " * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Favorite object options. -*/ -declare class FavoriteObjectOptionsInput { - /** - * Includes objects marked as favorite for the specified users. - */ - 'include'?: boolean | null; +declare class DeleteWebhookConfigurationsRequest { /** - * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + * List of webhook identifiers to delete. */ - 'user_identifiers'?: Array | null; + 'webhook_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5664,35 +5662,23 @@ declare class FavoriteObjectOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchAnswerDataRequest { - /** - * GUID or name of the Answer. - */ - 'metadata_identifier': string; - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - 'data_format'?: FetchAnswerDataRequestDataFormatEnum; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; +declare class DeployCommitRequest { /** - * The number of records to include in a batch. + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. */ - 'record_size'?: number; + 'commit_id'?: string; /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * Name of the remote branch where changes should be picked */ - 'runtime_filter'?: any; + 'branch_name': string; /** - * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * Indicates if all files or only modified file at specified commit point should be considered */ - 'runtime_sort'?: any; + 'deploy_type'?: DeployCommitRequestDeployTypeEnum; /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. */ - 'runtime_param_override'?: any; + 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5708,7 +5694,8 @@ declare class FetchAnswerDataRequest { }[]; constructor(); } -type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; +type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA"; +type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY"; /** * ThoughtSpot Public REST API @@ -5721,11 +5708,27 @@ type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchAnswerSqlQueryRequest { +declare class DeployResponse { /** - * ID or name of an Answer. + * Name of the file deployed */ - 'metadata_identifier': string; + 'file_name'?: string | null; + /** + * Name of the metadata object + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata object + */ + 'metadata_type'?: string | null; + /** + * Indicates the status of deployment for the file + */ + 'status_code'?: string | null; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5753,31 +5756,8 @@ declare class FetchAnswerSqlQueryRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchAsyncImportTaskStatusRequest { - /** - * List of task IDs to fetch status for. - */ - 'task_ids'?: Array; - /** - * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] - */ - 'task_status'?: Array; - /** - * Author GUID or name of async import tasks to filter on. - */ - 'author_identifier'?: string; - /** - * The offset point, starting from where the task status should be included in the response. - */ - 'record_offset'?: number; - /** - * The number of task statuses that should be included in the response starting from offset position. - */ - 'record_size'?: number; - /** - * Boolean flag to specify whether to include import response in the task status objects. - */ - 'include_import_response'?: boolean | null; +declare class ErrorResponse { + 'error'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5793,7 +5773,6 @@ declare class FetchAsyncImportTaskStatusRequest { }[]; constructor(); } -type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; /** * ThoughtSpot Public REST API @@ -5807,11 +5786,11 @@ type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" * Do not edit the class manually. */ -declare class FetchColumnSecurityRulesRequest { +declare class EurekaDataSourceSuggestionResponse { /** - * Array of table identifier objects for which to fetch column security rules + * List of data sources suggested. */ - 'tables': Array; + 'data_sources'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5839,11 +5818,19 @@ declare class FetchColumnSecurityRulesRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchConnectionDiffStatusResponse { +declare class EurekaLLMSuggestedQuery { /** - * Status of the connection diff. + * NL query that can be run using spotter aka natural language search to get an AI generated answer. */ - 'status'?: boolean | null; + 'query'?: string | null; + /** + * Unique identifier of the worksheet on which this query can be run on. + */ + 'worksheetId'?: string | null; + /** + * Display name of the worksheet on which this query can be run on. + */ + 'worksheetName'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5871,43 +5858,12 @@ declare class FetchConnectionDiffStatusResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchLiveboardDataRequest { - /** - * GUID or name of the Liveboard. - */ - 'metadata_identifier': string; - /** - * GUIDs or names of the visualizations on the Liveboard. - */ - 'visualization_identifiers'?: Array; - /** - * Transient content of the Liveboard. - */ - 'transient_content'?: string; - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records to include in a batch. - */ - 'record_size'?: number; - /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - */ - 'runtime_filter'?: any; - /** - * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - */ - 'runtime_sort'?: any; + +declare class EurekaLLMDecomposeQueryResponse { /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * List of analytical questions that can be run on their respective worksheet/data sources. */ - 'runtime_param_override'?: any; + 'decomposedQueries'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5923,7 +5879,6 @@ declare class FetchLiveboardDataRequest { }[]; constructor(); } -type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -5936,15 +5891,9 @@ type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchLiveboardSqlQueryRequest { - /** - * ID or name of the Liveboard. - */ - 'metadata_identifier': string; - /** - * Unique ID or name of visualizations. - */ - 'visualization_identifiers'?: Array; + +declare class EurekaDecomposeQueryResponse { + 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5972,23 +5921,19 @@ declare class FetchLiveboardSqlQueryRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchLogsRequest { +declare class EurekaRelevantQuestion { /** - * Name of the log type - */ - 'log_type': FetchLogsRequestLogTypeEnum; - /** - * Start time in EPOCH format + * NL query that can be run using spotter aka natural language search to get an AI generated answer. */ - 'start_epoch_time_in_millis'?: number; + 'query'?: string | null; /** - * End time in EPOCH format + * Unique identifier of the data source on which this query can be run on. */ - 'end_epoch_time_in_millis'?: number; + 'data_source_identifier'?: string | null; /** - * Fetch all the logs. This is available from 9.10.5.cl + * Display name of the data source on which this query can be run on. */ - 'get_all_logs'?: boolean | null; + 'data_source_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6004,7 +5949,6 @@ declare class FetchLogsRequest { }[]; constructor(); } -type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; /** * ThoughtSpot Public REST API @@ -6017,18 +5961,12 @@ type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* MetadataType InputType used in Permission API\'s -*/ -declare class PermissionsMetadataTypeInput { - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - 'type'?: PermissionsMetadataTypeInputTypeEnum | null; + +declare class EurekaGetRelevantQuestionsResponse { /** - * Unique ID or name of the metadata object. + * List of relevant questions that can be run on their respective data sources. */ - 'identifier': string; + 'relevant_questions'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6044,7 +5982,6 @@ declare class PermissionsMetadataTypeInput { }[]; constructor(); } -type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -6057,15 +5994,15 @@ type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PrincipalsInput { +declare class ExcludeMetadataListItemInput { /** - * Unique ID or name of the principal object such as a user or group. + * Unique ID or name of the metadata. */ 'identifier': string; /** - * Principal type. + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects */ - 'type'?: PrincipalsInputTypeEnum | null; + 'type': ExcludeMetadataListItemInputTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6081,7 +6018,7 @@ declare class PrincipalsInput { }[]; constructor(); } -type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; +type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; /** * ThoughtSpot Public REST API @@ -6094,28 +6031,26 @@ type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class FetchPermissionsOfPrincipalsRequest { - /** - * GUID or name of the user or group. - */ - 'principals': Array; +/** +* Options for specific region specific overrides to support date/number/string/currency formatting. +*/ +declare class ExportAnswerReportRequestRegionalSettings { /** - * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. + * ISO code to be appended with currency values. */ - 'metadata'?: Array; + 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; /** - * The starting record number from where the records should be included for each metadata type. + * Indicates the locale to be used for all formattings. */ - 'record_offset'?: number; + 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; /** - * The number of records that should be included for each metadata type. + * Indicates the locale to be used for number formatting. */ - 'record_size'?: number; + 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; /** - * When no metadata objects input is passed, metadata objects of this type are fetched. + * Indicates the locale to be used for date formatting. */ - 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; + 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6131,7 +6066,10 @@ declare class FetchPermissionsOfPrincipalsRequest { }[]; constructor(); } -type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; +type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -6145,36 +6083,41 @@ type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEB * Do not edit the class manually. */ -declare class FetchPermissionsOnMetadataRequest { +declare class ExportAnswerReportRequest { /** - * GUID or name of the metadata object. + * Unique ID or name of the metadata object. */ - 'metadata': Array; + 'metadata_identifier'?: string; /** - * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. + * Unique ID of the answer session. */ - 'principals'?: Array; + 'session_identifier'?: string; /** - * Indicates whether to fetch permissions of dependent metadata objects. + * Generation number of the answer session. */ - 'include_dependent_objects'?: boolean | null; + 'generation_number'?: number; /** - * The starting record number from where the records should be included for each metadata type. + * Export file format. */ - 'record_offset'?: number; + 'file_format'?: ExportAnswerReportRequestFileFormatEnum; /** - * The number of records that should be included for each metadata type. + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } */ - 'record_size'?: number; + 'runtime_filter'?: any; /** - *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } */ - 'permission_type'?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters in runtime. + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; format: string; }>; static getAttributeTypeMap(): { @@ -6185,6 +6128,7 @@ declare class FetchPermissionsOnMetadataRequest { }[]; constructor(); } +type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; /** * ThoughtSpot Public REST API @@ -6198,21 +6142,37 @@ declare class FetchPermissionsOnMetadataRequest { * Do not edit the class manually. */ /** -* Filter Rules to be applied on Objects. +* Options for PDF export. */ -declare class FilterRules { +declare class ExportLiveboardReportRequestPdfOptions { /** - * The name of the column to apply the filter on. + * Indicates whether to include the cover page with the Liveboard title. */ - 'column_name': string; + 'include_cover_page'?: boolean | null; /** - * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + * Indicates whether to include customized wide logo in the footer if available. */ - 'operator': FilterRulesOperatorEnum; + 'include_custom_logo'?: boolean | null; /** - * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + * Indicates whether to include a page with all applied filters. */ - 'values': Array; + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6228,7 +6188,7 @@ declare class FilterRules { }[]; constructor(); } -type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; +type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -6241,11 +6201,34 @@ type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ForceLogoutUsersRequest { +/** +* Options for PNG export. +*/ +declare class ExportLiveboardReportRequestPngOptions { /** - * GUID or name of the users for force logging out their sessions. + * Indicates whether to include the cover page with the Liveboard title. */ - 'user_identifiers'?: Array; + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6274,11 +6257,50 @@ declare class ForceLogoutUsersRequest { * Do not edit the class manually. */ -/** -* Configuration of schedule with cron expression -*/ -declare class Frequency { - 'cron_expression': CronExpression; +declare class ExportLiveboardReportRequest { + /** + * GUID or name of the Liveboard object. + */ + 'metadata_identifier': string; + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + */ + 'tab_identifiers'?: Array; + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * Export file format. + */ + 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } + */ + 'override_filters'?: any; + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; + 'png_options'?: ExportLiveboardReportRequestPngOptions; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6294,6 +6316,7 @@ declare class Frequency { }[]; constructor(); } +type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG"; /** * ThoughtSpot Public REST API @@ -6306,12 +6329,31 @@ declare class Frequency { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Configuration of schedule with cron expression -*/ -declare class FrequencyInput { - 'cron_expression': CronExpressionInput; +declare class ExportMetadataTMLBatchedRequest { + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + */ + 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; + /** + * Indicates the position within the complete set from where the API should begin returning objects. + */ + 'batch_offset'?: number; + /** + * Determines the number of objects or items to be retrieved in a single request. + */ + 'batch_size'?: number; + /** + * TML EDOC content format. + */ + 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6327,6 +6369,8 @@ declare class FrequencyInput { }[]; constructor(); } +type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE"; +type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; /** * ThoughtSpot Public REST API @@ -6339,35 +6383,34 @@ declare class FrequencyInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GenerateCSVRequest { - /** - * Start date for the calendar in `MM/dd/yyyy` format. - */ - 'start_date': string; +/** +* Flags to specify additional options for export. Version: 10.6.0.cl or later +*/ +declare class ExportMetadataTMLRequestExportOptions { /** - * End date for the calendar in `MM/dd/yyyy` format. + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'end_date': string; + 'include_obj_id_ref'?: boolean | null; /** - * Type of the calendar. + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + 'include_guid'?: boolean | null; /** - * Month offset to start calendar from `January`. + * 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. */ - 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + 'include_obj_id'?: boolean | null; /** - * Specify the starting day of the week. + * 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 */ - 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + 'export_with_associated_feedbacks'?: boolean | null; /** - * Prefix to add before the quarter. + * 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 */ - 'quarter_name_prefix'?: string; + 'export_column_security_rules'?: boolean | null; /** - * Prefix to add before the year. + * 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 */ - 'year_name_prefix'?: string; + 'export_with_column_aliases'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6383,9 +6426,6 @@ declare class GenerateCSVRequest { }[]; constructor(); } -type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; -type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; -type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -6398,9 +6438,26 @@ type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "W * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GenericInfo { - 'id'?: string | null; - 'name'?: string | null; +/** +* MetadataType InputType used in Export MetadataType API +*/ +declare class ExportMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ExportMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. + */ + 'identifier'?: string | null; + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'session_identifier'?: string | null; + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'generation_number'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6416,6 +6473,7 @@ declare class GenericInfo { }[]; constructor(); } +type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK"; /** * ThoughtSpot Public REST API @@ -6428,67 +6486,41 @@ declare class GenericInfo { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportEPackAsyncTaskStatus { - /** - * GUID of tenant from which the task is initiated. - */ - 'tenant_id'?: string | null; + +declare class ExportMetadataTMLRequest { /** - * Organisation ID of the user who initiated the task. + * Metadata objects. */ - 'org_id'?: number | null; + 'metadata': Array; /** - * Unique identifier for the task. + * Indicates whether to export associated metadata objects of specified metadata objects. */ - 'task_id'?: string | null; + 'export_associated'?: boolean | null; /** - * Name of the task. + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. */ - 'task_name'?: string | null; + 'export_fqn'?: boolean | null; /** - * Response of imported objects so far. + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** */ - 'import_response'?: any | null; + 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; /** - * Current status of the task. + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. */ - 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; /** - * ID of the user who initiated the task. + * Indicates whether to export table while exporting connection. */ - 'author_id'?: string | null; + 'export_dependent'?: boolean | null; /** - * Policy used for the import task. + * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. */ - 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + 'export_connection_as_dependent'?: boolean | null; /** - * Time when the task was created (in ms since epoch). + * Indicates whether to export is happening from all orgs context. */ - 'created_at'?: number | null; - /** - * Time when the task started (in ms since epoch). - */ - 'in_progress_at'?: number | null; - /** - * Time when the task was completed (in ms since epoch). - */ - 'completed_at'?: number | null; - /** - * Total number of objects to process. - */ - 'total_object_count'?: number | null; - /** - * Number of objects processed so far. - */ - 'object_processed_count'?: number | null; - /** - * Last time the task status was updated (in ms since epoch). - */ - 'modified_at'?: number | null; - /** - * Display name of the user who initiated the task. - */ - 'author_display_name'?: string | null; + 'all_orgs_override'?: boolean | null; + 'export_options'?: ExportMetadataTMLRequestExportOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6504,8 +6536,8 @@ declare class ImportEPackAsyncTaskStatus { }[]; constructor(); } -type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; -type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; +type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML"; +type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; /** * ThoughtSpot Public REST API @@ -6518,16 +6550,34 @@ type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "V * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetAsyncImportStatusResponse { +/** +* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +*/ +declare class ExportOptions { /** - * List of task statuses. + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'status_list'?: Array | null; + 'include_obj_id_ref'?: boolean | null; /** - * Indicates whether there are more task statuses to fetch. + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'last_batch'?: boolean | null; + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6555,11 +6605,23 @@ declare class GetAsyncImportStatusResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Groups objects. -*/ -declare class GroupObject { - 'identifier'?: string | null; +declare class ExternalTableInput { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6587,18 +6649,19 @@ declare class GroupObject { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Filter Rules to be applied on Objects. -*/ -declare class ParameterValues { +declare class FavoriteMetadataItem { /** - * The name of the column to apply the filter on. + * Unique ID of the metadata object. + */ + 'id': string; + /** + * name of the metadata object. */ 'name': string; /** - * The values to filter on. Only single value is supported currently. + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'values': Array; + 'type': FavoriteMetadataItemTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6614,6 +6677,7 @@ declare class ParameterValues { }[]; constructor(); } +type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -6627,17 +6691,17 @@ declare class ParameterValues { * Do not edit the class manually. */ /** -* Objects on which the filter rules and parameters values should be applied to +* Favorite object options. */ -declare class TokenAccessScopeObject { +declare class FavoriteObjectOptionsInput { /** - * 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. + * Includes objects marked as favorite for the specified users. */ - 'type'?: TokenAccessScopeObjectTypeEnum | null; + 'include'?: boolean | null; /** - * Unique name/id of the object. + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. */ - 'identifier': string; + 'user_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6653,7 +6717,6 @@ declare class TokenAccessScopeObject { }[]; constructor(); } -type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -6666,60 +6729,35 @@ type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetCustomAccessTokenRequest { - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. - */ - 'username': string; - /** - * Password of the user account - */ - 'password'?: string; - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. - */ - 'secret_key'?: string; - /** - * Token validity duration in seconds - */ - 'validity_time_in_sec'?: number; - /** - * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. - */ - 'org_identifier'?: string; - /** - * Indicates whether the specified attributes should be persisted or not. - */ - 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; +declare class FetchAnswerDataRequest { /** - * Filter rules. + * GUID or name of the Answer. */ - 'filter_rules'?: Array; + 'metadata_identifier': string; /** - * Parameter values. + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. */ - 'parameter_values'?: Array; + 'data_format'?: FetchAnswerDataRequestDataFormatEnum; /** - * Objects on which the filter rules and parameters values should be applied to + * The starting record number from where the records should be included. */ - 'objects'?: Array; + 'record_offset'?: number; /** - * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + * The number of records to include in a batch. */ - 'email'?: string; + 'record_size'?: number; /** - * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). */ - 'display_name'?: string; + 'runtime_filter'?: any; /** - * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). */ - 'groups'?: Array; + 'runtime_sort'?: any; /** - * 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. Version: 10.5.0.cl or later + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). */ - 'auto_create'?: boolean | null; + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6735,7 +6773,7 @@ declare class GetCustomAccessTokenRequest { }[]; constructor(); } -type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET"; +type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -6748,18 +6786,11 @@ type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Objects to apply the User_Object. -*/ -declare class UserObject { - /** - * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. - */ - 'type'?: UserObjectTypeEnum | null; +declare class FetchAnswerSqlQueryRequest { /** - * Unique name/id of the object. + * ID or name of an Answer. */ - 'identifier': string; + 'metadata_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6775,7 +6806,6 @@ declare class UserObject { }[]; constructor(); } -type UserObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -6788,31 +6818,31 @@ type UserObjectTypeEnum = "LOGICAL_TABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Objects to apply the Runtime_Filters. -*/ -declare class RuntimeFilters { +declare class FetchAsyncImportTaskStatusRequest { /** - * The column name to apply filter. + * List of task IDs to fetch status for. */ - 'column_name': string; + 'task_ids'?: Array; /** - * Value of the filters. + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] */ - 'values': Array; + 'task_status'?: Array; /** - * Operator value. Example: EQ + * Author GUID or name of async import tasks to filter on. */ - 'operator': RuntimeFiltersOperatorEnum; + 'author_identifier'?: string; /** - * Flag to persist the runtime filters. Version: 9.12.0.cl or later + * The offset point, starting from where the task status should be included in the response. */ - 'persist'?: boolean | null; + 'record_offset'?: number; /** - * Object to apply the runtime filter. + * The number of task statuses that should be included in the response starting from offset position. */ - 'objects'?: Array | null; + 'record_size'?: number; + /** + * Boolean flag to specify whether to include import response in the task status objects. + */ + 'include_import_response'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6828,7 +6858,7 @@ declare class RuntimeFilters { }[]; constructor(); } -type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; +type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; /** * ThoughtSpot Public REST API @@ -6842,26 +6872,11 @@ type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" * Do not edit the class manually. */ -/** -* Objects to apply the Runtime_Parameters. -*/ -declare class RuntimeParameters { - /** - * The name of the parameter. - */ - 'name': string; - /** - * The array of values. - */ - 'values': Array; - /** - * Flag to persist the parameters. Version: 9.12.0.cl or later - */ - 'persist'?: boolean | null; +declare class FetchColumnSecurityRulesRequest { /** - * Object to apply the runtime parameter. + * Array of table identifier objects for which to fetch column security rules */ - 'objects'?: Array | null; + 'tables': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6889,27 +6904,11 @@ declare class RuntimeParameters { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Objects to apply the Runtime_Sorts. -*/ -declare class RuntimeSorts { - /** - * The column name to apply filter. - */ - 'column_name'?: string | null; - /** - * Order for the sort. - */ - 'order'?: RuntimeSortsOrderEnum | null; - /** - * Flag to persist the runtime sorts. Version: 9.12.0.cl or later - */ - 'persist'?: boolean | null; +declare class FetchConnectionDiffStatusResponse { /** - * Object to apply the runtime sort. + * Status of the connection diff. */ - 'objects'?: Array | null; + 'status'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6925,7 +6924,6 @@ declare class RuntimeSorts { }[]; constructor(); } -type RuntimeSortsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -6938,24 +6936,43 @@ type RuntimeSortsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). -*/ -declare class GetFullAccessTokenRequestUserParameters { - 'objects'?: Array | null; +declare class FetchLiveboardDataRequest { /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * GUID or name of the Liveboard. */ - 'runtime_filters'?: Array | null; + 'metadata_identifier': string; /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * GUIDs or names of the visualizations on the Liveboard. */ - 'runtime_sorts'?: Array | null; + 'visualization_identifiers'?: Array; /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * Transient content of the Liveboard. */ - 'parameters'?: Array | null; + 'transient_content'?: string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6971,6 +6988,7 @@ declare class GetFullAccessTokenRequestUserParameters { }[]; constructor(); } +type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -6983,45 +7001,15 @@ declare class GetFullAccessTokenRequestUserParameters { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetFullAccessTokenRequest { - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. - */ - 'username': string; - /** - * Password of the user account - */ - 'password'?: string; - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. - */ - 'secret_key'?: string; - /** - * Token validity duration in seconds - */ - 'validity_time_in_sec'?: number; - /** - * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. - */ - 'org_id'?: number; - /** - * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). - */ - 'email'?: string; - /** - * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). - */ - 'display_name'?: string; +declare class FetchLiveboardSqlQueryRequest { /** - * 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. + * ID or name of the Liveboard. */ - 'auto_create'?: boolean | null; + 'metadata_identifier': 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). + * Unique ID or name of visualizations. */ - 'group_identifiers'?: Array; - 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + 'visualization_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7049,49 +7037,23 @@ declare class GetFullAccessTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetObjectAccessTokenRequest { - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. - */ - 'username': string; - /** - * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. - */ - 'object_id'?: string; - /** - * Password of the user account - */ - 'password'?: string; - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. - */ - 'secret_key'?: string; - /** - * Token validity duration in seconds - */ - 'validity_time_in_sec'?: number; - /** - * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. - */ - 'org_id'?: number; +declare class FetchLogsRequest { /** - * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * Name of the log type */ - 'email'?: string; + 'log_type': FetchLogsRequestLogTypeEnum; /** - * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * Start time in EPOCH format */ - 'display_name'?: string; + 'start_epoch_time_in_millis'?: number; /** - * 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. + * End time in EPOCH format */ - 'auto_create'?: boolean | null; + 'end_epoch_time_in_millis'?: number; /** - * 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. + * Fetch all the logs. This is available from 9.10.5.cl */ - 'group_identifiers'?: Array; - 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + 'get_all_logs'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7107,6 +7069,7 @@ declare class GetObjectAccessTokenRequest { }[]; constructor(); } +type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; /** * ThoughtSpot Public REST API @@ -7119,27 +7082,18 @@ declare class GetObjectAccessTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GetTokenResponse { - /** - * Bearer auth token. - */ - 'token': string; - /** - * Token creation time in milliseconds. - */ - 'creation_time_in_millis': number; - /** - * Token expiration time in milliseconds. - */ - 'expiration_time_in_millis': number; +/** +* MetadataType InputType used in Permission API\'s +*/ +declare class PermissionsMetadataTypeInput { /** - * Username to whom the token is issued. + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'valid_for_user_id': string; + 'type'?: PermissionsMetadataTypeInputTypeEnum | null; /** - * Unique identifier of the user to whom the token is issued. + * Unique ID or name of the metadata object. */ - 'valid_for_username': string; + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7155,6 +7109,7 @@ declare class GetTokenResponse { }[]; constructor(); } +type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -7167,43 +7122,15 @@ declare class GetTokenResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GroupsImportListInput { - /** - * Unique display name of the group. - */ - 'display_name': string; - /** - * Unique ID or name of the group. - */ - 'group_identifier': string; - /** - * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. - */ - 'default_liveboard_identifiers'?: Array | null; - /** - * Description of the group. - */ - 'description'?: string | null; - /** - * Privileges that will be assigned to the group. - */ - 'privileges'?: Array | null; - /** - * Unique ID or name of the sub-groups to add to the group. - */ - 'sub_group_identifiers'?: Array | null; - /** - * Type of the group. - */ - 'type'?: GroupsImportListInputTypeEnum | null; +declare class PrincipalsInput { /** - * Unique ID or name of the users to assign to the group. + * Unique ID or name of the principal object such as a user or group. */ - 'user_identifiers'?: Array | null; + 'identifier': string; /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + * Principal type. */ - 'visibility'?: GroupsImportListInputVisibilityEnum | null; + 'type'?: PrincipalsInputTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7219,9 +7146,7 @@ declare class GroupsImportListInput { }[]; constructor(); } -type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -7234,18 +7159,28 @@ type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Attribute to update in a header. -*/ -declare class HeaderAttributeInput { + +declare class FetchPermissionsOfPrincipalsRequest { /** - * Attribute name to be updated. + * GUID or name of the user or group. */ - 'name': string; + 'principals': Array; /** - * Attribute\'s new value. + * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. */ - 'value': string; + 'metadata'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + */ + 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7261,6 +7196,7 @@ declare class HeaderAttributeInput { }[]; constructor(); } +type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -7274,26 +7210,31 @@ declare class HeaderAttributeInput { * Do not edit the class manually. */ -/** -* Favorite object options. -*/ -declare class HeaderUpdateInput { +declare class FetchPermissionsOnMetadataRequest { /** - * Unique ID of a specified type to identify the header. + * GUID or name of the metadata object. */ - 'identifier'?: string | null; + 'metadata': Array; /** - * Custom object identifier to uniquely identify header. + * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. */ - 'obj_identifier'?: string | null; + 'principals'?: Array; /** - * Optional type of the header object. + * Indicates whether to fetch permissions of dependent metadata objects. */ - 'type'?: HeaderUpdateInputTypeEnum | null; + 'include_dependent_objects'?: boolean | null; /** - * List of attributes to update + * The starting record number from where the records should be included for each metadata type. */ - 'attributes': Array; + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + */ + 'permission_type'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7309,7 +7250,6 @@ declare class HeaderUpdateInput { }[]; constructor(); } -type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -7322,31 +7262,22 @@ type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportMetadataTMLAsyncRequest { +/** +* Filter Rules to be applied on Objects. +*/ +declare class FilterRules { /** - * Details of TML objects. + * The name of the column to apply the filter on. */ - 'metadata_tmls': Array; - /** - * If selected, creates TML objects with new GUIDs. - */ - 'create_new'?: boolean | null; - /** - * If import is happening from all orgs context. - */ - 'all_orgs_override'?: boolean | null; - /** - *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] - */ - 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + 'column_name': string; /** - *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. */ - 'skip_diff_check'?: boolean | null; + 'operator': FilterRulesOperatorEnum; /** - *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. */ - 'enable_large_metadata_validation'?: boolean | null; + 'values': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7362,7 +7293,7 @@ declare class ImportMetadataTMLAsyncRequest { }[]; constructor(); } -type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; +type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; /** * ThoughtSpot Public REST API @@ -7375,31 +7306,11 @@ type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportMetadataTMLRequest { - /** - * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - */ - 'metadata_tmls': Array; - /** - * Specifies the import policy for the TML import. - */ - 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; - /** - * If selected, creates TML objects with new GUIDs. - */ - 'create_new'?: boolean | null; - /** - * If import is happening from all orgs context. - */ - 'all_orgs_override'?: boolean | null; - /** - *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. - */ - 'skip_diff_check'?: boolean | null; +declare class ForceLogoutUsersRequest { /** - *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + * GUID or name of the users for force logging out their sessions. */ - 'enable_large_metadata_validation'?: boolean | null; + 'user_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7415,7 +7326,6 @@ declare class ImportMetadataTMLRequest { }[]; constructor(); } -type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -7429,63 +7339,11 @@ type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VAL * Do not edit the class manually. */ -declare class ImportUser { - /** - * Unique ID or name of the user. - */ - 'user_identifier': string; - /** - * Display name of the user. - */ - 'display_name': string; - /** - * Password of the user. - */ - 'password'?: string | null; - /** - * Type of the user account. - */ - 'account_type'?: ImportUserAccountTypeEnum | null; - /** - * Status of the user account. - */ - 'account_status'?: ImportUserAccountStatusEnum | null; - /** - * Email address of the user. - */ - 'email'?: string | null; - /** - * ID or name of the Orgs to which the user belongs. - */ - 'org_identifiers'?: Array | null; - /** - * ID or name of the groups to which the user belongs. - */ - 'group_identifiers'?: Array | null; - /** - * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. - */ - 'visibility'?: ImportUserVisibilityEnum | null; - /** - * Notify user when other users or groups share metadata objects - */ - 'notify_on_share'?: boolean | null; - /** - * Show or hide the new user onboarding walkthroughs - */ - 'show_onboarding_experience'?: boolean | null; - /** - * Revisit the new user onboarding walkthroughs - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * Unique ID or name of the default Liveboard assigned to the user. - */ - 'home_liveboard_identifier'?: string | null; - /** - * Metadata objects to add to the user\'s favorites list. - */ - 'favorite_metadata'?: Array | null; +/** +* Configuration of schedule with cron expression +*/ +declare class Frequency { + 'cron_expression': CronExpression; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7501,9 +7359,6 @@ declare class ImportUser { }[]; constructor(); } -type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -7517,19 +7372,11 @@ type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * Do not edit the class manually. */ -declare class ImportUserGroupsRequest { - /** - * Details of groups which are to be imported - */ - 'groups'?: Array; - /** - * If set to true, removes groups that are not specified in the API request. - */ - 'delete_unspecified_groups'?: boolean | null; - /** - * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. - */ - 'dry_run'?: boolean | null; +/** +* Configuration of schedule with cron expression +*/ +declare class FrequencyInput { + 'cron_expression': CronExpressionInput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7557,9 +7404,35 @@ declare class ImportUserGroupsRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UserGroup { - 'id'?: string | null; - 'name'?: string | null; +declare class GenerateCSVRequest { + /** + * Start date for the calendar in `MM/dd/yyyy` format. + */ + 'start_date': string; + /** + * End date for the calendar in `MM/dd/yyyy` format. + */ + 'end_date': string; + /** + * Type of the calendar. + */ + 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + /** + * Month offset to start calendar from `January`. + */ + 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7575,6 +7448,9 @@ declare class UserGroup { }[]; constructor(); } +type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -7587,20 +7463,9 @@ declare class UserGroup { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ImportUserGroupsResponse { - /** - * The groups which are added into the system. - */ - 'groups_added': Array; - /** - * The groups which are deleted from the system. - */ - 'groups_deleted': Array; - /** - * The groups which are updated in the system. - */ - 'groups_updated': Array; +declare class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7628,15 +7493,67 @@ declare class ImportUserGroupsResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportUserType { +declare class ImportEPackAsyncTaskStatus { /** - * Unique identifier of the user. + * GUID of tenant from which the task is initiated. */ - 'id'?: string | null; + 'tenant_id'?: string | null; /** - * Name of the user. + * Organisation ID of the user who initiated the task. */ - 'name': string; + 'org_id'?: number | null; + /** + * Unique identifier for the task. + */ + 'task_id'?: string | null; + /** + * Name of the task. + */ + 'task_name'?: string | null; + /** + * Response of imported objects so far. + */ + 'import_response'?: any | null; + /** + * Current status of the task. + */ + 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + /** + * ID of the user who initiated the task. + */ + 'author_id'?: string | null; + /** + * Policy used for the import task. + */ + 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + /** + * Time when the task was created (in ms since epoch). + */ + 'created_at'?: number | null; + /** + * Time when the task started (in ms since epoch). + */ + 'in_progress_at'?: number | null; + /** + * Time when the task was completed (in ms since epoch). + */ + 'completed_at'?: number | null; + /** + * Total number of objects to process. + */ + 'total_object_count'?: number | null; + /** + * Number of objects processed so far. + */ + 'object_processed_count'?: number | null; + /** + * Last time the task status was updated (in ms since epoch). + */ + 'modified_at'?: number | null; + /** + * Display name of the user who initiated the task. + */ + 'author_display_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7652,6 +7569,8 @@ declare class ImportUserType { }[]; constructor(); } +type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; +type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -7665,23 +7584,15 @@ declare class ImportUserType { * Do not edit the class manually. */ -declare class ImportUsersRequest { +declare class GetAsyncImportStatusResponse { /** - * List of users needs to be imported. + * List of task statuses. */ - 'users': Array; + 'status_list'?: Array | null; /** - * The default password to assign to users if they do not have a password assigned in ThoughtSpot. - */ - 'default_password'?: string; - /** - * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. - */ - 'dry_run'?: boolean | null; - /** - * If set to true, removes the users that are not specified in the API request. + * Indicates whether there are more task statuses to fetch. */ - 'delete_unspecified_users'?: boolean | null; + 'last_batch'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7709,11 +7620,11 @@ declare class ImportUsersRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ImportUsersResponse { - 'users_added'?: Array | null; - 'users_updated'?: Array | null; - 'users_deleted'?: Array | null; +/** +* Groups objects. +*/ +declare class GroupObject { + 'identifier'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7741,23 +7652,18 @@ declare class ImportUsersResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class InputEurekaNLSRequest { - /** - * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. - */ - 'agentVersion'?: number | null; - /** - * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. - */ - 'bypassCache'?: boolean | null; +/** +* Filter Rules to be applied on Objects. +*/ +declare class ParameterValues { /** - * User specific instructions for processing the @query. + * The name of the column to apply the filter on. */ - 'instructions'?: Array | null; + 'name': string; /** - * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + * The values to filter on. Only single value is supported currently. */ - 'query'?: string | null; + 'values': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7786,11 +7692,17 @@ declare class InputEurekaNLSRequest { * Do not edit the class manually. */ /** -* Metadata objects. +* Objects on which the filter rules and parameters values should be applied to */ -declare class JWTMetadataObject { - 'identifier'?: string | null; - 'type'?: JWTMetadataObjectTypeEnum | null; +declare class TokenAccessScopeObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: TokenAccessScopeObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7806,7 +7718,7 @@ declare class JWTMetadataObject { }[]; constructor(); } -type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; +type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -7819,22 +7731,60 @@ type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* List of runtime parameters need to set during the session. -*/ -declare class JWTParameter { + +declare class GetCustomAccessTokenRequest { /** - * Runtime filter parameter type in JWT. + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. */ - 'runtime_filter'?: any | null; + 'username': string; /** - * Runtime sort parameter type in JWT. + * Password of the user account */ - 'runtime_sort'?: any | null; + 'password'?: string; /** - * Runtime param override type in JWT. + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. */ - 'runtime_param_override'?: any | null; + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. + */ + 'org_identifier'?: string; + /** + * Indicates whether the specified attributes should be persisted or not. + */ + 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; + /** + * Filter rules. + */ + 'filter_rules'?: Array; + /** + * Parameter values. + */ + 'parameter_values'?: Array; + /** + * Objects on which the filter rules and parameters values should be applied to + */ + 'objects'?: Array; + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + */ + 'email'?: string; + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + */ + 'display_name'?: string; + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + */ + 'groups'?: Array; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. Version: 10.5.0.cl or later + */ + 'auto_create'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7850,6 +7800,7 @@ declare class JWTParameter { }[]; constructor(); } +type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET"; /** * ThoughtSpot Public REST API @@ -7862,13 +7813,11 @@ declare class JWTParameter { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* -*/ -declare class JWTUserOptions { - 'parameters'?: Array; - 'metadata'?: Array | null; +declare class GetDataSourceSuggestionsRequest { + /** + * User query used to suggest data sources. + */ + 'query': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7896,12 +7845,18 @@ declare class JWTUserOptions { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +* Objects to apply the User_Object. */ -declare class JWTUserOptionsFull { - 'parameters'?: Array | null; +declare class UserObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: UserObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7917,6 +7872,7 @@ declare class JWTUserOptionsFull { }[]; constructor(); } +type UserObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -7929,43 +7885,31 @@ declare class JWTUserOptionsFull { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class LiveboardContent { - /** - * Total available data row count. - */ - 'available_data_row_count': number; - /** - * Name of the columns. - */ - 'column_names': Array; - /** - * Rows of data set. - */ - 'data_rows': Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset': number; + +/** +* Objects to apply the Runtime_Filters. +*/ +declare class RuntimeFilters { /** - * The number of records that should be included. + * The column name to apply filter. */ - 'record_size': number; + 'column_name': string; /** - * Total returned data row count. + * Value of the filters. */ - 'returned_data_row_count': number; + 'values': Array; /** - * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + * Operator value. Example: EQ */ - 'sampling_ratio': number; + 'operator': RuntimeFiltersOperatorEnum; /** - * Unique ID of the visualization. + * Flag to persist the runtime filters. Version: 9.12.0.cl or later */ - 'visualization_id'?: string | null; + 'persist'?: boolean | null; /** - * Name of the visualization. + * Object to apply the runtime filter. */ - 'visualization_name'?: string | null; + 'objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7981,6 +7925,7 @@ declare class LiveboardContent { }[]; constructor(); } +type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; /** * ThoughtSpot Public REST API @@ -7994,19 +7939,26 @@ declare class LiveboardContent { * Do not edit the class manually. */ -declare class LiveboardDataResponse { +/** +* Objects to apply the Runtime_Parameters. +*/ +declare class RuntimeParameters { /** - * The unique identifier of the object + * The name of the parameter. */ - 'metadata_id': string; + 'name': string; /** - * Name of the metadata object + * The array of values. */ - 'metadata_name': string; + 'values': Array; /** - * Data content of metadata objects + * Flag to persist the parameters. Version: 9.12.0.cl or later */ - 'contents': Array; + 'persist'?: boolean | null; + /** + * Object to apply the runtime parameter. + */ + 'objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8034,14 +7986,27 @@ declare class LiveboardDataResponse { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Options to specify details of Liveboard. +* Objects to apply the Runtime_Sorts. */ -declare class LiveboardOptions { +declare class RuntimeSorts { /** - * Unique ID or name of visualizations. + * The column name to apply filter. */ - 'visualization_identifiers': Array; + 'column_name'?: string | null; + /** + * Order for the sort. + */ + 'order'?: RuntimeSortsOrderEnum | null; + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime sort. + */ + 'objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8057,6 +8022,7 @@ declare class LiveboardOptions { }[]; constructor(); } +type RuntimeSortsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -8069,14 +8035,24 @@ declare class LiveboardOptions { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Options to specify details of Liveboard. +*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). */ -declare class LiveboardOptionsInput { +declare class GetFullAccessTokenRequestUserParameters { + 'objects'?: Array | null; /** - * Unique ID or name of visualizations. + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` */ - 'visualization_identifiers': Array; + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8104,17 +8080,47 @@ declare class LiveboardOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class LogResponse { + +declare class GetFullAccessTokenRequest { /** - * Date timestamp of the log entry + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. */ - 'date': string; + 'username': string; /** - * Log data + * Password of the user account */ - 'log': string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ name: string; baseName: string; type: string; @@ -8140,23 +8146,49 @@ declare class LogResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class LoginRequest { + +declare class GetObjectAccessTokenRequest { /** - * Username of the ThoughtSpot user + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. */ - 'username'?: string; + 'username': string; + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. + */ + 'object_id'?: string; /** * Password of the user account */ 'password'?: string; /** - * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. */ - 'org_identifier'?: string; + 'secret_key'?: string; /** - * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + * Token validity duration in seconds */ - 'remember_me'?: boolean | null; + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8184,17 +8216,18 @@ declare class LoginRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class MetadataAssociationItem { - 'action_config': ActionConfig; +/** +* Additional context to guide the response. +*/ +declare class GetRelevantQuestionsRequestAiContext { /** - * Unique ID or name of the metadata. + * User specific text instructions sent to AI system for processing the query. */ - 'identifier': string; + 'instructions'?: Array | null; /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. */ - 'type': string; + 'content'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8222,9 +8255,26 @@ declare class MetadataAssociationItem { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class MetadataInput { - 'identifier'?: string | null; - 'type'?: MetadataInputTypeEnum | null; +/** +* metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. +*/ +declare class GetRelevantQuestionsRequestMetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8240,7 +8290,6 @@ declare class MetadataInput { }[]; constructor(); } -type MetadataInputTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -8253,27 +8302,22 @@ type MetadataInputTypeEnum = "LIVEBOARD"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class MetadataListItemInput { - /** - * Unique ID or name of the metadata. - */ - 'identifier'?: string | null; - /** - * CustomObjectId of the metadata. - */ - 'obj_identifier'?: string | null; + +declare class GetRelevantQuestionsRequest { + 'metadata_context': GetRelevantQuestionsRequestMetadataContext; /** - * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + * Maximum number of relevant questions that is allowed in the response, default = 5. */ - 'name_pattern'?: string | null; + 'limit_relevant_questions'?: number; /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + * If true, results are not returned from cache & calculated every time. */ - 'type'?: MetadataListItemInputTypeEnum | null; + 'bypass_cache'?: boolean | null; /** - * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. */ - 'subtypes'?: Array | null; + 'query': string; + 'ai_context'?: GetRelevantQuestionsRequestAiContext; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8289,8 +8333,6 @@ declare class MetadataListItemInput { }[]; constructor(); } -type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; -type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW"; /** * ThoughtSpot Public REST API @@ -8303,10 +8345,27 @@ type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "P * https://openapi-generator.tech * Do not edit the class manually. */ -declare class MetadataResponse { - 'name'?: string | null; - 'id': string; - 'type': MetadataResponseTypeEnum; +declare class GetTokenResponse { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8322,7 +8381,6 @@ declare class MetadataResponse { }[]; constructor(); } -type MetadataResponseTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -8335,50 +8393,43 @@ type MetadataResponseTypeEnum = "LIVEBOARD"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Metadata Search Response Object. -*/ -declare class MetadataSearchResponse { - /** - * Unique identifier of the metadata. - */ - 'metadata_id'?: string | null; +declare class GroupsImportListInput { /** - * Name of the metadata. + * Unique display name of the group. */ - 'metadata_name'?: string | null; + 'display_name': string; /** - * Type of the metadata. + * Unique ID or name of the group. */ - 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + 'group_identifier': string; /** - * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. */ - 'metadata_obj_id'?: string | null; + 'default_liveboard_identifiers'?: Array | null; /** - * Details of dependent objects of the metadata objects. + * Description of the group. */ - 'dependent_objects'?: any | null; + 'description'?: string | null; /** - * Details of incomplete information of the metadata objects if any. + * Privileges that will be assigned to the group. */ - 'incomplete_objects'?: Array | null; + 'privileges'?: Array | null; /** - * Complete details of the metadata objects. + * Unique ID or name of the sub-groups to add to the group. */ - 'metadata_detail'?: any | null; + 'sub_group_identifiers'?: Array | null; /** - * Header information of the metadata objects. + * Type of the group. */ - 'metadata_header'?: any | null; + 'type'?: GroupsImportListInputTypeEnum | null; /** - * Visualization header information of the metadata objects. + * Unique ID or name of the users to assign to the group. */ - 'visualization_headers'?: Array | null; + 'user_identifiers'?: Array | null; /** - * Stats of the metadata object. Includes views, favorites, last_accessed. + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. */ - 'stats'?: any | null; + 'visibility'?: GroupsImportListInputVisibilityEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8394,7 +8445,9 @@ declare class MetadataSearchResponse { }[]; constructor(); } -type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; +type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -8408,17 +8461,17 @@ type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_ * Do not edit the class manually. */ /** -* Sort options. +* Attribute to update in a header. */ -declare class MetadataSearchSortOptions { +declare class HeaderAttributeInput { /** - * Name of the field to apply the sort on. + * Attribute name to be updated. */ - 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + 'name': string; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Attribute\'s new value. */ - 'order'?: MetadataSearchSortOptionsOrderEnum | null; + 'value': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8434,8 +8487,6 @@ declare class MetadataSearchSortOptions { }[]; constructor(); } -type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; -type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -8448,19 +8499,27 @@ type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ModelTableList { + +/** +* Favorite object options. +*/ +declare class HeaderUpdateInput { /** - * Name of the Model. + * Unique ID of a specified type to identify the header. */ - 'model_name': string; + 'identifier'?: string | null; /** - * Model directory path, this is optional param and required if there are duplicate models with the same name. + * Custom object identifier to uniquely identify header. */ - 'model_path'?: string | null; + 'obj_identifier'?: string | null; /** - * List of Tables. + * Optional type of the header object. */ - 'tables': Array; + 'type'?: HeaderUpdateInputTypeEnum | null; + /** + * List of attributes to update + */ + 'attributes': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8476,6 +8535,7 @@ declare class ModelTableList { }[]; constructor(); } +type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -8488,57 +8548,31 @@ declare class ModelTableList { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* The object representation with ID and Name. -*/ -declare class ObjectIDAndName { +declare class ImportMetadataTMLAsyncRequest { /** - * The unique identifier of the object. + * Details of TML objects. */ - 'id'?: string | null; + 'metadata_tmls': Array; /** - * Name of the object. + * If selected, creates TML objects with new GUIDs. */ - 'name'?: string | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* The current Org context of the user. -*/ -declare class Org { + 'create_new'?: boolean | null; /** - * The ID of the object. + * If import is happening from all orgs context. */ - 'id': number; + 'all_orgs_override'?: boolean | null; /** - * Name of the object. + *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] */ - 'name': string; + 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8554,6 +8588,7 @@ declare class Org { }[]; constructor(); } +type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -8566,27 +8601,31 @@ declare class Org { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class OrgResponse { +declare class ImportMetadataTMLRequest { /** - * Unique identifier of the Org. + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** */ - 'id'?: number | null; + 'metadata_tmls': Array; /** - * Name of the Org. + * Specifies the import policy for the TML import. */ - 'name'?: string | null; + 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; /** - * Status of the Org. + * If selected, creates TML objects with new GUIDs. */ - 'status'?: OrgResponseStatusEnum | null; + 'create_new'?: boolean | null; /** - * Description of the Org. + * If import is happening from all orgs context. */ - 'description'?: string | null; + 'all_orgs_override'?: boolean | null; /** - * Visibility of the Org. + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. */ - 'visibility'?: OrgResponseVisibilityEnum | null; + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8602,8 +8641,7 @@ declare class OrgResponse { }[]; constructor(); } -type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; -type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; +type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -8616,27 +8654,64 @@ type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ParameterizeMetadataRequest { + +declare class ImportUser { /** - * Type of metadata object to parameterize. + * Unique ID or name of the user. */ - 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + 'user_identifier': string; /** - * Unique ID or name of the metadata object to parameterize. + * Display name of the user. */ - 'metadata_identifier': string; + 'display_name': string; /** - * Type of field in the metadata to parameterize. + * Password of the user. */ - 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + 'password'?: string | null; /** - * Name of the field which needs to be parameterized. + * Type of the user account. */ - 'field_name': string; + 'account_type'?: ImportUserAccountTypeEnum | null; /** - * Unique ID or name of the variable to use for parameterization + * Status of the user account. */ - 'variable_identifier': string; + 'account_status'?: ImportUserAccountStatusEnum | null; + /** + * Email address of the user. + */ + 'email'?: string | null; + /** + * ID or name of the Orgs to which the user belongs. + */ + 'org_identifiers'?: Array | null; + /** + * ID or name of the groups to which the user belongs. + */ + 'group_identifiers'?: Array | null; + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility'?: ImportUserVisibilityEnum | null; + /** + * Notify user when other users or groups share metadata objects + */ + 'notify_on_share'?: boolean | null; + /** + * Show or hide the new user onboarding walkthroughs + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Revisit the new user onboarding walkthroughs + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Unique ID or name of the default Liveboard assigned to the user. + */ + 'home_liveboard_identifier'?: string | null; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8652,8 +8727,9 @@ declare class ParameterizeMetadataRequest { }[]; constructor(); } -type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; -type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; +type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -8666,46 +8742,20 @@ type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPER * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class PdfOptions { - /** - * Indicates whether to include complete Liveboard. - */ - 'complete_liveboard'?: boolean | null; - /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page - */ - 'include_page_number'?: boolean | null; - /** - * Text to include in the footer of each page. - */ - 'page_footer_text'?: string | null; + +declare class ImportUserGroupsRequest { /** - * Page orientation of the PDF. + * Details of groups which are to be imported */ - 'page_orientation'?: string | null; + 'groups'?: Array; /** - * Page size. + * If set to true, removes groups that are not specified in the API request. */ - 'page_size'?: PdfOptionsPageSizeEnum | null; + 'delete_unspecified_groups'?: boolean | null; /** - * Indicates whether to include only first page of the tables. + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. */ - 'truncate_table'?: boolean | null; + 'dry_run'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8721,7 +8771,6 @@ declare class PdfOptions { }[]; constructor(); } -type PdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -8734,35 +8783,9 @@ type PdfOptionsPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PdfOptionsInput { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page. - */ - 'include_page_number'?: boolean | null; - /** - * Page orientation of the PDF. - */ - 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; - /** - * Indicates whether to include only the first page of the tables. - */ - 'truncate_table'?: boolean | null; - /** - * Text to include in the footer of each page. - */ - 'page_footer_text'?: string | null; +declare class UserGroup { + 'id'?: string | null; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8778,7 +8801,6 @@ declare class PdfOptionsInput { }[]; constructor(); } -type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -8792,15 +8814,19 @@ type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; * Do not edit the class manually. */ -/** -* Details of users or groups. -*/ -declare class PermissionInput { - 'principal': PrincipalsInput; +declare class ImportUserGroupsResponse { /** - * Object share mode. + * The groups which are added into the system. */ - 'share_mode': PermissionInputShareModeEnum; + 'groups_added': Array; + /** + * The groups which are deleted from the system. + */ + 'groups_deleted': Array; + /** + * The groups which are updated in the system. + */ + 'groups_updated': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8816,7 +8842,6 @@ declare class PermissionInput { }[]; constructor(); } -type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -8829,8 +8854,15 @@ type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PermissionOfMetadataResponse { - 'metadata_permission_details'?: any | null; +declare class ImportUserType { + /** + * Unique identifier of the user. + */ + 'id'?: string | null; + /** + * Name of the user. + */ + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8858,8 +8890,24 @@ declare class PermissionOfMetadataResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PermissionOfPrincipalsResponse { - 'principal_permission_details'?: any | null; + +declare class ImportUsersRequest { + /** + * List of users needs to be imported. + */ + 'users': Array; + /** + * The default password to assign to users if they do not have a password assigned in ThoughtSpot. + */ + 'default_password'?: string; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + /** + * If set to true, removes the users that are not specified in the API request. + */ + 'delete_unspecified_users'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8887,31 +8935,55 @@ declare class PermissionOfPrincipalsResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PngOptionsInput { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; + +declare class ImportUsersResponse { + 'users_added'?: Array | null; + 'users_updated'?: Array | null; + 'users_deleted'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class InputEurekaNLSRequest { /** - * Indicates personalised view of the Liveboard in case of png + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. */ - 'personalised_view_id'?: string | null; + 'agentVersion'?: number | null; /** - * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. */ - 'image_resolution'?: number | null; + 'bypassCache'?: boolean | null; /** - * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + * User specific instructions for processing the @query. */ - 'image_scale'?: number | null; + 'instructions'?: Array | null; /** - * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. */ - 'include_header'?: boolean | null; + 'query'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8939,15 +9011,12 @@ declare class PngOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PrincipalsListItem { - /** - * Unique ID or name of the user or group. - */ - 'identifier': string; - /** - * Principal type. Valid values are - */ - 'type': string; +/** +* Metadata objects. +*/ +declare class JWTMetadataObject { + 'identifier'?: string | null; + 'type'?: JWTMetadataObjectTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8963,6 +9032,7 @@ declare class PrincipalsListItem { }[]; constructor(); } +type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -8975,15 +9045,22 @@ declare class PrincipalsListItem { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PublishMetadataListItem { +/** +* List of runtime parameters need to set during the session. +*/ +declare class JWTParameter { /** - * Unique ID or name of the metadata. + * Runtime filter parameter type in JWT. */ - 'identifier': string; + 'runtime_filter'?: any | null; /** - * Type of metadata. Required if identifier is name. + * Runtime sort parameter type in JWT. */ - 'type'?: PublishMetadataListItemTypeEnum | null; + 'runtime_sort'?: any | null; + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8999,7 +9076,6 @@ declare class PublishMetadataListItem { }[]; constructor(); } -type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -9013,19 +9089,12 @@ type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; * Do not edit the class manually. */ -declare class PublishMetadataRequest { - /** - * Metadata objects to be published. - */ - 'metadata': Array; - /** - * Unique ID or name of orgs to which metadata objects should be published. - */ - 'org_identifiers': Array; - /** - * Skip validations of objects to be published. - */ - 'skip_validation'?: boolean | null; +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +declare class JWTUserOptions { + 'parameters'?: Array; + 'metadata'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9053,26 +9122,12 @@ declare class PublishMetadataRequest { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* NLSRequest object containing user query & instructions. +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* */ -declare class QueryGetDecomposedQueryRequestNlsRequest { - /** - * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. - */ - 'agentVersion'?: number | null; - /** - * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. - */ - 'bypassCache'?: boolean | null; - /** - * User specific instructions for processing the @query. - */ - 'instructions'?: Array | null; - /** - * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. - */ - 'query'?: string | null; +declare class JWTUserOptionsFull { + 'parameters'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9100,33 +9155,43 @@ declare class QueryGetDecomposedQueryRequestNlsRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class QueryGetDecomposedQueryRequest { +declare class LiveboardContent { /** - * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + * Total available data row count. */ - 'answerIds'?: Array; + 'available_data_row_count': number; /** - * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + * Name of the columns. */ - 'content'?: Array; + 'column_names': Array; /** - * Unique identifier to denote current conversation. + * Rows of data set. */ - 'conversationId'?: string; + 'data_rows': Array; /** - * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + * The starting record number from where the records should be included. */ - 'liveboardIds'?: Array; + 'record_offset': number; /** - * Maximum number of decomposed queries that is allowed in the response, default = 5. + * The number of records that should be included. */ - 'maxDecomposedQueries'?: number; - 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + 'record_size': number; /** - * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + * Total returned data row count. */ - 'worksheetIds'?: Array; + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + /** + * Unique ID of the visualization. + */ + 'visualization_id'?: string | null; + /** + * Name of the visualization. + */ + 'visualization_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9155,18 +9220,19 @@ declare class QueryGetDecomposedQueryRequest { * Do not edit the class manually. */ -/** -* Recipient configuration which includes email address, ID or name of the users and groups. -*/ -declare class RecipientDetails { +declare class LiveboardDataResponse { /** - * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + * The unique identifier of the object */ - 'emails'?: Array | null; + 'metadata_id': string; /** - * List of user or groups to subscribe for the scheduled job notifications. + * Name of the metadata object */ - 'principals'?: Array | null; + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9194,19 +9260,14 @@ declare class RecipientDetails { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Recipients of the scheduled job notification. +* Options to specify details of Liveboard. */ -declare class RecipientDetailsInput { - /** - * Emails of the recipients. - */ - 'emails'?: Array | null; +declare class LiveboardOptions { /** - * User or groups to be set as recipients of the schedule notifications. + * Unique ID or name of visualizations. */ - 'principals'?: Array | null; + 'visualization_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9234,23 +9295,14 @@ declare class RecipientDetailsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RegionalSettingsInput { - /** - * ISO code to be appended with currency values. - */ - 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; - /** - * Indicates the locale to be used for all formattings. - */ - 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; - /** - * Indicates the locale to be used for number formatting. - */ - 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; +/** +* Options to specify details of Liveboard. +*/ +declare class LiveboardOptionsInput { /** - * Indicates the locale to be used for date formatting. + * Unique ID or name of visualizations. */ - 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; + 'visualization_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9266,10 +9318,6 @@ declare class RegionalSettingsInput { }[]; constructor(); } -type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; -type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -9282,33 +9330,15 @@ type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | " * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class RepoConfigObject { - /** - * Remote repository URL configured - */ - 'repository_url'?: string | null; - /** - * Username to authenticate connection to the version control system - */ - 'username'?: string | null; - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. - */ - 'commit_branch_name'?: string | null; - /** - * Branches that have been pulled in local repository - */ - 'branches'?: Array | null; +declare class LogResponse { /** - * Maintain mapping of guid for the deployment to an instance + * Date timestamp of the log entry */ - 'enable_guid_mapping'?: boolean | null; + 'date': string; /** - * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. + * Log data */ - 'configuration_branch_name'?: string | null; - 'org'?: Org; + 'log': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9336,15 +9366,23 @@ declare class RepoConfigObject { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ResetUserPasswordRequest { +declare class LoginRequest { /** - * New password for the user. + * Username of the ThoughtSpot user */ - 'new_password': string; + 'username'?: string; /** - * GUID or name of the user. + * Password of the user account */ - 'user_identifier': string; + 'password'?: string; + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + */ + 'org_identifier'?: string; + /** + * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + */ + 'remember_me'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9372,14 +9410,17 @@ declare class ResetUserPasswordRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* The object representation with activation link. -*/ -declare class ResponseActivationURL { + +declare class MetadataAssociationItem { + 'action_config': ActionConfig; /** - * Activation link to activate the user. + * Unique ID or name of the metadata. */ - 'activation_link'?: string | null; + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9407,11 +9448,23 @@ declare class ResponseActivationURL { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ResponseCopyObject { +declare class MetadataContext { /** - * The unique identifier of the object. + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. */ - 'metadata_id'?: string | null; + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9439,29 +9492,9 @@ declare class ResponseCopyObject { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Custom action details -*/ -declare class ResponseCustomAction { - 'action_details': ActionDetails; - 'default_action_config': DefaultActionConfig; - /** - * Unique Id of the custom action. - */ - 'id': string; - /** - * Metadata objects to assign the the custom action to. - */ - 'metadata_association'?: Array | null; - /** - * Unique name of the custom action. - */ - 'name': string; - /** - * Unique ID or name of the User groups which are associated with the custom action. - */ - 'user_groups'?: Array | null; +declare class MetadataInput { + 'identifier'?: string | null; + 'type'?: MetadataInputTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9477,6 +9510,7 @@ declare class ResponseCustomAction { }[]; constructor(); } +type MetadataInputTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -9489,19 +9523,27 @@ declare class ResponseCustomAction { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Unique ID of the failed worksheet. -*/ -declare class ResponseFailedEntity { - 'id': string; +declare class MetadataListItemInput { /** - * Name of the worksheet that failed to convert. + * Unique ID or name of the metadata. */ - 'name': string; + 'identifier'?: string | null; /** - * Error details related to the failed conversion. + * CustomObjectId of the metadata. */ - 'error': string; + 'obj_identifier'?: string | null; + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type'?: MetadataListItemInputTypeEnum | null; + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + */ + 'subtypes'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9517,6 +9559,8 @@ declare class ResponseFailedEntity { }[]; constructor(); } +type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; +type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW"; /** * ThoughtSpot Public REST API @@ -9529,12 +9573,10 @@ declare class ResponseFailedEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Wrapper for the failed entities, as they are inside a \'data\' field in the response. -*/ -declare class ResponseFailedEntities { - 'data': Array; +declare class MetadataResponse { + 'name'?: string | null; + 'id': string; + 'type': MetadataResponseTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9550,6 +9592,7 @@ declare class ResponseFailedEntities { }[]; constructor(); } +type MetadataResponseTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -9563,18 +9606,49 @@ declare class ResponseFailedEntities { * Do not edit the class manually. */ /** -* Unique ID of the incomplete worksheet. +* Metadata Search Response Object. */ -declare class ResponseIncompleteEntity { - 'id': string; +declare class MetadataSearchResponse { /** - * Name of the incomplete worksheet. + * Unique identifier of the metadata. */ - 'name': string; + 'metadata_id'?: string | null; /** - * Error details related to the incomplete conversion. + * Name of the metadata. */ - 'error': string; + 'metadata_name'?: string | null; + /** + * Type of the metadata. + */ + 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + */ + 'metadata_obj_id'?: string | null; + /** + * Details of dependent objects of the metadata objects. + */ + 'dependent_objects'?: any | null; + /** + * Details of incomplete information of the metadata objects if any. + */ + 'incomplete_objects'?: Array | null; + /** + * Complete details of the metadata objects. + */ + 'metadata_detail'?: any | null; + /** + * Header information of the metadata objects. + */ + 'metadata_header'?: any | null; + /** + * Visualization header information of the metadata objects. + */ + 'visualization_headers'?: Array | null; + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + */ + 'stats'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9590,6 +9664,7 @@ declare class ResponseIncompleteEntity { }[]; constructor(); } +type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; /** * ThoughtSpot Public REST API @@ -9602,12 +9677,18 @@ declare class ResponseIncompleteEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +* Sort options. */ -declare class ResponseIncompleteEntities { - 'data': Array; +declare class MetadataSearchSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: MetadataSearchSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9623,6 +9704,8 @@ declare class ResponseIncompleteEntities { }[]; constructor(); } +type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -9635,31 +9718,19 @@ declare class ResponseIncompleteEntities { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ResponseMessage { - /** - * Unique identifier of the generated response. - */ - 'session_identifier'?: string | null; - /** - * Generate number of the response. - */ - 'generation_number'?: number | null; - /** - * Type of the generated response. - */ - 'message_type': ResponseMessageMessageTypeEnum; +declare class ModelTableList { /** - * Generated visualization type. + * Name of the Model. */ - 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; + 'model_name': string; /** - * Tokens for the response. + * Model directory path, this is optional param and required if there are duplicate models with the same name. */ - 'tokens'?: string | null; + 'model_path'?: string | null; /** - * User friendly tokens for the response. + * List of Tables. */ - 'display_tokens'?: string | null; + 'tables': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9675,8 +9746,6 @@ declare class ResponseMessage { }[]; constructor(); } -type ResponseMessageMessageTypeEnum = "TSAnswer"; -type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; /** * ThoughtSpot Public REST API @@ -9690,18 +9759,17 @@ type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; * Do not edit the class manually. */ /** -* Unique ID of the worksheet that failed post-upgrade. +* The object representation with ID and Name. */ -declare class ResponsePostUpgradeFailedEntity { - 'id': string; +declare class ObjectIDAndName { /** - * Name of the worksheet that failed post-upgrade. + * The unique identifier of the object. */ - 'name': string; + 'id'?: string | null; /** - * Error details related to the post-upgrade failure. + * Name of the object. */ - 'error': string; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9729,12 +9797,18 @@ declare class ResponsePostUpgradeFailedEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +* The current Org context of the user. */ -declare class ResponsePostUpgradeFailedEntities { - 'data': Array; +declare class Org { + /** + * The ID of the object. + */ + 'id': number; + /** + * Name of the object. + */ + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9762,30 +9836,15 @@ declare class ResponsePostUpgradeFailedEntities { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Schedule run response object -*/ -declare class ResponseScheduleRun { - /** - * GUID of the scheduled job. - */ - 'id': string; - /** - * Schedule run start time in milliseconds. - */ - 'start_time_in_millis': number; - /** - * Schedule run end time in milliseconds. - */ - 'end_time_in_millis': number; +declare class OrgPreferenceSearchCriteriaInput { /** - * Status of the schedule run. + * Unique identifier or name of the org */ - 'status': string; + 'org_identifier': string; /** - * Message details related to the schedule run. + * Event types to search for. If not provided, all event types for this org are returned. */ - 'detail'?: string | null; + 'event_types'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9801,6 +9860,7 @@ declare class ResponseScheduleRun { }[]; constructor(); } +type OrgPreferenceSearchCriteriaInputEventTypesEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -9813,50 +9873,27 @@ declare class ResponseScheduleRun { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ResponseSchedule { - 'author': Author; +declare class OrgResponse { /** - * Schedule creation time in milliseconds. + * Unique identifier of the Org. */ - 'creation_time_in_millis': any; + 'id'?: number | null; /** - * Description of the job. + * Name of the Org. */ - 'description'?: string | null; - /** - * Export file format. - */ - 'file_format': string; - 'frequency': Frequency; - /** - * GUID of the scheduled job. - */ - 'id': string; - 'liveboard_options'?: LiveboardOptions; - 'metadata': MetadataResponse; - /** - * Name of the scheduled job. - */ - 'name': string; - 'pdf_options'?: PdfOptions; - 'recipient_details': RecipientDetails; - /** - * Status of the job - */ - 'status'?: string | null; + 'name'?: string | null; /** - * Time zone + * Status of the Org. */ - 'time_zone': string; + 'status'?: OrgResponseStatusEnum | null; /** - * Schedule runs history records. + * Description of the Org. */ - 'history_runs'?: Array | null; + 'description'?: string | null; /** - * Personalised view id of the liveboard to be scheduled. + * Visibility of the Org. */ - 'personalised_view_id'?: string | null; + 'visibility'?: OrgResponseVisibilityEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9872,6 +9909,8 @@ declare class ResponseSchedule { }[]; constructor(); } +type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; +type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; /** * ThoughtSpot Public REST API @@ -9884,15 +9923,27 @@ declare class ResponseSchedule { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Unique ID of the worksheet. -*/ -declare class ResponseSuccessfulEntity { - 'id': string; +declare class ParameterizeMetadataRequest { /** - * Name of the worksheet. + * Type of metadata object to parameterize. */ - 'name': string; + 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be parameterized. + */ + 'field_name': string; + /** + * Unique ID or name of the variable to use for parameterization + */ + 'variable_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9908,6 +9959,8 @@ declare class ResponseSuccessfulEntity { }[]; constructor(); } +type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; +type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; /** * ThoughtSpot Public REST API @@ -9920,12 +9973,46 @@ declare class ResponseSuccessfulEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Wrapper for the successful entities, as they are inside a \'data\' field in the response. +* Options for PDF export. */ -declare class ResponseSuccessfulEntities { - 'data': Array; +declare class PdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: PdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9941,6 +10028,7 @@ declare class ResponseSuccessfulEntities { }[]; constructor(); } +type PdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -9953,36 +10041,35 @@ declare class ResponseSuccessfulEntities { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Name of the conversion process, which involves converting worksheets to models. -*/ -declare class ResponseWorksheetToModelConversion { - 'name': string; +declare class PdfOptionsInput { /** - * The number of worksheets successfully converted to models. + * Indicates whether to include the cover page with the Liveboard title. */ - 'success_count': number; + 'include_cover_page'?: boolean | null; /** - * The number of worksheets that failed to convert. + * Indicates whether to include customized wide logo in the footer if available. */ - 'failure_count': number; + 'include_custom_logo'?: boolean | null; /** - * The number of worksheets that were incomplete during the conversion process. + * Indicates whether to include a page with all applied filters. */ - 'incomplete_count': number; + 'include_filter_page'?: boolean | null; /** - * The number of worksheets that failed after an upgrade during the conversion process. + * Indicates whether to include page number in the footer of each page. */ - 'post_upgrade_failed_count': number; + 'include_page_number'?: boolean | null; /** - * The total time taken to complete the conversion process in milliseconds. + * Page orientation of the PDF. */ - 'total_time_in_millis': number; - 'successful_entities': ResponseSuccessfulEntities; - 'failed_entities': ResponseFailedEntities; - 'incomplete_entities': ResponseIncompleteEntities; - 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; + 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9998,6 +10085,7 @@ declare class ResponseWorksheetToModelConversion { }[]; constructor(); } +type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -10011,19 +10099,15 @@ declare class ResponseWorksheetToModelConversion { * Do not edit the class manually. */ -declare class RevertCommitRequest { - /** - * Metadata objects. - */ - 'metadata'?: Array; - /** - * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. - */ - 'branch_name'?: string; +/** +* Details of users or groups. +*/ +declare class PermissionInput { + 'principal': PrincipalsInput; /** - * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + * Object share mode. */ - 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; + 'share_mode': PermissionInputShareModeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10039,7 +10123,7 @@ declare class RevertCommitRequest { }[]; constructor(); } -type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; +type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -10052,27 +10136,8 @@ type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RevertedMetadata { - /** - * Name of the file deployed - */ - 'file_name': string; - /** - * Name of the metadata object - */ - 'metadata_name': string; - /** - * Type of the metadata object - */ - 'metadata_type': string; - /** - * Indicates the status of deployment for the file - */ - 'status_code': string; - /** - * Any error or warning with the deployment - */ - 'status_message': string; +declare class PermissionOfMetadataResponse { + 'metadata_permission_details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10100,34 +10165,8 @@ declare class RevertedMetadata { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class RevertResponse { - 'committer'?: CommiterType; - 'author'?: AuthorType; - /** - * Comments associated with the commit - */ - 'comment'?: string | null; - /** - * Time at which the changes were committed. - */ - 'commit_time'?: string | null; - /** - * SHA id associated with the commit - */ - 'commit_id'?: string | null; - /** - * Branch where changes were committed - */ - 'branch'?: string | null; - /** - * Files that were pushed as part of this commit - */ - 'committed_files'?: Array | null; - /** - * Metadata of reverted file of this commit - */ - 'reverted_metadata'?: Array | null; +declare class PermissionOfPrincipalsResponse { + 'principal_permission_details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10155,9 +10194,31 @@ declare class RevertResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RevokeTokenRequest { - 'user_identifier'?: string; - 'token'?: string; +declare class PngOptionsInput { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10185,13 +10246,19 @@ declare class RevokeTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RiseGQLArgWrapper { - 'name': string; - 'type': string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; +declare class PrincipalsListItem { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. Valid values are + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; type: string; format: string; }>; @@ -10215,9 +10282,15 @@ declare class RiseGQLArgWrapper { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RiseSetter { - 'field': string; - 'path': string; +declare class PublishMetadataListItem { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if identifier is name. + */ + 'type'?: PublishMetadataListItemTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10233,6 +10306,7 @@ declare class RiseSetter { }[]; constructor(); } +type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -10245,15 +10319,20 @@ declare class RiseSetter { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Role { + +declare class PublishMetadataRequest { /** - * id of the role + * Metadata objects to be published. */ - 'id'?: string | null; + 'metadata': Array; /** - * name of the role + * Unique ID or name of orgs to which metadata objects should be published. */ - 'name'?: string | null; + 'org_identifiers': Array; + /** + * Skip validations of objects to be published. + */ + 'skip_validation'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10281,76 +10360,26 @@ declare class Role { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class RoleResponse { - /** - * Unique Id of the role. - */ - 'id': string; - /** - * Name of the role - */ - 'name': string; - /** - * Description of the role - */ - 'description': string; - /** - * number of groups assigned with this role - */ - 'groups_assigned_count'?: number | null; - /** - * Orgs in which role exists. - */ - 'orgs'?: Array | null; - /** - * Details of groups assigned with this role - */ - 'groups'?: Array | null; - /** - * Privileges granted to the role. - */ - 'privileges': Array; - /** - * Permission details of the Role - */ - 'permission'?: RoleResponsePermissionEnum | null; - /** - * Unique identifier of author of the role. - */ - 'author_id'?: string | null; - /** - * Unique identifier of modifier of the role. - */ - 'modifier_id'?: string | null; - /** - * Creation time of the role in milliseconds. - */ - 'creation_time_in_millis'?: any | null; - /** - * Last modified time of the role in milliseconds. - */ - 'modification_time_in_millis'?: any | null; - /** - * Indicates whether the role is deleted. - */ - 'deleted'?: boolean | null; +/** +* NLSRequest object containing user query & instructions. +*/ +declare class QueryGetDecomposedQueryRequestNlsRequest { /** - * Indicates whether the role is deprecated. + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. */ - 'deprecated'?: boolean | null; + 'agentVersion'?: number | null; /** - * Indicates whether the role is external. + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. */ - 'external'?: boolean | null; + 'bypassCache'?: boolean | null; /** - * Indicates whether the role is hidden. + * User specific instructions for processing the @query. */ - 'hidden'?: boolean | null; + 'instructions'?: Array | null; /** - * Indicates whether the role is shared via connection + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. */ - 'shared_via_connection'?: boolean | null; + 'query'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10366,8 +10395,6 @@ declare class RoleResponse { }[]; constructor(); } -type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE"; -type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -10380,14 +10407,33 @@ type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* List of runtime parameters need to set during the session. -*/ -declare class RuntimeFilter { + +declare class QueryGetDecomposedQueryRequest { /** - * Runtime filter parameter type in JWT. + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. */ - 'runtime_filter'?: any; + 'answerIds'?: Array; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array; + /** + * Unique identifier to denote current conversation. + */ + 'conversationId'?: string; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboardIds'?: Array; + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + */ + 'maxDecomposedQueries'?: number; + 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + */ + 'worksheetIds'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10415,14 +10461,19 @@ declare class RuntimeFilter { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* List of runtime parameters need to set during the session. +* Recipient configuration which includes email address, ID or name of the users and groups. */ -declare class RuntimeParamOverride { +declare class RecipientDetails { /** - * Runtime param override type in JWT. + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. */ - 'runtime_param_override'?: any; + 'emails'?: Array | null; + /** + * List of user or groups to subscribe for the scheduled job notifications. + */ + 'principals'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10450,14 +10501,19 @@ declare class RuntimeParamOverride { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* List of runtime parameters need to set during the session. +* Recipients of the scheduled job notification. */ -declare class RuntimeSort { +declare class RecipientDetailsInput { /** - * Runtime sort parameter type in JWT. + * Emails of the recipients. */ - 'runtime_sort'?: any; + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10485,19 +10541,23 @@ declare class RuntimeSort { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ScheduleHistoryRunsOptionsInput { +declare class RegionalSettingsInput { /** - * Indicates whether to fetch history runs for the scheduled notification. + * ISO code to be appended with currency values. */ - 'include_history_runs'?: boolean | null; + 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. + * Indicates the locale to be used for all formattings. */ - 'record_size'?: number | null; + 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; /** - * Indicates the starting record number from where history runs records should be fetched. + * Indicates the locale to be used for number formatting. */ - 'record_offset'?: number | null; + 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10513,6 +10573,10 @@ declare class ScheduleHistoryRunsOptionsInput { }[]; constructor(); } +type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -10525,46 +10589,33 @@ declare class ScheduleHistoryRunsOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class SchedulesPdfOptionsInput { - /** - * Indicates whether to include complete Liveboard. - */ - 'complete_liveboard'?: boolean | null; - /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; + +declare class RepoConfigObject { /** - * Indicates whether to include a page with all applied filters. + * Remote repository URL configured */ - 'include_filter_page'?: boolean | null; + 'repository_url'?: string | null; /** - * Indicates whether to include page number in the footer of each page + * Username to authenticate connection to the version control system */ - 'include_page_number'?: boolean | null; + 'username'?: string | null; /** - * Text to include in the footer of each page. + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. */ - 'page_footer_text'?: string | null; + 'commit_branch_name'?: string | null; /** - * Page orientation of the PDF. + * Branches that have been pulled in local repository */ - 'page_orientation'?: string | null; + 'branches'?: Array | null; /** - * Page size. + * Maintain mapping of guid for the deployment to an instance */ - 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + 'enable_guid_mapping'?: boolean | null; /** - * Indicates whether to include only first page of the tables. + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. */ - 'truncate_table'?: boolean | null; + 'configuration_branch_name'?: string | null; + 'org'?: Org; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10580,7 +10631,6 @@ declare class SchedulesPdfOptionsInput { }[]; constructor(); } -type SchedulesPdfOptionsInputPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -10593,19 +10643,15 @@ type SchedulesPdfOptionsInputPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Scope { - /** - * Object access scope type. - */ - 'access_type': string; +declare class ResetUserPasswordRequest { /** - * Unique identifier of the metadata. + * New password for the user. */ - 'org_id'?: number | null; + 'new_password': string; /** - * Unique identifier of the Org. + * GUID or name of the user. */ - 'metadata_id'?: string | null; + 'user_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10634,17 +10680,45 @@ declare class Scope { * Do not edit the class manually. */ /** -* Sort options. +* The object representation with activation link. */ -declare class SearchCalendarsRequestSortOptions { +declare class ResponseActivationURL { /** - * Name of the field to apply the sort on. + * Activation link to activate the user. */ - 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + 'activation_link'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResponseCopyObject { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * The unique identifier of the object. */ - 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + 'metadata_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10660,8 +10734,6 @@ declare class SearchCalendarsRequestSortOptions { }[]; constructor(); } -type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -10675,24 +10747,28 @@ type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchCalendarsRequest { +/** +* Custom action details +*/ +declare class ResponseCustomAction { + 'action_details': ActionDetails; + 'default_action_config': DefaultActionConfig; /** - * Unique ID or name of the connection. + * Unique Id of the custom action. */ - 'connection_identifier'?: string; + 'id': string; /** - * Pattern to match for calendar names (use \'%\' for wildcard match). + * Metadata objects to assign the the custom action to. */ - 'name_pattern'?: string; + 'metadata_association'?: Array | null; /** - * The starting record number from where the records should be included. + * Unique name of the custom action. */ - 'record_offset'?: number; + 'name': string; /** - * The number of records that should be included. + * Unique ID or name of the User groups which are associated with the custom action. */ - 'record_size'?: number; - 'sort_options'?: SearchCalendarsRequestSortOptions; + 'user_groups'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10720,27 +10796,19 @@ declare class SearchCalendarsRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchCommitsRequest { - /** - * Unique ID or name of the metadata. - */ - 'metadata_identifier': string; - /** - * Type of metadata. - */ - 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; - /** - * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. - */ - 'branch_name'?: string; +/** +* Unique ID of the failed worksheet. +*/ +declare class ResponseFailedEntity { + 'id': string; /** - * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + * Name of the worksheet that failed to convert. */ - 'record_offset'?: number; + 'name': string; /** - * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + * Error details related to the failed conversion. */ - 'record_size'?: number; + 'error': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10756,7 +10824,6 @@ declare class SearchCommitsRequest { }[]; constructor(); } -type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; /** * ThoughtSpot Public REST API @@ -10769,11 +10836,12 @@ type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchConfigRequest { - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later - */ - 'org_identifiers'?: Array; + +/** +* Wrapper for the failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseFailedEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10802,17 +10870,18 @@ declare class SearchConfigRequest { * Do not edit the class manually. */ /** -* Sort options. +* Unique ID of the incomplete worksheet. */ -declare class SearchConnectionRequestSortOptions { +declare class ResponseIncompleteEntity { + 'id': string; /** - * Name of the field to apply the sort on. + * Name of the incomplete worksheet. */ - 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; + 'name': string; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Error details related to the incomplete conversion. */ - 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; + 'error': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10828,8 +10897,6 @@ declare class SearchConnectionRequestSortOptions { }[]; constructor(); } -type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; -type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -10843,48 +10910,11 @@ type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchConnectionRequest { - /** - * List of connections and name pattern - */ - 'connections'?: Array; - /** - * Array of types of data warehouse defined for the connection. - */ - 'data_warehouse_types'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records that should be included. - */ - 'record_size'?: number; - /** - * Unique ID or name of tags. - */ - 'tag_identifiers'?: Array; - /** - * Data warehouse object type. - */ - 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; - 'sort_options'?: SearchConnectionRequestSortOptions; - /** - * Indicates whether to include complete details of the connection objects. - */ - 'include_details'?: boolean | null; - /** - * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. - */ - 'configuration'?: any; - /** - * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. - */ - 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; - /** - *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. - */ - 'show_resolved_parameters'?: boolean | null; +/** +* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseIncompleteEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10900,9 +10930,6 @@ declare class SearchConnectionRequest { }[]; constructor(); } -type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; -type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN"; -type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ"; /** * ThoughtSpot Public REST API @@ -10915,29 +10942,31 @@ type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchConnectionResponse { +declare class ResponseMessage { /** - * Unique ID of the connection. + * Unique identifier of the generated response. */ - 'id': string; + 'session_identifier'?: string | null; /** - * Name of the connection. + * Generate number of the response. */ - 'name': string; + 'generation_number'?: number | null; /** - * Description of the connection. + * Type of the generated response. */ - 'description'?: string | null; + 'message_type': ResponseMessageMessageTypeEnum; /** - * Type of data warehouse. + * Generated visualization type. */ - 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; - 'data_warehouse_objects'?: DataWarehouseObjects; + 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; /** - * Details of the connection. + * Tokens for the response. */ - 'details'?: any | null; + 'tokens'?: string | null; + /** + * User friendly tokens for the response. + */ + 'display_tokens'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10953,7 +10982,8 @@ declare class SearchConnectionResponse { }[]; constructor(); } -type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; +type ResponseMessageMessageTypeEnum = "TSAnswer"; +type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; /** * ThoughtSpot Public REST API @@ -10967,13 +10997,18 @@ type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSH * Do not edit the class manually. */ /** -* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +* Unique ID of the worksheet that failed post-upgrade. */ -declare class SearchCustomActionsRequestDefaultActionConfig { +declare class ResponsePostUpgradeFailedEntity { + 'id': string; /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Name of the worksheet that failed post-upgrade. */ - 'visibility'?: boolean | null; + 'name': string; + /** + * Error details related to the post-upgrade failure. + */ + 'error': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11002,32 +11037,11 @@ declare class SearchCustomActionsRequestDefaultActionConfig { * Do not edit the class manually. */ -declare class SearchCustomActionsRequest { - /** - * Name or ID of the custom action. - */ - 'custom_action_identifier'?: string; - /** - * A pattern to match case-insensitive name of the custom-action object. - */ - 'name_pattern'?: string; - 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; - /** - * When set to true, returns the associated groups for a custom action. - */ - 'include_group_associations'?: boolean | null; - /** - * When set to true, returns the associated metadata for a custom action. - */ - 'include_metadata_associations'?: boolean | null; - /** - * Search with a given metadata identifier. - */ - 'metadata'?: Array; - /** - * Filter the action objects based on type - */ - 'type'?: SearchCustomActionsRequestTypeEnum; +/** +* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponsePostUpgradeFailedEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11043,7 +11057,6 @@ declare class SearchCustomActionsRequest { }[]; constructor(); } -type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; /** * ThoughtSpot Public REST API @@ -11056,39 +11069,30 @@ type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchDataRequest { +/** +* Schedule run response object +*/ +declare class ResponseScheduleRun { /** - * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + * GUID of the scheduled job. */ - 'query_string': string; + 'id': string; /** - * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. + * Schedule run start time in milliseconds. */ - 'logical_table_identifier': string; + 'start_time_in_millis': number; /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * Schedule run end time in milliseconds. */ - 'data_format'?: SearchDataRequestDataFormatEnum; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records to include in a batch. - */ - 'record_size'?: number; - /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - */ - 'runtime_filter'?: any; + 'end_time_in_millis': number; /** - * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * Status of the schedule run. */ - 'runtime_sort'?: any; + 'status': string; /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * Message details related to the schedule run. */ - 'runtime_param_override'?: any; + 'detail'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11104,7 +11108,6 @@ declare class SearchDataRequest { }[]; constructor(); } -type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -11118,14 +11121,49 @@ type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; * Do not edit the class manually. */ -/** -* Response format associated with the search data API. -*/ -declare class SearchDataResponse { +declare class ResponseSchedule { + 'author': Author; /** - * Data content of metadata objects + * Schedule creation time in milliseconds. */ - 'contents': Array; + 'creation_time_in_millis': any; + /** + * Description of the job. + */ + 'description'?: string | null; + /** + * Export file format. + */ + 'file_format': string; + 'frequency': Frequency; + /** + * GUID of the scheduled job. + */ + 'id': string; + 'liveboard_options'?: LiveboardOptions; + 'metadata': MetadataResponse; + /** + * Name of the scheduled job. + */ + 'name': string; + 'pdf_options'?: PdfOptions; + 'recipient_details': RecipientDetails; + /** + * Status of the job + */ + 'status'?: string | null; + /** + * Time zone + */ + 'time_zone': string; + /** + * Schedule runs history records. + */ + 'history_runs'?: Array | null; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11153,11 +11191,15 @@ declare class SearchDataResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchEmailCustomizationRequest { +/** +* Unique ID of the worksheet. +*/ +declare class ResponseSuccessfulEntity { + 'id': string; /** - * Unique ID or name of org Version: 10.12.0.cl or later + * Name of the worksheet. */ - 'org_identifiers'?: Array; + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11185,18 +11227,12 @@ declare class SearchEmailCustomizationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +* Wrapper for the successful entities, as they are inside a \'data\' field in the response. */ -declare class SearchMetadataRequestFavoriteObjectOptions { - /** - * Includes objects marked as favorite for the specified users. - */ - 'include'?: boolean | null; - /** - * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. - */ - 'user_identifiers'?: Array | null; +declare class ResponseSuccessfulEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11224,18 +11260,36 @@ declare class SearchMetadataRequestFavoriteObjectOptions { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Sort options to filter metadata details. +* Name of the conversion process, which involves converting worksheets to models. */ -declare class SearchMetadataRequestSortOptions { +declare class ResponseWorksheetToModelConversion { + 'name': string; /** - * Name of the field to apply the sort on. + * The number of worksheets successfully converted to models. */ - 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + 'success_count': number; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * The number of worksheets that failed to convert. */ - 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; + 'failure_count': number; + /** + * The number of worksheets that were incomplete during the conversion process. + */ + 'incomplete_count': number; + /** + * The number of worksheets that failed after an upgrade during the conversion process. + */ + 'post_upgrade_failed_count': number; + /** + * The total time taken to complete the conversion process in milliseconds. + */ + 'total_time_in_millis': number; + 'successful_entities': ResponseSuccessfulEntities; + 'failed_entities': ResponseFailedEntities; + 'incomplete_entities': ResponseIncompleteEntities; + 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11251,8 +11305,6 @@ declare class SearchMetadataRequestSortOptions { }[]; constructor(); } -type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; -type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -11266,101 +11318,19 @@ type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchMetadataRequest { - /** - * Metadata objects such as Liveboards, Answers, and Worksheets. - */ - 'metadata'?: Array; - /** - * Object permission details to search by. - */ - 'permissions'?: Array; - /** - * GUID or name of user who created the metadata object. - */ - 'created_by_user_identifiers'?: Array; - /** - * Version of the dependent table of the metadata objects like Worksheets. - */ - 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; - /** - * List of metadata objects to exclude from search. - */ - 'exclude_objects'?: Array; - 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; - /** - * Includes system-generated metadata objects. - */ - 'include_auto_created_objects'?: boolean | null; - /** - * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. - */ - 'include_dependent_objects'?: boolean | null; - /** - * The maximum number of dependents to include per metadata object. - */ - 'dependent_objects_record_size'?: number; - /** - * Includes complete details of the metadata objects. - */ - 'include_details'?: boolean | null; - /** - * Includes headers of the metadata objects. - */ - 'include_headers'?: boolean | null; - /** - * Includes details of the hidden objects, such as a column in a worksheet or a table. - */ - 'include_hidden_objects'?: boolean | null; - /** - * Includes objects with incomplete metadata. - */ - 'include_incomplete_objects'?: boolean | null; - /** - * Includes visualization headers of the specified Liveboard object. - */ - 'include_visualization_headers'?: boolean | null; - /** - * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. - */ - 'include_worksheet_search_assist_data'?: boolean | null; - /** - * Includes ID or names of the users who modified the metadata object. - */ - 'modified_by_user_identifiers'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. - */ - 'record_size'?: number; - 'sort_options'?: SearchMetadataRequestSortOptions; - /** - * Tags to filter metadata objects by - */ - 'tag_identifiers'?: Array; - /** - * Indicates whether to include stats of the metadata objects. - */ - 'include_stats'?: boolean | null; - /** - *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. - */ - 'include_discoverable_objects'?: boolean | null; +declare class RevertCommitRequest { /** - *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + * Metadata objects. */ - 'show_resolved_parameters'?: boolean | null; + 'metadata'?: Array; /** - * Indicates the model version of Liveboard to be attached in metadata detail. + * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. */ - 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; + 'branch_name'?: string; /** - *
Version: 10.11.0.cl or later
If only published objects should be returned + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] */ - 'include_only_published_objects'?: boolean | null; + 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11376,8 +11346,7 @@ declare class SearchMetadataRequest { }[]; constructor(); } -type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2"; -type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; +type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; /** * ThoughtSpot Public REST API @@ -11390,27 +11359,27 @@ type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchOrgsRequest { +declare class RevertedMetadata { /** - * ID or name of the Org + * Name of the file deployed */ - 'org_identifier'?: string; + 'file_name': string; /** - * Description of the Org + * Name of the metadata object */ - 'description'?: string; + 'metadata_name': string; /** - * Visibility of the Org + * Type of the metadata object */ - 'visibility'?: SearchOrgsRequestVisibilityEnum; + 'metadata_type': string; /** - * Status of the Org + * Indicates the status of deployment for the file */ - 'status'?: SearchOrgsRequestStatusEnum; + 'status_code': string; /** - * GUIDs or names of the users for which you want to retrieve the Orgs data + * Any error or warning with the deployment */ - 'user_identifiers'?: Array; + 'status_message': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11426,8 +11395,6 @@ declare class SearchOrgsRequest { }[]; constructor(); } -type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN"; -type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; /** * ThoughtSpot Public REST API @@ -11441,78 +11408,33 @@ type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; * Do not edit the class manually. */ -/** -* Response for search role api should handle hidden privileges as well. -*/ -declare class SearchRoleResponse { +declare class RevertResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; /** - * Unique Id of the role. - */ - 'id': string; - /** - * Name of the role - */ - 'name': string; - /** - * Description of the role - */ - 'description': string; - /** - * number of groups assigned with this role - */ - 'groups_assigned_count'?: number | null; - /** - * Orgs in which role exists. - */ - 'orgs'?: Array | null; - /** - * Details of groups assigned with this role - */ - 'groups'?: Array | null; - /** - * Privileges granted to the role. - */ - 'privileges': Array; - /** - * Permission details of the Role - */ - 'permission'?: SearchRoleResponsePermissionEnum | null; - /** - * Unique identifier of author of the role. - */ - 'author_id'?: string | null; - /** - * Unique identifier of modifier of the role. - */ - 'modifier_id'?: string | null; - /** - * Creation time of the role in milliseconds. - */ - 'creation_time_in_millis'?: any | null; - /** - * Last modified time of the role in milliseconds. + * Comments associated with the commit */ - 'modification_time_in_millis'?: any | null; + 'comment'?: string | null; /** - * Indicates whether the role is deleted. + * Time at which the changes were committed. */ - 'deleted'?: boolean | null; + 'commit_time'?: string | null; /** - * Indicates whether the role is deprecated. + * SHA id associated with the commit */ - 'deprecated'?: boolean | null; + 'commit_id'?: string | null; /** - * Indicates whether the role is external. + * Branch where changes were committed */ - 'external'?: boolean | null; + 'branch'?: string | null; /** - * Indicates whether the role is hidden. + * Files that were pushed as part of this commit */ - 'hidden'?: boolean | null; + 'committed_files'?: Array | null; /** - * Indicates whether the role is shared via connection + * Metadata of reverted file of this commit */ - 'shared_via_connection'?: boolean | null; + 'reverted_metadata'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11528,8 +11450,6 @@ declare class SearchRoleResponse { }[]; constructor(); } -type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -11542,39 +11462,9 @@ type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchRolesRequest { - /** - * unique ID or name of the Roles - */ - 'role_identifiers'?: Array; - /** - * Unique Id or name of the Organisation - */ - 'org_identifiers'?: Array; - /** - * Unique Id or name of the User Group - */ - 'group_identifiers'?: Array; - /** - * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. - */ - 'privileges'?: Array; - /** - * Indicates whether the Role is deprecated. - */ - 'deprecated'?: boolean | null; - /** - * Indicates whether the Role is external - */ - 'external'?: boolean | null; - /** - * Indicates whether the Role is shared via connection - */ - 'shared_via_connection'?: boolean | null; - /** - * Permission details of the Role - */ - 'permissions'?: Array; +declare class RevokeTokenRequest { + 'user_identifier'?: string; + 'token'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11590,8 +11480,6 @@ declare class SearchRolesRequest { }[]; constructor(); } -type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -11604,22 +11492,9 @@ type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options while fetching history runs for the schedule. -*/ -declare class SearchSchedulesRequestHistoryRunsOptions { - /** - * Indicates whether to fetch history runs for the scheduled notification. - */ - 'include_history_runs'?: boolean | null; - /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. - */ - 'record_size'?: number | null; - /** - * Indicates the starting record number from where history runs records should be fetched. - */ - 'record_offset'?: number | null; +declare class RiseGQLArgWrapper { + 'name': string; + 'type': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11647,18 +11522,9 @@ declare class SearchSchedulesRequestHistoryRunsOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Sort options. -*/ -declare class SearchSchedulesRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: string | null; - /** - * Sort order : ASC(Ascending) or DESC(Descending). - */ - 'order'?: string | null; +declare class RiseSetter { + 'field': string; + 'path': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11686,26 +11552,15 @@ declare class SearchSchedulesRequestSortOptions { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchSchedulesRequest { - /** - * Metadata objects associated with the scheduled jobs. - */ - 'metadata'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; +declare class Role { /** - * The number of records that should be included. + * id of the role */ - 'record_size'?: number; - 'sort_options'?: SearchSchedulesRequestSortOptions; - 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; + 'id'?: string | null; /** - * unique ID or name of the Schedule + * name of the role */ - 'schedule_identifiers'?: Array; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11733,19 +11588,76 @@ declare class SearchSchedulesRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchTagsRequest { + +declare class RoleResponse { /** - * Name or Id of the tag. + * Unique Id of the role. */ - 'tag_identifier'?: string; + 'id': string; /** - * A pattern to match case-insensitive name of the Tag object. + * Name of the role */ - 'name_pattern'?: string; + 'name': string; /** - * Color of the tag. + * Description of the role */ - 'color'?: string; + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: RoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11761,6 +11673,8 @@ declare class SearchTagsRequest { }[]; constructor(); } +type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -11774,17 +11688,13 @@ declare class SearchTagsRequest { * Do not edit the class manually. */ /** -* Sort options to filter group details. +* List of runtime parameters need to set during the session. */ -declare class SearchUserGroupsRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; +declare class RuntimeFilter { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Runtime filter parameter type in JWT. */ - 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; + 'runtime_filter'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11800,8 +11710,6 @@ declare class SearchUserGroupsRequestSortOptions { }[]; constructor(); } -type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -11814,73 +11722,14 @@ type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchUserGroupsRequest { +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeParamOverride { /** - * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + * Runtime param override type in JWT. */ - 'default_liveboard_identifiers'?: Array; - /** - * Description of the group - */ - 'description'?: string; - /** - * Display name of the group - */ - 'display_name'?: string; - /** - * A pattern to match case-insensitive name of the Group object. - */ - 'name_pattern'?: string; - /** - * GUID or name of the group - */ - 'group_identifier'?: string; - /** - * ID or name of the Org to which the group belongs - */ - 'org_identifiers'?: Array; - /** - * Privileges assigned to the group. - */ - 'privileges'?: Array; - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - */ - 'sub_group_identifiers'?: Array; - /** - * Group type. - */ - 'type'?: SearchUserGroupsRequestTypeEnum; - /** - * GUID or name of the users assigned to the group. - */ - 'user_identifiers'?: Array; - /** - * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. - */ - 'visibility'?: SearchUserGroupsRequestVisibilityEnum; - /** - * Filter groups with a list of Roles assigned to a group - */ - 'role_identifiers'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records that should be included. - */ - 'record_size'?: number; - 'sort_options'?: SearchUserGroupsRequestSortOptions; - /** - *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. - */ - 'include_users'?: boolean | null; - /** - *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. - */ - 'include_sub_groups'?: boolean | null; + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11896,9 +11745,6 @@ declare class SearchUserGroupsRequest { }[]; constructor(); } -type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -11912,17 +11758,13 @@ type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * Do not edit the class manually. */ /** -* Sort options. +* List of runtime parameters need to set during the session. */ -declare class SearchUsersRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; +declare class RuntimeSort { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Runtime sort parameter type in JWT. */ - 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; + 'runtime_sort'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11938,8 +11780,6 @@ declare class SearchUsersRequestSortOptions { }[]; constructor(); } -type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -11952,85 +11792,19 @@ type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchUsersRequest { - /** - * GUID / name of the user to search - */ - 'user_identifier'?: string; - /** - * A unique display name string for the user account, usually their first and last name - */ - 'display_name'?: string; - /** - * A pattern to match case-insensitive name of the User object. - */ - 'name_pattern'?: string; - /** - * Visibility of the user - */ - 'visibility'?: SearchUsersRequestVisibilityEnum; - /** - * Email of the user account - */ - 'email'?: string; - /** - * GUID or name of the group to which the user belongs - */ - 'group_identifiers'?: Array; - /** - * Privileges assigned to the user - */ - 'privileges'?: Array; - /** - * Type of the account - */ - 'account_type'?: SearchUsersRequestAccountTypeEnum; - /** - * Current status of the user account. - */ - 'account_status'?: SearchUsersRequestAccountStatusEnum; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. - */ - 'notify_on_share'?: boolean | null; - /** - * The user preference for revisiting the onboarding experience - */ - 'show_onboarding_experience'?: boolean | null; - /** - * Indicates if the user has completed the onboarding walkthrough - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * IDs or names of the Orgs to which the user belongs - */ - 'org_identifiers'?: Array; - /** - * Unique ID or name of the user\'s home Liveboard. - */ - 'home_liveboard_identifier'?: string; - /** - * Metadata objects which are assigned as favorites of the user. - */ - 'favorite_metadata'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; +declare class ScheduleHistoryRunsOptionsInput { /** - * The number of records that should be included. + * Indicates whether to fetch history runs for the scheduled notification. */ - 'record_size'?: number; - 'sort_options'?: SearchUsersRequestSortOptions; + 'include_history_runs'?: boolean | null; /** - * Filters by the role assigned to the user. + * Indicates the max number of records that can be fetched as past runs of any scheduled job. */ - 'role_identifiers'?: Array; + 'record_size'?: number | null; /** - * Indicates if the user\'s favorite objects should be displayed. + * Indicates the starting record number from where history runs records should be fetched. */ - 'include_favorite_metadata'?: boolean | null; + 'record_offset'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12046,10 +11820,6 @@ declare class SearchUsersRequest { }[]; constructor(); } -type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; /** * ThoughtSpot Public REST API @@ -12063,21 +11833,45 @@ type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | " * Do not edit the class manually. */ /** -* Input for variable details in search +* Options for PDF export. */ -declare class VariableDetailInput { +declare class SchedulesPdfOptionsInput { /** - * Unique ID or name of the variable + * Indicates whether to include complete Liveboard. */ - 'identifier'?: string | null; + 'complete_liveboard'?: boolean | null; /** - * Type of variable + * Indicates whether to include cover page with the Liveboard title. */ - 'type'?: VariableDetailInputTypeEnum | null; + 'include_cover_page'?: boolean | null; /** - * A pattern to match case-insensitive name of the variable. User % for a wildcard match + * Indicates whether to include customized wide logo in the footer if available. */ - 'name_pattern'?: string | null; + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12093,7 +11887,7 @@ declare class VariableDetailInput { }[]; constructor(); } -type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type SchedulesPdfOptionsInputPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -12106,24 +11900,19 @@ type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CO * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchVariablesRequest { - /** - * Variable details - */ - 'variable_details'?: Array; +declare class Scope { /** - * The starting record number from where the records should be included + * Object access scope type. */ - 'record_offset'?: number; + 'access_type': string; /** - * The number of records that should be included + * Unique identifier of the metadata. */ - 'record_size'?: number; + 'org_id'?: number | null; /** - * Format in which we want the output + * Unique identifier of the Org. */ - 'output_format'?: SearchVariablesRequestOutputFormatEnum; + 'metadata_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12139,7 +11928,6 @@ declare class SearchVariablesRequest { }[]; constructor(); } -type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VALUES" | "EDITABLE_METADATA_AND_VALUES"; /** * ThoughtSpot Public REST API @@ -12152,15 +11940,18 @@ type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SendMessageRequest { +/** +* Sort options. +*/ +declare class SearchCalendarsRequestSortOptions { /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + * Name of the field to apply the sort on. */ - 'metadata_identifier': string; + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; /** - * A message string with the follow-up question to continue the conversation. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'message': string; + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12176,6 +11967,8 @@ declare class SendMessageRequest { }[]; constructor(); } +type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -12188,15 +11981,25 @@ declare class SendMessageRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ShareMetadataTypeInput { + +declare class SearchCalendarsRequest { /** - * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Unique ID or name of the connection. */ - 'type'?: ShareMetadataTypeInputTypeEnum | null; + 'connection_identifier'?: string; /** - * Unique ID or name of the metadata object. + * Pattern to match for calendar names (use \'%\' for wildcard match). */ - 'identifier': string; + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12212,7 +12015,6 @@ declare class ShareMetadataTypeInput { }[]; constructor(); } -type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -12225,13 +12027,27 @@ type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SharePermissionsInput { - 'principal': PrincipalsInput; +declare class SearchCommitsRequest { /** - * Type of access to the shared object + * Unique ID or name of the metadata. */ - 'share_mode': SharePermissionsInputShareModeEnum; + 'metadata_identifier': string; + /** + * Type of metadata. + */ + 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. + */ + 'branch_name'?: string; + /** + * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + */ + 'record_offset'?: number; + /** + * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + */ + 'record_size'?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12247,7 +12063,7 @@ declare class SharePermissionsInput { }[]; constructor(); } -type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; +type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; /** * ThoughtSpot Public REST API @@ -12261,47 +12077,15 @@ type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * Do not edit the class manually. */ -declare class ShareMetadataRequest { - /** - * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection - */ - 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; +declare class SearchCommunicationChannelPreferencesRequest { /** - * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type - */ - 'metadata_identifiers'?: Array; - /** - * Metadata details for sharing objects. - */ - 'metadata'?: Array; - /** - * Permission details for sharing the objects. - */ - 'permissions': Array; - /** - * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. - */ - 'visualization_identifiers'?: Array; - /** - * Email IDs to which notifications will be sent. - */ - 'emails'?: Array; - /** - * Message to be included in notification. - */ - 'message': string; - /** - * Sends object URLs in the customized format in email notifications. - */ - 'enable_custom_url'?: boolean | null; - /** - * Flag to notify user when any object is shared. + * Event types to search for in cluster-level preferences. */ - 'notify_on_share'?: boolean | null; + 'cluster_preferences'?: Array; /** - * Flag to make the object discoverable. + * Org-specific search criteria. */ - 'has_lenient_discoverability'?: boolean | null; + 'org_preferences'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12317,7 +12101,7 @@ declare class ShareMetadataRequest { }[]; constructor(); } -type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; +type SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -12330,15 +12114,11 @@ type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SingleAnswerRequest { - /** - * A natural language query string to generate the Answer. - */ - 'query': string; +declare class SearchConfigRequest { /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later */ - 'metadata_identifier': string; + 'org_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12366,15 +12146,18 @@ declare class SingleAnswerRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SortOption { +/** +* Sort options. +*/ +declare class SearchConnectionRequestSortOptions { /** * Name of the field to apply the sort on. */ - 'field_name'?: SortOptionFieldNameEnum | null; + 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; /** * Sort order : ASC(Ascending) or DESC(Descending). */ - 'order'?: SortOptionOrderEnum | null; + 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12390,8 +12173,8 @@ declare class SortOption { }[]; constructor(); } -type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SortOptionOrderEnum = "ASC" | "DESC"; +type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -12404,15 +12187,49 @@ type SortOptionOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SortOptionInput { + +declare class SearchConnectionRequest { /** - * Name of the field to apply the sort on. + * List of connections and name pattern */ - 'field_name'?: SortOptionInputFieldNameEnum | null; + 'connections'?: Array; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Array of types of data warehouse defined for the connection. */ - 'order'?: SortOptionInputOrderEnum | null; + 'data_warehouse_types'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + /** + * Unique ID or name of tags. + */ + 'tag_identifiers'?: Array; + /** + * Data warehouse object type. + */ + 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; + 'sort_options'?: SearchConnectionRequestSortOptions; + /** + * Indicates whether to include complete details of the connection objects. + */ + 'include_details'?: boolean | null; + /** + * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. + */ + 'configuration'?: any; + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + */ + 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12428,8 +12245,9 @@ declare class SortOptionInput { }[]; constructor(); } -type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; -type SortOptionInputOrderEnum = "ASC" | "DESC"; +type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; +type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN"; +type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" | "OAUTH_CLIENT_CREDENTIALS"; /** * ThoughtSpot Public REST API @@ -12442,18 +12260,29 @@ type SortOptionInputOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Sort options. -*/ -declare class SortOptions { + +declare class SearchConnectionResponse { /** - * Name of the field to apply the sort on. + * Unique ID of the connection. */ - 'field_name'?: SortOptionsFieldNameEnum | null; + 'id': string; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Name of the connection. */ - 'order'?: SortOptionsOrderEnum | null; + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string | null; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; + 'data_warehouse_objects'?: DataWarehouseObjects; + /** + * Details of the connection. + */ + 'details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12469,8 +12298,7 @@ declare class SortOptions { }[]; constructor(); } -type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SortOptionsOrderEnum = "ASC" | "DESC"; +type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -12484,17 +12312,13 @@ type SortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ /** -* Sort options. +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. */ -declare class SortingOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: string | null; +declare class SearchCustomActionsRequestDefaultActionConfig { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'order'?: string | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12522,22 +12346,33 @@ declare class SortingOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Response format associated with fetch SQL query api -*/ -declare class SqlQuery { + +declare class SearchCustomActionsRequest { /** - * Unique identifier of the metadata. + * Name or ID of the custom action. */ - 'metadata_id': string; + 'custom_action_identifier'?: string; /** - * Name of the metadata. + * A pattern to match case-insensitive name of the custom-action object. */ - 'metadata_name': string; + 'name_pattern'?: string; + 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; /** - * SQL query of a metadata object. + * When set to true, returns the associated groups for a custom action. */ - 'sql_query': string; + 'include_group_associations'?: boolean | null; + /** + * When set to true, returns the associated metadata for a custom action. + */ + 'include_metadata_associations'?: boolean | null; + /** + * Search with a given metadata identifier. + */ + 'metadata'?: Array; + /** + * Filter the action objects based on type + */ + 'type'?: SearchCustomActionsRequestTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12553,6 +12388,7 @@ declare class SqlQuery { }[]; constructor(); } +type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; /** * ThoughtSpot Public REST API @@ -12565,24 +12401,39 @@ declare class SqlQuery { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SqlQueryResponse { +declare class SearchDataRequest { /** - * Unique identifier of the metadata. + * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) */ - 'metadata_id': string; + 'query_string': string; /** - * Name of the metadata. + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. */ - 'metadata_name': string; + 'logical_table_identifier': string; /** - * Type of the metadata. + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. */ - 'metadata_type': SqlQueryResponseMetadataTypeEnum; + 'data_format'?: SearchDataRequestDataFormatEnum; /** - * SQL query details of metadata objects. + * The starting record number from where the records should be included. */ - 'sql_queries': Array; + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12598,7 +12449,7 @@ declare class SqlQueryResponse { }[]; constructor(); } -type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; +type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -12611,15 +12462,22 @@ type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SystemConfig { - 'onboarding_content_url'?: string | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; + +/** +* Response format associated with the search data API. +*/ +declare class SearchDataResponse { + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; static getAttributeTypeMap(): { name: string; baseName: string; @@ -12640,99 +12498,11 @@ declare class SystemConfig { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SystemInfo { - /** - * The unique identifier of the object - */ - 'id'?: string | null; - /** - * Name of the cluster. - */ - 'name'?: string | null; - /** - * The release version of the cluster. - */ - 'release_version'?: string | null; - /** - * The timezone of the cluster. - */ - 'time_zone'?: string | null; - /** - * The default locale of the cluster. - */ - 'locale'?: string | null; - /** - * The default date format representation of the cluster. - */ - 'date_format'?: string | null; - /** - * The API version of the cluster. - */ - 'api_version'?: string | null; - /** - * The deployment type of the cluster. - */ - 'type'?: string | null; - /** - * The deployed environment of the cluster. - */ - 'environment'?: string | null; - /** - * The license applied to the cluster. - */ - 'license'?: string | null; - /** - * The default date time format representation of the cluster. - */ - 'date_time_format'?: string | null; - /** - * The default time format representation of the cluster. - */ - 'time_format'?: string | null; - /** - * The unique identifier of system user. - */ - 'system_user_id'?: string | null; - /** - * The unique identifier of super user. - */ - 'super_user_id'?: string | null; - /** - * The unique identifier of hidden object. - */ - 'hidden_object_id'?: string | null; - /** - * The unique identifier of system group. - */ - 'system_group_id'?: string | null; - /** - * The unique identifier of tsadmin user. - */ - 'tsadmin_user_id'?: string | null; - /** - * The unique identifier of admin group. - */ - 'admin_group_id'?: string | null; - /** - * The unique identifier of all tables connection. - */ - 'all_tables_connection_id'?: string | null; - /** - * The unique identifier of ALL group. - */ - 'all_user_group_id'?: string | null; - /** - * The supported accept language by the cluster. - */ - 'accept_language'?: string | null; - /** - * The count of users of ALL group. - */ - 'all_user_group_member_user_count'?: number | null; +declare class SearchEmailCustomizationRequest { /** - * The version number of logical model of the cluster. + * Unique ID or name of org Version: 10.12.0.cl or later */ - 'logical_model_version'?: number | null; + 'org_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12760,8 +12530,18 @@ declare class SystemInfo { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SystemOverrideInfo { - 'config_override_info'?: any | null; +/** +* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +*/ +declare class SearchMetadataRequestFavoriteObjectOptions { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12789,19 +12569,18 @@ declare class SystemOverrideInfo { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Tag { - 'name': string; - 'id': string; - 'color'?: string | null; - 'deleted'?: boolean | null; - 'hidden'?: boolean | null; - 'external'?: boolean | null; - 'deprecated'?: boolean | null; - 'creation_time_in_millis'?: number | null; - 'modification_time_in_millis'?: number | null; - 'author_id'?: string | null; - 'modifier_id'?: string | null; - 'owner_id'?: string | null; +/** +* Sort options to filter metadata details. +*/ +declare class SearchMetadataRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12817,6 +12596,8 @@ declare class Tag { }[]; constructor(); } +type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -12829,102 +12610,102 @@ declare class Tag { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Email customization configuration properties -*/ -declare class TemplatePropertiesInputCreate { + +declare class SearchMetadataRequest { /** - * Background color for call-to-action button in hex format + * Metadata objects such as Liveboards, Answers, and Worksheets. */ - 'cta_button_bg_color'?: string | null; + 'metadata'?: Array; /** - * Text color for call-to-action button in hex format + * Object permission details to search by. */ - 'cta_text_font_color'?: string | null; + 'permissions'?: Array; /** - * Primary background color in hex format + * GUID or name of user who created the metadata object. */ - 'primary_bg_color'?: string | null; + 'created_by_user_identifiers'?: Array; /** - * Home page URL (HTTP/HTTPS only) + * Version of the dependent table of the metadata objects like Worksheets. */ - 'home_url'?: string | null; + 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; /** - * Logo image URL (HTTP/HTTPS only) + * List of metadata objects to exclude from search. */ - 'logo_url'?: string | null; + 'exclude_objects'?: Array; + 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; /** - * Font family for email content (e.g., Arial, sans-serif) + * Includes system-generated metadata objects. */ - 'font_family'?: string | null; + 'include_auto_created_objects'?: boolean | null; /** - * Product name to display + * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. */ - 'product_name'?: string | null; + 'include_dependent_objects'?: boolean | null; /** - * Footer address text + * The maximum number of dependents to include per metadata object. */ - 'footer_address'?: string | null; + 'dependent_objects_record_size'?: number; /** - * Footer phone number + * Includes complete details of the metadata objects. */ - 'footer_phone'?: string | null; + 'include_details'?: boolean | null; /** - * Replacement value for Liveboard + * Includes headers of the metadata objects. */ - 'replacement_value_for_liveboard'?: string | null; + 'include_headers'?: boolean | null; /** - * Replacement value for Answer + * Includes details of the hidden objects, such as a column in a worksheet or a table. */ - 'replacement_value_for_answer'?: string | null; + 'include_hidden_objects'?: boolean | null; /** - * Replacement value for SpotIQ + * Includes objects with incomplete metadata. */ - 'replacement_value_for_spot_iq'?: string | null; + 'include_incomplete_objects'?: boolean | null; /** - * Whether to hide footer address + * Includes visualization headers of the specified Liveboard object. */ - 'hide_footer_address'?: boolean | null; + 'include_visualization_headers'?: boolean | null; /** - * Whether to hide footer phone number + * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. */ - 'hide_footer_phone'?: boolean | null; + 'include_worksheet_search_assist_data'?: boolean | null; /** - * Whether to hide manage notification link + * Includes ID or names of the users who modified the metadata object. */ - 'hide_manage_notification'?: boolean | null; + 'modified_by_user_identifiers'?: Array; /** - * Whether to hide mobile app nudge + * The starting record number from where the records should be included. */ - 'hide_mobile_app_nudge'?: boolean | null; + 'record_offset'?: number; /** - * Whether to hide privacy policy link + * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. */ - 'hide_privacy_policy'?: boolean | null; + 'record_size'?: number; + 'sort_options'?: SearchMetadataRequestSortOptions; /** - * Whether to hide product name + * Tags to filter metadata objects by */ - 'hide_product_name'?: boolean | null; + 'tag_identifiers'?: Array; /** - * Whether to hide ThoughtSpot vocabulary definitions + * Indicates whether to include stats of the metadata objects. */ - 'hide_ts_vocabulary_definitions'?: boolean | null; + 'include_stats'?: boolean | null; /** - * Whether to hide notification status + *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. */ - 'hide_notification_status'?: boolean | null; + 'include_discoverable_objects'?: boolean | null; /** - * Whether to hide error message + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. */ - 'hide_error_message'?: boolean | null; + 'show_resolved_parameters'?: boolean | null; /** - * Whether to hide unsubscribe link + * Indicates the model version of Liveboard to be attached in metadata detail. */ - 'hide_unsubscribe_link'?: boolean | null; + 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; /** - * Whether to hide modify alert + *
Version: 10.11.0.cl or later
If only published objects should be returned */ - 'hide_modify_alert'?: boolean | null; + 'include_only_published_objects'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12940,6 +12721,8 @@ declare class TemplatePropertiesInputCreate { }[]; constructor(); } +type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2"; +type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; /** * ThoughtSpot Public REST API @@ -12952,29 +12735,27 @@ declare class TemplatePropertiesInputCreate { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class Token { +declare class SearchOrgsRequest { /** - * Bearer auth token. + * ID or name of the Org */ - 'token': string; + 'org_identifier'?: string; /** - * Token creation time in milliseconds. + * Description of the Org */ - 'creation_time_in_millis': number; + 'description'?: string; /** - * Token expiration time in milliseconds. + * Visibility of the Org */ - 'expiration_time_in_millis': number; - 'scope': Scope; + 'visibility'?: SearchOrgsRequestVisibilityEnum; /** - * Username to whom the token is issued. + * Status of the Org */ - 'valid_for_user_id': string; + 'status'?: SearchOrgsRequestStatusEnum; /** - * Unique identifier of the user to whom the token is issued. + * GUIDs or names of the users for which you want to retrieve the Orgs data */ - 'valid_for_username': string; + 'user_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12990,6 +12771,8 @@ declare class Token { }[]; constructor(); } +type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN"; +type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; /** * ThoughtSpot Public REST API @@ -13003,24 +12786,78 @@ declare class Token { * Do not edit the class manually. */ -declare class TokenValidationResponse { +/** +* Response for search role api should handle hidden privileges as well. +*/ +declare class SearchRoleResponse { /** - * Token creation time in milliseconds. + * Unique Id of the role. */ - 'creation_time_in_millis': number; + 'id': string; /** - * Token expiration time in milliseconds. + * Name of the role */ - 'expiration_time_in_millis': number; - 'scope': Scope; + 'name': string; /** - * Username to whom the token is issued. + * Description of the role */ - 'valid_for_user_id': string; + 'description': string; /** - * Type of token. + * number of groups assigned with this role */ - 'token_type': string; + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: SearchRoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13036,6 +12873,8 @@ declare class TokenValidationResponse { }[]; constructor(); } +type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -13048,27 +12887,39 @@ declare class TokenValidationResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UnparameterizeMetadataRequest { +declare class SearchRolesRequest { /** - * Type of metadata object to unparameterize. + * unique ID or name of the Roles */ - 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + 'role_identifiers'?: Array; /** - * Unique ID or name of the metadata object to unparameterize. + * Unique Id or name of the Organisation */ - 'metadata_identifier': string; + 'org_identifiers'?: Array; /** - * Type of field in the metadata to unparameterize. + * Unique Id or name of the User Group */ - 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + 'group_identifiers'?: Array; /** - * Name of the field which needs to be unparameterized. + * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. */ - 'field_name': string; + 'privileges'?: Array; /** - * The value to use in place of the variable for the field + * Indicates whether the Role is deprecated. */ - 'value': string; + 'deprecated'?: boolean | null; + /** + * Indicates whether the Role is external + */ + 'external'?: boolean | null; + /** + * Indicates whether the Role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + /** + * Permission details of the Role + */ + 'permissions'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13084,8 +12935,8 @@ declare class UnparameterizeMetadataRequest { }[]; constructor(); } -type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; -type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; +type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -13098,24 +12949,22 @@ type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROP * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UnpublishMetadataRequest { - /** - * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. - */ - 'force'?: boolean | null; +/** +* Options while fetching history runs for the schedule. +*/ +declare class SearchSchedulesRequestHistoryRunsOptions { /** - * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + * Indicates whether to fetch history runs for the scheduled notification. */ - 'include_dependencies': boolean; + 'include_history_runs'?: boolean | null; /** - * Metadata objects. + * Indicates the max number of records that can be fetched as past runs of any scheduled job. */ - 'metadata': Array; + 'record_size'?: number | null; /** - * Unique ID or name of orgs. + * Indicates the starting record number from where history runs records should be fetched. */ - 'org_identifiers': Array; + 'record_offset'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13144,25 +12993,17 @@ declare class UnpublishMetadataRequest { * Do not edit the class manually. */ /** -* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +* Sort options. */ -declare class UpdateCalendarRequestTableReference { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Name of the database. - */ - 'database_name'?: string | null; +declare class SearchSchedulesRequestSortOptions { /** - * Name of the schema. + * Name of the field to apply the sort on. */ - 'schema_name'?: string | null; + 'field_name'?: string | null; /** - * Name of the table. Table names may be case-sensitive depending on the database system. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'table_name': string; + 'order'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13191,40 +13032,25 @@ declare class UpdateCalendarRequestTableReference { * Do not edit the class manually. */ -declare class UpdateCalendarRequest { - /** - * Type of update operation. - */ - 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; - 'table_reference': UpdateCalendarRequestTableReference; - /** - * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. - */ - 'start_date'?: string; - /** - * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. - */ - 'end_date'?: string; - /** - * Type of the calendar. - */ - 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; +declare class SearchSchedulesRequest { /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + * Metadata objects associated with the scheduled jobs. */ - 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + 'metadata'?: Array; /** - * Specify the starting day of the week + * The starting record number from where the records should be included. */ - 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + 'record_offset'?: number; /** - * Prefix to add before the quarter. + * The number of records that should be included. */ - 'quarter_name_prefix'?: string; + 'record_size'?: number; + 'sort_options'?: SearchSchedulesRequestSortOptions; + 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; /** - * Prefix to add before the year. + * unique ID or name of the Schedule */ - 'year_name_prefix'?: string; + 'schedule_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13240,10 +13066,6 @@ declare class UpdateCalendarRequest { }[]; constructor(); } -type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; -type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; -type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; -type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -13256,24 +13078,19 @@ type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateColumnSecurityRulesRequest { - /** - * GUID or name of the table for which we want to create column security rules - */ - 'identifier'?: string; +declare class SearchTagsRequest { /** - * The object ID of the table + * Name or Id of the tag. */ - 'obj_identifier'?: string; + 'tag_identifier'?: string; /** - * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + * A pattern to match case-insensitive name of the Tag object. */ - 'clear_csr'?: boolean | null; + 'name_pattern'?: string; /** - * Array where each object defines the security rule for a specific column + * Color of the tag. */ - 'column_security_rules': Array; + 'color'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13301,35 +13118,18 @@ declare class UpdateColumnSecurityRulesRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConfigRequest { - /** - * Username to authenticate connection to version control system - */ - 'username'?: string; - /** - * Access token corresponding to the user to authenticate connection to version control system - */ - 'access_token'?: string; +/** +* Sort options to filter group details. +*/ +declare class SearchUserGroupsRequestSortOptions { /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + * Name of the field to apply the sort on. */ - 'org_identifier'?: string; + 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; /** - * List the remote branches to configure. Example:[development, production] + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'branch_names'?: Array; - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later - */ - 'commit_branch_name'?: string; - /** - * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later - */ - 'enable_guid_mapping'?: boolean | null; - /** - * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later - */ - 'configuration_branch_name'?: string; + 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13345,6 +13145,8 @@ declare class UpdateConfigRequest { }[]; constructor(); } +type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13357,43 +13159,73 @@ declare class UpdateConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConnectionConfigurationRequest { + +declare class SearchUserGroupsRequest { /** - * Unique ID or name of the connection. + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. */ - 'connection_identifier': string; + 'default_liveboard_identifiers'?: Array; /** - * Name of the configuration to update. + * Description of the group */ - 'name'?: string; + 'description'?: string; /** - * Description of the configuration. + * Display name of the group */ - 'description'?: string; + 'display_name'?: string; /** - * Type of authentication. + * A pattern to match case-insensitive name of the Group object. */ - 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + 'name_pattern'?: string; /** - * Configuration properties in JSON. + * GUID or name of the group */ - 'configuration'?: any; + 'group_identifier'?: string; /** - * Type of policy. + * ID or name of the Org to which the group belongs */ - 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + 'org_identifiers'?: Array; /** - * Unique ID or name of the User and User Groups. + * Privileges assigned to the group. */ - 'policy_principals'?: Array; + 'privileges'?: Array; /** - * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. */ - 'policy_processes'?: Array; + 'sub_group_identifiers'?: Array; /** - * Indicates whether the configuration enable/disable. + * Group type. */ - 'disable'?: boolean | null; + 'type'?: SearchUserGroupsRequestTypeEnum; + /** + * GUID or name of the users assigned to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: SearchUserGroupsRequestVisibilityEnum; + /** + * Filter groups with a list of Roles assigned to a group + */ + 'role_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUserGroupsRequestSortOptions; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. + */ + 'include_users'?: boolean | null; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. + */ + 'include_sub_groups'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13409,9 +13241,9 @@ declare class UpdateConnectionConfigurationRequest { }[]; constructor(); } -type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN"; -type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; -type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; +type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -13424,27 +13256,18 @@ type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConnectionRequest { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Updated name of the connection. - */ - 'name'?: string; - /** - * Updated description of the connection. - */ - 'description'?: string; +/** +* Sort options. +*/ +declare class SearchUsersRequestSortOptions { /** - * Configuration of the data warehouse in JSON. + * Name of the field to apply the sort on. */ - 'data_warehouse_config'?: any; + 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; /** - * Indicates whether to validate the connection details. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'validate'?: boolean | null; + 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13460,6 +13283,8 @@ declare class UpdateConnectionRequest { }[]; constructor(); } +type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13472,23 +13297,85 @@ declare class UpdateConnectionRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConnectionV2Request { + +declare class SearchUsersRequest { /** - * Updated name of the connection. + * GUID / name of the user to search */ - 'name'?: string; + 'user_identifier'?: string; /** - * Updated description of the connection. + * A unique display name string for the user account, usually their first and last name */ - 'description'?: string; + 'display_name'?: string; /** - * Configuration of the data warehouse in JSON. + * A pattern to match case-insensitive name of the User object. */ - 'data_warehouse_config'?: any; + 'name_pattern'?: string; /** - * Indicates whether to validate the connection details. + * Visibility of the user */ - 'validate'?: boolean | null; + 'visibility'?: SearchUsersRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * GUID or name of the group to which the user belongs + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the user + */ + 'privileges'?: Array; + /** + * Type of the account + */ + 'account_type'?: SearchUsersRequestAccountTypeEnum; + /** + * Current status of the user account. + */ + 'account_status'?: SearchUsersRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding walkthrough + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * IDs or names of the Orgs to which the user belongs + */ + 'org_identifiers'?: Array; + /** + * Unique ID or name of the user\'s home Liveboard. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects which are assigned as favorites of the user. + */ + 'favorite_metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUsersRequestSortOptions; + /** + * Filters by the role assigned to the user. + */ + 'role_identifiers'?: Array; + /** + * Indicates if the user\'s favorite objects should be displayed. + */ + 'include_favorite_metadata'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13504,6 +13391,10 @@ declare class UpdateConnectionV2Request { }[]; constructor(); } +type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; /** * ThoughtSpot Public REST API @@ -13516,13 +13407,26 @@ declare class UpdateConnectionV2Request { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +* Input for variable scope in search */ -declare class UpdateCustomActionRequestActionDetails { - 'CALLBACK'?: CALLBACKInput; - 'URL'?: URLInput; +declare class ValueScopeInput { + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Model Identifier + */ + 'model_identifier'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13538,6 +13442,7 @@ declare class UpdateCustomActionRequestActionDetails { }[]; constructor(); } +type ValueScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -13551,13 +13456,21 @@ declare class UpdateCustomActionRequestActionDetails { * Do not edit the class manually. */ /** -* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +* Input for variable details in search */ -declare class UpdateCustomActionRequestDefaultActionConfig { +declare class VariableDetailInput { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Unique ID or name of the variable */ - 'visibility'?: boolean | null; + 'identifier'?: string | null; + /** + * Type of variable + */ + 'type'?: VariableDetailInputTypeEnum | null; + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + */ + 'name_pattern'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13573,6 +13486,7 @@ declare class UpdateCustomActionRequestDefaultActionConfig { }[]; constructor(); } +type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; /** * ThoughtSpot Public REST API @@ -13586,25 +13500,27 @@ declare class UpdateCustomActionRequestDefaultActionConfig { * Do not edit the class manually. */ -declare class UpdateCustomActionRequest { - 'action_details'?: UpdateCustomActionRequestActionDetails; +declare class SearchVariablesRequest { /** - * Metadata objects to which the custom action needs to be associated. + * Variable details */ - 'associate_metadata'?: Array; - 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + 'variable_details'?: Array; /** - * Unique ID or name of the groups that can view and access the custom action. + * Array of scope filters */ - 'group_identifiers'?: Array; + 'value_scope'?: Array; /** - * Name of the custom action. The custom action name must be unique. + * The starting record number from where the records should be included */ - 'name'?: string; + 'record_offset'?: number; /** - * Type of update operation. Default operation type is ADD + * The number of records that should be included */ - 'operation'?: UpdateCustomActionRequestOperationEnum; + 'record_size'?: number; + /** + * Format in which we want the output + */ + 'output_format'?: SearchVariablesRequestOutputFormatEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13620,7 +13536,7 @@ declare class UpdateCustomActionRequest { }[]; constructor(); } -type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; +type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VALUES"; /** * ThoughtSpot Public REST API @@ -13633,13 +13549,18 @@ type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateEmailCustomizationRequest { - 'template_properties': CreateEmailCustomizationRequestTemplateProperties; +/** +* Sort option includes sort field and sort order. +*/ +declare class SearchWebhookConfigurationsRequestSortOptions { /** - * Unique ID or name of org + * Name of the field to apply the sort on. */ - 'org_identifier'?: string; + 'field_name'?: SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: SearchWebhookConfigurationsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13655,6 +13576,8 @@ declare class UpdateEmailCustomizationRequest { }[]; constructor(); } +type SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type SearchWebhookConfigurationsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13668,15 +13591,28 @@ declare class UpdateEmailCustomizationRequest { * Do not edit the class manually. */ -declare class UpdateMetadataHeaderRequest { +declare class SearchWebhookConfigurationsRequest { /** - * List of header objects to update. + * Unique ID or name of the org. */ - 'headers_update': Array; + 'org_identifier'?: string; /** - * Unique ID or name of the organization. + * Unique ID or name of the webhook. */ - 'org_identifier'?: string; + 'webhook_identifier'?: string; + /** + * Type of webhook event to filter by. + */ + 'event_type'?: SearchWebhookConfigurationsRequestEventTypeEnum; + /** + * The offset point, starting from where the webhooks should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of webhooks that should be included in the response starting from offset position. + */ + 'record_size'?: number; + 'sort_options'?: SearchWebhookConfigurationsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13692,6 +13628,7 @@ declare class UpdateMetadataHeaderRequest { }[]; constructor(); } +type SearchWebhookConfigurationsRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -13704,26 +13641,11 @@ declare class UpdateMetadataHeaderRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Input for updating object ID of a metadata object. -*/ -declare class UpdateObjIdInput { - /** - * GUID or name of the metadata object. - */ - 'metadata_identifier'?: string | null; - /** - * Type of metadata. Required if metadata_identifier is name of the object. - */ - 'type'?: UpdateObjIdInputTypeEnum | null; - /** - * Current object ID value. - */ - 'current_obj_id'?: string | null; +declare class SendAgentMessageRequest { /** - * New object ID value to set. + * messages to be sent to the agent */ - 'new_obj_id': string; + 'messages': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13739,7 +13661,6 @@ declare class UpdateObjIdInput { }[]; constructor(); } -type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -13752,12 +13673,9 @@ type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateMetadataObjIdRequest { - /** - * List of metadata objects to update their object IDs. - */ - 'metadata': Array; +declare class SendAgentMessageResponse { + 'success': boolean; + 'message'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13785,27 +13703,15 @@ declare class UpdateMetadataObjIdRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateOrgRequest { +declare class SendAgentMessageStreamingRequest { /** - * Name of the Org - */ - 'name'?: string; - /** - * Description of the Org - */ - 'description'?: string; - /** - * Add Users to an Org - */ - 'user_identifiers'?: Array; - /** - * Add Default Groups to an Org + * Unique identifier for the conversation (used to track context) */ - 'group_identifiers'?: Array; + 'conversation_identifier': string; /** - * Type of update operation. Default operation type is ADD + * messages to be sent to the agent */ - 'operation'?: UpdateOrgRequestOperationEnum; + 'messages': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13821,7 +13727,6 @@ declare class UpdateOrgRequest { }[]; constructor(); } -type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; /** * ThoughtSpot Public REST API @@ -13834,19 +13739,15 @@ type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateRoleRequest { - /** - * Name of the Role. - */ - 'name': string; +declare class SendMessageRequest { /** - * Description of the Role. + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. */ - 'description'?: string; + 'metadata_identifier': string; /** - * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * A message string with the follow-up question to continue the conversation. */ - 'privileges'?: Array; + 'message': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13862,7 +13763,6 @@ declare class UpdateRoleRequest { }[]; constructor(); } -type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE"; /** * ThoughtSpot Public REST API @@ -13875,12 +13775,15 @@ type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Frequency of the scheduled job run. -*/ -declare class UpdateScheduleRequestFrequency { - 'cron_expression': CronExpressionInput; +declare class ShareMetadataTypeInput { + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ShareMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13896,6 +13799,7 @@ declare class UpdateScheduleRequestFrequency { }[]; constructor(); } +type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -13908,14 +13812,13 @@ declare class UpdateScheduleRequestFrequency { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options to specify the details of a Liveboard. -*/ -declare class UpdateScheduleRequestLiveboardOptions { + +declare class SharePermissionsInput { + 'principal': PrincipalsInput; /** - * Unique ID or name of visualizations. + * Type of access to the shared object */ - 'visualization_identifiers': Array; + 'share_mode': SharePermissionsInputShareModeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13931,6 +13834,7 @@ declare class UpdateScheduleRequestLiveboardOptions { }[]; constructor(); } +type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -13943,46 +13847,48 @@ declare class UpdateScheduleRequestLiveboardOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class UpdateScheduleRequestPdfOptions { + +declare class ShareMetadataRequest { /** - * Indicates whether to include complete Liveboard. + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection */ - 'complete_liveboard'?: boolean | null; + 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; /** - * Indicates whether to include cover page with the Liveboard title. + * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type */ - 'include_cover_page'?: boolean | null; + 'metadata_identifiers'?: Array; /** - * Indicates whether to include customized wide logo in the footer if available. + * Metadata details for sharing objects. */ - 'include_custom_logo'?: boolean | null; + 'metadata'?: Array; /** - * Indicates whether to include a page with all applied filters. + * Permission details for sharing the objects. */ - 'include_filter_page'?: boolean | null; + 'permissions': Array; /** - * Indicates whether to include page number in the footer of each page + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. */ - 'include_page_number'?: boolean | null; + 'visualization_identifiers'?: Array; /** - * Text to include in the footer of each page. + * Email IDs to which notifications will be sent. */ - 'page_footer_text'?: string | null; + 'emails'?: Array; /** - * Page orientation of the PDF. + * Message to be included in notification. */ - 'page_orientation'?: string | null; + 'message': string; /** - * Page size. + * Sends object URLs in the customized format in email notifications. */ - 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + 'enable_custom_url'?: boolean | null; /** - * Indicates whether to include only first page of the tables. + * Flag to notify user when any object is shared. */ - 'truncate_table'?: boolean | null; + 'notify_on_share'?: boolean | null; + /** + * Flag to make the object discoverable. + */ + 'has_lenient_discoverability'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13998,7 +13904,7 @@ declare class UpdateScheduleRequestPdfOptions { }[]; constructor(); } -type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4"; +type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -14011,19 +13917,15 @@ type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. -*/ -declare class UpdateScheduleRequestRecipientDetails { +declare class SingleAnswerRequest { /** - * Emails of the recipients. + * A natural language query string to generate the Answer. */ - 'emails'?: Array | null; + 'query': string; /** - * User or groups to be set as recipients of the schedule notifications. + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. */ - 'principals'?: Array | null; + 'metadata_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14051,44 +13953,15 @@ declare class UpdateScheduleRequestRecipientDetails { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateScheduleRequest { - /** - * Name of the scheduled job. - */ - 'name'?: string; - /** - * Description of the scheduled job. - */ - 'description'?: string; - /** - * Type of metadata object. - */ - 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; - /** - * Unique ID or name of the metadata object. - */ - 'metadata_identifier'?: string; - /** - * Export file format. - */ - 'file_format'?: UpdateScheduleRequestFileFormatEnum; - 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; - 'pdf_options'?: UpdateScheduleRequestPdfOptions; - /** - * Time zone - */ - 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; - 'frequency'?: UpdateScheduleRequestFrequency; - 'recipient_details'?: UpdateScheduleRequestRecipientDetails; +declare class SortOption { /** - * Status of the schedule + * Name of the field to apply the sort on. */ - 'status'?: UpdateScheduleRequestStatusEnum; + 'field_name'?: SortOptionFieldNameEnum | null; /** - * Personalised view id of the liveboard to be scheduled. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'personalised_view_id'?: string; + 'order'?: SortOptionOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14104,10 +13977,8 @@ declare class UpdateScheduleRequest { }[]; constructor(); } -type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; -type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; -type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; -type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; +type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -14120,11 +13991,15 @@ type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateSystemConfigRequest { +declare class SortOptionInput { /** - * Configuration JSON with the key-value pair of configuration attributes to be updated. + * Name of the field to apply the sort on. */ - 'configuration': any; + 'field_name'?: SortOptionInputFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionInputOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14140,6 +14015,8 @@ declare class UpdateSystemConfigRequest { }[]; constructor(); } +type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SortOptionInputOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -14152,15 +14029,18 @@ declare class UpdateSystemConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateTagRequest { +/** +* Sort options. +*/ +declare class SortOptions { /** - * Name of the tag. + * Name of the field to apply the sort on. */ - 'name'?: string; + 'field_name'?: SortOptionsFieldNameEnum | null; /** - * Hex color code to be assigned to the tag. For example, #ff78a9. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'color'?: string; + 'order'?: SortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14176,6 +14056,8 @@ declare class UpdateTagRequest { }[]; constructor(); } +type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -14188,51 +14070,18 @@ declare class UpdateTagRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateUserGroupRequest { +/** +* Sort options. +*/ +declare class SortingOptions { /** - * Name of the group to modify. + * Name of the field to apply the sort on. */ - 'name'?: string; + 'field_name'?: string | null; /** - * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'default_liveboard_identifiers'?: Array; - /** - * Description for the group. - */ - 'description'?: string; - /** - * Display name of the group. - */ - 'display_name'?: string; - /** - * Privileges to assign to the group. - */ - 'privileges'?: Array; - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - */ - 'sub_group_identifiers'?: Array; - /** - * Type of the group - */ - 'type'?: UpdateUserGroupRequestTypeEnum; - /** - * GUID or name of the users to assign to the group. - */ - 'user_identifiers'?: Array; - /** - * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. - */ - 'visibility'?: UpdateUserGroupRequestVisibilityEnum; - /** - * Role identifiers of the Roles that should be assigned to the group. - */ - 'role_identifiers'?: Array; - /** - * Type of update operation. Default operation type is REPLACE - */ - 'operation'?: UpdateUserGroupRequestOperationEnum; + 'order'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14248,10 +14097,6 @@ declare class UpdateUserGroupRequest { }[]; constructor(); } -type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; /** * ThoughtSpot Public REST API @@ -14264,76 +14109,22 @@ type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateUserRequest { - /** - * Name of the user. The username string must be unique. - */ - 'name'?: string; - /** - * A unique display name string for the user account, usually their first and last name - */ - 'display_name'?: string; - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. - */ - 'visibility'?: UpdateUserRequestVisibilityEnum; - /** - * Email of the user account - */ - 'email'?: string; - /** - * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. - */ - 'account_status'?: UpdateUserRequestAccountStatusEnum; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. - */ - 'notify_on_share'?: boolean | null; - /** - * The user preference for revisiting the onboarding experience. - */ - 'show_onboarding_experience'?: boolean | null; - /** - * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * Type of the account. - */ - 'account_type'?: UpdateUserRequestAccountTypeEnum; - /** - * GUIDs or names of the groups. - */ - 'group_identifiers'?: Array; - /** - * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. - */ - 'home_liveboard_identifier'?: string; - /** - * Metadata objects to add to the user\'s favorites list. - */ - 'favorite_metadata'?: Array; - /** - * IDs of the Orgs. - */ - 'org_identifiers'?: Array; - /** - * Type of update operation. Default operation type is REPLACE - */ - 'operation'?: UpdateUserRequestOperationEnum; +/** +* Response format associated with fetch SQL query api +*/ +declare class SqlQuery { /** - * Locale for the user. + * Unique identifier of the metadata. */ - 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + 'metadata_id': string; /** - * Properties for the user + * Name of the metadata. */ - 'extended_properties'?: any; + 'metadata_name': string; /** - * Preferences for the user + * SQL query of a metadata object. */ - 'extended_preferences'?: any; + 'sql_query': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14349,11 +14140,6 @@ declare class UpdateUserRequest { }[]; constructor(); } -type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; -type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -14367,60 +14153,23 @@ type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE * Do not edit the class manually. */ -declare class UpdateVariableRequest { - /** - * New name of the variable if we want to rename. - */ - 'name'?: string; +declare class SqlQueryResponse { /** - * Operation to perform on the values. + * Unique identifier of the metadata. */ - 'operation'?: UpdateVariableRequestOperationEnum; + 'metadata_id': string; /** - * Values of variable to be updated. + * Name of the metadata. */ - 'values'?: Array; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -type UpdateVariableRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** -* Input for variable value update -*/ -declare class VariableValueInput { + 'metadata_name': string; /** - * ID or Name of the variable + * Type of the metadata. */ - 'variable_identifier': string; + 'metadata_type': SqlQueryResponseMetadataTypeEnum; /** - * Values of the variable + * SQL query details of metadata objects. */ - 'variable_values': Array; + 'sql_queries': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14436,6 +14185,7 @@ declare class VariableValueInput { }[]; constructor(); } +type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -14448,16 +14198,8 @@ declare class VariableValueInput { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateVariableValuesRequest { - /** - * Variables and values - */ - 'variable_updates': Array; - /** - * Type of update operation - */ - 'operation': UpdateVariableValuesRequestOperationEnum; +declare class SystemConfig { + 'onboarding_content_url'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14473,7 +14215,6 @@ declare class UpdateVariableValuesRequest { }[]; constructor(); } -type UpdateVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; /** * ThoughtSpot Public REST API @@ -14486,182 +14227,2769 @@ type UpdateVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class User { +declare class SystemInfo { /** - * Unique identifier of the user. + * The unique identifier of the object */ - 'id': string; + 'id'?: string | null; /** - * Name of the user. + * Name of the cluster. */ - 'name': string; + 'name'?: string | null; /** - * Display name of the user. + * The release version of the cluster. */ - 'display_name': string; + 'release_version'?: string | null; /** - * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + * The timezone of the cluster. */ - 'visibility': UserVisibilityEnum; + 'time_zone'?: string | null; /** - * Unique identifier of author of the user. + * The default locale of the cluster. */ - 'author_id'?: string | null; + 'locale'?: string | null; /** - * Defines whether the user can change their password. + * The default date format representation of the cluster. */ - 'can_change_password'?: boolean | null; + 'date_format'?: string | null; /** - * Defines whether the response has complete detail of the user. + * The API version of the cluster. */ - 'complete_detail'?: boolean | null; + 'api_version'?: string | null; /** - * Creation time of the user in milliseconds. + * The deployment type of the cluster. */ - 'creation_time_in_millis'?: number | null; - 'current_org'?: Org; + 'type'?: string | null; /** - * Indicates whether the user is deleted. + * The deployed environment of the cluster. */ - 'deleted'?: boolean | null; + 'environment'?: string | null; /** - * Indicates whether the user is deprecated. + * The license applied to the cluster. */ - 'deprecated'?: boolean | null; + 'license'?: string | null; /** - * Type of the user account. + * The default date time format representation of the cluster. */ - 'account_type'?: UserAccountTypeEnum | null; + 'date_time_format'?: string | null; /** - * Status of the user account. + * The default time format representation of the cluster. */ - 'account_status'?: UserAccountStatusEnum | null; + 'time_format'?: string | null; /** - * Email of the user. + * The unique identifier of system user. */ - 'email'?: string | null; + 'system_user_id'?: string | null; /** - * Expiration time of the user in milliseconds. + * The unique identifier of super user. */ - 'expiration_time_in_millis'?: number | null; + 'super_user_id'?: string | null; /** - * Indicates whether the user is external. + * The unique identifier of hidden object. */ - 'external'?: boolean | null; + 'hidden_object_id'?: string | null; /** - * Metadata objects to add to the users\' favorites list. + * The unique identifier of system group. */ - 'favorite_metadata'?: Array | null; + 'system_group_id'?: string | null; /** - * Timestamp of the first login session of the user in milliseconds. + * The unique identifier of tsadmin user. */ - 'first_login_time_in_millis'?: number | null; + 'tsadmin_user_id'?: string | null; /** - * Group mask of the user. + * The unique identifier of admin group. */ - 'group_mask'?: number | null; + 'admin_group_id'?: string | null; /** - * Indicates whether the user is hidden. + * The unique identifier of all tables connection. */ - 'hidden'?: boolean | null; - 'home_liveboard'?: ObjectIDAndName; + 'all_tables_connection_id'?: string | null; /** - * Incomplete details of user if any present. + * The unique identifier of ALL group. */ - 'incomplete_details'?: any | null; + 'all_user_group_id'?: string | null; /** - * Indicates whether it is first login of the user. + * The supported accept language by the cluster. */ - 'is_first_login'?: boolean | null; + 'accept_language'?: string | null; /** - * Last modified time of the user in milliseconds. + * The count of users of ALL group. */ - 'modification_time_in_millis'?: number | null; + 'all_user_group_member_user_count'?: number | null; /** - * Unique identifier of modifier of the user. + * The version number of logical model of the cluster. */ + 'logical_model_version'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemOverrideInfo { + 'config_override_info'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Tag { + 'name': string; + 'id': string; + 'color'?: string | null; + 'deleted'?: boolean | null; + 'hidden'?: boolean | null; + 'external'?: boolean | null; + 'deprecated'?: boolean | null; + 'creation_time_in_millis'?: number | null; + 'modification_time_in_millis'?: number | null; + 'author_id'?: string | null; 'modifier_id'?: string | null; + 'owner_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Email customization configuration properties +*/ +declare class TemplatePropertiesInputCreate { /** - * User preference for receiving email notifications on shared Answers or Liveboard. + * Background color for call-to-action button in hex format */ - 'notify_on_share'?: boolean | null; + 'cta_button_bg_color'?: string | null; /** - * The user preference for turning off the onboarding experience. + * Text color for call-to-action button in hex format */ - 'onboarding_experience_completed'?: boolean | null; + 'cta_text_font_color'?: string | null; /** - * Orgs to which the user belongs. + * Primary background color in hex format */ - 'orgs'?: Array | null; + 'primary_bg_color'?: string | null; /** - * Unique identifier of owner of the user. + * Home page URL (HTTP/HTTPS only) */ - 'owner_id'?: string | null; + 'home_url'?: string | null; /** - * Parent type of the user. + * Logo image URL (HTTP/HTTPS only) */ - 'parent_type'?: UserParentTypeEnum | null; + 'logo_url'?: string | null; /** - * Privileges which are assigned to the user. + * Font family for email content (e.g., Arial, sans-serif) */ - 'privileges'?: Array | null; + 'font_family'?: string | null; /** - * User\'s preference to revisit the new user onboarding experience. + * Product name to display */ - 'show_onboarding_experience'?: boolean | null; + 'product_name'?: string | null; /** - * Indicates whether the user is a super user. + * Footer address text */ - 'super_user'?: boolean | null; + 'footer_address'?: string | null; /** - * Indicates whether the user is a system user. + * Footer phone number */ - 'system_user'?: boolean | null; + 'footer_phone'?: string | null; /** - * Tags associated with the user. + * Replacement value for Liveboard */ - 'tags'?: Array | null; + 'replacement_value_for_liveboard'?: string | null; /** - * Unique identifier of tenant of the user. + * Replacement value for Answer */ - 'tenant_id'?: string | null; + 'replacement_value_for_answer'?: string | null; /** - * Groups to which the user is assigned. + * Replacement value for SpotIQ */ - 'user_groups'?: Array | null; + 'replacement_value_for_spot_iq'?: string | null; /** - * Inherited User Groups which the user is part of. + * Whether to hide footer address */ - 'user_inherited_groups'?: Array | null; + 'hide_footer_address'?: boolean | null; /** - * Indicates whether welcome email is sent for the user. + * Whether to hide footer phone number */ - 'welcome_email_sent'?: boolean | null; + 'hide_footer_phone'?: boolean | null; /** - * Privileges which are assigned to the user with org. + * Whether to hide manage notification link */ - 'org_privileges'?: any | null; + 'hide_manage_notification'?: boolean | null; /** - * Locale for the user. + * Whether to hide mobile app nudge */ - 'preferred_locale'?: string | null; + 'hide_mobile_app_nudge'?: boolean | null; /** - * Properties for the user + * Whether to hide privacy policy link */ - 'extended_properties'?: any | null; + 'hide_privacy_policy'?: boolean | null; /** - * Preferences for the user + * Whether to hide product name */ - 'extended_preferences'?: any | null; + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Token { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class TokenValidationResponse { + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Type of token. + */ + 'token_type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UnparameterizeMetadataRequest { + /** + * Type of metadata object to unparameterize. + */ + 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to unparameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to unparameterize. + */ + 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be unparameterized. + */ + 'field_name': string; + /** + * The value to use in place of the variable for the field + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; +type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UnpublishMetadataRequest { + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. + */ + 'force'?: boolean | null; + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + */ + 'include_dependencies': boolean; + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs. + */ + 'org_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +*/ +declare class UpdateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCalendarRequest { + /** + * Type of update operation. + */ + 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; + 'table_reference': UpdateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week + */ + 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateColumnSecurityRulesRequest { + /** + * GUID or name of the table for which we want to create column security rules + */ + 'identifier'?: string; + /** + * The object ID of the table + */ + 'obj_identifier'?: string; + /** + * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + */ + 'clear_csr'?: boolean | null; + /** + * Array where each object defines the security rule for a specific column + */ + 'column_security_rules': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConfigRequest { + /** + * Username to authenticate connection to version control system + */ + 'username'?: string; + /** + * Access token corresponding to the user to authenticate connection to version control system + */ + 'access_token'?: string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the configuration to update. + */ + 'name'?: string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Type of authentication. + */ + 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration'?: any; + /** + * Type of policy. + */ + 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + /** + * Indicates whether the configuration enable/disable. + */ + 'disable'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_CLIENT_CREDENTIALS"; +type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionV2Request { + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +*/ +declare class UpdateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class UpdateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCustomActionRequest { + 'action_details'?: UpdateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name'?: string; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateCustomActionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataHeaderRequest { + /** + * List of header objects to update. + */ + 'headers_update': Array; + /** + * Unique ID or name of the organization. + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for updating object ID of a metadata object. +*/ +declare class UpdateObjIdInput { + /** + * GUID or name of the metadata object. + */ + 'metadata_identifier'?: string | null; + /** + * Type of metadata. Required if metadata_identifier is name of the object. + */ + 'type'?: UpdateObjIdInputTypeEnum | null; + /** + * Current object ID value. + */ + 'current_obj_id'?: string | null; + /** + * New object ID value to set. + */ + 'new_obj_id': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataObjIdRequest { + /** + * List of metadata objects to update their object IDs. + */ + 'metadata': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateOrgRequest { + /** + * Name of the Org + */ + 'name'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Add Users to an Org + */ + 'user_identifiers'?: Array; + /** + * Add Default Groups to an Org + */ + 'group_identifiers'?: Array; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateOrgRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateRoleRequest { + /** + * Name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Frequency of the scheduled job run. +*/ +declare class UpdateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify the details of a Liveboard. +*/ +declare class UpdateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class UpdateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class UpdateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name'?: string; + /** + * Description of the scheduled job. + */ + 'description'?: string; + /** + * Type of metadata object. + */ + 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Export file format. + */ + 'file_format'?: UpdateScheduleRequestFileFormatEnum; + 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; + 'pdf_options'?: UpdateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; + 'frequency'?: UpdateScheduleRequestFrequency; + 'recipient_details'?: UpdateScheduleRequestRecipientDetails; + /** + * Status of the schedule + */ + 'status'?: UpdateScheduleRequestStatusEnum; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; +type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateSystemConfigRequest { + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + */ + 'configuration': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateTagRequest { + /** + * Name of the tag. + */ + 'name'?: string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateUserGroupRequest { + /** + * Name of the group to modify. + */ + 'name'?: string; + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description for the group. + */ + 'description'?: string; + /** + * Display name of the group. + */ + 'display_name'?: string; + /** + * Privileges to assign to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Type of the group + */ + 'type'?: UpdateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: UpdateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the Roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserGroupRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: UpdateUserRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: UpdateUserRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Type of the account. + */ + 'account_type'?: UpdateUserRequestAccountTypeEnum; + /** + * GUIDs or names of the groups. + */ + 'group_identifiers'?: Array; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * IDs of the Orgs. + */ + 'org_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserRequestOperationEnum; + /** + * Locale for the user. + */ + 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; +type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateVariableRequest { + /** + * New name of the variable. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value update in batch operations +*/ +declare class VariableUpdateAssignmentInput { + /** + * ID or Name of the variable + */ + 'variable_identifier': string; + /** + * Values of the variable + */ + 'variable_values': Array; + /** + * Operation to perform + */ + 'operation': VariableUpdateAssignmentInputOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "CLEAR"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value update in batch operations +*/ +declare class VariableUpdateScopeInput { + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Principal type + */ + 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateVariableValuesRequest { + /** + * Variables and values to update + */ + 'variable_assignment': Array; + /** + * Variables and values to update + */ + 'variable_value_scope': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name'?: string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url'?: string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events'?: Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class User { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility': UserVisibilityEnum; + /** + * Unique identifier of author of the user. + */ + 'author_id'?: string | null; + /** + * Defines whether the user can change their password. + */ + 'can_change_password'?: boolean | null; + /** + * Defines whether the response has complete detail of the user. + */ + 'complete_detail'?: boolean | null; + /** + * Creation time of the user in milliseconds. + */ + 'creation_time_in_millis'?: number | null; + 'current_org'?: Org; + /** + * Indicates whether the user is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the user is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Type of the user account. + */ + 'account_type'?: UserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: UserAccountStatusEnum | null; + /** + * Email of the user. + */ + 'email'?: string | null; + /** + * Expiration time of the user in milliseconds. + */ + 'expiration_time_in_millis'?: number | null; + /** + * Indicates whether the user is external. + */ + 'external'?: boolean | null; + /** + * Metadata objects to add to the users\' favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Timestamp of the first login session of the user in milliseconds. + */ + 'first_login_time_in_millis'?: number | null; + /** + * Group mask of the user. + */ + 'group_mask'?: number | null; + /** + * Indicates whether the user is hidden. + */ + 'hidden'?: boolean | null; + 'home_liveboard'?: ObjectIDAndName; + /** + * Incomplete details of user if any present. + */ + 'incomplete_details'?: any | null; + /** + * Indicates whether it is first login of the user. + */ + 'is_first_login'?: boolean | null; + /** + * Last modified time of the user in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * Unique identifier of modifier of the user. + */ + 'modifier_id'?: string | null; + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for turning off the onboarding experience. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Orgs to which the user belongs. + */ + 'orgs'?: Array | null; + /** + * Unique identifier of owner of the user. + */ + 'owner_id'?: string | null; + /** + * Parent type of the user. + */ + 'parent_type'?: UserParentTypeEnum | null; + /** + * Privileges which are assigned to the user. + */ + 'privileges'?: Array | null; + /** + * User\'s preference to revisit the new user onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates whether the user is a super user. + */ + 'super_user'?: boolean | null; + /** + * Indicates whether the user is a system user. + */ + 'system_user'?: boolean | null; + /** + * Tags associated with the user. + */ + 'tags'?: Array | null; + /** + * Unique identifier of tenant of the user. + */ + 'tenant_id'?: string | null; + /** + * Groups to which the user is assigned. + */ + 'user_groups'?: Array | null; + /** + * Inherited User Groups which the user is part of. + */ + 'user_inherited_groups'?: Array | null; + /** + * Indicates whether welcome email is sent for the user. + */ + 'welcome_email_sent'?: boolean | null; + /** + * Privileges which are assigned to the user with org. + */ + 'org_privileges'?: any | null; + /** + * Locale for the user. + */ + 'preferred_locale'?: string | null; + /** + * Properties for the user + */ + 'extended_properties'?: any | null; + /** + * Preferences for the user + */ + 'extended_preferences'?: any | null; + /** + * User Parameters which are specified for the user via JWToken + */ + 'user_parameters'?: any | null; + /** + * Access Control Properties which are specified for the user via JWToken + */ + 'access_control_properties'?: any | null; + /** + * Formula Variables which are specified for the user via JWToken + */ + 'variable_values'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UserParentTypeEnum = "USER" | "GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UserGroupResponse { + /** + * The unique identifier of the object + */ + 'author_id'?: string | null; + /** + * Indicates whether the response has complete detail of the group. + */ + 'complete_detail'?: boolean | null; + /** + * Content details of the group + */ + 'content'?: any | null; + /** + * Creation time of the group in milliseconds + */ + 'creation_time_in_millis'?: number | null; + /** + * Liveboards that are assigned as default Liveboards to the group. + */ + 'default_liveboards'?: Array | null; + /** + * Indicates whether the group is deleted + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the group is deprecated + */ + 'deprecated'?: boolean | null; + /** + * Description of the group + */ + 'description'?: string | null; + /** + * Display name of the group. + */ + 'display_name': string; + /** + * Indicates whether the group is external + */ + 'external'?: boolean | null; + /** + * Generation number of the group + */ + 'generation_number'?: number | null; + /** + * Indicates whether the group is hidden + */ + 'hidden'?: boolean | null; + /** + * The unique identifier of the object + */ + 'id': string; + /** + * Index number of the group + */ + 'index'?: number | null; + /** + * Index version number of the group + */ + 'index_version'?: number | null; + /** + * Metadata version number of the group + */ + 'metadata_version'?: number | null; + /** + * Last modified time of the group in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * The unique identifier of the object + */ + 'modifier_id'?: string | null; + /** + * Name of the group. + */ + 'name': string; + /** + * Orgs in which group exists. + */ + 'orgs'?: Array | null; + /** + * The unique identifier of the object + */ + 'owner_id'?: string | null; + /** + * Parent type of the group. + */ + 'parent_type'?: UserGroupResponseParentTypeEnum | null; + /** + * Privileges which are assigned to the group + */ + 'privileges'?: Array | null; + /** + * Groups who are part of the group + */ + 'sub_groups'?: Array | null; + /** + * Indicates whether the group is a system group. + */ + 'system_group'?: boolean | null; + /** + * Tags associated with the group. + */ + 'tags'?: Array | null; + /** + * Type of the group. + */ + 'type'?: UserGroupResponseTypeEnum | null; + /** + * Users who are part of the group. + */ + 'users'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility': UserGroupResponseVisibilityEnum; + /** + * List of roles assgined to the user + */ + 'roles'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; +type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateMergeRequest { + /** + * Name of the branch from which changes need to be picked for validation + */ + 'source_branch_name': string; + /** + * Name of the branch where files will be merged + */ + 'target_branch_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateTokenRequest { + 'token': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class VariableValue { + /** + * The value of the variable + */ + 'value'?: string | null; + /** + * The value of the variable if it is a list type + */ + 'value_list'?: Array | null; + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Principal type + */ + 'principal_type'?: VariableValuePrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Variable object +*/ +declare class Variable { + /** + * Unique identifier of the variable + */ + 'id': string; + /** + * Name of the variable + */ + 'name': string; + /** + * Type of the variable + */ + 'variable_type'?: VariableVariableTypeEnum | null; + /** + * If the variable is sensitive + */ + 'sensitive'?: boolean | null; + /** + * Values of the variable + */ + 'values'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthApiKey { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthBasicAuth { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthOAuth2 { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthentication { + 'API_KEY'?: WebhookAuthApiKey; + 'BASIC_AUTH'?: WebhookAuthBasicAuth; + /** + * Redacted Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthenticationInput { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookDeleteFailure { + /** + * Unique identifier of the webhook that failed to delete. + */ + 'id': string; + /** + * Name of the webhook that failed to delete. + */ + 'name': string; + /** + * Error message describing why the deletion failed. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookOrg { /** - * User Parameters which are specified for the user via JWToken + * Unique identifier of the org. */ - 'user_parameters'?: any | null; + 'id': string; /** - * Access Control Properties which are specified for the user via JWToken + * Name of the org. */ - 'access_control_properties'?: any | null; + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14677,10 +17005,6 @@ declare class User { }[]; constructor(); } -type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type UserParentTypeEnum = "USER" | "GROUP"; /** * ThoughtSpot Public REST API @@ -14693,128 +17017,127 @@ type UserParentTypeEnum = "USER" | "GROUP"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UserGroupResponse { - /** - * The unique identifier of the object - */ - 'author_id'?: string | null; - /** - * Indicates whether the response has complete detail of the group. - */ - 'complete_detail'?: boolean | null; - /** - * Content details of the group - */ - 'content'?: any | null; - /** - * Creation time of the group in milliseconds - */ - 'creation_time_in_millis'?: number | null; - /** - * Liveboards that are assigned as default Liveboards to the group. - */ - 'default_liveboards'?: Array | null; - /** - * Indicates whether the group is deleted - */ - 'deleted'?: boolean | null; - /** - * Indicates whether the group is deprecated - */ - 'deprecated'?: boolean | null; - /** - * Description of the group - */ - 'description'?: string | null; +declare class WebhookSignatureVerification { /** - * Display name of the group. + * Signature verification method type. */ - 'display_name': string; + 'type': WebhookSignatureVerificationTypeEnum; /** - * Indicates whether the group is external + * HTTP header where the signature is sent. */ - 'external'?: boolean | null; + 'header': string; /** - * Generation number of the group + * Hash algorithm used for signature verification. */ - 'generation_number'?: number | null; + 'algorithm': WebhookSignatureVerificationAlgorithmEnum; /** - * Indicates whether the group is hidden + * Shared secret used for HMAC signature generation. */ - 'hidden'?: boolean | null; + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSignatureVerificationTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookUser { /** - * The unique identifier of the object + * Unique identifier of the user. */ 'id': string; /** - * Index number of the group - */ - 'index'?: number | null; - /** - * Index version number of the group - */ - 'index_version'?: number | null; - /** - * Metadata version number of the group - */ - 'metadata_version'?: number | null; - /** - * Last modified time of the group in milliseconds. - */ - 'modification_time_in_millis'?: number | null; - /** - * The unique identifier of the object - */ - 'modifier_id'?: string | null; - /** - * Name of the group. + * Name of the user. */ 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookResponse { /** - * Orgs in which group exists. - */ - 'orgs'?: Array | null; - /** - * The unique identifier of the object - */ - 'owner_id'?: string | null; - /** - * Parent type of the group. - */ - 'parent_type'?: UserGroupResponseParentTypeEnum | null; - /** - * Privileges which are assigned to the group + * Unique identifier of the webhook configuration. */ - 'privileges'?: Array | null; + 'id': string; /** - * Groups who are part of the group + * Name of the webhook configuration. */ - 'sub_groups'?: Array | null; + 'name': string; /** - * Indicates whether the group is a system group. + * Description of the webhook configuration. */ - 'system_group'?: boolean | null; + 'description'?: string | null; + 'org'?: WebhookOrg; /** - * Tags associated with the group. + * The webhook endpoint URL. */ - 'tags'?: Array | null; + 'url': string; /** - * Type of the group. + * Additional URL parameters as key-value pairs. */ - 'type'?: UserGroupResponseTypeEnum | null; + 'url_params'?: any | null; /** - * Users who are part of the group. + * List of events this webhook subscribes to. */ - 'users'?: Array | null; + 'events': Array; + 'authentication'?: WebhookAuthentication; + 'signature_verification'?: WebhookSignatureVerification; /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + * Creation time of the webhook configuration in milliseconds. */ - 'visibility': UserGroupResponseVisibilityEnum; + 'creation_time_in_millis': number; /** - * List of roles assgined to the user + * Last modified time of the webhook configuration in milliseconds. */ - 'roles'?: Array | null; + 'modification_time_in_millis': number; + 'created_by'?: WebhookUser; + 'last_modified_by'?: WebhookUser; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14830,9 +17153,7 @@ declare class UserGroupResponse { }[]; constructor(); } -type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; -type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type WebhookResponseEventsEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -14846,23 +17167,23 @@ type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * Do not edit the class manually. */ -/** -* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). -*/ -declare class UserParameterOptions { - 'objects'?: Array | null; +declare class WebhookDeleteResponse { /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * Number of webhooks successfully deleted. */ - 'runtime_filters'?: Array | null; + 'deleted_count': number; /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * Number of webhooks that failed to delete. */ - 'runtime_sorts'?: Array | null; + 'failed_count': number; /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * List of successfully deleted webhooks. */ - 'parameters'?: Array | null; + 'deleted_webhooks': Array; + /** + * List of webhooks that failed to delete with error details. + */ + 'failed_webhooks': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14890,15 +17211,23 @@ declare class UserParameterOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ValidateMergeRequest { +declare class WebhookPagination { /** - * Name of the branch from which changes need to be picked for validation + * The starting record number from where the records are included. */ - 'source_branch_name': string; + 'record_offset': number; /** - * Name of the branch where files will be merged + * The number of records included in the response. */ - 'target_branch_name': string; + 'record_size': number; + /** + * Total number of webhook configurations available. + */ + 'total_count': number; + /** + * Indicates whether more records are available beyond the current response. + */ + 'has_more': boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14926,8 +17255,13 @@ declare class ValidateMergeRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ValidateTokenRequest { - 'token': string; + +declare class WebhookSearchResponse { + /** + * List of webhook configurations matching the search criteria. + */ + 'webhooks': Array; + 'pagination': WebhookPagination; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14955,27 +17289,23 @@ declare class ValidateTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class VariableValue { - /** - * The value of the variable - */ - 'value'?: string | null; +declare class WebhookSignatureVerificationInput { /** - * The unique name of the org + * Signature verification method type. */ - 'org_identifier': string; + 'type': WebhookSignatureVerificationInputTypeEnum; /** - * Principal type + * HTTP header where the signature is sent. */ - 'principal_type'?: VariableValuePrincipalTypeEnum | null; + 'header': string; /** - * Unique ID or name of the principal + * Hash algorithm used for signature verification. */ - 'principal_identifier'?: string | null; + 'algorithm': WebhookSignatureVerificationInputAlgorithmEnum; /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + * Shared secret used for HMAC signature generation. */ - 'priority'?: number | null; + 'secret': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14988,47 +17318,32 @@ declare class VariableValue { baseName: string; type: string; format: string; - }[]; - constructor(); -} -type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** -* Variable object -*/ -declare class Variable { - /** - * Unique identifier of the variable - */ - 'id': string; - /** - * Name of the variable - */ - 'name': string; - /** - * Type of the variable - */ - 'variable_type'?: VariableVariableTypeEnum | null; + }[]; + constructor(); +} +type WebhookSignatureVerificationInputTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationInputAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSortOptionsInput { /** - * If the variable is sensitive + * Name of the field to apply the sort on. */ - 'sensitive'?: boolean | null; + 'field_name'?: WebhookSortOptionsInputFieldNameEnum | null; /** - * Values of the variable + * Sort order: ASC (Ascending) or DESC (Descending). */ - 'values'?: Array | null; + 'order'?: WebhookSortOptionsInputOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -15044,7 +17359,8 @@ declare class Variable { }[]; constructor(); } -type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type WebhookSortOptionsInputFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type WebhookSortOptionsInputOrderEnum = "ASC" | "DESC"; /** * Defines the contract for a middleware intercepting requests before @@ -15242,16 +17558,42 @@ declare class RequiredError extends Error { * no description */ declare class AIApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -15265,6 +17607,14 @@ declare class AIApiRequestFactory extends BaseAPIRequestFactory { singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; } declare class AIApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15273,6 +17623,22 @@ declare class AIApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ createConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15281,6 +17647,22 @@ declare class AIApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ queryGetDecomposedQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15312,7 +17694,7 @@ declare class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; @@ -15522,7 +17904,7 @@ declare class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { */ updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -15757,12 +18139,12 @@ declare class DBTApiRequestFactory extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -16076,7 +18458,7 @@ declare class MetadataApiRequestFactory extends BaseAPIRequestFactory { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; @@ -16602,6 +18984,11 @@ declare class SecurityApiResponseProcessor { * no description */ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -16614,6 +19001,11 @@ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. */ getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -16621,6 +19013,14 @@ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; } declare class SystemApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -16645,6 +19045,14 @@ declare class SystemApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ getSystemOverrideInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -16771,6 +19179,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param commitBranchRequest */ commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -16782,10 +19195,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -16852,10 +19270,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -16879,12 +19302,12 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -16975,10 +19398,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -17078,10 +19506,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -17092,6 +19525,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param getObjectAccessTokenRequest */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -17174,6 +19612,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param searchCommitsRequest */ searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -17235,10 +19678,26 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -17298,7 +19757,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -17381,16 +19840,22 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -17447,6 +19912,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ commitBranch(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17471,6 +19944,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ copyObject(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17583,6 +20064,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ createVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17759,6 +20248,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17927,6 +20424,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ getCustomAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17943,6 +20448,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ getObjectAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18079,6 +20592,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ searchCommits(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18183,6 +20704,30 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ searchVariables(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18391,6 +20936,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18561,28 +21114,28 @@ declare class UsersApiResponseProcessor { */ declare class VariableApiRequestFactory extends BaseAPIRequestFactory { /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -18756,19 +21309,106 @@ declare class VersionControlApiResponseProcessor { validateMerge(response: ResponseContext): Promise>; } +/** + * no description + */ +declare class WebhooksApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} +declare class WebhooksApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; +} + declare class PromiseAIApi { private api; constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor); + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -18794,7 +21434,7 @@ declare class PromiseAuthenticationApi { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; @@ -18894,7 +21534,7 @@ declare class PromiseConnectionsApi { */ updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -18984,12 +21624,12 @@ declare class PromiseDBTApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -19120,7 +21760,7 @@ declare class PromiseMetadataApi { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; @@ -19332,6 +21972,11 @@ declare class PromiseSecurityApi { declare class PromiseSystemApi { private api; constructor(configuration: Configuration, requestFactory?: SystemApiRequestFactory, responseProcessor?: SystemApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -19344,6 +21989,11 @@ declare class PromiseSystemApi { * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. */ getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -19415,6 +22065,11 @@ declare class PromiseThoughtSpotRestApi { * @param commitBranchRequest */ commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -19426,10 +22081,15 @@ declare class PromiseThoughtSpotRestApi { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -19496,10 +22156,15 @@ declare class PromiseThoughtSpotRestApi { */ createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -19523,12 +22188,12 @@ declare class PromiseThoughtSpotRestApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -19619,10 +22284,15 @@ declare class PromiseThoughtSpotRestApi { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -19722,10 +22392,15 @@ declare class PromiseThoughtSpotRestApi { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -19736,6 +22411,11 @@ declare class PromiseThoughtSpotRestApi { * @param getObjectAccessTokenRequest */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -19818,6 +22498,11 @@ declare class PromiseThoughtSpotRestApi { * @param searchCommitsRequest */ searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -19879,10 +22564,26 @@ declare class PromiseThoughtSpotRestApi { */ searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise>; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -19942,7 +22643,7 @@ declare class PromiseThoughtSpotRestApi { */ updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -20025,16 +22726,22 @@ declare class PromiseThoughtSpotRestApi { */ updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -20111,28 +22818,28 @@ declare class PromiseVariableApi { private api; constructor(configuration: Configuration, requestFactory?: VariableApiRequestFactory, responseProcessor?: VariableApiResponseProcessor); /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -20189,18 +22896,76 @@ declare class PromiseVersionControlApi { validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise>; } +declare class PromiseWebhooksApi { + private api; + constructor(configuration: Configuration, requestFactory?: WebhooksApiRequestFactory, responseProcessor?: WebhooksApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} + /** - * creates a bearer authentication configuration using params or a token provider - * @param thoughtSpotHost : the base url of the server - * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , - * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or - * function which returns a promise of a string which is the full access token + * Options for additional configuration settings + */ +interface ConfigurationOptions { + /** + * Additional headers to be included in every request + * @example + * ```typescript + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ``` + */ + additionalHeaders?: Record; +} +/** + * creates a bearer authentication configuration using params or a token provider + * @param thoughtSpotHost thoughtSpotHost URL + * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , + * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or + * function which returns a promise of a string which is the full access token + * @param options - Optional configuration for custom headers and other settings + * @returns Configuration object ready for authenticated API calls + * @example + * ```typescript + * const configWithTokenProvider = createBearerAuthenticationConfig( + * "CLUSTER_SERVER_URL", + * YOUR_TOKEN_PROVIDER, + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ); */ -declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise)) => Configuration; +declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise), options?: ConfigurationOptions) => Configuration; /** * creates a basic configuration using params which does not require authentication * @param thoughtSpotHost : the base url of the server + * @param options - Optional configuration for additional headers and other settings + * @returns Basic client configuration for unauthenticated API calls */ -declare const createBasicConfig: (thoughtSpotHost: string) => Configuration; +declare const createBasicConfig: (thoughtSpotHost: string, options?: ConfigurationOptions) => Configuration; -export { PromiseAIApi as AIApi, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AnswerContent, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, Configuration, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, Conversation, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestTypeEnum, CronExpression, CronExpressionInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, ErrorResponse, EurekaDecomposeQueryResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest, GetTokenResponse, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, InputVariableValue, InputVariableValuePrincipalTypeEnum, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, OAuth2Configuration, ObjectIDAndName, Org, OrgInfo, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum, SearchUsersRequestSortOptionsOrderEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestOutputFormatEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SelfDecodingBody, SendMessageRequest, ServerConfiguration, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableRequestOperationEnum, UpdateVariableValuesRequest, UpdateVariableValuesRequestOperationEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableValue, VariableValueInput, VariableValuePrincipalTypeEnum, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; +export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerContextInput, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, Configuration, ConfigureCommunicationChannelPreferencesRequest, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CronExpression, CronExpressionInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, OAuth2Configuration, ObjectIDAndName, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum, SearchUsersRequestSortOptionsOrderEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestOutputFormatEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SelfDecodingBody, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; diff --git a/sdks/typescript/dist/index.d.ts b/sdks/typescript/dist/index.d.ts index 2c80cc620..d381ef890 100644 --- a/sdks/typescript/dist/index.d.ts +++ b/sdks/typescript/dist/index.d.ts @@ -181,6 +181,42 @@ type AuthMethodsConfiguration = { */ declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AIContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1117,6 +1153,38 @@ declare class ActivateUserRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AgentConversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_id': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1173,6 +1241,42 @@ declare class AnswerContent { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AnswerContextInput { + /** + * Unique identifier of the answer session. + */ + 'session_identifier': string; + /** + * Generation number of the answer. + */ + 'generation_number': number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1799,7 +1903,7 @@ declare class ColumnSecurityRule { * Array of groups that have access to this column */ 'groups'?: Array | null; - 'sourceTableDetails'?: ColumnSecurityRuleSourceTable; + 'source_table_details'?: ColumnSecurityRuleSourceTable; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -1869,15 +1973,15 @@ declare class ColumnSecurityRuleResponse { /** * GUID of the table for which the column security rules are fetched */ - 'guid'?: string | null; + 'table_guid'?: string | null; /** * Object ID of the table for which the column security rules are fetched */ - 'objId'?: string | null; + 'obj_id'?: string | null; /** * Array containing column security rule objects */ - 'columnSecurityRules'?: Array | null; + 'column_security_rules'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2238,10 +2342,15 @@ declare class CommitResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UserPrincipal { - 'id'?: string | null; - 'name'?: string | null; - 'type'?: string | null; +declare class EventChannelConfig { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array indicates no channels are enabled. + */ + 'channels': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2257,6 +2366,8 @@ declare class UserPrincipal { }[]; constructor(); } +type EventChannelConfigEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigChannelsEnum = "EMAIL" | "WEBHOOK"; /** * ThoughtSpot Public REST API @@ -2269,17 +2380,15 @@ declare class UserPrincipal { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ConnectionConfigurationResponse { - 'configuration_identifier'?: string | null; - 'name'?: string | null; - 'description'?: string | null; - 'configuration'?: any | null; - 'policy_principals'?: Array | null; - 'policy_processes'?: Array | null; - 'disabled'?: boolean | null; - 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; - 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; +declare class OrgDetails { + /** + * Unique id of the org + */ + 'id': string; + /** + * Name of the org + */ + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2295,9 +2404,6 @@ declare class ConnectionConfigurationResponse { }[]; constructor(); } -type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; -type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; -type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2310,19 +2416,13 @@ type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ConnectionConfigurationSearchRequest { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Unique ID or name of the configuration. - */ - 'configuration_identifier'?: string; + +declare class OrgChannelConfigResponse { + 'org': OrgDetails; /** - * Type of policy. + * Event-specific communication channel configurations for this org */ - 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; + 'preferences': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2338,7 +2438,6 @@ declare class ConnectionConfigurationSearchRequest { }[]; constructor(); } -type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2351,23 +2450,16 @@ type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIP * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DataWarehouseObjectInput { - /** - * Name of the database. - */ - 'database'?: string | null; - /** - * Name of the schema within the database. - */ - 'schema'?: string | null; + +declare class CommunicationChannelPreferencesResponse { /** - * Name of the table within the schema. + * Cluster-level default configurations. */ - 'table'?: string | null; + 'cluster_preferences'?: Array | null; /** - * Name of the column within the table. + * Org-specific configurations. */ - 'column'?: string | null; + 'org_preferences'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2395,20 +2487,15 @@ declare class DataWarehouseObjectInput { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ConnectionInput { - /** - * Unique ID or name of the connection. - */ - 'identifier'?: string | null; +declare class EventChannelConfigInput { /** - * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. + * Type of event for which communication channels are configured */ - 'name_pattern'?: string | null; + 'event_type': EventChannelConfigInputEventTypeEnum; /** - * Filter options for databases, schemas, tables and columns. + * Communication channels enabled for this event type. Empty array disables all channels for this event. */ - 'data_warehouse_objects'?: Array | null; + 'channels': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2424,6 +2511,8 @@ declare class ConnectionInput { }[]; constructor(); } +type EventChannelConfigInputEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigInputChannelsEnum = "EMAIL" | "WEBHOOK"; /** * ThoughtSpot Public REST API @@ -2436,11 +2525,24 @@ declare class ConnectionInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Conversation { + +declare class OrgChannelConfigInput { /** - * Unique identifier of the conversation. + * Unique identifier or name of the org */ - 'conversation_identifier': string; + 'org_identifier': string; + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. + */ + 'operation'?: OrgChannelConfigInputOperationEnum | null; + /** + * Event-specific configurations. Required for REPLACE operation. + */ + 'preferences'?: Array | null; + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. + */ + 'reset_events'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2456,6 +2558,8 @@ declare class Conversation { }[]; constructor(); } +type OrgChannelConfigInputOperationEnum = "REPLACE" | "RESET"; +type OrgChannelConfigInputResetEventsEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -2468,23 +2572,16 @@ declare class Conversation { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ConvertWorksheetToModelRequest { - /** - * List of Worksheet IDs. - */ - 'worksheet_ids'?: Array; - /** - * List of Worksheet IDs to be excluded. - */ - 'exclude_worksheet_ids'?: Array; + +declare class ConfigureCommunicationChannelPreferencesRequest { /** - * Indicates whether all the worksheet needs to be converted to models. + * Cluster-level default configurations. */ - 'convert_all'?: boolean | null; + 'cluster_preferences'?: Array; /** - * Indicates whether the changes should be applied to database. + * Org-specific configurations. */ - 'apply_changes'?: boolean | null; + 'org_preferences'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2512,23 +2609,10 @@ declare class ConvertWorksheetToModelRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CopyObjectRequest { - /** - * Description of the new object - */ - 'description'?: string; - /** - * GUID of metadata object to be copied (answer id or liveboard id) - */ - 'identifier': string; - /** - * Type of metadata object - */ - 'type'?: CopyObjectRequestTypeEnum; - /** - * Title of the new object - */ - 'title'?: string; +declare class UserPrincipal { + 'id'?: string | null; + 'name'?: string | null; + 'type'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2544,7 +2628,6 @@ declare class CopyObjectRequest { }[]; constructor(); } -type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; /** * ThoughtSpot Public REST API @@ -2557,26 +2640,17 @@ type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. -*/ -declare class CreateCalendarRequestTableReference { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Name of the database. - */ - 'database_name'?: string | null; - /** - * Name of the schema. - */ - 'schema_name'?: string | null; - /** - * Name of the table. Table names may be case-sensitive depending on the database system. - */ - 'table_name': string; + +declare class ConnectionConfigurationResponse { + 'configuration_identifier'?: string | null; + 'name'?: string | null; + 'description'?: string | null; + 'configuration'?: any | null; + 'policy_principals'?: Array | null; + 'policy_processes'?: Array | null; + 'disabled'?: boolean | null; + 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; + 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2592,6 +2666,9 @@ declare class CreateCalendarRequestTableReference { }[]; constructor(); } +type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; +type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; +type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2604,45 +2681,19 @@ declare class CreateCalendarRequestTableReference { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateCalendarRequest { +declare class ConnectionConfigurationSearchRequest { /** - * Name of the custom calendar. + * Unique ID or name of the connection. */ - 'name': string; + 'connection_identifier': string; /** - * Type of create operation. + * Unique ID or name of the configuration. */ - 'creation_method': CreateCalendarRequestCreationMethodEnum; - 'table_reference': CreateCalendarRequestTableReference; + 'configuration_identifier'?: string; /** - * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + * Type of policy. */ - 'start_date'?: string; - /** - * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. - */ - 'end_date'?: string; - /** - * Type of the calendar. - */ - 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; - /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). - */ - 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; - /** - * Specify the starting day of the week. - */ - 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; - /** - * Prefix to add before the quarter. - */ - 'quarter_name_prefix'?: string; - /** - * Prefix to add before the year. - */ - 'year_name_prefix'?: string; + 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2658,10 +2709,7 @@ declare class CreateCalendarRequest { }[]; constructor(); } -type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; -type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; -type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; -type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; +type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; /** * ThoughtSpot Public REST API @@ -2674,39 +2722,23 @@ type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConfigRequest { - /** - * URL for connecting to remote repository - */ - 'repository_url': string; - /** - * Username to authenticate connection to remote repository - */ - 'username': string; - /** - * Access token corresponding to the user to authenticate connection to remote repository - */ - 'access_token': string; - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later - */ - 'org_identifier'?: string; +declare class DataWarehouseObjectInput { /** - * List the remote branches to configure. Example:[development, production] + * Name of the database. */ - 'branch_names'?: Array; + 'database'?: string | null; /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + * Name of the schema within the database. */ - 'commit_branch_name'?: string; + 'schema'?: string | null; /** - * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + * Name of the table within the schema. */ - 'enable_guid_mapping'?: boolean | null; + 'table'?: string | null; /** - * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + * Name of the column within the table. */ - 'configuration_branch_name'?: string; + 'column'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2734,39 +2766,20 @@ declare class CreateConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConnectionConfigurationRequest { - /** - * Unique name for the configuration. - */ - 'name': string; - /** - * Description of the configuration. - */ - 'description'?: string; + +declare class ConnectionInput { /** * Unique ID or name of the connection. */ - 'connection_identifier': string; - /** - * Type of authentication used for the connection. - */ - 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; - /** - * Configuration properties in JSON. - */ - 'configuration': any; - /** - * Type of policy. - */ - 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + 'identifier'?: string | null; /** - * Unique ID or name of the User and User Groups. + * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. */ - 'policy_principals'?: Array; + 'name_pattern'?: string | null; /** - * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + * Filter options for databases, schemas, tables and columns. */ - 'policy_processes'?: Array; + 'data_warehouse_objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2782,9 +2795,6 @@ declare class CreateConnectionConfigurationRequest { }[]; constructor(); } -type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL"; -type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; -type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; /** * ThoughtSpot Public REST API @@ -2797,27 +2807,11 @@ type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConnectionRequest { - /** - * Unique name for the connection. - */ - 'name': string; - /** - * Description of the connection. - */ - 'description'?: string; - /** - * Type of the data warehouse. - */ - 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; - /** - * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. - */ - 'data_warehouse_config': any; +declare class DataSourceContextInput { /** - * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + * Unique identifier of the data source. */ - 'validate'?: boolean | null; + 'guid': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2833,7 +2827,6 @@ declare class CreateConnectionRequest { }[]; constructor(); } -type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -2846,23 +2839,15 @@ type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHI * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConnectionResponse { - /** - * ID of the connection created. - */ - 'id': string; - /** - * Name of the connection. - */ - 'name': string; +declare class LBContextInput { /** - * Type of data warehouse. + * Unique identifier of the liveboard. */ - 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + 'liveboard_identifier': string; /** - * Details of the connection. + * Unique identifier of the visualization. */ - 'details'?: any | null; + 'visualization_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2878,7 +2863,6 @@ declare class CreateConnectionResponse { }[]; constructor(); } -type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -2891,15 +2875,15 @@ type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSH * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateConversationRequest { - /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. - */ - 'metadata_identifier': string; + +declare class ContextPayloadV2Input { /** - * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. + * Type of the context. */ - 'tokens'?: string; + 'type'?: ContextPayloadV2InputTypeEnum | null; + 'answer_context'?: AnswerContextInput; + 'liveboard_context'?: LBContextInput; + 'data_source_context'?: DataSourceContextInput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2915,6 +2899,7 @@ declare class CreateConversationRequest { }[]; constructor(); } +type ContextPayloadV2InputTypeEnum = "answer" | "liveboard" | "data_source"; /** * ThoughtSpot Public REST API @@ -2927,13 +2912,11 @@ declare class CreateConversationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. -*/ -declare class CreateCustomActionRequestActionDetails { - 'CALLBACK'?: CALLBACKInputMandatory; - 'URL'?: URLInputMandatory; +declare class Conversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2961,14 +2944,19 @@ declare class CreateCustomActionRequestActionDetails { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. -*/ -declare class CreateCustomActionRequestDefaultActionConfig { +declare class ConversationSettingsInput { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + * Enable contextual change analysis. */ - 'visibility'?: boolean | null; + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. + */ + 'enable_reasoning'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2996,22 +2984,23 @@ declare class CreateCustomActionRequestDefaultActionConfig { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateCustomActionRequest { +declare class ConvertWorksheetToModelRequest { /** - * Name of the custom action. The custom action name must be unique. + * List of Worksheet IDs. */ - 'name': string; - 'action_details': CreateCustomActionRequestActionDetails; + 'worksheet_ids'?: Array; /** - * Metadata objects to which the custom action needs to be associated. + * List of Worksheet IDs to be excluded. */ - 'associate_metadata'?: Array; - 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; + 'exclude_worksheet_ids'?: Array; /** - * Unique ID or name of the groups that can view and access the custom action. + * Indicates whether all the worksheet needs to be converted to models. */ - 'group_identifiers'?: Array; + 'convert_all'?: boolean | null; + /** + * Indicates whether the changes should be applied to database. + */ + 'apply_changes'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3039,102 +3028,67 @@ declare class CreateCustomActionRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Email customization configuration as key value pair -*/ -declare class CreateEmailCustomizationRequestTemplateProperties { - /** - * Background color for call-to-action button in hex format - */ - 'cta_button_bg_color'?: string | null; - /** - * Text color for call-to-action button in hex format - */ - 'cta_text_font_color'?: string | null; - /** - * Primary background color in hex format - */ - 'primary_bg_color'?: string | null; - /** - * Home page URL (HTTP/HTTPS only) - */ - 'home_url'?: string | null; +declare class CopyObjectRequest { /** - * Logo image URL (HTTP/HTTPS only) + * Description of the new object */ - 'logo_url'?: string | null; + 'description'?: string; /** - * Font family for email content (e.g., Arial, sans-serif) + * GUID of metadata object to be copied (answer id or liveboard id) */ - 'font_family'?: string | null; + 'identifier': string; /** - * Product name to display + * Type of metadata object */ - 'product_name'?: string | null; + 'type'?: CopyObjectRequestTypeEnum; /** - * Footer address text + * Title of the new object */ - 'footer_address'?: string | null; + 'title'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Conversation settings. +*/ +declare class CreateAgentConversationRequestConversationSettings { /** - * Footer phone number + * Enable contextual change analysis. */ - 'footer_phone'?: string | null; + 'enable_contextual_change_analysis'?: boolean | null; /** - * Replacement value for Liveboard + * Enable natural language to answer generation. */ - 'replacement_value_for_liveboard'?: string | null; + 'enable_natural_language_answer_generation'?: boolean | null; /** - * Replacement value for Answer + * Enable reasoning. */ - 'replacement_value_for_answer'?: string | null; - /** - * Replacement value for SpotIQ - */ - 'replacement_value_for_spot_iq'?: string | null; - /** - * Whether to hide footer address - */ - 'hide_footer_address'?: boolean | null; - /** - * Whether to hide footer phone number - */ - 'hide_footer_phone'?: boolean | null; - /** - * Whether to hide manage notification link - */ - 'hide_manage_notification'?: boolean | null; - /** - * Whether to hide mobile app nudge - */ - 'hide_mobile_app_nudge'?: boolean | null; - /** - * Whether to hide privacy policy link - */ - 'hide_privacy_policy'?: boolean | null; - /** - * Whether to hide product name - */ - 'hide_product_name'?: boolean | null; - /** - * Whether to hide ThoughtSpot vocabulary definitions - */ - 'hide_ts_vocabulary_definitions'?: boolean | null; - /** - * Whether to hide notification status - */ - 'hide_notification_status'?: boolean | null; - /** - * Whether to hide error message - */ - 'hide_error_message'?: boolean | null; - /** - * Whether to hide unsubscribe link - */ - 'hide_unsubscribe_link'?: boolean | null; - /** - * Whether to hide modify alert - */ - 'hide_modify_alert'?: boolean | null; + 'enable_reasoning'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3163,12 +3117,17 @@ declare class CreateEmailCustomizationRequestTemplateProperties { * Do not edit the class manually. */ -declare class CreateEmailCustomizationRequest { - 'template_properties': CreateEmailCustomizationRequestTemplateProperties; +/** +* Context for the conversation. +*/ +declare class CreateAgentConversationRequestMetadataContext { /** - * Unique ID or name of org Version: 10.12.0.cl or later + * Type of the context. */ - 'org_identifier'?: string; + 'type'?: CreateAgentConversationRequestMetadataContextTypeEnum | null; + 'answer_context'?: AnswerContextInput; + 'liveboard_context'?: LBContextInput; + 'data_source_context'?: DataSourceContextInput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3184,6 +3143,7 @@ declare class CreateEmailCustomizationRequest { }[]; constructor(); } +type CreateAgentConversationRequestMetadataContextTypeEnum = "answer" | "liveboard" | "data_source"; /** * ThoughtSpot Public REST API @@ -3196,9 +3156,10 @@ declare class CreateEmailCustomizationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class OrgType { - 'name'?: string | null; - 'id'?: number | null; + +declare class CreateAgentConversationRequest { + 'metadata_context': CreateAgentConversationRequestMetadataContext; + 'conversation_settings': CreateAgentConversationRequestConversationSettings; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3226,21 +3187,26 @@ declare class OrgType { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateEmailCustomizationResponse { +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. +*/ +declare class CreateCalendarRequestTableReference { /** - * Tenant ID + * Unique ID or name of the connection. */ - 'tenant_id': string; - 'org': OrgType; + 'connection_identifier': string; /** - * Email customization name. + * Name of the database. */ - 'name': string; + 'database_name'?: string | null; /** - * Customization configuration for the email + * Name of the schema. */ - 'template_properties': any; + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3268,15 +3234,45 @@ declare class CreateEmailCustomizationResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateOrgRequest { + +declare class CreateCalendarRequest { /** - * Name of the Org. + * Name of the custom calendar. */ 'name': string; /** - * Description of the Org. + * Type of create operation. */ - 'description'?: string; + 'creation_method': CreateCalendarRequestCreationMethodEnum; + 'table_reference': CreateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3292,6 +3288,10 @@ declare class CreateOrgRequest { }[]; constructor(); } +type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -3304,23 +3304,39 @@ declare class CreateOrgRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateRoleRequest { +declare class CreateConfigRequest { /** - * Unique name of the Role. + * URL for connecting to remote repository */ - 'name': string; + 'repository_url': string; /** - * Description of the Role. + * Username to authenticate connection to remote repository */ - 'description'?: string; + 'username': string; /** - * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * Access token corresponding to the user to authenticate connection to remote repository */ - 'privileges'?: Array; + 'access_token': string; /** - *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later */ - 'read_only'?: boolean | null; + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3336,7 +3352,6 @@ declare class CreateRoleRequest { }[]; constructor(); } -type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE"; /** * ThoughtSpot Public REST API @@ -3349,34 +3364,39 @@ type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Schedule selected cron expression. -*/ -declare class CronExpressionInput { +declare class CreateConnectionConfigurationRequest { /** - * Day of month of the object. + * Unique name for the configuration. */ - 'day_of_month': string; + 'name': string; /** - * Day of Week of the object. + * Description of the configuration. */ - 'day_of_week': string; + 'description'?: string; /** - * Hour of the object. + * Unique ID or name of the connection. */ - 'hour': string; + 'connection_identifier': string; /** - * Minute of the object. + * Type of authentication used for the connection. */ - 'minute': string; + 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; /** - * Month of the object. + * Configuration properties in JSON. */ - 'month': string; + 'configuration': any; /** - * Second of the object. + * Type of policy. */ - 'second': string; + 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3392,6 +3412,9 @@ declare class CronExpressionInput { }[]; constructor(); } +type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "OAUTH_CLIENT_CREDENTIALS"; +type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; /** * ThoughtSpot Public REST API @@ -3404,12 +3427,27 @@ declare class CronExpressionInput { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Frequency settings for the scheduled job. -*/ -declare class CreateScheduleRequestFrequency { - 'cron_expression': CronExpressionInput; +declare class CreateConnectionRequest { + /** + * Unique name for the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string; + /** + * Type of the data warehouse. + */ + 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; + /** + * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. + */ + 'data_warehouse_config': any; + /** + * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + */ + 'validate'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3425,6 +3463,7 @@ declare class CreateScheduleRequestFrequency { }[]; constructor(); } +type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -3437,14 +3476,23 @@ declare class CreateScheduleRequestFrequency { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options to specify details of Liveboard. -*/ -declare class CreateScheduleRequestLiveboardOptions { +declare class CreateConnectionResponse { /** - * Unique ID or name of visualizations. + * ID of the connection created. */ - 'visualization_identifiers': Array; + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + /** + * Details of the connection. + */ + 'details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3460,6 +3508,7 @@ declare class CreateScheduleRequestLiveboardOptions { }[]; constructor(); } +type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -3472,46 +3521,15 @@ declare class CreateScheduleRequestLiveboardOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. -*/ -declare class CreateScheduleRequestPdfOptions { +declare class CreateConversationRequest { /** - * Indicates whether to include complete Liveboard. + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. */ - 'complete_liveboard'?: boolean | null; + 'metadata_identifier': string; /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page - */ - 'include_page_number'?: boolean | null; - /** - * Text to include in the footer of each page. - */ - 'page_footer_text'?: string | null; - /** - * Page orientation of the PDF. - */ - 'page_orientation'?: string | null; - /** - * Page size. - */ - 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; - /** - * Indicates whether to include only first page of the tables. + * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. */ - 'truncate_table'?: boolean | null; + 'tokens'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3527,7 +3545,6 @@ declare class CreateScheduleRequestPdfOptions { }[]; constructor(); } -type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -3540,15 +3557,13 @@ type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PrincipalsListItemInput { - /** - * Unique ID or name of the user or group. - */ - 'identifier': string; - /** - * Principal type. - */ - 'type': string; + +/** +* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. +*/ +declare class CreateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3576,19 +3591,14 @@ declare class PrincipalsListItemInput { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. */ -declare class CreateScheduleRequestRecipientDetails { - /** - * Emails of the recipients. - */ - 'emails'?: Array | null; +declare class CreateCustomActionRequestDefaultActionConfig { /** - * User or groups to be set as recipients of the schedule notifications. + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true */ - 'principals'?: Array | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3617,39 +3627,21 @@ declare class CreateScheduleRequestRecipientDetails { * Do not edit the class manually. */ -declare class CreateScheduleRequest { +declare class CreateCustomActionRequest { /** - * Name of the scheduled job. + * Name of the custom action. The custom action name must be unique. */ 'name': string; + 'action_details': CreateCustomActionRequestActionDetails; /** - * Description of the job. - */ - 'description': string; - /** - * Type of the metadata object. - */ - 'metadata_type': CreateScheduleRequestMetadataTypeEnum; - /** - * Unique ID or name of the metadata object. - */ - 'metadata_identifier': string; - /** - * Export file format. - */ - 'file_format'?: CreateScheduleRequestFileFormatEnum; - 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; - 'pdf_options'?: CreateScheduleRequestPdfOptions; - /** - * Time zone + * Metadata objects to which the custom action needs to be associated. */ - 'time_zone': CreateScheduleRequestTimeZoneEnum; - 'frequency'?: CreateScheduleRequestFrequency; - 'recipient_details': CreateScheduleRequestRecipientDetails; + 'associate_metadata'?: Array; + 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; /** - * Personalised view id of the liveboard to be scheduled. + * Unique ID or name of the groups that can view and access the custom action. */ - 'personalised_view_id'?: string; + 'group_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3665,9 +3657,6 @@ declare class CreateScheduleRequest { }[]; constructor(); } -type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; -type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; -type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; /** * ThoughtSpot Public REST API @@ -3680,83 +3669,110 @@ type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Af * https://openapi-generator.tech * Do not edit the class manually. */ -declare class CreateTagRequest { +/** +* Email customization configuration as key value pair +*/ +declare class CreateEmailCustomizationRequestTemplateProperties { /** - * Name of the tag. + * Background color for call-to-action button in hex format */ - 'name': string; + 'cta_button_bg_color'?: string | null; /** - * Hex color code to be assigned to the tag. For example, #ff78a9. + * Text color for call-to-action button in hex format */ - 'color'?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -declare class CreateUserGroupRequest { + 'cta_text_font_color'?: string | null; /** - * Name of the group. The group name must be unique. + * Primary background color in hex format */ - 'name': string; + 'primary_bg_color'?: string | null; /** - * Display name for the group. + * Home page URL (HTTP/HTTPS only) */ - 'display_name': string; + 'home_url'?: string | null; /** - * GUID of the Liveboards to assign as default Liveboards to the users in the group. + * Logo image URL (HTTP/HTTPS only) */ - 'default_liveboard_identifiers'?: Array; + 'logo_url'?: string | null; /** - * Description of the group + * Font family for email content (e.g., Arial, sans-serif) */ - 'description'?: string; + 'font_family'?: string | null; /** - * Privileges to assign to the group + * Product name to display */ - 'privileges'?: Array; + 'product_name'?: string | null; /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * Footer address text */ - 'sub_group_identifiers'?: Array; + 'footer_address'?: string | null; /** - * Group type. + * Footer phone number */ - 'type'?: CreateUserGroupRequestTypeEnum; + 'footer_phone'?: string | null; /** - * GUID or name of the users to assign to the group. + * Replacement value for Liveboard */ - 'user_identifiers'?: Array; + 'replacement_value_for_liveboard'?: string | null; /** - * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + * Replacement value for Answer */ - 'visibility'?: CreateUserGroupRequestVisibilityEnum; + 'replacement_value_for_answer'?: string | null; /** - * Role identifiers of the roles that should be assigned to the group. + * Replacement value for SpotIQ */ - 'role_identifiers'?: Array; + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3772,9 +3788,6 @@ declare class CreateUserGroupRequest { }[]; constructor(); } -type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -3787,15 +3800,13 @@ type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FavoriteMetadataInput { - /** - * Unique ID or name of the metadata object. - */ - 'identifier'?: string | null; + +declare class CreateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Unique ID or name of org Version: 10.12.0.cl or later */ - 'type'?: FavoriteMetadataInputTypeEnum | null; + 'org_identifier'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3811,7 +3822,6 @@ declare class FavoriteMetadataInput { }[]; constructor(); } -type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; /** * ThoughtSpot Public REST API @@ -3824,84 +3834,9 @@ type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateUserRequest { - /** - * Name of the user. The username string must be unique. - */ - 'name': string; - /** - * A unique display name string for the user account, usually their first and last name - */ - 'display_name': string; - /** - * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. - */ - 'password'?: string; - /** - * Email of the user account - */ - 'email': string; - /** - * Type of the account. - */ - 'account_type'?: CreateUserRequestAccountTypeEnum; - /** - * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. - */ - 'account_status'?: CreateUserRequestAccountStatusEnum; - /** - * List of Org IDs to which the user belongs. - */ - 'org_identifiers'?: Array; - /** - * GUIDs or names of the groups to which the newly created user belongs. - */ - 'group_identifiers'?: Array; - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. - */ - 'visibility'?: CreateUserRequestVisibilityEnum; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. - */ - 'notify_on_share'?: boolean | null; - /** - * The user preference for revisiting the onboarding experience. - */ - 'show_onboarding_experience'?: boolean | null; - /** - * flag to get the on-boarding experience is completed or not. - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. - */ - 'home_liveboard_identifier'?: string; - /** - * Metadata objects to add to the user\'s favorites list. - */ - 'favorite_metadata'?: Array; - /** - * Locale for the user. - */ - 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; - /** - * Properties for the user - */ - 'extended_properties'?: any; - /** - * Preferences for the user - */ - 'extended_preferences'?: any; - /** - * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. - */ - 'trigger_welcome_email'?: boolean | null; - /** - * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. - */ - 'trigger_activation_email'?: boolean | null; +declare class OrgType { + 'name'?: string | null; + 'id'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3917,10 +3852,6 @@ declare class CreateUserRequest { }[]; constructor(); } -type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -3933,27 +3864,57 @@ type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE * https://openapi-generator.tech * Do not edit the class manually. */ -declare class InputVariableValue { + +declare class CreateEmailCustomizationResponse { /** - * The connection property value + * Tenant ID */ - 'value': string; + 'tenant_id': string; + 'org': OrgType; /** - * The unique name of the org + * Email customization name. */ - 'org_identifier': string; + 'name': string; /** - * Principal type + * Customization configuration for the email */ - 'principal_type'?: InputVariableValuePrincipalTypeEnum | null; + 'template_properties': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateOrgRequest { /** - * Unique ID or name of the principal + * Name of the Org. */ - 'principal_identifier'?: string | null; + 'name': string; /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + * Description of the Org. */ - 'priority'?: number | null; + 'description'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -3969,7 +3930,6 @@ declare class InputVariableValue { }[]; constructor(); } -type InputVariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -3982,24 +3942,23 @@ type InputVariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class CreateVariableRequest { +declare class CreateRoleRequest { /** - * Type of variable + * Unique name of the Role. */ - 'type': CreateVariableRequestTypeEnum; + 'name': string; /** - * Name of the variable. This is unique across the cluster. + * Description of the Role. */ - 'name': string; + 'description'?: string; /** - * If the variable contains sensitive values like passwords + * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. */ - 'sensitive'?: boolean | null; + 'privileges'?: Array; /** - * Values of variable + *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. */ - 'values'?: Array; + 'read_only'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4015,7 +3974,7 @@ declare class CreateVariableRequest { }[]; constructor(); } -type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; /** * ThoughtSpot Public REST API @@ -4031,7 +3990,7 @@ type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | " /** * Schedule selected cron expression. */ -declare class CronExpression { +declare class CronExpressionInput { /** * Day of month of the object. */ @@ -4083,18 +4042,47 @@ declare class CronExpression { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* MetadataType InputType used in Custom Action API\'s +* Frequency settings for the scheduled job. */ -declare class CustomActionMetadataTypeInput { - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - 'type'?: CustomActionMetadataTypeInputTypeEnum | null; +declare class CreateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class CreateScheduleRequestLiveboardOptions { /** - * Unique ID or name of the metadata object. + * Unique ID or name of visualizations. */ - 'identifier': string; + 'visualization_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4110,7 +4098,6 @@ declare class CustomActionMetadataTypeInput { }[]; constructor(); } -type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; /** * ThoughtSpot Public REST API @@ -4123,36 +4110,46 @@ type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKS * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class Table { +/** +* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. +*/ +declare class CreateScheduleRequestPdfOptions { /** - * Name of the table. + * Indicates whether to include complete Liveboard. */ - 'name': string; + 'complete_liveboard'?: boolean | null; /** - * Columns of the table. + * Indicates whether to include cover page with the Liveboard title. */ - 'columns'?: Array | null; + 'include_cover_page'?: boolean | null; /** - * Type of table. Either view or table + * Indicates whether to include customized wide logo in the footer if available. */ - 'type'?: string | null; + 'include_custom_logo'?: boolean | null; /** - * Description of the table + * Indicates whether to include a page with all applied filters. */ - 'description'?: string | null; + 'include_filter_page'?: boolean | null; /** - * Determines if the table is selected + * Indicates whether to include page number in the footer of each page */ - 'selected'?: boolean | null; + 'include_page_number'?: boolean | null; /** - * Determines if the table is linked + * Text to include in the footer of each page. */ - 'linked'?: boolean | null; + 'page_footer_text'?: string | null; /** - * List of relationships for the table + * Page orientation of the PDF. */ - 'relationships'?: Array | null; + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4168,6 +4165,7 @@ declare class Table { }[]; constructor(); } +type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -4180,16 +4178,15 @@ declare class Table { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SchemaObject { +declare class PrincipalsListItemInput { /** - * Name of the schema. + * Unique ID or name of the user or group. */ - 'name': string; + 'identifier': string; /** - * Tables in the schema. + * Principal type. */ - 'tables'?: Array
| null; + 'type': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4218,19 +4215,18 @@ declare class SchemaObject { * Do not edit the class manually. */ -declare class Database { - /** - * Name of the database. - */ - 'name': string; +/** +* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class CreateScheduleRequestRecipientDetails { /** - * Schemas of the database. + * Emails of the recipients. */ - 'schemas'?: Array | null; + 'emails'?: Array | null; /** - * Determines if the object is auto created. + * User or groups to be set as recipients of the schedule notifications. */ - 'auto_created'?: boolean | null; + 'principals'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4259,11 +4255,39 @@ declare class Database { * Do not edit the class manually. */ -declare class DataWarehouseObjects { +declare class CreateScheduleRequest { /** - * Databases of the connection. + * Name of the scheduled job. */ - 'databases': Array; + 'name': string; + /** + * Description of the job. + */ + 'description': string; + /** + * Type of the metadata object. + */ + 'metadata_type': CreateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier': string; + /** + * Export file format. + */ + 'file_format'?: CreateScheduleRequestFileFormatEnum; + 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; + 'pdf_options'?: CreateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone': CreateScheduleRequestTimeZoneEnum; + 'frequency'?: CreateScheduleRequestFrequency; + 'recipient_details': CreateScheduleRequestRecipientDetails; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4279,6 +4303,9 @@ declare class DataWarehouseObjects { }[]; constructor(); } +type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; /** * ThoughtSpot Public REST API @@ -4291,14 +4318,15 @@ declare class DataWarehouseObjects { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DbtSearchResponse { - 'dbt_connection_identifier'?: string | null; - 'project_name'?: string | null; - 'connection_id'?: string | null; - 'connection_name'?: string | null; - 'cdw_database'?: string | null; - 'import_type'?: string | null; - 'author_name'?: string | null; +declare class CreateTagRequest { + /** + * Name of the tag. + */ + 'name': string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4326,15 +4354,47 @@ declare class DbtSearchResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeactivateUserRequest { +declare class CreateUserGroupRequest { /** - * Unique ID or name of the user. + * Name of the group. The group name must be unique. */ - 'user_identifier': string; + 'name': string; /** - * Base url of the cluster. + * Display name for the group. */ - 'base_url': string; + 'display_name': string; + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Privileges to assign to the group + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: CreateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: CreateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4350,6 +4410,9 @@ declare class DeactivateUserRequest { }[]; constructor(); } +type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -4362,14 +4425,15 @@ declare class DeactivateUserRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfig { +declare class FavoriteMetadataInput { /** - * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Unique ID or name of the metadata object. */ - 'visibility'?: boolean | null; + 'identifier'?: string | null; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: FavoriteMetadataInputTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4385,6 +4449,7 @@ declare class DefaultActionConfig { }[]; constructor(); } +type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; /** * ThoughtSpot Public REST API @@ -4397,14 +4462,84 @@ declare class DefaultActionConfig { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfigInput { + +declare class CreateUserRequest { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Name of the user. The username string must be unique. */ - 'visibility'?: boolean | null; + 'name': string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name': string; + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. + */ + 'password'?: string; + /** + * Email of the user account + */ + 'email': string; + /** + * Type of the account. + */ + 'account_type'?: CreateUserRequestAccountTypeEnum; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: CreateUserRequestAccountStatusEnum; + /** + * List of Org IDs to which the user belongs. + */ + 'org_identifiers'?: Array; + /** + * GUIDs or names of the groups to which the newly created user belongs. + */ + 'group_identifiers'?: Array; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: CreateUserRequestVisibilityEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * flag to get the on-boarding experience is completed or not. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * Locale for the user. + */ + 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. + */ + 'trigger_welcome_email'?: boolean | null; + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. + */ + 'trigger_activation_email'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4420,6 +4555,10 @@ declare class DefaultActionConfigInput { }[]; constructor(); } +type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -4432,14 +4571,23 @@ declare class DefaultActionConfigInput { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfigInputCreate { +declare class CreateVariableRequest { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + * Type of variable */ - 'visibility'?: boolean | null; + 'type': CreateVariableRequestTypeEnum; + /** + * Name of the variable. This is unique across the cluster. + */ + 'name': string; + /** + * If the variable contains sensitive values like passwords + */ + 'is_sensitive'?: boolean | null; + /** + * Variable Data Type + */ + 'data_type'?: CreateVariableRequestDataTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4455,6 +4603,8 @@ declare class DefaultActionConfigInputCreate { }[]; constructor(); } +type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type CreateVariableRequestDataTypeEnum = "VARCHAR" | "INT32" | "INT64" | "DOUBLE" | "DATE" | "DATE_TIME"; /** * ThoughtSpot Public REST API @@ -4467,14 +4617,15 @@ declare class DefaultActionConfigInputCreate { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. -*/ -declare class DefaultActionConfigSearchInput { +declare class WebhookAuthApiKeyInput { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * The header or query parameter name for the API key. */ - 'visibility'?: boolean | null; + 'key': string; + /** + * The API key value. + */ + 'value': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4502,11 +4653,15 @@ declare class DefaultActionConfigSearchInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteConfigRequest { +declare class WebhookAuthBasicAuthInput { /** - * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later + * Username for basic authentication. */ - 'cluster_level'?: boolean | null; + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4534,15 +4689,19 @@ declare class DeleteConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteConnectionConfigurationRequest { +declare class WebhookAuthOAuth2Input { /** - * Unique ID or name of the configuration. + * OAuth2 authorization server URL. */ - 'configuration_identifier': string; + 'authorization_url': string; /** - * Unique ID or name of the connection. + * OAuth2 client identifier. */ - 'connection_identifier': string; + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4570,11 +4729,18 @@ declare class DeleteConnectionConfigurationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteConnectionRequest { + +/** +* Authorization configuration for the webhook. +*/ +declare class CreateWebhookConfigurationRequestAuthentication { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; /** - * Unique ID or name of the connection. + * Bearer token authentication configuration. */ - 'connection_identifier': string; + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4603,17 +4769,25 @@ declare class DeleteConnectionRequest { * Do not edit the class manually. */ /** -* MetadataType InputType used in Delete MetadataType API +* Configuration for webhook signature verification. */ -declare class DeleteMetadataTypeInput { +declare class CreateWebhookConfigurationRequestSignatureVerification { /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Signature verification method type. */ - 'type'?: DeleteMetadataTypeInputTypeEnum | null; + 'type': CreateWebhookConfigurationRequestSignatureVerificationTypeEnum; /** - * Unique ID or name of the metadata object. + * HTTP header where the signature is sent. */ - 'identifier': string; + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4629,7 +4803,8 @@ declare class DeleteMetadataTypeInput { }[]; constructor(); } -type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP"; +type CreateWebhookConfigurationRequestSignatureVerificationTypeEnum = "HMAC_SHA256"; +type CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum = "SHA256"; /** * ThoughtSpot Public REST API @@ -4643,15 +4818,29 @@ type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" * Do not edit the class manually. */ -declare class DeleteMetadataRequest { +declare class CreateWebhookConfigurationRequest { /** - * Metadata objects. + * Name of the webhook configuration. */ - 'metadata': Array; + 'name': string; /** - * Indicates whether to delete disabled metadata objects. + * Description of the webhook configuration. */ - 'delete_disabled_objects'?: boolean | null; + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events': Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4667,6 +4856,7 @@ declare class DeleteMetadataRequest { }[]; constructor(); } +type CreateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -4679,11 +4869,34 @@ declare class DeleteMetadataRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeleteOrgEmailCustomizationRequest { +/** +* Schedule selected cron expression. +*/ +declare class CronExpression { /** - * Unique identifier of the organization. + * Day of month of the object. */ - 'org_identifiers'?: Array; + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4711,23 +4924,18 @@ declare class DeleteOrgEmailCustomizationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeployCommitRequest { - /** - * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. - */ - 'commit_id'?: string; - /** - * Name of the remote branch where changes should be picked - */ - 'branch_name': string; +/** +* MetadataType InputType used in Custom Action API\'s +*/ +declare class CustomActionMetadataTypeInput { /** - * Indicates if all files or only modified file at specified commit point should be considered + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'deploy_type'?: DeployCommitRequestDeployTypeEnum; + 'type'?: CustomActionMetadataTypeInputTypeEnum | null; /** - * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + * Unique ID or name of the metadata object. */ - 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4743,8 +4951,7 @@ declare class DeployCommitRequest { }[]; constructor(); } -type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA"; -type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY"; +type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; /** * ThoughtSpot Public REST API @@ -4757,27 +4964,19 @@ type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE * https://openapi-generator.tech * Do not edit the class manually. */ -declare class DeployResponse { - /** - * Name of the file deployed - */ - 'file_name'?: string | null; +declare class EntityHeader { /** - * Name of the metadata object - */ - 'metadata_name'?: string | null; - /** - * Type of the metadata object + * Description of the data source. */ - 'metadata_type'?: string | null; + 'description'?: string | null; /** - * Indicates the status of deployment for the file + * Display name of the data source. */ - 'status_code'?: string | null; + 'data_source_name'?: string | null; /** - * Any error or warning with the deployment + * Unique identifier of the data source. */ - 'status_message'?: string | null; + 'data_source_identifier'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4805,8 +5004,17 @@ declare class DeployResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ErrorResponse { - 'error'?: any | null; + +declare class DataSource { + /** + * Confidence score for the data source suggestion. + */ + 'confidence'?: number | null; + 'details'?: EntityHeader; + /** + * LLM reasoning for the data source. + */ + 'reasoning'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4834,19 +5042,36 @@ declare class ErrorResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class EurekaLLMSuggestedQuery { + +declare class Table { /** - * NL query that can be run using spotter aka natural language search to get an AI generated answer. + * Name of the table. */ - 'query'?: string | null; + 'name': string; /** - * Unique identifier of the worksheet on which this query can be run on. + * Columns of the table. */ - 'worksheetId'?: string | null; + 'columns'?: Array | null; /** - * Display name of the worksheet on which this query can be run on. + * Type of table. Either view or table */ - 'worksheetName'?: string | null; + 'type'?: string | null; + /** + * Description of the table + */ + 'description'?: string | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'linked'?: boolean | null; + /** + * List of relationships for the table + */ + 'relationships'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4875,11 +5100,15 @@ declare class EurekaLLMSuggestedQuery { * Do not edit the class manually. */ -declare class EurekaLLMDecomposeQueryResponse { +declare class SchemaObject { /** - * List of analytical questions that can be run on their respective worksheet/data sources. + * Name of the schema. */ - 'decomposedQueries'?: Array | null; + 'name': string; + /** + * Tables in the schema. + */ + 'tables'?: Array
| null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4908,8 +5137,19 @@ declare class EurekaLLMDecomposeQueryResponse { * Do not edit the class manually. */ -declare class EurekaDecomposeQueryResponse { - 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; +declare class Database { + /** + * Name of the database. + */ + 'name': string; + /** + * Schemas of the database. + */ + 'schemas'?: Array | null; + /** + * Determines if the object is auto created. + */ + 'auto_created'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4937,15 +5177,12 @@ declare class EurekaDecomposeQueryResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ExcludeMetadataListItemInput { - /** - * Unique ID or name of the metadata. - */ - 'identifier': string; + +declare class DataWarehouseObjects { /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + * Databases of the connection. */ - 'type': ExcludeMetadataListItemInputTypeEnum; + 'databases': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -4961,7 +5198,6 @@ declare class ExcludeMetadataListItemInput { }[]; constructor(); } -type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; /** * ThoughtSpot Public REST API @@ -4974,26 +5210,14 @@ type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for specific region specific overrides to support date/number/string/currency formatting. -*/ -declare class ExportAnswerReportRequestRegionalSettings { - /** - * ISO code to be appended with currency values. - */ - 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; - /** - * Indicates the locale to be used for all formattings. - */ - 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; - /** - * Indicates the locale to be used for number formatting. - */ - 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; - /** - * Indicates the locale to be used for date formatting. - */ - 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; +declare class DbtSearchResponse { + 'dbt_connection_identifier'?: string | null; + 'project_name'?: string | null; + 'connection_id'?: string | null; + 'connection_name'?: string | null; + 'cdw_database'?: string | null; + 'import_type'?: string | null; + 'author_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5009,10 +5233,6 @@ declare class ExportAnswerReportRequestRegionalSettings { }[]; constructor(); } -type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; -type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -5025,37 +5245,15 @@ type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | " * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ExportAnswerReportRequest { - /** - * Unique ID or name of the metadata object. - */ - 'metadata_identifier'?: string; - /** - * Unique ID of the answer session. - */ - 'session_identifier'?: string; - /** - * Generation number of the answer session. - */ - 'generation_number'?: number; - /** - * Export file format. - */ - 'file_format'?: ExportAnswerReportRequestFileFormatEnum; - /** - * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } - */ - 'runtime_filter'?: any; +declare class DeactivateUserRequest { /** - * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + * Unique ID or name of the user. */ - 'runtime_sort'?: any; + 'user_identifier': string; /** - * JSON object for setting values of parameters in runtime. + * Base url of the cluster. */ - 'runtime_param_override'?: any; - 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'base_url': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5071,7 +5269,6 @@ declare class ExportAnswerReportRequest { }[]; constructor(); } -type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; /** * ThoughtSpot Public REST API @@ -5085,37 +5282,13 @@ type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; * Do not edit the class manually. */ /** -* Options for PDF export. +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -declare class ExportLiveboardReportRequestPdfOptions { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page. - */ - 'include_page_number'?: boolean | null; - /** - * Page orientation of the PDF. - */ - 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; - /** - * Indicates whether to include only the first page of the tables. - */ - 'truncate_table'?: boolean | null; +declare class DefaultActionConfig { /** - * Text to include in the footer of each page. + * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'page_footer_text'?: string | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5131,7 +5304,6 @@ declare class ExportLiveboardReportRequestPdfOptions { }[]; constructor(); } -type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -5145,33 +5317,13 @@ type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "L * Do not edit the class manually. */ /** -* Options for PNG export. +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. */ -declare class ExportLiveboardReportRequestPngOptions { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates personalised view of the Liveboard in case of png - */ - 'personalised_view_id'?: string | null; - /** - * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later - */ - 'image_resolution'?: number | null; - /** - * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later - */ - 'image_scale'?: number | null; +declare class DefaultActionConfigInput { /** - * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'include_header'?: boolean | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5199,51 +5351,14 @@ declare class ExportLiveboardReportRequestPngOptions { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ExportLiveboardReportRequest { - /** - * GUID or name of the Liveboard object. - */ - 'metadata_identifier': string; - /** - * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later - */ - 'tab_identifiers'?: Array; - /** - * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later - */ - 'personalised_view_identifier'?: string; - /** - * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. - */ - 'visualization_identifiers'?: Array; - /** - * Transient content of the Liveboard. - */ - 'transient_content'?: string; - /** - * Export file format. - */ - 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; - /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - */ - 'runtime_filter'?: any; - /** - * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } - */ - 'override_filters'?: any; - /** - * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - */ - 'runtime_sort'?: any; - 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; - 'png_options'?: ExportLiveboardReportRequestPngOptions; +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigInputCreate { /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true */ - 'runtime_param_override'?: any; - 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5259,7 +5374,6 @@ declare class ExportLiveboardReportRequest { }[]; constructor(); } -type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG"; /** * ThoughtSpot Public REST API @@ -5272,31 +5386,14 @@ type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ExportMetadataTMLBatchedRequest { - /** - * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP - */ - 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; - /** - * Indicates the position within the complete set from where the API should begin returning objects. - */ - 'batch_offset'?: number; - /** - * Determines the number of objects or items to be retrieved in a single request. - */ - 'batch_size'?: number; - /** - * TML EDOC content format. - */ - 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; - /** - * Indicates whether to export dependent metadata objects of specified metadata objects. - */ - 'export_dependent'?: boolean | null; +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigSearchInput { /** - * Indicates whether to export is happening from all orgs context. + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'all_orgs_override'?: boolean | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5312,8 +5409,6 @@ declare class ExportMetadataTMLBatchedRequest { }[]; constructor(); } -type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE"; -type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; /** * ThoughtSpot Public REST API @@ -5326,30 +5421,11 @@ type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Flags to specify additional options for export. Version: 10.6.0.cl or later -*/ -declare class ExportMetadataTMLRequestExportOptions { - /** - * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id_ref'?: boolean | null; - /** - * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_guid'?: boolean | null; - /** - * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id'?: boolean | null; - /** - * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later - */ - 'export_with_associated_feedbacks'?: boolean | null; +declare class DeleteConfigRequest { /** - * 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 + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later */ - 'export_column_security_rules'?: boolean | null; + 'cluster_level'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5377,26 +5453,15 @@ declare class ExportMetadataTMLRequestExportOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* MetadataType InputType used in Export MetadataType API -*/ -declare class ExportMetadataTypeInput { - /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - 'type'?: ExportMetadataTypeInputTypeEnum | null; - /** - * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. - */ - 'identifier'?: string | null; +declare class DeleteConnectionConfigurationRequest { /** - * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + * Unique ID or name of the configuration. */ - 'session_identifier'?: string | null; + 'configuration_identifier': string; /** - * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + * Unique ID or name of the connection. */ - 'generation_number'?: number | null; + 'connection_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5412,7 +5477,6 @@ declare class ExportMetadataTypeInput { }[]; constructor(); } -type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK"; /** * ThoughtSpot Public REST API @@ -5425,41 +5489,11 @@ type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ExportMetadataTMLRequest { - /** - * Metadata objects. - */ - 'metadata': Array; - /** - * Indicates whether to export associated metadata objects of specified metadata objects. - */ - 'export_associated'?: boolean | null; - /** - * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. - */ - 'export_fqn'?: boolean | null; - /** - * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - */ - 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; - /** - * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. - */ - 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; - /** - * Indicates whether to export table while exporting connection. - */ - 'export_dependent'?: boolean | null; - /** - * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. - */ - 'export_connection_as_dependent'?: boolean | null; +declare class DeleteConnectionRequest { /** - * Indicates whether to export is happening from all orgs context. + * Unique ID or name of the connection. */ - 'all_orgs_override'?: boolean | null; - 'export_options'?: ExportMetadataTMLRequestExportOptions; + 'connection_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5475,8 +5509,6 @@ declare class ExportMetadataTMLRequest { }[]; constructor(); } -type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML"; -type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; /** * ThoughtSpot Public REST API @@ -5490,29 +5522,17 @@ type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; * Do not edit the class manually. */ /** -* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +* MetadataType InputType used in Delete MetadataType API */ -declare class ExportOptions { - /** - * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id_ref'?: boolean | null; - /** - * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_guid'?: boolean | null; - /** - * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. - */ - 'include_obj_id'?: boolean | null; +declare class DeleteMetadataTypeInput { /** - * 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 + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'export_with_associated_feedbacks'?: boolean | null; + 'type'?: DeleteMetadataTypeInputTypeEnum | null; /** - * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + * Unique ID or name of the metadata object. */ - 'export_column_security_rules'?: boolean | null; + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5528,6 +5548,7 @@ declare class ExportOptions { }[]; constructor(); } +type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -5540,23 +5561,16 @@ declare class ExportOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ExternalTableInput { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Name of the database. - */ - 'database_name'?: string | null; + +declare class DeleteMetadataRequest { /** - * Name of the schema. + * Metadata objects. */ - 'schema_name'?: string | null; + 'metadata': Array; /** - * Name of the table. Table names may be case-sensitive depending on the database system. + * Indicates whether to delete disabled metadata objects. */ - 'table_name': string; + 'delete_disabled_objects'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5584,19 +5598,11 @@ declare class ExternalTableInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FavoriteMetadataItem { - /** - * Unique ID of the metadata object. - */ - 'id': string; - /** - * name of the metadata object. - */ - 'name': string; +declare class DeleteOrgEmailCustomizationRequest { /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Unique identifier of the organization. */ - 'type': FavoriteMetadataItemTypeEnum; + 'org_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5612,7 +5618,6 @@ declare class FavoriteMetadataItem { }[]; constructor(); } -type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -5625,18 +5630,11 @@ type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | " * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Favorite object options. -*/ -declare class FavoriteObjectOptionsInput { - /** - * Includes objects marked as favorite for the specified users. - */ - 'include'?: boolean | null; +declare class DeleteWebhookConfigurationsRequest { /** - * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + * List of webhook identifiers to delete. */ - 'user_identifiers'?: Array | null; + 'webhook_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5664,35 +5662,23 @@ declare class FavoriteObjectOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchAnswerDataRequest { - /** - * GUID or name of the Answer. - */ - 'metadata_identifier': string; - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - 'data_format'?: FetchAnswerDataRequestDataFormatEnum; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; +declare class DeployCommitRequest { /** - * The number of records to include in a batch. + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. */ - 'record_size'?: number; + 'commit_id'?: string; /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * Name of the remote branch where changes should be picked */ - 'runtime_filter'?: any; + 'branch_name': string; /** - * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * Indicates if all files or only modified file at specified commit point should be considered */ - 'runtime_sort'?: any; + 'deploy_type'?: DeployCommitRequestDeployTypeEnum; /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. */ - 'runtime_param_override'?: any; + 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5708,7 +5694,8 @@ declare class FetchAnswerDataRequest { }[]; constructor(); } -type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; +type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA"; +type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY"; /** * ThoughtSpot Public REST API @@ -5721,11 +5708,27 @@ type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchAnswerSqlQueryRequest { +declare class DeployResponse { /** - * ID or name of an Answer. + * Name of the file deployed */ - 'metadata_identifier': string; + 'file_name'?: string | null; + /** + * Name of the metadata object + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata object + */ + 'metadata_type'?: string | null; + /** + * Indicates the status of deployment for the file + */ + 'status_code'?: string | null; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5753,31 +5756,8 @@ declare class FetchAnswerSqlQueryRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchAsyncImportTaskStatusRequest { - /** - * List of task IDs to fetch status for. - */ - 'task_ids'?: Array; - /** - * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] - */ - 'task_status'?: Array; - /** - * Author GUID or name of async import tasks to filter on. - */ - 'author_identifier'?: string; - /** - * The offset point, starting from where the task status should be included in the response. - */ - 'record_offset'?: number; - /** - * The number of task statuses that should be included in the response starting from offset position. - */ - 'record_size'?: number; - /** - * Boolean flag to specify whether to include import response in the task status objects. - */ - 'include_import_response'?: boolean | null; +declare class ErrorResponse { + 'error'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5793,7 +5773,6 @@ declare class FetchAsyncImportTaskStatusRequest { }[]; constructor(); } -type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; /** * ThoughtSpot Public REST API @@ -5807,11 +5786,11 @@ type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" * Do not edit the class manually. */ -declare class FetchColumnSecurityRulesRequest { +declare class EurekaDataSourceSuggestionResponse { /** - * Array of table identifier objects for which to fetch column security rules + * List of data sources suggested. */ - 'tables': Array; + 'data_sources'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5839,11 +5818,19 @@ declare class FetchColumnSecurityRulesRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchConnectionDiffStatusResponse { +declare class EurekaLLMSuggestedQuery { /** - * Status of the connection diff. + * NL query that can be run using spotter aka natural language search to get an AI generated answer. */ - 'status'?: boolean | null; + 'query'?: string | null; + /** + * Unique identifier of the worksheet on which this query can be run on. + */ + 'worksheetId'?: string | null; + /** + * Display name of the worksheet on which this query can be run on. + */ + 'worksheetName'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5871,43 +5858,12 @@ declare class FetchConnectionDiffStatusResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchLiveboardDataRequest { - /** - * GUID or name of the Liveboard. - */ - 'metadata_identifier': string; - /** - * GUIDs or names of the visualizations on the Liveboard. - */ - 'visualization_identifiers'?: Array; - /** - * Transient content of the Liveboard. - */ - 'transient_content'?: string; - /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. - */ - 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records to include in a batch. - */ - 'record_size'?: number; - /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - */ - 'runtime_filter'?: any; - /** - * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). - */ - 'runtime_sort'?: any; + +declare class EurekaLLMDecomposeQueryResponse { /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * List of analytical questions that can be run on their respective worksheet/data sources. */ - 'runtime_param_override'?: any; + 'decomposedQueries'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5923,7 +5879,6 @@ declare class FetchLiveboardDataRequest { }[]; constructor(); } -type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -5936,15 +5891,9 @@ type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchLiveboardSqlQueryRequest { - /** - * ID or name of the Liveboard. - */ - 'metadata_identifier': string; - /** - * Unique ID or name of visualizations. - */ - 'visualization_identifiers'?: Array; + +declare class EurekaDecomposeQueryResponse { + 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5972,23 +5921,19 @@ declare class FetchLiveboardSqlQueryRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class FetchLogsRequest { +declare class EurekaRelevantQuestion { /** - * Name of the log type - */ - 'log_type': FetchLogsRequestLogTypeEnum; - /** - * Start time in EPOCH format + * NL query that can be run using spotter aka natural language search to get an AI generated answer. */ - 'start_epoch_time_in_millis'?: number; + 'query'?: string | null; /** - * End time in EPOCH format + * Unique identifier of the data source on which this query can be run on. */ - 'end_epoch_time_in_millis'?: number; + 'data_source_identifier'?: string | null; /** - * Fetch all the logs. This is available from 9.10.5.cl + * Display name of the data source on which this query can be run on. */ - 'get_all_logs'?: boolean | null; + 'data_source_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6004,7 +5949,6 @@ declare class FetchLogsRequest { }[]; constructor(); } -type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; /** * ThoughtSpot Public REST API @@ -6017,18 +5961,12 @@ type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* MetadataType InputType used in Permission API\'s -*/ -declare class PermissionsMetadataTypeInput { - /** - * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. - */ - 'type'?: PermissionsMetadataTypeInputTypeEnum | null; + +declare class EurekaGetRelevantQuestionsResponse { /** - * Unique ID or name of the metadata object. + * List of relevant questions that can be run on their respective data sources. */ - 'identifier': string; + 'relevant_questions'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6044,7 +5982,6 @@ declare class PermissionsMetadataTypeInput { }[]; constructor(); } -type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -6057,15 +5994,15 @@ type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PrincipalsInput { +declare class ExcludeMetadataListItemInput { /** - * Unique ID or name of the principal object such as a user or group. + * Unique ID or name of the metadata. */ 'identifier': string; /** - * Principal type. + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects */ - 'type'?: PrincipalsInputTypeEnum | null; + 'type': ExcludeMetadataListItemInputTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6081,7 +6018,7 @@ declare class PrincipalsInput { }[]; constructor(); } -type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; +type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; /** * ThoughtSpot Public REST API @@ -6094,28 +6031,26 @@ type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class FetchPermissionsOfPrincipalsRequest { - /** - * GUID or name of the user or group. - */ - 'principals': Array; +/** +* Options for specific region specific overrides to support date/number/string/currency formatting. +*/ +declare class ExportAnswerReportRequestRegionalSettings { /** - * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. + * ISO code to be appended with currency values. */ - 'metadata'?: Array; + 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; /** - * The starting record number from where the records should be included for each metadata type. + * Indicates the locale to be used for all formattings. */ - 'record_offset'?: number; + 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; /** - * The number of records that should be included for each metadata type. + * Indicates the locale to be used for number formatting. */ - 'record_size'?: number; + 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; /** - * When no metadata objects input is passed, metadata objects of this type are fetched. + * Indicates the locale to be used for date formatting. */ - 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; + 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6131,7 +6066,10 @@ declare class FetchPermissionsOfPrincipalsRequest { }[]; constructor(); } -type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; +type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -6145,36 +6083,41 @@ type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEB * Do not edit the class manually. */ -declare class FetchPermissionsOnMetadataRequest { +declare class ExportAnswerReportRequest { /** - * GUID or name of the metadata object. + * Unique ID or name of the metadata object. */ - 'metadata': Array; + 'metadata_identifier'?: string; /** - * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. + * Unique ID of the answer session. */ - 'principals'?: Array; + 'session_identifier'?: string; /** - * Indicates whether to fetch permissions of dependent metadata objects. + * Generation number of the answer session. */ - 'include_dependent_objects'?: boolean | null; + 'generation_number'?: number; /** - * The starting record number from where the records should be included for each metadata type. + * Export file format. */ - 'record_offset'?: number; + 'file_format'?: ExportAnswerReportRequestFileFormatEnum; /** - * The number of records that should be included for each metadata type. + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } */ - 'record_size'?: number; + 'runtime_filter'?: any; /** - *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } */ - 'permission_type'?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters in runtime. + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; format: string; }>; static getAttributeTypeMap(): { @@ -6185,6 +6128,7 @@ declare class FetchPermissionsOnMetadataRequest { }[]; constructor(); } +type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; /** * ThoughtSpot Public REST API @@ -6198,21 +6142,37 @@ declare class FetchPermissionsOnMetadataRequest { * Do not edit the class manually. */ /** -* Filter Rules to be applied on Objects. +* Options for PDF export. */ -declare class FilterRules { +declare class ExportLiveboardReportRequestPdfOptions { /** - * The name of the column to apply the filter on. + * Indicates whether to include the cover page with the Liveboard title. */ - 'column_name': string; + 'include_cover_page'?: boolean | null; /** - * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + * Indicates whether to include customized wide logo in the footer if available. */ - 'operator': FilterRulesOperatorEnum; + 'include_custom_logo'?: boolean | null; /** - * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + * Indicates whether to include a page with all applied filters. */ - 'values': Array; + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6228,7 +6188,7 @@ declare class FilterRules { }[]; constructor(); } -type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; +type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -6241,11 +6201,34 @@ type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ForceLogoutUsersRequest { +/** +* Options for PNG export. +*/ +declare class ExportLiveboardReportRequestPngOptions { /** - * GUID or name of the users for force logging out their sessions. + * Indicates whether to include the cover page with the Liveboard title. */ - 'user_identifiers'?: Array; + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6274,11 +6257,50 @@ declare class ForceLogoutUsersRequest { * Do not edit the class manually. */ -/** -* Configuration of schedule with cron expression -*/ -declare class Frequency { - 'cron_expression': CronExpression; +declare class ExportLiveboardReportRequest { + /** + * GUID or name of the Liveboard object. + */ + 'metadata_identifier': string; + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + */ + 'tab_identifiers'?: Array; + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * Export file format. + */ + 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } + */ + 'override_filters'?: any; + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; + 'png_options'?: ExportLiveboardReportRequestPngOptions; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6294,6 +6316,7 @@ declare class Frequency { }[]; constructor(); } +type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG"; /** * ThoughtSpot Public REST API @@ -6306,12 +6329,31 @@ declare class Frequency { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Configuration of schedule with cron expression -*/ -declare class FrequencyInput { - 'cron_expression': CronExpressionInput; +declare class ExportMetadataTMLBatchedRequest { + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + */ + 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; + /** + * Indicates the position within the complete set from where the API should begin returning objects. + */ + 'batch_offset'?: number; + /** + * Determines the number of objects or items to be retrieved in a single request. + */ + 'batch_size'?: number; + /** + * TML EDOC content format. + */ + 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6327,6 +6369,8 @@ declare class FrequencyInput { }[]; constructor(); } +type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE"; +type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; /** * ThoughtSpot Public REST API @@ -6339,35 +6383,34 @@ declare class FrequencyInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GenerateCSVRequest { - /** - * Start date for the calendar in `MM/dd/yyyy` format. - */ - 'start_date': string; +/** +* Flags to specify additional options for export. Version: 10.6.0.cl or later +*/ +declare class ExportMetadataTMLRequestExportOptions { /** - * End date for the calendar in `MM/dd/yyyy` format. + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'end_date': string; + 'include_obj_id_ref'?: boolean | null; /** - * Type of the calendar. + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + 'include_guid'?: boolean | null; /** - * Month offset to start calendar from `January`. + * 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. */ - 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + 'include_obj_id'?: boolean | null; /** - * Specify the starting day of the week. + * 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 */ - 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + 'export_with_associated_feedbacks'?: boolean | null; /** - * Prefix to add before the quarter. + * 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 */ - 'quarter_name_prefix'?: string; + 'export_column_security_rules'?: boolean | null; /** - * Prefix to add before the year. + * 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 */ - 'year_name_prefix'?: string; + 'export_with_column_aliases'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6383,9 +6426,6 @@ declare class GenerateCSVRequest { }[]; constructor(); } -type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; -type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; -type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -6398,9 +6438,26 @@ type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "W * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GenericInfo { - 'id'?: string | null; - 'name'?: string | null; +/** +* MetadataType InputType used in Export MetadataType API +*/ +declare class ExportMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ExportMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. + */ + 'identifier'?: string | null; + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'session_identifier'?: string | null; + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'generation_number'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6416,6 +6473,7 @@ declare class GenericInfo { }[]; constructor(); } +type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK"; /** * ThoughtSpot Public REST API @@ -6428,67 +6486,41 @@ declare class GenericInfo { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportEPackAsyncTaskStatus { - /** - * GUID of tenant from which the task is initiated. - */ - 'tenant_id'?: string | null; + +declare class ExportMetadataTMLRequest { /** - * Organisation ID of the user who initiated the task. + * Metadata objects. */ - 'org_id'?: number | null; + 'metadata': Array; /** - * Unique identifier for the task. + * Indicates whether to export associated metadata objects of specified metadata objects. */ - 'task_id'?: string | null; + 'export_associated'?: boolean | null; /** - * Name of the task. + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. */ - 'task_name'?: string | null; + 'export_fqn'?: boolean | null; /** - * Response of imported objects so far. + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** */ - 'import_response'?: any | null; + 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; /** - * Current status of the task. + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. */ - 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; /** - * ID of the user who initiated the task. + * Indicates whether to export table while exporting connection. */ - 'author_id'?: string | null; + 'export_dependent'?: boolean | null; /** - * Policy used for the import task. + * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. */ - 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + 'export_connection_as_dependent'?: boolean | null; /** - * Time when the task was created (in ms since epoch). + * Indicates whether to export is happening from all orgs context. */ - 'created_at'?: number | null; - /** - * Time when the task started (in ms since epoch). - */ - 'in_progress_at'?: number | null; - /** - * Time when the task was completed (in ms since epoch). - */ - 'completed_at'?: number | null; - /** - * Total number of objects to process. - */ - 'total_object_count'?: number | null; - /** - * Number of objects processed so far. - */ - 'object_processed_count'?: number | null; - /** - * Last time the task status was updated (in ms since epoch). - */ - 'modified_at'?: number | null; - /** - * Display name of the user who initiated the task. - */ - 'author_display_name'?: string | null; + 'all_orgs_override'?: boolean | null; + 'export_options'?: ExportMetadataTMLRequestExportOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6504,8 +6536,8 @@ declare class ImportEPackAsyncTaskStatus { }[]; constructor(); } -type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; -type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; +type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML"; +type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; /** * ThoughtSpot Public REST API @@ -6518,16 +6550,34 @@ type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "V * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetAsyncImportStatusResponse { +/** +* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +*/ +declare class ExportOptions { /** - * List of task statuses. + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'status_list'?: Array | null; + 'include_obj_id_ref'?: boolean | null; /** - * Indicates whether there are more task statuses to fetch. + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. */ - 'last_batch'?: boolean | null; + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6555,11 +6605,23 @@ declare class GetAsyncImportStatusResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Groups objects. -*/ -declare class GroupObject { - 'identifier'?: string | null; +declare class ExternalTableInput { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6587,18 +6649,19 @@ declare class GroupObject { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Filter Rules to be applied on Objects. -*/ -declare class ParameterValues { +declare class FavoriteMetadataItem { /** - * The name of the column to apply the filter on. + * Unique ID of the metadata object. + */ + 'id': string; + /** + * name of the metadata object. */ 'name': string; /** - * The values to filter on. Only single value is supported currently. + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'values': Array; + 'type': FavoriteMetadataItemTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6614,6 +6677,7 @@ declare class ParameterValues { }[]; constructor(); } +type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -6627,17 +6691,17 @@ declare class ParameterValues { * Do not edit the class manually. */ /** -* Objects on which the filter rules and parameters values should be applied to +* Favorite object options. */ -declare class TokenAccessScopeObject { +declare class FavoriteObjectOptionsInput { /** - * 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. + * Includes objects marked as favorite for the specified users. */ - 'type'?: TokenAccessScopeObjectTypeEnum | null; + 'include'?: boolean | null; /** - * Unique name/id of the object. + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. */ - 'identifier': string; + 'user_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6653,7 +6717,6 @@ declare class TokenAccessScopeObject { }[]; constructor(); } -type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -6666,60 +6729,35 @@ type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetCustomAccessTokenRequest { - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. - */ - 'username': string; - /** - * Password of the user account - */ - 'password'?: string; - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. - */ - 'secret_key'?: string; - /** - * Token validity duration in seconds - */ - 'validity_time_in_sec'?: number; - /** - * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. - */ - 'org_identifier'?: string; - /** - * Indicates whether the specified attributes should be persisted or not. - */ - 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; +declare class FetchAnswerDataRequest { /** - * Filter rules. + * GUID or name of the Answer. */ - 'filter_rules'?: Array; + 'metadata_identifier': string; /** - * Parameter values. + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. */ - 'parameter_values'?: Array; + 'data_format'?: FetchAnswerDataRequestDataFormatEnum; /** - * Objects on which the filter rules and parameters values should be applied to + * The starting record number from where the records should be included. */ - 'objects'?: Array; + 'record_offset'?: number; /** - * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + * The number of records to include in a batch. */ - 'email'?: string; + 'record_size'?: number; /** - * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). */ - 'display_name'?: string; + 'runtime_filter'?: any; /** - * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). */ - 'groups'?: Array; + 'runtime_sort'?: any; /** - * 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. Version: 10.5.0.cl or later + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). */ - 'auto_create'?: boolean | null; + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6735,7 +6773,7 @@ declare class GetCustomAccessTokenRequest { }[]; constructor(); } -type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET"; +type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -6748,18 +6786,11 @@ type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Objects to apply the User_Object. -*/ -declare class UserObject { - /** - * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. - */ - 'type'?: UserObjectTypeEnum | null; +declare class FetchAnswerSqlQueryRequest { /** - * Unique name/id of the object. + * ID or name of an Answer. */ - 'identifier': string; + 'metadata_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6775,7 +6806,6 @@ declare class UserObject { }[]; constructor(); } -type UserObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -6788,31 +6818,31 @@ type UserObjectTypeEnum = "LOGICAL_TABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Objects to apply the Runtime_Filters. -*/ -declare class RuntimeFilters { +declare class FetchAsyncImportTaskStatusRequest { /** - * The column name to apply filter. + * List of task IDs to fetch status for. */ - 'column_name': string; + 'task_ids'?: Array; /** - * Value of the filters. + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] */ - 'values': Array; + 'task_status'?: Array; /** - * Operator value. Example: EQ + * Author GUID or name of async import tasks to filter on. */ - 'operator': RuntimeFiltersOperatorEnum; + 'author_identifier'?: string; /** - * Flag to persist the runtime filters. Version: 9.12.0.cl or later + * The offset point, starting from where the task status should be included in the response. */ - 'persist'?: boolean | null; + 'record_offset'?: number; /** - * Object to apply the runtime filter. + * The number of task statuses that should be included in the response starting from offset position. */ - 'objects'?: Array | null; + 'record_size'?: number; + /** + * Boolean flag to specify whether to include import response in the task status objects. + */ + 'include_import_response'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6828,7 +6858,7 @@ declare class RuntimeFilters { }[]; constructor(); } -type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; +type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; /** * ThoughtSpot Public REST API @@ -6842,26 +6872,11 @@ type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" * Do not edit the class manually. */ -/** -* Objects to apply the Runtime_Parameters. -*/ -declare class RuntimeParameters { - /** - * The name of the parameter. - */ - 'name': string; - /** - * The array of values. - */ - 'values': Array; - /** - * Flag to persist the parameters. Version: 9.12.0.cl or later - */ - 'persist'?: boolean | null; +declare class FetchColumnSecurityRulesRequest { /** - * Object to apply the runtime parameter. + * Array of table identifier objects for which to fetch column security rules */ - 'objects'?: Array | null; + 'tables': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6889,27 +6904,11 @@ declare class RuntimeParameters { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Objects to apply the Runtime_Sorts. -*/ -declare class RuntimeSorts { - /** - * The column name to apply filter. - */ - 'column_name'?: string | null; - /** - * Order for the sort. - */ - 'order'?: RuntimeSortsOrderEnum | null; - /** - * Flag to persist the runtime sorts. Version: 9.12.0.cl or later - */ - 'persist'?: boolean | null; +declare class FetchConnectionDiffStatusResponse { /** - * Object to apply the runtime sort. + * Status of the connection diff. */ - 'objects'?: Array | null; + 'status'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6925,7 +6924,6 @@ declare class RuntimeSorts { }[]; constructor(); } -type RuntimeSortsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -6938,24 +6936,43 @@ type RuntimeSortsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). -*/ -declare class GetFullAccessTokenRequestUserParameters { - 'objects'?: Array | null; +declare class FetchLiveboardDataRequest { /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * GUID or name of the Liveboard. */ - 'runtime_filters'?: Array | null; + 'metadata_identifier': string; /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * GUIDs or names of the visualizations on the Liveboard. */ - 'runtime_sorts'?: Array | null; + 'visualization_identifiers'?: Array; /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * Transient content of the Liveboard. */ - 'parameters'?: Array | null; + 'transient_content'?: string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6971,6 +6988,7 @@ declare class GetFullAccessTokenRequestUserParameters { }[]; constructor(); } +type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -6983,45 +7001,15 @@ declare class GetFullAccessTokenRequestUserParameters { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetFullAccessTokenRequest { - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. - */ - 'username': string; - /** - * Password of the user account - */ - 'password'?: string; - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. - */ - 'secret_key'?: string; - /** - * Token validity duration in seconds - */ - 'validity_time_in_sec'?: number; - /** - * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. - */ - 'org_id'?: number; - /** - * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). - */ - 'email'?: string; - /** - * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). - */ - 'display_name'?: string; +declare class FetchLiveboardSqlQueryRequest { /** - * 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. + * ID or name of the Liveboard. */ - 'auto_create'?: boolean | null; + 'metadata_identifier': 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). + * Unique ID or name of visualizations. */ - 'group_identifiers'?: Array; - 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + 'visualization_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7049,49 +7037,23 @@ declare class GetFullAccessTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class GetObjectAccessTokenRequest { - /** - * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. - */ - 'username': string; - /** - * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. - */ - 'object_id'?: string; - /** - * Password of the user account - */ - 'password'?: string; - /** - * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. - */ - 'secret_key'?: string; - /** - * Token validity duration in seconds - */ - 'validity_time_in_sec'?: number; - /** - * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. - */ - 'org_id'?: number; +declare class FetchLogsRequest { /** - * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * Name of the log type */ - 'email'?: string; + 'log_type': FetchLogsRequestLogTypeEnum; /** - * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + * Start time in EPOCH format */ - 'display_name'?: string; + 'start_epoch_time_in_millis'?: number; /** - * 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. + * End time in EPOCH format */ - 'auto_create'?: boolean | null; + 'end_epoch_time_in_millis'?: number; /** - * 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. + * Fetch all the logs. This is available from 9.10.5.cl */ - 'group_identifiers'?: Array; - 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + 'get_all_logs'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7107,6 +7069,7 @@ declare class GetObjectAccessTokenRequest { }[]; constructor(); } +type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; /** * ThoughtSpot Public REST API @@ -7119,27 +7082,18 @@ declare class GetObjectAccessTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GetTokenResponse { - /** - * Bearer auth token. - */ - 'token': string; - /** - * Token creation time in milliseconds. - */ - 'creation_time_in_millis': number; - /** - * Token expiration time in milliseconds. - */ - 'expiration_time_in_millis': number; +/** +* MetadataType InputType used in Permission API\'s +*/ +declare class PermissionsMetadataTypeInput { /** - * Username to whom the token is issued. + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. */ - 'valid_for_user_id': string; + 'type'?: PermissionsMetadataTypeInputTypeEnum | null; /** - * Unique identifier of the user to whom the token is issued. + * Unique ID or name of the metadata object. */ - 'valid_for_username': string; + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7155,6 +7109,7 @@ declare class GetTokenResponse { }[]; constructor(); } +type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -7167,43 +7122,15 @@ declare class GetTokenResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class GroupsImportListInput { - /** - * Unique display name of the group. - */ - 'display_name': string; - /** - * Unique ID or name of the group. - */ - 'group_identifier': string; - /** - * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. - */ - 'default_liveboard_identifiers'?: Array | null; - /** - * Description of the group. - */ - 'description'?: string | null; - /** - * Privileges that will be assigned to the group. - */ - 'privileges'?: Array | null; - /** - * Unique ID or name of the sub-groups to add to the group. - */ - 'sub_group_identifiers'?: Array | null; - /** - * Type of the group. - */ - 'type'?: GroupsImportListInputTypeEnum | null; +declare class PrincipalsInput { /** - * Unique ID or name of the users to assign to the group. + * Unique ID or name of the principal object such as a user or group. */ - 'user_identifiers'?: Array | null; + 'identifier': string; /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + * Principal type. */ - 'visibility'?: GroupsImportListInputVisibilityEnum | null; + 'type'?: PrincipalsInputTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7219,9 +7146,7 @@ declare class GroupsImportListInput { }[]; constructor(); } -type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -7234,18 +7159,28 @@ type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Attribute to update in a header. -*/ -declare class HeaderAttributeInput { + +declare class FetchPermissionsOfPrincipalsRequest { /** - * Attribute name to be updated. + * GUID or name of the user or group. */ - 'name': string; + 'principals': Array; /** - * Attribute\'s new value. + * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. */ - 'value': string; + 'metadata'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + */ + 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7261,6 +7196,7 @@ declare class HeaderAttributeInput { }[]; constructor(); } +type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -7274,26 +7210,31 @@ declare class HeaderAttributeInput { * Do not edit the class manually. */ -/** -* Favorite object options. -*/ -declare class HeaderUpdateInput { +declare class FetchPermissionsOnMetadataRequest { /** - * Unique ID of a specified type to identify the header. + * GUID or name of the metadata object. */ - 'identifier'?: string | null; + 'metadata': Array; /** - * Custom object identifier to uniquely identify header. + * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. */ - 'obj_identifier'?: string | null; + 'principals'?: Array; /** - * Optional type of the header object. + * Indicates whether to fetch permissions of dependent metadata objects. */ - 'type'?: HeaderUpdateInputTypeEnum | null; + 'include_dependent_objects'?: boolean | null; /** - * List of attributes to update + * The starting record number from where the records should be included for each metadata type. */ - 'attributes': Array; + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + */ + 'permission_type'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7309,7 +7250,6 @@ declare class HeaderUpdateInput { }[]; constructor(); } -type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -7322,31 +7262,22 @@ type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportMetadataTMLAsyncRequest { +/** +* Filter Rules to be applied on Objects. +*/ +declare class FilterRules { /** - * Details of TML objects. + * The name of the column to apply the filter on. */ - 'metadata_tmls': Array; - /** - * If selected, creates TML objects with new GUIDs. - */ - 'create_new'?: boolean | null; - /** - * If import is happening from all orgs context. - */ - 'all_orgs_override'?: boolean | null; - /** - *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] - */ - 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + 'column_name': string; /** - *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. */ - 'skip_diff_check'?: boolean | null; + 'operator': FilterRulesOperatorEnum; /** - *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. */ - 'enable_large_metadata_validation'?: boolean | null; + 'values': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7362,7 +7293,7 @@ declare class ImportMetadataTMLAsyncRequest { }[]; constructor(); } -type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; +type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; /** * ThoughtSpot Public REST API @@ -7375,31 +7306,11 @@ type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportMetadataTMLRequest { - /** - * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** - */ - 'metadata_tmls': Array; - /** - * Specifies the import policy for the TML import. - */ - 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; - /** - * If selected, creates TML objects with new GUIDs. - */ - 'create_new'?: boolean | null; - /** - * If import is happening from all orgs context. - */ - 'all_orgs_override'?: boolean | null; - /** - *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. - */ - 'skip_diff_check'?: boolean | null; +declare class ForceLogoutUsersRequest { /** - *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + * GUID or name of the users for force logging out their sessions. */ - 'enable_large_metadata_validation'?: boolean | null; + 'user_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7415,7 +7326,6 @@ declare class ImportMetadataTMLRequest { }[]; constructor(); } -type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -7429,63 +7339,11 @@ type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VAL * Do not edit the class manually. */ -declare class ImportUser { - /** - * Unique ID or name of the user. - */ - 'user_identifier': string; - /** - * Display name of the user. - */ - 'display_name': string; - /** - * Password of the user. - */ - 'password'?: string | null; - /** - * Type of the user account. - */ - 'account_type'?: ImportUserAccountTypeEnum | null; - /** - * Status of the user account. - */ - 'account_status'?: ImportUserAccountStatusEnum | null; - /** - * Email address of the user. - */ - 'email'?: string | null; - /** - * ID or name of the Orgs to which the user belongs. - */ - 'org_identifiers'?: Array | null; - /** - * ID or name of the groups to which the user belongs. - */ - 'group_identifiers'?: Array | null; - /** - * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. - */ - 'visibility'?: ImportUserVisibilityEnum | null; - /** - * Notify user when other users or groups share metadata objects - */ - 'notify_on_share'?: boolean | null; - /** - * Show or hide the new user onboarding walkthroughs - */ - 'show_onboarding_experience'?: boolean | null; - /** - * Revisit the new user onboarding walkthroughs - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * Unique ID or name of the default Liveboard assigned to the user. - */ - 'home_liveboard_identifier'?: string | null; - /** - * Metadata objects to add to the user\'s favorites list. - */ - 'favorite_metadata'?: Array | null; +/** +* Configuration of schedule with cron expression +*/ +declare class Frequency { + 'cron_expression': CronExpression; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7501,9 +7359,6 @@ declare class ImportUser { }[]; constructor(); } -type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -7517,19 +7372,11 @@ type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * Do not edit the class manually. */ -declare class ImportUserGroupsRequest { - /** - * Details of groups which are to be imported - */ - 'groups'?: Array; - /** - * If set to true, removes groups that are not specified in the API request. - */ - 'delete_unspecified_groups'?: boolean | null; - /** - * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. - */ - 'dry_run'?: boolean | null; +/** +* Configuration of schedule with cron expression +*/ +declare class FrequencyInput { + 'cron_expression': CronExpressionInput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7557,9 +7404,35 @@ declare class ImportUserGroupsRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UserGroup { - 'id'?: string | null; - 'name'?: string | null; +declare class GenerateCSVRequest { + /** + * Start date for the calendar in `MM/dd/yyyy` format. + */ + 'start_date': string; + /** + * End date for the calendar in `MM/dd/yyyy` format. + */ + 'end_date': string; + /** + * Type of the calendar. + */ + 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + /** + * Month offset to start calendar from `January`. + */ + 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7575,6 +7448,9 @@ declare class UserGroup { }[]; constructor(); } +type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -7587,20 +7463,9 @@ declare class UserGroup { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ImportUserGroupsResponse { - /** - * The groups which are added into the system. - */ - 'groups_added': Array; - /** - * The groups which are deleted from the system. - */ - 'groups_deleted': Array; - /** - * The groups which are updated in the system. - */ - 'groups_updated': Array; +declare class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7628,15 +7493,67 @@ declare class ImportUserGroupsResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ImportUserType { +declare class ImportEPackAsyncTaskStatus { /** - * Unique identifier of the user. + * GUID of tenant from which the task is initiated. */ - 'id'?: string | null; + 'tenant_id'?: string | null; /** - * Name of the user. + * Organisation ID of the user who initiated the task. */ - 'name': string; + 'org_id'?: number | null; + /** + * Unique identifier for the task. + */ + 'task_id'?: string | null; + /** + * Name of the task. + */ + 'task_name'?: string | null; + /** + * Response of imported objects so far. + */ + 'import_response'?: any | null; + /** + * Current status of the task. + */ + 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + /** + * ID of the user who initiated the task. + */ + 'author_id'?: string | null; + /** + * Policy used for the import task. + */ + 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + /** + * Time when the task was created (in ms since epoch). + */ + 'created_at'?: number | null; + /** + * Time when the task started (in ms since epoch). + */ + 'in_progress_at'?: number | null; + /** + * Time when the task was completed (in ms since epoch). + */ + 'completed_at'?: number | null; + /** + * Total number of objects to process. + */ + 'total_object_count'?: number | null; + /** + * Number of objects processed so far. + */ + 'object_processed_count'?: number | null; + /** + * Last time the task status was updated (in ms since epoch). + */ + 'modified_at'?: number | null; + /** + * Display name of the user who initiated the task. + */ + 'author_display_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7652,6 +7569,8 @@ declare class ImportUserType { }[]; constructor(); } +type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; +type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -7665,23 +7584,15 @@ declare class ImportUserType { * Do not edit the class manually. */ -declare class ImportUsersRequest { +declare class GetAsyncImportStatusResponse { /** - * List of users needs to be imported. + * List of task statuses. */ - 'users': Array; + 'status_list'?: Array | null; /** - * The default password to assign to users if they do not have a password assigned in ThoughtSpot. - */ - 'default_password'?: string; - /** - * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. - */ - 'dry_run'?: boolean | null; - /** - * If set to true, removes the users that are not specified in the API request. + * Indicates whether there are more task statuses to fetch. */ - 'delete_unspecified_users'?: boolean | null; + 'last_batch'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7709,11 +7620,11 @@ declare class ImportUsersRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ImportUsersResponse { - 'users_added'?: Array | null; - 'users_updated'?: Array | null; - 'users_deleted'?: Array | null; +/** +* Groups objects. +*/ +declare class GroupObject { + 'identifier'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7741,23 +7652,18 @@ declare class ImportUsersResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class InputEurekaNLSRequest { - /** - * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. - */ - 'agentVersion'?: number | null; - /** - * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. - */ - 'bypassCache'?: boolean | null; +/** +* Filter Rules to be applied on Objects. +*/ +declare class ParameterValues { /** - * User specific instructions for processing the @query. + * The name of the column to apply the filter on. */ - 'instructions'?: Array | null; + 'name': string; /** - * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + * The values to filter on. Only single value is supported currently. */ - 'query'?: string | null; + 'values': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7786,11 +7692,17 @@ declare class InputEurekaNLSRequest { * Do not edit the class manually. */ /** -* Metadata objects. +* Objects on which the filter rules and parameters values should be applied to */ -declare class JWTMetadataObject { - 'identifier'?: string | null; - 'type'?: JWTMetadataObjectTypeEnum | null; +declare class TokenAccessScopeObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: TokenAccessScopeObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7806,7 +7718,7 @@ declare class JWTMetadataObject { }[]; constructor(); } -type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; +type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -7819,22 +7731,60 @@ type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* List of runtime parameters need to set during the session. -*/ -declare class JWTParameter { + +declare class GetCustomAccessTokenRequest { /** - * Runtime filter parameter type in JWT. + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. */ - 'runtime_filter'?: any | null; + 'username': string; /** - * Runtime sort parameter type in JWT. + * Password of the user account */ - 'runtime_sort'?: any | null; + 'password'?: string; /** - * Runtime param override type in JWT. + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. */ - 'runtime_param_override'?: any | null; + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. + */ + 'org_identifier'?: string; + /** + * Indicates whether the specified attributes should be persisted or not. + */ + 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; + /** + * Filter rules. + */ + 'filter_rules'?: Array; + /** + * Parameter values. + */ + 'parameter_values'?: Array; + /** + * Objects on which the filter rules and parameters values should be applied to + */ + 'objects'?: Array; + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + */ + 'email'?: string; + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + */ + 'display_name'?: string; + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + */ + 'groups'?: Array; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. Version: 10.5.0.cl or later + */ + 'auto_create'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7850,6 +7800,7 @@ declare class JWTParameter { }[]; constructor(); } +type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET"; /** * ThoughtSpot Public REST API @@ -7862,13 +7813,11 @@ declare class JWTParameter { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* -*/ -declare class JWTUserOptions { - 'parameters'?: Array; - 'metadata'?: Array | null; +declare class GetDataSourceSuggestionsRequest { + /** + * User query used to suggest data sources. + */ + 'query': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7896,12 +7845,18 @@ declare class JWTUserOptions { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +* Objects to apply the User_Object. */ -declare class JWTUserOptionsFull { - 'parameters'?: Array | null; +declare class UserObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: UserObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7917,6 +7872,7 @@ declare class JWTUserOptionsFull { }[]; constructor(); } +type UserObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -7929,43 +7885,31 @@ declare class JWTUserOptionsFull { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class LiveboardContent { - /** - * Total available data row count. - */ - 'available_data_row_count': number; - /** - * Name of the columns. - */ - 'column_names': Array; - /** - * Rows of data set. - */ - 'data_rows': Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset': number; + +/** +* Objects to apply the Runtime_Filters. +*/ +declare class RuntimeFilters { /** - * The number of records that should be included. + * The column name to apply filter. */ - 'record_size': number; + 'column_name': string; /** - * Total returned data row count. + * Value of the filters. */ - 'returned_data_row_count': number; + 'values': Array; /** - * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + * Operator value. Example: EQ */ - 'sampling_ratio': number; + 'operator': RuntimeFiltersOperatorEnum; /** - * Unique ID of the visualization. + * Flag to persist the runtime filters. Version: 9.12.0.cl or later */ - 'visualization_id'?: string | null; + 'persist'?: boolean | null; /** - * Name of the visualization. + * Object to apply the runtime filter. */ - 'visualization_name'?: string | null; + 'objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7981,6 +7925,7 @@ declare class LiveboardContent { }[]; constructor(); } +type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; /** * ThoughtSpot Public REST API @@ -7994,19 +7939,26 @@ declare class LiveboardContent { * Do not edit the class manually. */ -declare class LiveboardDataResponse { +/** +* Objects to apply the Runtime_Parameters. +*/ +declare class RuntimeParameters { /** - * The unique identifier of the object + * The name of the parameter. */ - 'metadata_id': string; + 'name': string; /** - * Name of the metadata object + * The array of values. */ - 'metadata_name': string; + 'values': Array; /** - * Data content of metadata objects + * Flag to persist the parameters. Version: 9.12.0.cl or later */ - 'contents': Array; + 'persist'?: boolean | null; + /** + * Object to apply the runtime parameter. + */ + 'objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8034,14 +7986,27 @@ declare class LiveboardDataResponse { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Options to specify details of Liveboard. +* Objects to apply the Runtime_Sorts. */ -declare class LiveboardOptions { +declare class RuntimeSorts { /** - * Unique ID or name of visualizations. + * The column name to apply filter. */ - 'visualization_identifiers': Array; + 'column_name'?: string | null; + /** + * Order for the sort. + */ + 'order'?: RuntimeSortsOrderEnum | null; + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime sort. + */ + 'objects'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8057,6 +8022,7 @@ declare class LiveboardOptions { }[]; constructor(); } +type RuntimeSortsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -8069,14 +8035,24 @@ declare class LiveboardOptions { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Options to specify details of Liveboard. +*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). */ -declare class LiveboardOptionsInput { +declare class GetFullAccessTokenRequestUserParameters { + 'objects'?: Array | null; /** - * Unique ID or name of visualizations. + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` */ - 'visualization_identifiers': Array; + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8104,17 +8080,47 @@ declare class LiveboardOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class LogResponse { + +declare class GetFullAccessTokenRequest { /** - * Date timestamp of the log entry + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. */ - 'date': string; + 'username': string; /** - * Log data + * Password of the user account */ - 'log': string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ name: string; baseName: string; type: string; @@ -8140,23 +8146,49 @@ declare class LogResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class LoginRequest { + +declare class GetObjectAccessTokenRequest { /** - * Username of the ThoughtSpot user + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. */ - 'username'?: string; + 'username': string; + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. + */ + 'object_id'?: string; /** * Password of the user account */ 'password'?: string; /** - * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. */ - 'org_identifier'?: string; + 'secret_key'?: string; /** - * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + * Token validity duration in seconds */ - 'remember_me'?: boolean | null; + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8184,17 +8216,18 @@ declare class LoginRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class MetadataAssociationItem { - 'action_config': ActionConfig; +/** +* Additional context to guide the response. +*/ +declare class GetRelevantQuestionsRequestAiContext { /** - * Unique ID or name of the metadata. + * User specific text instructions sent to AI system for processing the query. */ - 'identifier': string; + 'instructions'?: Array | null; /** - * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. */ - 'type': string; + 'content'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8222,9 +8255,26 @@ declare class MetadataAssociationItem { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class MetadataInput { - 'identifier'?: string | null; - 'type'?: MetadataInputTypeEnum | null; +/** +* metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. +*/ +declare class GetRelevantQuestionsRequestMetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8240,7 +8290,6 @@ declare class MetadataInput { }[]; constructor(); } -type MetadataInputTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -8253,27 +8302,22 @@ type MetadataInputTypeEnum = "LIVEBOARD"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class MetadataListItemInput { - /** - * Unique ID or name of the metadata. - */ - 'identifier'?: string | null; - /** - * CustomObjectId of the metadata. - */ - 'obj_identifier'?: string | null; + +declare class GetRelevantQuestionsRequest { + 'metadata_context': GetRelevantQuestionsRequestMetadataContext; /** - * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + * Maximum number of relevant questions that is allowed in the response, default = 5. */ - 'name_pattern'?: string | null; + 'limit_relevant_questions'?: number; /** - * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + * If true, results are not returned from cache & calculated every time. */ - 'type'?: MetadataListItemInputTypeEnum | null; + 'bypass_cache'?: boolean | null; /** - * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. */ - 'subtypes'?: Array | null; + 'query': string; + 'ai_context'?: GetRelevantQuestionsRequestAiContext; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8289,8 +8333,6 @@ declare class MetadataListItemInput { }[]; constructor(); } -type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; -type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW"; /** * ThoughtSpot Public REST API @@ -8303,10 +8345,27 @@ type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "P * https://openapi-generator.tech * Do not edit the class manually. */ -declare class MetadataResponse { - 'name'?: string | null; - 'id': string; - 'type': MetadataResponseTypeEnum; +declare class GetTokenResponse { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8322,7 +8381,6 @@ declare class MetadataResponse { }[]; constructor(); } -type MetadataResponseTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -8335,50 +8393,43 @@ type MetadataResponseTypeEnum = "LIVEBOARD"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Metadata Search Response Object. -*/ -declare class MetadataSearchResponse { - /** - * Unique identifier of the metadata. - */ - 'metadata_id'?: string | null; +declare class GroupsImportListInput { /** - * Name of the metadata. + * Unique display name of the group. */ - 'metadata_name'?: string | null; + 'display_name': string; /** - * Type of the metadata. + * Unique ID or name of the group. */ - 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + 'group_identifier': string; /** - * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. */ - 'metadata_obj_id'?: string | null; + 'default_liveboard_identifiers'?: Array | null; /** - * Details of dependent objects of the metadata objects. + * Description of the group. */ - 'dependent_objects'?: any | null; + 'description'?: string | null; /** - * Details of incomplete information of the metadata objects if any. + * Privileges that will be assigned to the group. */ - 'incomplete_objects'?: Array | null; + 'privileges'?: Array | null; /** - * Complete details of the metadata objects. + * Unique ID or name of the sub-groups to add to the group. */ - 'metadata_detail'?: any | null; + 'sub_group_identifiers'?: Array | null; /** - * Header information of the metadata objects. + * Type of the group. */ - 'metadata_header'?: any | null; + 'type'?: GroupsImportListInputTypeEnum | null; /** - * Visualization header information of the metadata objects. + * Unique ID or name of the users to assign to the group. */ - 'visualization_headers'?: Array | null; + 'user_identifiers'?: Array | null; /** - * Stats of the metadata object. Includes views, favorites, last_accessed. + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. */ - 'stats'?: any | null; + 'visibility'?: GroupsImportListInputVisibilityEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8394,7 +8445,9 @@ declare class MetadataSearchResponse { }[]; constructor(); } -type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; +type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -8408,17 +8461,17 @@ type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_ * Do not edit the class manually. */ /** -* Sort options. +* Attribute to update in a header. */ -declare class MetadataSearchSortOptions { +declare class HeaderAttributeInput { /** - * Name of the field to apply the sort on. + * Attribute name to be updated. */ - 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + 'name': string; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Attribute\'s new value. */ - 'order'?: MetadataSearchSortOptionsOrderEnum | null; + 'value': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8434,8 +8487,6 @@ declare class MetadataSearchSortOptions { }[]; constructor(); } -type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; -type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -8448,19 +8499,27 @@ type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ModelTableList { + +/** +* Favorite object options. +*/ +declare class HeaderUpdateInput { /** - * Name of the Model. + * Unique ID of a specified type to identify the header. */ - 'model_name': string; + 'identifier'?: string | null; /** - * Model directory path, this is optional param and required if there are duplicate models with the same name. + * Custom object identifier to uniquely identify header. */ - 'model_path'?: string | null; + 'obj_identifier'?: string | null; /** - * List of Tables. + * Optional type of the header object. */ - 'tables': Array; + 'type'?: HeaderUpdateInputTypeEnum | null; + /** + * List of attributes to update + */ + 'attributes': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8476,6 +8535,7 @@ declare class ModelTableList { }[]; constructor(); } +type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -8488,57 +8548,31 @@ declare class ModelTableList { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* The object representation with ID and Name. -*/ -declare class ObjectIDAndName { +declare class ImportMetadataTMLAsyncRequest { /** - * The unique identifier of the object. + * Details of TML objects. */ - 'id'?: string | null; + 'metadata_tmls': Array; /** - * Name of the object. + * If selected, creates TML objects with new GUIDs. */ - 'name'?: string | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* The current Org context of the user. -*/ -declare class Org { + 'create_new'?: boolean | null; /** - * The ID of the object. + * If import is happening from all orgs context. */ - 'id': number; + 'all_orgs_override'?: boolean | null; /** - * Name of the object. + *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] */ - 'name': string; + 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8554,6 +8588,7 @@ declare class Org { }[]; constructor(); } +type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -8566,27 +8601,31 @@ declare class Org { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class OrgResponse { +declare class ImportMetadataTMLRequest { /** - * Unique identifier of the Org. + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** */ - 'id'?: number | null; + 'metadata_tmls': Array; /** - * Name of the Org. + * Specifies the import policy for the TML import. */ - 'name'?: string | null; + 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; /** - * Status of the Org. + * If selected, creates TML objects with new GUIDs. */ - 'status'?: OrgResponseStatusEnum | null; + 'create_new'?: boolean | null; /** - * Description of the Org. + * If import is happening from all orgs context. */ - 'description'?: string | null; + 'all_orgs_override'?: boolean | null; /** - * Visibility of the Org. + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. */ - 'visibility'?: OrgResponseVisibilityEnum | null; + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8602,8 +8641,7 @@ declare class OrgResponse { }[]; constructor(); } -type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; -type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; +type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; /** * ThoughtSpot Public REST API @@ -8616,27 +8654,64 @@ type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ParameterizeMetadataRequest { + +declare class ImportUser { /** - * Type of metadata object to parameterize. + * Unique ID or name of the user. */ - 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + 'user_identifier': string; /** - * Unique ID or name of the metadata object to parameterize. + * Display name of the user. */ - 'metadata_identifier': string; + 'display_name': string; /** - * Type of field in the metadata to parameterize. + * Password of the user. */ - 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + 'password'?: string | null; /** - * Name of the field which needs to be parameterized. + * Type of the user account. */ - 'field_name': string; + 'account_type'?: ImportUserAccountTypeEnum | null; /** - * Unique ID or name of the variable to use for parameterization + * Status of the user account. */ - 'variable_identifier': string; + 'account_status'?: ImportUserAccountStatusEnum | null; + /** + * Email address of the user. + */ + 'email'?: string | null; + /** + * ID or name of the Orgs to which the user belongs. + */ + 'org_identifiers'?: Array | null; + /** + * ID or name of the groups to which the user belongs. + */ + 'group_identifiers'?: Array | null; + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility'?: ImportUserVisibilityEnum | null; + /** + * Notify user when other users or groups share metadata objects + */ + 'notify_on_share'?: boolean | null; + /** + * Show or hide the new user onboarding walkthroughs + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Revisit the new user onboarding walkthroughs + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Unique ID or name of the default Liveboard assigned to the user. + */ + 'home_liveboard_identifier'?: string | null; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8652,8 +8727,9 @@ declare class ParameterizeMetadataRequest { }[]; constructor(); } -type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; -type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; +type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -8666,46 +8742,20 @@ type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPER * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class PdfOptions { - /** - * Indicates whether to include complete Liveboard. - */ - 'complete_liveboard'?: boolean | null; - /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page - */ - 'include_page_number'?: boolean | null; - /** - * Text to include in the footer of each page. - */ - 'page_footer_text'?: string | null; + +declare class ImportUserGroupsRequest { /** - * Page orientation of the PDF. + * Details of groups which are to be imported */ - 'page_orientation'?: string | null; + 'groups'?: Array; /** - * Page size. + * If set to true, removes groups that are not specified in the API request. */ - 'page_size'?: PdfOptionsPageSizeEnum | null; + 'delete_unspecified_groups'?: boolean | null; /** - * Indicates whether to include only first page of the tables. + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. */ - 'truncate_table'?: boolean | null; + 'dry_run'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8721,7 +8771,6 @@ declare class PdfOptions { }[]; constructor(); } -type PdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -8734,35 +8783,9 @@ type PdfOptionsPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PdfOptionsInput { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; - /** - * Indicates whether to include page number in the footer of each page. - */ - 'include_page_number'?: boolean | null; - /** - * Page orientation of the PDF. - */ - 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; - /** - * Indicates whether to include only the first page of the tables. - */ - 'truncate_table'?: boolean | null; - /** - * Text to include in the footer of each page. - */ - 'page_footer_text'?: string | null; +declare class UserGroup { + 'id'?: string | null; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8778,7 +8801,6 @@ declare class PdfOptionsInput { }[]; constructor(); } -type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -8792,15 +8814,19 @@ type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; * Do not edit the class manually. */ -/** -* Details of users or groups. -*/ -declare class PermissionInput { - 'principal': PrincipalsInput; +declare class ImportUserGroupsResponse { /** - * Object share mode. + * The groups which are added into the system. */ - 'share_mode': PermissionInputShareModeEnum; + 'groups_added': Array; + /** + * The groups which are deleted from the system. + */ + 'groups_deleted': Array; + /** + * The groups which are updated in the system. + */ + 'groups_updated': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8816,7 +8842,6 @@ declare class PermissionInput { }[]; constructor(); } -type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -8829,8 +8854,15 @@ type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PermissionOfMetadataResponse { - 'metadata_permission_details'?: any | null; +declare class ImportUserType { + /** + * Unique identifier of the user. + */ + 'id'?: string | null; + /** + * Name of the user. + */ + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8858,8 +8890,24 @@ declare class PermissionOfMetadataResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PermissionOfPrincipalsResponse { - 'principal_permission_details'?: any | null; + +declare class ImportUsersRequest { + /** + * List of users needs to be imported. + */ + 'users': Array; + /** + * The default password to assign to users if they do not have a password assigned in ThoughtSpot. + */ + 'default_password'?: string; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + /** + * If set to true, removes the users that are not specified in the API request. + */ + 'delete_unspecified_users'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8887,31 +8935,55 @@ declare class PermissionOfPrincipalsResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PngOptionsInput { - /** - * Indicates whether to include the cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include a page with all applied filters. - */ - 'include_filter_page'?: boolean | null; + +declare class ImportUsersResponse { + 'users_added'?: Array | null; + 'users_updated'?: Array | null; + 'users_deleted'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class InputEurekaNLSRequest { /** - * Indicates personalised view of the Liveboard in case of png + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. */ - 'personalised_view_id'?: string | null; + 'agentVersion'?: number | null; /** - * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. */ - 'image_resolution'?: number | null; + 'bypassCache'?: boolean | null; /** - * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + * User specific instructions for processing the @query. */ - 'image_scale'?: number | null; + 'instructions'?: Array | null; /** - * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. */ - 'include_header'?: boolean | null; + 'query'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8939,15 +9011,12 @@ declare class PngOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PrincipalsListItem { - /** - * Unique ID or name of the user or group. - */ - 'identifier': string; - /** - * Principal type. Valid values are - */ - 'type': string; +/** +* Metadata objects. +*/ +declare class JWTMetadataObject { + 'identifier'?: string | null; + 'type'?: JWTMetadataObjectTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8963,6 +9032,7 @@ declare class PrincipalsListItem { }[]; constructor(); } +type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -8975,15 +9045,22 @@ declare class PrincipalsListItem { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class PublishMetadataListItem { +/** +* List of runtime parameters need to set during the session. +*/ +declare class JWTParameter { /** - * Unique ID or name of the metadata. + * Runtime filter parameter type in JWT. */ - 'identifier': string; + 'runtime_filter'?: any | null; /** - * Type of metadata. Required if identifier is name. + * Runtime sort parameter type in JWT. */ - 'type'?: PublishMetadataListItemTypeEnum | null; + 'runtime_sort'?: any | null; + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8999,7 +9076,6 @@ declare class PublishMetadataListItem { }[]; constructor(); } -type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -9013,19 +9089,12 @@ type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; * Do not edit the class manually. */ -declare class PublishMetadataRequest { - /** - * Metadata objects to be published. - */ - 'metadata': Array; - /** - * Unique ID or name of orgs to which metadata objects should be published. - */ - 'org_identifiers': Array; - /** - * Skip validations of objects to be published. - */ - 'skip_validation'?: boolean | null; +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +declare class JWTUserOptions { + 'parameters'?: Array; + 'metadata'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9053,26 +9122,12 @@ declare class PublishMetadataRequest { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* NLSRequest object containing user query & instructions. +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* */ -declare class QueryGetDecomposedQueryRequestNlsRequest { - /** - * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. - */ - 'agentVersion'?: number | null; - /** - * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. - */ - 'bypassCache'?: boolean | null; - /** - * User specific instructions for processing the @query. - */ - 'instructions'?: Array | null; - /** - * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. - */ - 'query'?: string | null; +declare class JWTUserOptionsFull { + 'parameters'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9100,33 +9155,43 @@ declare class QueryGetDecomposedQueryRequestNlsRequest { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class QueryGetDecomposedQueryRequest { +declare class LiveboardContent { /** - * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + * Total available data row count. */ - 'answerIds'?: Array; + 'available_data_row_count': number; /** - * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + * Name of the columns. */ - 'content'?: Array; + 'column_names': Array; /** - * Unique identifier to denote current conversation. + * Rows of data set. */ - 'conversationId'?: string; + 'data_rows': Array; /** - * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + * The starting record number from where the records should be included. */ - 'liveboardIds'?: Array; + 'record_offset': number; /** - * Maximum number of decomposed queries that is allowed in the response, default = 5. + * The number of records that should be included. */ - 'maxDecomposedQueries'?: number; - 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + 'record_size': number; /** - * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + * Total returned data row count. */ - 'worksheetIds'?: Array; + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + /** + * Unique ID of the visualization. + */ + 'visualization_id'?: string | null; + /** + * Name of the visualization. + */ + 'visualization_name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9155,18 +9220,19 @@ declare class QueryGetDecomposedQueryRequest { * Do not edit the class manually. */ -/** -* Recipient configuration which includes email address, ID or name of the users and groups. -*/ -declare class RecipientDetails { +declare class LiveboardDataResponse { /** - * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + * The unique identifier of the object */ - 'emails'?: Array | null; + 'metadata_id': string; /** - * List of user or groups to subscribe for the scheduled job notifications. + * Name of the metadata object */ - 'principals'?: Array | null; + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9194,19 +9260,14 @@ declare class RecipientDetails { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Recipients of the scheduled job notification. +* Options to specify details of Liveboard. */ -declare class RecipientDetailsInput { - /** - * Emails of the recipients. - */ - 'emails'?: Array | null; +declare class LiveboardOptions { /** - * User or groups to be set as recipients of the schedule notifications. + * Unique ID or name of visualizations. */ - 'principals'?: Array | null; + 'visualization_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9234,23 +9295,14 @@ declare class RecipientDetailsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RegionalSettingsInput { - /** - * ISO code to be appended with currency values. - */ - 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; - /** - * Indicates the locale to be used for all formattings. - */ - 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; - /** - * Indicates the locale to be used for number formatting. - */ - 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; +/** +* Options to specify details of Liveboard. +*/ +declare class LiveboardOptionsInput { /** - * Indicates the locale to be used for date formatting. + * Unique ID or name of visualizations. */ - 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; + 'visualization_identifiers': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9266,10 +9318,6 @@ declare class RegionalSettingsInput { }[]; constructor(); } -type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; -type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; -type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -9282,33 +9330,15 @@ type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | " * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class RepoConfigObject { - /** - * Remote repository URL configured - */ - 'repository_url'?: string | null; - /** - * Username to authenticate connection to the version control system - */ - 'username'?: string | null; - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. - */ - 'commit_branch_name'?: string | null; - /** - * Branches that have been pulled in local repository - */ - 'branches'?: Array | null; +declare class LogResponse { /** - * Maintain mapping of guid for the deployment to an instance + * Date timestamp of the log entry */ - 'enable_guid_mapping'?: boolean | null; + 'date': string; /** - * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. + * Log data */ - 'configuration_branch_name'?: string | null; - 'org'?: Org; + 'log': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9336,15 +9366,23 @@ declare class RepoConfigObject { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ResetUserPasswordRequest { +declare class LoginRequest { /** - * New password for the user. + * Username of the ThoughtSpot user */ - 'new_password': string; + 'username'?: string; /** - * GUID or name of the user. + * Password of the user account */ - 'user_identifier': string; + 'password'?: string; + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + */ + 'org_identifier'?: string; + /** + * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + */ + 'remember_me'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9372,14 +9410,17 @@ declare class ResetUserPasswordRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* The object representation with activation link. -*/ -declare class ResponseActivationURL { + +declare class MetadataAssociationItem { + 'action_config': ActionConfig; /** - * Activation link to activate the user. + * Unique ID or name of the metadata. */ - 'activation_link'?: string | null; + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9407,11 +9448,23 @@ declare class ResponseActivationURL { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ResponseCopyObject { +declare class MetadataContext { /** - * The unique identifier of the object. + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. */ - 'metadata_id'?: string | null; + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9439,29 +9492,9 @@ declare class ResponseCopyObject { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Custom action details -*/ -declare class ResponseCustomAction { - 'action_details': ActionDetails; - 'default_action_config': DefaultActionConfig; - /** - * Unique Id of the custom action. - */ - 'id': string; - /** - * Metadata objects to assign the the custom action to. - */ - 'metadata_association'?: Array | null; - /** - * Unique name of the custom action. - */ - 'name': string; - /** - * Unique ID or name of the User groups which are associated with the custom action. - */ - 'user_groups'?: Array | null; +declare class MetadataInput { + 'identifier'?: string | null; + 'type'?: MetadataInputTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9477,6 +9510,7 @@ declare class ResponseCustomAction { }[]; constructor(); } +type MetadataInputTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -9489,19 +9523,27 @@ declare class ResponseCustomAction { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Unique ID of the failed worksheet. -*/ -declare class ResponseFailedEntity { - 'id': string; +declare class MetadataListItemInput { /** - * Name of the worksheet that failed to convert. + * Unique ID or name of the metadata. */ - 'name': string; + 'identifier'?: string | null; /** - * Error details related to the failed conversion. + * CustomObjectId of the metadata. */ - 'error': string; + 'obj_identifier'?: string | null; + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type'?: MetadataListItemInputTypeEnum | null; + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + */ + 'subtypes'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9517,6 +9559,8 @@ declare class ResponseFailedEntity { }[]; constructor(); } +type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; +type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW"; /** * ThoughtSpot Public REST API @@ -9529,12 +9573,10 @@ declare class ResponseFailedEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Wrapper for the failed entities, as they are inside a \'data\' field in the response. -*/ -declare class ResponseFailedEntities { - 'data': Array; +declare class MetadataResponse { + 'name'?: string | null; + 'id': string; + 'type': MetadataResponseTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9550,6 +9592,7 @@ declare class ResponseFailedEntities { }[]; constructor(); } +type MetadataResponseTypeEnum = "LIVEBOARD"; /** * ThoughtSpot Public REST API @@ -9563,18 +9606,49 @@ declare class ResponseFailedEntities { * Do not edit the class manually. */ /** -* Unique ID of the incomplete worksheet. +* Metadata Search Response Object. */ -declare class ResponseIncompleteEntity { - 'id': string; +declare class MetadataSearchResponse { /** - * Name of the incomplete worksheet. + * Unique identifier of the metadata. */ - 'name': string; + 'metadata_id'?: string | null; /** - * Error details related to the incomplete conversion. + * Name of the metadata. */ - 'error': string; + 'metadata_name'?: string | null; + /** + * Type of the metadata. + */ + 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + */ + 'metadata_obj_id'?: string | null; + /** + * Details of dependent objects of the metadata objects. + */ + 'dependent_objects'?: any | null; + /** + * Details of incomplete information of the metadata objects if any. + */ + 'incomplete_objects'?: Array | null; + /** + * Complete details of the metadata objects. + */ + 'metadata_detail'?: any | null; + /** + * Header information of the metadata objects. + */ + 'metadata_header'?: any | null; + /** + * Visualization header information of the metadata objects. + */ + 'visualization_headers'?: Array | null; + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + */ + 'stats'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9590,6 +9664,7 @@ declare class ResponseIncompleteEntity { }[]; constructor(); } +type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; /** * ThoughtSpot Public REST API @@ -9602,12 +9677,18 @@ declare class ResponseIncompleteEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +* Sort options. */ -declare class ResponseIncompleteEntities { - 'data': Array; +declare class MetadataSearchSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: MetadataSearchSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9623,6 +9704,8 @@ declare class ResponseIncompleteEntities { }[]; constructor(); } +type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -9635,31 +9718,19 @@ declare class ResponseIncompleteEntities { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ResponseMessage { - /** - * Unique identifier of the generated response. - */ - 'session_identifier'?: string | null; - /** - * Generate number of the response. - */ - 'generation_number'?: number | null; - /** - * Type of the generated response. - */ - 'message_type': ResponseMessageMessageTypeEnum; +declare class ModelTableList { /** - * Generated visualization type. + * Name of the Model. */ - 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; + 'model_name': string; /** - * Tokens for the response. + * Model directory path, this is optional param and required if there are duplicate models with the same name. */ - 'tokens'?: string | null; + 'model_path'?: string | null; /** - * User friendly tokens for the response. + * List of Tables. */ - 'display_tokens'?: string | null; + 'tables': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9675,8 +9746,6 @@ declare class ResponseMessage { }[]; constructor(); } -type ResponseMessageMessageTypeEnum = "TSAnswer"; -type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; /** * ThoughtSpot Public REST API @@ -9690,18 +9759,17 @@ type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; * Do not edit the class manually. */ /** -* Unique ID of the worksheet that failed post-upgrade. +* The object representation with ID and Name. */ -declare class ResponsePostUpgradeFailedEntity { - 'id': string; +declare class ObjectIDAndName { /** - * Name of the worksheet that failed post-upgrade. + * The unique identifier of the object. */ - 'name': string; + 'id'?: string | null; /** - * Error details related to the post-upgrade failure. + * Name of the object. */ - 'error': string; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9729,12 +9797,18 @@ declare class ResponsePostUpgradeFailedEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +* The current Org context of the user. */ -declare class ResponsePostUpgradeFailedEntities { - 'data': Array; +declare class Org { + /** + * The ID of the object. + */ + 'id': number; + /** + * Name of the object. + */ + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9762,30 +9836,15 @@ declare class ResponsePostUpgradeFailedEntities { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Schedule run response object -*/ -declare class ResponseScheduleRun { - /** - * GUID of the scheduled job. - */ - 'id': string; - /** - * Schedule run start time in milliseconds. - */ - 'start_time_in_millis': number; - /** - * Schedule run end time in milliseconds. - */ - 'end_time_in_millis': number; +declare class OrgPreferenceSearchCriteriaInput { /** - * Status of the schedule run. + * Unique identifier or name of the org */ - 'status': string; + 'org_identifier': string; /** - * Message details related to the schedule run. + * Event types to search for. If not provided, all event types for this org are returned. */ - 'detail'?: string | null; + 'event_types'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9801,6 +9860,7 @@ declare class ResponseScheduleRun { }[]; constructor(); } +type OrgPreferenceSearchCriteriaInputEventTypesEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -9813,50 +9873,27 @@ declare class ResponseScheduleRun { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class ResponseSchedule { - 'author': Author; +declare class OrgResponse { /** - * Schedule creation time in milliseconds. + * Unique identifier of the Org. */ - 'creation_time_in_millis': any; + 'id'?: number | null; /** - * Description of the job. + * Name of the Org. */ - 'description'?: string | null; - /** - * Export file format. - */ - 'file_format': string; - 'frequency': Frequency; - /** - * GUID of the scheduled job. - */ - 'id': string; - 'liveboard_options'?: LiveboardOptions; - 'metadata': MetadataResponse; - /** - * Name of the scheduled job. - */ - 'name': string; - 'pdf_options'?: PdfOptions; - 'recipient_details': RecipientDetails; - /** - * Status of the job - */ - 'status'?: string | null; + 'name'?: string | null; /** - * Time zone + * Status of the Org. */ - 'time_zone': string; + 'status'?: OrgResponseStatusEnum | null; /** - * Schedule runs history records. + * Description of the Org. */ - 'history_runs'?: Array | null; + 'description'?: string | null; /** - * Personalised view id of the liveboard to be scheduled. + * Visibility of the Org. */ - 'personalised_view_id'?: string | null; + 'visibility'?: OrgResponseVisibilityEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9872,6 +9909,8 @@ declare class ResponseSchedule { }[]; constructor(); } +type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; +type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; /** * ThoughtSpot Public REST API @@ -9884,15 +9923,27 @@ declare class ResponseSchedule { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Unique ID of the worksheet. -*/ -declare class ResponseSuccessfulEntity { - 'id': string; +declare class ParameterizeMetadataRequest { /** - * Name of the worksheet. + * Type of metadata object to parameterize. */ - 'name': string; + 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be parameterized. + */ + 'field_name': string; + /** + * Unique ID or name of the variable to use for parameterization + */ + 'variable_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9908,6 +9959,8 @@ declare class ResponseSuccessfulEntity { }[]; constructor(); } +type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; +type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; /** * ThoughtSpot Public REST API @@ -9920,12 +9973,46 @@ declare class ResponseSuccessfulEntity { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Wrapper for the successful entities, as they are inside a \'data\' field in the response. +* Options for PDF export. */ -declare class ResponseSuccessfulEntities { - 'data': Array; +declare class PdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: PdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9941,6 +10028,7 @@ declare class ResponseSuccessfulEntities { }[]; constructor(); } +type PdfOptionsPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -9953,36 +10041,35 @@ declare class ResponseSuccessfulEntities { * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Name of the conversion process, which involves converting worksheets to models. -*/ -declare class ResponseWorksheetToModelConversion { - 'name': string; +declare class PdfOptionsInput { /** - * The number of worksheets successfully converted to models. + * Indicates whether to include the cover page with the Liveboard title. */ - 'success_count': number; + 'include_cover_page'?: boolean | null; /** - * The number of worksheets that failed to convert. + * Indicates whether to include customized wide logo in the footer if available. */ - 'failure_count': number; + 'include_custom_logo'?: boolean | null; /** - * The number of worksheets that were incomplete during the conversion process. + * Indicates whether to include a page with all applied filters. */ - 'incomplete_count': number; + 'include_filter_page'?: boolean | null; /** - * The number of worksheets that failed after an upgrade during the conversion process. + * Indicates whether to include page number in the footer of each page. */ - 'post_upgrade_failed_count': number; + 'include_page_number'?: boolean | null; /** - * The total time taken to complete the conversion process in milliseconds. + * Page orientation of the PDF. */ - 'total_time_in_millis': number; - 'successful_entities': ResponseSuccessfulEntities; - 'failed_entities': ResponseFailedEntities; - 'incomplete_entities': ResponseIncompleteEntities; - 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; + 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9998,6 +10085,7 @@ declare class ResponseWorksheetToModelConversion { }[]; constructor(); } +type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; /** * ThoughtSpot Public REST API @@ -10011,19 +10099,15 @@ declare class ResponseWorksheetToModelConversion { * Do not edit the class manually. */ -declare class RevertCommitRequest { - /** - * Metadata objects. - */ - 'metadata'?: Array; - /** - * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. - */ - 'branch_name'?: string; +/** +* Details of users or groups. +*/ +declare class PermissionInput { + 'principal': PrincipalsInput; /** - * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + * Object share mode. */ - 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; + 'share_mode': PermissionInputShareModeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10039,7 +10123,7 @@ declare class RevertCommitRequest { }[]; constructor(); } -type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; +type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -10052,27 +10136,8 @@ type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RevertedMetadata { - /** - * Name of the file deployed - */ - 'file_name': string; - /** - * Name of the metadata object - */ - 'metadata_name': string; - /** - * Type of the metadata object - */ - 'metadata_type': string; - /** - * Indicates the status of deployment for the file - */ - 'status_code': string; - /** - * Any error or warning with the deployment - */ - 'status_message': string; +declare class PermissionOfMetadataResponse { + 'metadata_permission_details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10100,34 +10165,8 @@ declare class RevertedMetadata { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class RevertResponse { - 'committer'?: CommiterType; - 'author'?: AuthorType; - /** - * Comments associated with the commit - */ - 'comment'?: string | null; - /** - * Time at which the changes were committed. - */ - 'commit_time'?: string | null; - /** - * SHA id associated with the commit - */ - 'commit_id'?: string | null; - /** - * Branch where changes were committed - */ - 'branch'?: string | null; - /** - * Files that were pushed as part of this commit - */ - 'committed_files'?: Array | null; - /** - * Metadata of reverted file of this commit - */ - 'reverted_metadata'?: Array | null; +declare class PermissionOfPrincipalsResponse { + 'principal_permission_details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10155,9 +10194,31 @@ declare class RevertResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RevokeTokenRequest { - 'user_identifier'?: string; - 'token'?: string; +declare class PngOptionsInput { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10185,13 +10246,19 @@ declare class RevokeTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RiseGQLArgWrapper { - 'name': string; - 'type': string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; +declare class PrincipalsListItem { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. Valid values are + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; type: string; format: string; }>; @@ -10215,9 +10282,15 @@ declare class RiseGQLArgWrapper { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class RiseSetter { - 'field': string; - 'path': string; +declare class PublishMetadataListItem { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if identifier is name. + */ + 'type'?: PublishMetadataListItemTypeEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10233,6 +10306,7 @@ declare class RiseSetter { }[]; constructor(); } +type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; /** * ThoughtSpot Public REST API @@ -10245,15 +10319,20 @@ declare class RiseSetter { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Role { + +declare class PublishMetadataRequest { /** - * id of the role + * Metadata objects to be published. */ - 'id'?: string | null; + 'metadata': Array; /** - * name of the role + * Unique ID or name of orgs to which metadata objects should be published. */ - 'name'?: string | null; + 'org_identifiers': Array; + /** + * Skip validations of objects to be published. + */ + 'skip_validation'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10281,76 +10360,26 @@ declare class Role { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class RoleResponse { - /** - * Unique Id of the role. - */ - 'id': string; - /** - * Name of the role - */ - 'name': string; - /** - * Description of the role - */ - 'description': string; - /** - * number of groups assigned with this role - */ - 'groups_assigned_count'?: number | null; - /** - * Orgs in which role exists. - */ - 'orgs'?: Array | null; - /** - * Details of groups assigned with this role - */ - 'groups'?: Array | null; - /** - * Privileges granted to the role. - */ - 'privileges': Array; - /** - * Permission details of the Role - */ - 'permission'?: RoleResponsePermissionEnum | null; - /** - * Unique identifier of author of the role. - */ - 'author_id'?: string | null; - /** - * Unique identifier of modifier of the role. - */ - 'modifier_id'?: string | null; - /** - * Creation time of the role in milliseconds. - */ - 'creation_time_in_millis'?: any | null; - /** - * Last modified time of the role in milliseconds. - */ - 'modification_time_in_millis'?: any | null; - /** - * Indicates whether the role is deleted. - */ - 'deleted'?: boolean | null; +/** +* NLSRequest object containing user query & instructions. +*/ +declare class QueryGetDecomposedQueryRequestNlsRequest { /** - * Indicates whether the role is deprecated. + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. */ - 'deprecated'?: boolean | null; + 'agentVersion'?: number | null; /** - * Indicates whether the role is external. + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. */ - 'external'?: boolean | null; + 'bypassCache'?: boolean | null; /** - * Indicates whether the role is hidden. + * User specific instructions for processing the @query. */ - 'hidden'?: boolean | null; + 'instructions'?: Array | null; /** - * Indicates whether the role is shared via connection + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. */ - 'shared_via_connection'?: boolean | null; + 'query'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10366,8 +10395,6 @@ declare class RoleResponse { }[]; constructor(); } -type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE"; -type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -10380,14 +10407,33 @@ type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* List of runtime parameters need to set during the session. -*/ -declare class RuntimeFilter { + +declare class QueryGetDecomposedQueryRequest { /** - * Runtime filter parameter type in JWT. + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. */ - 'runtime_filter'?: any; + 'answerIds'?: Array; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array; + /** + * Unique identifier to denote current conversation. + */ + 'conversationId'?: string; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboardIds'?: Array; + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + */ + 'maxDecomposedQueries'?: number; + 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + */ + 'worksheetIds'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10415,14 +10461,19 @@ declare class RuntimeFilter { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* List of runtime parameters need to set during the session. +* Recipient configuration which includes email address, ID or name of the users and groups. */ -declare class RuntimeParamOverride { +declare class RecipientDetails { /** - * Runtime param override type in JWT. + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. */ - 'runtime_param_override'?: any; + 'emails'?: Array | null; + /** + * List of user or groups to subscribe for the scheduled job notifications. + */ + 'principals'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10450,14 +10501,19 @@ declare class RuntimeParamOverride { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* List of runtime parameters need to set during the session. +* Recipients of the scheduled job notification. */ -declare class RuntimeSort { +declare class RecipientDetailsInput { /** - * Runtime sort parameter type in JWT. + * Emails of the recipients. */ - 'runtime_sort'?: any; + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10485,19 +10541,23 @@ declare class RuntimeSort { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ScheduleHistoryRunsOptionsInput { +declare class RegionalSettingsInput { /** - * Indicates whether to fetch history runs for the scheduled notification. + * ISO code to be appended with currency values. */ - 'include_history_runs'?: boolean | null; + 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. + * Indicates the locale to be used for all formattings. */ - 'record_size'?: number | null; + 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; /** - * Indicates the starting record number from where history runs records should be fetched. + * Indicates the locale to be used for number formatting. */ - 'record_offset'?: number | null; + 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10513,6 +10573,10 @@ declare class ScheduleHistoryRunsOptionsInput { }[]; constructor(); } +type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -10525,46 +10589,33 @@ declare class ScheduleHistoryRunsOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class SchedulesPdfOptionsInput { - /** - * Indicates whether to include complete Liveboard. - */ - 'complete_liveboard'?: boolean | null; - /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; + +declare class RepoConfigObject { /** - * Indicates whether to include a page with all applied filters. + * Remote repository URL configured */ - 'include_filter_page'?: boolean | null; + 'repository_url'?: string | null; /** - * Indicates whether to include page number in the footer of each page + * Username to authenticate connection to the version control system */ - 'include_page_number'?: boolean | null; + 'username'?: string | null; /** - * Text to include in the footer of each page. + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. */ - 'page_footer_text'?: string | null; + 'commit_branch_name'?: string | null; /** - * Page orientation of the PDF. + * Branches that have been pulled in local repository */ - 'page_orientation'?: string | null; + 'branches'?: Array | null; /** - * Page size. + * Maintain mapping of guid for the deployment to an instance */ - 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + 'enable_guid_mapping'?: boolean | null; /** - * Indicates whether to include only first page of the tables. + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. */ - 'truncate_table'?: boolean | null; + 'configuration_branch_name'?: string | null; + 'org'?: Org; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10580,7 +10631,6 @@ declare class SchedulesPdfOptionsInput { }[]; constructor(); } -type SchedulesPdfOptionsInputPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -10593,19 +10643,15 @@ type SchedulesPdfOptionsInputPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Scope { - /** - * Object access scope type. - */ - 'access_type': string; +declare class ResetUserPasswordRequest { /** - * Unique identifier of the metadata. + * New password for the user. */ - 'org_id'?: number | null; + 'new_password': string; /** - * Unique identifier of the Org. + * GUID or name of the user. */ - 'metadata_id'?: string | null; + 'user_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10634,17 +10680,45 @@ declare class Scope { * Do not edit the class manually. */ /** -* Sort options. +* The object representation with activation link. */ -declare class SearchCalendarsRequestSortOptions { +declare class ResponseActivationURL { /** - * Name of the field to apply the sort on. + * Activation link to activate the user. */ - 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + 'activation_link'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResponseCopyObject { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * The unique identifier of the object. */ - 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + 'metadata_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10660,8 +10734,6 @@ declare class SearchCalendarsRequestSortOptions { }[]; constructor(); } -type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -10675,24 +10747,28 @@ type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchCalendarsRequest { +/** +* Custom action details +*/ +declare class ResponseCustomAction { + 'action_details': ActionDetails; + 'default_action_config': DefaultActionConfig; /** - * Unique ID or name of the connection. + * Unique Id of the custom action. */ - 'connection_identifier'?: string; + 'id': string; /** - * Pattern to match for calendar names (use \'%\' for wildcard match). + * Metadata objects to assign the the custom action to. */ - 'name_pattern'?: string; + 'metadata_association'?: Array | null; /** - * The starting record number from where the records should be included. + * Unique name of the custom action. */ - 'record_offset'?: number; + 'name': string; /** - * The number of records that should be included. + * Unique ID or name of the User groups which are associated with the custom action. */ - 'record_size'?: number; - 'sort_options'?: SearchCalendarsRequestSortOptions; + 'user_groups'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10720,27 +10796,19 @@ declare class SearchCalendarsRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchCommitsRequest { - /** - * Unique ID or name of the metadata. - */ - 'metadata_identifier': string; - /** - * Type of metadata. - */ - 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; - /** - * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. - */ - 'branch_name'?: string; +/** +* Unique ID of the failed worksheet. +*/ +declare class ResponseFailedEntity { + 'id': string; /** - * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + * Name of the worksheet that failed to convert. */ - 'record_offset'?: number; + 'name': string; /** - * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + * Error details related to the failed conversion. */ - 'record_size'?: number; + 'error': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10756,7 +10824,6 @@ declare class SearchCommitsRequest { }[]; constructor(); } -type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; /** * ThoughtSpot Public REST API @@ -10769,11 +10836,12 @@ type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchConfigRequest { - /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later - */ - 'org_identifiers'?: Array; + +/** +* Wrapper for the failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseFailedEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10802,17 +10870,18 @@ declare class SearchConfigRequest { * Do not edit the class manually. */ /** -* Sort options. +* Unique ID of the incomplete worksheet. */ -declare class SearchConnectionRequestSortOptions { +declare class ResponseIncompleteEntity { + 'id': string; /** - * Name of the field to apply the sort on. + * Name of the incomplete worksheet. */ - 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; + 'name': string; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Error details related to the incomplete conversion. */ - 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; + 'error': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10828,8 +10897,6 @@ declare class SearchConnectionRequestSortOptions { }[]; constructor(); } -type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; -type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -10843,48 +10910,11 @@ type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchConnectionRequest { - /** - * List of connections and name pattern - */ - 'connections'?: Array; - /** - * Array of types of data warehouse defined for the connection. - */ - 'data_warehouse_types'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records that should be included. - */ - 'record_size'?: number; - /** - * Unique ID or name of tags. - */ - 'tag_identifiers'?: Array; - /** - * Data warehouse object type. - */ - 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; - 'sort_options'?: SearchConnectionRequestSortOptions; - /** - * Indicates whether to include complete details of the connection objects. - */ - 'include_details'?: boolean | null; - /** - * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. - */ - 'configuration'?: any; - /** - * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. - */ - 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; - /** - *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. - */ - 'show_resolved_parameters'?: boolean | null; +/** +* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseIncompleteEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10900,9 +10930,6 @@ declare class SearchConnectionRequest { }[]; constructor(); } -type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; -type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN"; -type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ"; /** * ThoughtSpot Public REST API @@ -10915,29 +10942,31 @@ type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchConnectionResponse { +declare class ResponseMessage { /** - * Unique ID of the connection. + * Unique identifier of the generated response. */ - 'id': string; + 'session_identifier'?: string | null; /** - * Name of the connection. + * Generate number of the response. */ - 'name': string; + 'generation_number'?: number | null; /** - * Description of the connection. + * Type of the generated response. */ - 'description'?: string | null; + 'message_type': ResponseMessageMessageTypeEnum; /** - * Type of data warehouse. + * Generated visualization type. */ - 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; - 'data_warehouse_objects'?: DataWarehouseObjects; + 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; /** - * Details of the connection. + * Tokens for the response. */ - 'details'?: any | null; + 'tokens'?: string | null; + /** + * User friendly tokens for the response. + */ + 'display_tokens'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10953,7 +10982,8 @@ declare class SearchConnectionResponse { }[]; constructor(); } -type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; +type ResponseMessageMessageTypeEnum = "TSAnswer"; +type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; /** * ThoughtSpot Public REST API @@ -10967,13 +10997,18 @@ type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSH * Do not edit the class manually. */ /** -* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +* Unique ID of the worksheet that failed post-upgrade. */ -declare class SearchCustomActionsRequestDefaultActionConfig { +declare class ResponsePostUpgradeFailedEntity { + 'id': string; /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Name of the worksheet that failed post-upgrade. */ - 'visibility'?: boolean | null; + 'name': string; + /** + * Error details related to the post-upgrade failure. + */ + 'error': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11002,32 +11037,11 @@ declare class SearchCustomActionsRequestDefaultActionConfig { * Do not edit the class manually. */ -declare class SearchCustomActionsRequest { - /** - * Name or ID of the custom action. - */ - 'custom_action_identifier'?: string; - /** - * A pattern to match case-insensitive name of the custom-action object. - */ - 'name_pattern'?: string; - 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; - /** - * When set to true, returns the associated groups for a custom action. - */ - 'include_group_associations'?: boolean | null; - /** - * When set to true, returns the associated metadata for a custom action. - */ - 'include_metadata_associations'?: boolean | null; - /** - * Search with a given metadata identifier. - */ - 'metadata'?: Array; - /** - * Filter the action objects based on type - */ - 'type'?: SearchCustomActionsRequestTypeEnum; +/** +* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponsePostUpgradeFailedEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11043,7 +11057,6 @@ declare class SearchCustomActionsRequest { }[]; constructor(); } -type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; /** * ThoughtSpot Public REST API @@ -11056,39 +11069,30 @@ type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchDataRequest { +/** +* Schedule run response object +*/ +declare class ResponseScheduleRun { /** - * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + * GUID of the scheduled job. */ - 'query_string': string; + 'id': string; /** - * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. + * Schedule run start time in milliseconds. */ - 'logical_table_identifier': string; + 'start_time_in_millis': number; /** - * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * Schedule run end time in milliseconds. */ - 'data_format'?: SearchDataRequestDataFormatEnum; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records to include in a batch. - */ - 'record_size'?: number; - /** - * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). - */ - 'runtime_filter'?: any; + 'end_time_in_millis': number; /** - * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * Status of the schedule run. */ - 'runtime_sort'?: any; + 'status': string; /** - * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * Message details related to the schedule run. */ - 'runtime_param_override'?: any; + 'detail'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11104,7 +11108,6 @@ declare class SearchDataRequest { }[]; constructor(); } -type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -11118,14 +11121,49 @@ type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; * Do not edit the class manually. */ -/** -* Response format associated with the search data API. -*/ -declare class SearchDataResponse { +declare class ResponseSchedule { + 'author': Author; /** - * Data content of metadata objects + * Schedule creation time in milliseconds. */ - 'contents': Array; + 'creation_time_in_millis': any; + /** + * Description of the job. + */ + 'description'?: string | null; + /** + * Export file format. + */ + 'file_format': string; + 'frequency': Frequency; + /** + * GUID of the scheduled job. + */ + 'id': string; + 'liveboard_options'?: LiveboardOptions; + 'metadata': MetadataResponse; + /** + * Name of the scheduled job. + */ + 'name': string; + 'pdf_options'?: PdfOptions; + 'recipient_details': RecipientDetails; + /** + * Status of the job + */ + 'status'?: string | null; + /** + * Time zone + */ + 'time_zone': string; + /** + * Schedule runs history records. + */ + 'history_runs'?: Array | null; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11153,11 +11191,15 @@ declare class SearchDataResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchEmailCustomizationRequest { +/** +* Unique ID of the worksheet. +*/ +declare class ResponseSuccessfulEntity { + 'id': string; /** - * Unique ID or name of org Version: 10.12.0.cl or later + * Name of the worksheet. */ - 'org_identifiers'?: Array; + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11185,18 +11227,12 @@ declare class SearchEmailCustomizationRequest { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +* Wrapper for the successful entities, as they are inside a \'data\' field in the response. */ -declare class SearchMetadataRequestFavoriteObjectOptions { - /** - * Includes objects marked as favorite for the specified users. - */ - 'include'?: boolean | null; - /** - * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. - */ - 'user_identifiers'?: Array | null; +declare class ResponseSuccessfulEntities { + 'data': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11224,18 +11260,36 @@ declare class SearchMetadataRequestFavoriteObjectOptions { * https://openapi-generator.tech * Do not edit the class manually. */ + /** -* Sort options to filter metadata details. +* Name of the conversion process, which involves converting worksheets to models. */ -declare class SearchMetadataRequestSortOptions { +declare class ResponseWorksheetToModelConversion { + 'name': string; /** - * Name of the field to apply the sort on. + * The number of worksheets successfully converted to models. */ - 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + 'success_count': number; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * The number of worksheets that failed to convert. */ - 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; + 'failure_count': number; + /** + * The number of worksheets that were incomplete during the conversion process. + */ + 'incomplete_count': number; + /** + * The number of worksheets that failed after an upgrade during the conversion process. + */ + 'post_upgrade_failed_count': number; + /** + * The total time taken to complete the conversion process in milliseconds. + */ + 'total_time_in_millis': number; + 'successful_entities': ResponseSuccessfulEntities; + 'failed_entities': ResponseFailedEntities; + 'incomplete_entities': ResponseIncompleteEntities; + 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11251,8 +11305,6 @@ declare class SearchMetadataRequestSortOptions { }[]; constructor(); } -type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; -type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -11266,101 +11318,19 @@ type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchMetadataRequest { - /** - * Metadata objects such as Liveboards, Answers, and Worksheets. - */ - 'metadata'?: Array; - /** - * Object permission details to search by. - */ - 'permissions'?: Array; - /** - * GUID or name of user who created the metadata object. - */ - 'created_by_user_identifiers'?: Array; - /** - * Version of the dependent table of the metadata objects like Worksheets. - */ - 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; - /** - * List of metadata objects to exclude from search. - */ - 'exclude_objects'?: Array; - 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; - /** - * Includes system-generated metadata objects. - */ - 'include_auto_created_objects'?: boolean | null; - /** - * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. - */ - 'include_dependent_objects'?: boolean | null; - /** - * The maximum number of dependents to include per metadata object. - */ - 'dependent_objects_record_size'?: number; - /** - * Includes complete details of the metadata objects. - */ - 'include_details'?: boolean | null; - /** - * Includes headers of the metadata objects. - */ - 'include_headers'?: boolean | null; - /** - * Includes details of the hidden objects, such as a column in a worksheet or a table. - */ - 'include_hidden_objects'?: boolean | null; - /** - * Includes objects with incomplete metadata. - */ - 'include_incomplete_objects'?: boolean | null; - /** - * Includes visualization headers of the specified Liveboard object. - */ - 'include_visualization_headers'?: boolean | null; - /** - * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. - */ - 'include_worksheet_search_assist_data'?: boolean | null; - /** - * Includes ID or names of the users who modified the metadata object. - */ - 'modified_by_user_identifiers'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. - */ - 'record_size'?: number; - 'sort_options'?: SearchMetadataRequestSortOptions; - /** - * Tags to filter metadata objects by - */ - 'tag_identifiers'?: Array; - /** - * Indicates whether to include stats of the metadata objects. - */ - 'include_stats'?: boolean | null; - /** - *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. - */ - 'include_discoverable_objects'?: boolean | null; +declare class RevertCommitRequest { /** - *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + * Metadata objects. */ - 'show_resolved_parameters'?: boolean | null; + 'metadata'?: Array; /** - * Indicates the model version of Liveboard to be attached in metadata detail. + * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. */ - 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; + 'branch_name'?: string; /** - *
Version: 10.11.0.cl or later
If only published objects should be returned + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] */ - 'include_only_published_objects'?: boolean | null; + 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11376,8 +11346,7 @@ declare class SearchMetadataRequest { }[]; constructor(); } -type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2"; -type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; +type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; /** * ThoughtSpot Public REST API @@ -11390,27 +11359,27 @@ type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchOrgsRequest { +declare class RevertedMetadata { /** - * ID or name of the Org + * Name of the file deployed */ - 'org_identifier'?: string; + 'file_name': string; /** - * Description of the Org + * Name of the metadata object */ - 'description'?: string; + 'metadata_name': string; /** - * Visibility of the Org + * Type of the metadata object */ - 'visibility'?: SearchOrgsRequestVisibilityEnum; + 'metadata_type': string; /** - * Status of the Org + * Indicates the status of deployment for the file */ - 'status'?: SearchOrgsRequestStatusEnum; + 'status_code': string; /** - * GUIDs or names of the users for which you want to retrieve the Orgs data + * Any error or warning with the deployment */ - 'user_identifiers'?: Array; + 'status_message': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11426,8 +11395,6 @@ declare class SearchOrgsRequest { }[]; constructor(); } -type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN"; -type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; /** * ThoughtSpot Public REST API @@ -11441,78 +11408,33 @@ type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; * Do not edit the class manually. */ -/** -* Response for search role api should handle hidden privileges as well. -*/ -declare class SearchRoleResponse { +declare class RevertResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; /** - * Unique Id of the role. - */ - 'id': string; - /** - * Name of the role - */ - 'name': string; - /** - * Description of the role - */ - 'description': string; - /** - * number of groups assigned with this role - */ - 'groups_assigned_count'?: number | null; - /** - * Orgs in which role exists. - */ - 'orgs'?: Array | null; - /** - * Details of groups assigned with this role - */ - 'groups'?: Array | null; - /** - * Privileges granted to the role. - */ - 'privileges': Array; - /** - * Permission details of the Role - */ - 'permission'?: SearchRoleResponsePermissionEnum | null; - /** - * Unique identifier of author of the role. - */ - 'author_id'?: string | null; - /** - * Unique identifier of modifier of the role. - */ - 'modifier_id'?: string | null; - /** - * Creation time of the role in milliseconds. - */ - 'creation_time_in_millis'?: any | null; - /** - * Last modified time of the role in milliseconds. + * Comments associated with the commit */ - 'modification_time_in_millis'?: any | null; + 'comment'?: string | null; /** - * Indicates whether the role is deleted. + * Time at which the changes were committed. */ - 'deleted'?: boolean | null; + 'commit_time'?: string | null; /** - * Indicates whether the role is deprecated. + * SHA id associated with the commit */ - 'deprecated'?: boolean | null; + 'commit_id'?: string | null; /** - * Indicates whether the role is external. + * Branch where changes were committed */ - 'external'?: boolean | null; + 'branch'?: string | null; /** - * Indicates whether the role is hidden. + * Files that were pushed as part of this commit */ - 'hidden'?: boolean | null; + 'committed_files'?: Array | null; /** - * Indicates whether the role is shared via connection + * Metadata of reverted file of this commit */ - 'shared_via_connection'?: boolean | null; + 'reverted_metadata'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11528,8 +11450,6 @@ declare class SearchRoleResponse { }[]; constructor(); } -type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -11542,39 +11462,9 @@ type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchRolesRequest { - /** - * unique ID or name of the Roles - */ - 'role_identifiers'?: Array; - /** - * Unique Id or name of the Organisation - */ - 'org_identifiers'?: Array; - /** - * Unique Id or name of the User Group - */ - 'group_identifiers'?: Array; - /** - * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. - */ - 'privileges'?: Array; - /** - * Indicates whether the Role is deprecated. - */ - 'deprecated'?: boolean | null; - /** - * Indicates whether the Role is external - */ - 'external'?: boolean | null; - /** - * Indicates whether the Role is shared via connection - */ - 'shared_via_connection'?: boolean | null; - /** - * Permission details of the Role - */ - 'permissions'?: Array; +declare class RevokeTokenRequest { + 'user_identifier'?: string; + 'token'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11590,8 +11480,6 @@ declare class SearchRolesRequest { }[]; constructor(); } -type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -11604,22 +11492,9 @@ type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options while fetching history runs for the schedule. -*/ -declare class SearchSchedulesRequestHistoryRunsOptions { - /** - * Indicates whether to fetch history runs for the scheduled notification. - */ - 'include_history_runs'?: boolean | null; - /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. - */ - 'record_size'?: number | null; - /** - * Indicates the starting record number from where history runs records should be fetched. - */ - 'record_offset'?: number | null; +declare class RiseGQLArgWrapper { + 'name': string; + 'type': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11647,18 +11522,9 @@ declare class SearchSchedulesRequestHistoryRunsOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Sort options. -*/ -declare class SearchSchedulesRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: string | null; - /** - * Sort order : ASC(Ascending) or DESC(Descending). - */ - 'order'?: string | null; +declare class RiseSetter { + 'field': string; + 'path': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11686,26 +11552,15 @@ declare class SearchSchedulesRequestSortOptions { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchSchedulesRequest { - /** - * Metadata objects associated with the scheduled jobs. - */ - 'metadata'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; +declare class Role { /** - * The number of records that should be included. + * id of the role */ - 'record_size'?: number; - 'sort_options'?: SearchSchedulesRequestSortOptions; - 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; + 'id'?: string | null; /** - * unique ID or name of the Schedule + * name of the role */ - 'schedule_identifiers'?: Array; + 'name'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11733,19 +11588,76 @@ declare class SearchSchedulesRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SearchTagsRequest { + +declare class RoleResponse { /** - * Name or Id of the tag. + * Unique Id of the role. */ - 'tag_identifier'?: string; + 'id': string; /** - * A pattern to match case-insensitive name of the Tag object. + * Name of the role */ - 'name_pattern'?: string; + 'name': string; /** - * Color of the tag. + * Description of the role */ - 'color'?: string; + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: RoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11761,6 +11673,8 @@ declare class SearchTagsRequest { }[]; constructor(); } +type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -11774,17 +11688,13 @@ declare class SearchTagsRequest { * Do not edit the class manually. */ /** -* Sort options to filter group details. +* List of runtime parameters need to set during the session. */ -declare class SearchUserGroupsRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; +declare class RuntimeFilter { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Runtime filter parameter type in JWT. */ - 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; + 'runtime_filter'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11800,8 +11710,6 @@ declare class SearchUserGroupsRequestSortOptions { }[]; constructor(); } -type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -11814,73 +11722,14 @@ type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchUserGroupsRequest { +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeParamOverride { /** - * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + * Runtime param override type in JWT. */ - 'default_liveboard_identifiers'?: Array; - /** - * Description of the group - */ - 'description'?: string; - /** - * Display name of the group - */ - 'display_name'?: string; - /** - * A pattern to match case-insensitive name of the Group object. - */ - 'name_pattern'?: string; - /** - * GUID or name of the group - */ - 'group_identifier'?: string; - /** - * ID or name of the Org to which the group belongs - */ - 'org_identifiers'?: Array; - /** - * Privileges assigned to the group. - */ - 'privileges'?: Array; - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - */ - 'sub_group_identifiers'?: Array; - /** - * Group type. - */ - 'type'?: SearchUserGroupsRequestTypeEnum; - /** - * GUID or name of the users assigned to the group. - */ - 'user_identifiers'?: Array; - /** - * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. - */ - 'visibility'?: SearchUserGroupsRequestVisibilityEnum; - /** - * Filter groups with a list of Roles assigned to a group - */ - 'role_identifiers'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; - /** - * The number of records that should be included. - */ - 'record_size'?: number; - 'sort_options'?: SearchUserGroupsRequestSortOptions; - /** - *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. - */ - 'include_users'?: boolean | null; - /** - *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. - */ - 'include_sub_groups'?: boolean | null; + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11896,9 +11745,6 @@ declare class SearchUserGroupsRequest { }[]; constructor(); } -type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -11912,17 +11758,13 @@ type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * Do not edit the class manually. */ /** -* Sort options. +* List of runtime parameters need to set during the session. */ -declare class SearchUsersRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; +declare class RuntimeSort { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Runtime sort parameter type in JWT. */ - 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; + 'runtime_sort'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11938,8 +11780,6 @@ declare class SearchUsersRequestSortOptions { }[]; constructor(); } -type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -11952,85 +11792,19 @@ type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchUsersRequest { - /** - * GUID / name of the user to search - */ - 'user_identifier'?: string; - /** - * A unique display name string for the user account, usually their first and last name - */ - 'display_name'?: string; - /** - * A pattern to match case-insensitive name of the User object. - */ - 'name_pattern'?: string; - /** - * Visibility of the user - */ - 'visibility'?: SearchUsersRequestVisibilityEnum; - /** - * Email of the user account - */ - 'email'?: string; - /** - * GUID or name of the group to which the user belongs - */ - 'group_identifiers'?: Array; - /** - * Privileges assigned to the user - */ - 'privileges'?: Array; - /** - * Type of the account - */ - 'account_type'?: SearchUsersRequestAccountTypeEnum; - /** - * Current status of the user account. - */ - 'account_status'?: SearchUsersRequestAccountStatusEnum; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. - */ - 'notify_on_share'?: boolean | null; - /** - * The user preference for revisiting the onboarding experience - */ - 'show_onboarding_experience'?: boolean | null; - /** - * Indicates if the user has completed the onboarding walkthrough - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * IDs or names of the Orgs to which the user belongs - */ - 'org_identifiers'?: Array; - /** - * Unique ID or name of the user\'s home Liveboard. - */ - 'home_liveboard_identifier'?: string; - /** - * Metadata objects which are assigned as favorites of the user. - */ - 'favorite_metadata'?: Array; - /** - * The starting record number from where the records should be included. - */ - 'record_offset'?: number; +declare class ScheduleHistoryRunsOptionsInput { /** - * The number of records that should be included. + * Indicates whether to fetch history runs for the scheduled notification. */ - 'record_size'?: number; - 'sort_options'?: SearchUsersRequestSortOptions; + 'include_history_runs'?: boolean | null; /** - * Filters by the role assigned to the user. + * Indicates the max number of records that can be fetched as past runs of any scheduled job. */ - 'role_identifiers'?: Array; + 'record_size'?: number | null; /** - * Indicates if the user\'s favorite objects should be displayed. + * Indicates the starting record number from where history runs records should be fetched. */ - 'include_favorite_metadata'?: boolean | null; + 'record_offset'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12046,10 +11820,6 @@ declare class SearchUsersRequest { }[]; constructor(); } -type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; /** * ThoughtSpot Public REST API @@ -12063,21 +11833,45 @@ type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | " * Do not edit the class manually. */ /** -* Input for variable details in search +* Options for PDF export. */ -declare class VariableDetailInput { +declare class SchedulesPdfOptionsInput { /** - * Unique ID or name of the variable + * Indicates whether to include complete Liveboard. */ - 'identifier'?: string | null; + 'complete_liveboard'?: boolean | null; /** - * Type of variable + * Indicates whether to include cover page with the Liveboard title. */ - 'type'?: VariableDetailInputTypeEnum | null; + 'include_cover_page'?: boolean | null; /** - * A pattern to match case-insensitive name of the variable. User % for a wildcard match + * Indicates whether to include customized wide logo in the footer if available. */ - 'name_pattern'?: string | null; + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12093,7 +11887,7 @@ declare class VariableDetailInput { }[]; constructor(); } -type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type SchedulesPdfOptionsInputPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -12106,24 +11900,19 @@ type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CO * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SearchVariablesRequest { - /** - * Variable details - */ - 'variable_details'?: Array; +declare class Scope { /** - * The starting record number from where the records should be included + * Object access scope type. */ - 'record_offset'?: number; + 'access_type': string; /** - * The number of records that should be included + * Unique identifier of the metadata. */ - 'record_size'?: number; + 'org_id'?: number | null; /** - * Format in which we want the output + * Unique identifier of the Org. */ - 'output_format'?: SearchVariablesRequestOutputFormatEnum; + 'metadata_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12139,7 +11928,6 @@ declare class SearchVariablesRequest { }[]; constructor(); } -type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VALUES" | "EDITABLE_METADATA_AND_VALUES"; /** * ThoughtSpot Public REST API @@ -12152,15 +11940,18 @@ type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SendMessageRequest { +/** +* Sort options. +*/ +declare class SearchCalendarsRequestSortOptions { /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + * Name of the field to apply the sort on. */ - 'metadata_identifier': string; + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; /** - * A message string with the follow-up question to continue the conversation. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'message': string; + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12176,6 +11967,8 @@ declare class SendMessageRequest { }[]; constructor(); } +type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -12188,15 +11981,25 @@ declare class SendMessageRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ShareMetadataTypeInput { + +declare class SearchCalendarsRequest { /** - * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + * Unique ID or name of the connection. */ - 'type'?: ShareMetadataTypeInputTypeEnum | null; + 'connection_identifier'?: string; /** - * Unique ID or name of the metadata object. + * Pattern to match for calendar names (use \'%\' for wildcard match). */ - 'identifier': string; + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12212,7 +12015,6 @@ declare class ShareMetadataTypeInput { }[]; constructor(); } -type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -12225,13 +12027,27 @@ type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SharePermissionsInput { - 'principal': PrincipalsInput; +declare class SearchCommitsRequest { /** - * Type of access to the shared object + * Unique ID or name of the metadata. */ - 'share_mode': SharePermissionsInputShareModeEnum; + 'metadata_identifier': string; + /** + * Type of metadata. + */ + 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. + */ + 'branch_name'?: string; + /** + * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + */ + 'record_offset'?: number; + /** + * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + */ + 'record_size'?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12247,7 +12063,7 @@ declare class SharePermissionsInput { }[]; constructor(); } -type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; +type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; /** * ThoughtSpot Public REST API @@ -12261,47 +12077,15 @@ type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; * Do not edit the class manually. */ -declare class ShareMetadataRequest { - /** - * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection - */ - 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; +declare class SearchCommunicationChannelPreferencesRequest { /** - * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type - */ - 'metadata_identifiers'?: Array; - /** - * Metadata details for sharing objects. - */ - 'metadata'?: Array; - /** - * Permission details for sharing the objects. - */ - 'permissions': Array; - /** - * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. - */ - 'visualization_identifiers'?: Array; - /** - * Email IDs to which notifications will be sent. - */ - 'emails'?: Array; - /** - * Message to be included in notification. - */ - 'message': string; - /** - * Sends object URLs in the customized format in email notifications. - */ - 'enable_custom_url'?: boolean | null; - /** - * Flag to notify user when any object is shared. + * Event types to search for in cluster-level preferences. */ - 'notify_on_share'?: boolean | null; + 'cluster_preferences'?: Array; /** - * Flag to make the object discoverable. + * Org-specific search criteria. */ - 'has_lenient_discoverability'?: boolean | null; + 'org_preferences'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12317,7 +12101,7 @@ declare class ShareMetadataRequest { }[]; constructor(); } -type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; +type SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -12330,15 +12114,11 @@ type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TA * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SingleAnswerRequest { - /** - * A natural language query string to generate the Answer. - */ - 'query': string; +declare class SearchConfigRequest { /** - * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later */ - 'metadata_identifier': string; + 'org_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12366,15 +12146,18 @@ declare class SingleAnswerRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SortOption { +/** +* Sort options. +*/ +declare class SearchConnectionRequestSortOptions { /** * Name of the field to apply the sort on. */ - 'field_name'?: SortOptionFieldNameEnum | null; + 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; /** * Sort order : ASC(Ascending) or DESC(Descending). */ - 'order'?: SortOptionOrderEnum | null; + 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12390,8 +12173,8 @@ declare class SortOption { }[]; constructor(); } -type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SortOptionOrderEnum = "ASC" | "DESC"; +type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -12404,15 +12187,49 @@ type SortOptionOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SortOptionInput { + +declare class SearchConnectionRequest { /** - * Name of the field to apply the sort on. + * List of connections and name pattern */ - 'field_name'?: SortOptionInputFieldNameEnum | null; + 'connections'?: Array; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Array of types of data warehouse defined for the connection. */ - 'order'?: SortOptionInputOrderEnum | null; + 'data_warehouse_types'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + /** + * Unique ID or name of tags. + */ + 'tag_identifiers'?: Array; + /** + * Data warehouse object type. + */ + 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; + 'sort_options'?: SearchConnectionRequestSortOptions; + /** + * Indicates whether to include complete details of the connection objects. + */ + 'include_details'?: boolean | null; + /** + * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. + */ + 'configuration'?: any; + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + */ + 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12428,8 +12245,9 @@ declare class SortOptionInput { }[]; constructor(); } -type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; -type SortOptionInputOrderEnum = "ASC" | "DESC"; +type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; +type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN"; +type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" | "OAUTH_CLIENT_CREDENTIALS"; /** * ThoughtSpot Public REST API @@ -12442,18 +12260,29 @@ type SortOptionInputOrderEnum = "ASC" | "DESC"; * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Sort options. -*/ -declare class SortOptions { + +declare class SearchConnectionResponse { /** - * Name of the field to apply the sort on. + * Unique ID of the connection. */ - 'field_name'?: SortOptionsFieldNameEnum | null; + 'id': string; /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Name of the connection. */ - 'order'?: SortOptionsOrderEnum | null; + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string | null; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; + 'data_warehouse_objects'?: DataWarehouseObjects; + /** + * Details of the connection. + */ + 'details'?: any | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12469,8 +12298,7 @@ declare class SortOptions { }[]; constructor(); } -type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SortOptionsOrderEnum = "ASC" | "DESC"; +type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE"; /** * ThoughtSpot Public REST API @@ -12484,17 +12312,13 @@ type SortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ /** -* Sort options. +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. */ -declare class SortingOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: string | null; +declare class SearchCustomActionsRequestDefaultActionConfig { /** - * Sort order : ASC(Ascending) or DESC(Descending). + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. */ - 'order'?: string | null; + 'visibility'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12522,22 +12346,33 @@ declare class SortingOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Response format associated with fetch SQL query api -*/ -declare class SqlQuery { + +declare class SearchCustomActionsRequest { /** - * Unique identifier of the metadata. + * Name or ID of the custom action. */ - 'metadata_id': string; + 'custom_action_identifier'?: string; /** - * Name of the metadata. + * A pattern to match case-insensitive name of the custom-action object. */ - 'metadata_name': string; + 'name_pattern'?: string; + 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; /** - * SQL query of a metadata object. + * When set to true, returns the associated groups for a custom action. */ - 'sql_query': string; + 'include_group_associations'?: boolean | null; + /** + * When set to true, returns the associated metadata for a custom action. + */ + 'include_metadata_associations'?: boolean | null; + /** + * Search with a given metadata identifier. + */ + 'metadata'?: Array; + /** + * Filter the action objects based on type + */ + 'type'?: SearchCustomActionsRequestTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12553,6 +12388,7 @@ declare class SqlQuery { }[]; constructor(); } +type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; /** * ThoughtSpot Public REST API @@ -12565,24 +12401,39 @@ declare class SqlQuery { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class SqlQueryResponse { +declare class SearchDataRequest { /** - * Unique identifier of the metadata. + * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) */ - 'metadata_id': string; + 'query_string': string; /** - * Name of the metadata. + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. */ - 'metadata_name': string; + 'logical_table_identifier': string; /** - * Type of the metadata. + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. */ - 'metadata_type': SqlQueryResponseMetadataTypeEnum; + 'data_format'?: SearchDataRequestDataFormatEnum; /** - * SQL query details of metadata objects. + * The starting record number from where the records should be included. */ - 'sql_queries': Array; + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12598,7 +12449,7 @@ declare class SqlQueryResponse { }[]; constructor(); } -type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; +type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; /** * ThoughtSpot Public REST API @@ -12611,15 +12462,22 @@ type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SystemConfig { - 'onboarding_content_url'?: string | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; + +/** +* Response format associated with the search data API. +*/ +declare class SearchDataResponse { + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; static getAttributeTypeMap(): { name: string; baseName: string; @@ -12640,99 +12498,11 @@ declare class SystemConfig { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SystemInfo { - /** - * The unique identifier of the object - */ - 'id'?: string | null; - /** - * Name of the cluster. - */ - 'name'?: string | null; - /** - * The release version of the cluster. - */ - 'release_version'?: string | null; - /** - * The timezone of the cluster. - */ - 'time_zone'?: string | null; - /** - * The default locale of the cluster. - */ - 'locale'?: string | null; - /** - * The default date format representation of the cluster. - */ - 'date_format'?: string | null; - /** - * The API version of the cluster. - */ - 'api_version'?: string | null; - /** - * The deployment type of the cluster. - */ - 'type'?: string | null; - /** - * The deployed environment of the cluster. - */ - 'environment'?: string | null; - /** - * The license applied to the cluster. - */ - 'license'?: string | null; - /** - * The default date time format representation of the cluster. - */ - 'date_time_format'?: string | null; - /** - * The default time format representation of the cluster. - */ - 'time_format'?: string | null; - /** - * The unique identifier of system user. - */ - 'system_user_id'?: string | null; - /** - * The unique identifier of super user. - */ - 'super_user_id'?: string | null; - /** - * The unique identifier of hidden object. - */ - 'hidden_object_id'?: string | null; - /** - * The unique identifier of system group. - */ - 'system_group_id'?: string | null; - /** - * The unique identifier of tsadmin user. - */ - 'tsadmin_user_id'?: string | null; - /** - * The unique identifier of admin group. - */ - 'admin_group_id'?: string | null; - /** - * The unique identifier of all tables connection. - */ - 'all_tables_connection_id'?: string | null; - /** - * The unique identifier of ALL group. - */ - 'all_user_group_id'?: string | null; - /** - * The supported accept language by the cluster. - */ - 'accept_language'?: string | null; - /** - * The count of users of ALL group. - */ - 'all_user_group_member_user_count'?: number | null; +declare class SearchEmailCustomizationRequest { /** - * The version number of logical model of the cluster. + * Unique ID or name of org Version: 10.12.0.cl or later */ - 'logical_model_version'?: number | null; + 'org_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12760,8 +12530,18 @@ declare class SystemInfo { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class SystemOverrideInfo { - 'config_override_info'?: any | null; +/** +* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +*/ +declare class SearchMetadataRequestFavoriteObjectOptions { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12789,19 +12569,18 @@ declare class SystemOverrideInfo { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Tag { - 'name': string; - 'id': string; - 'color'?: string | null; - 'deleted'?: boolean | null; - 'hidden'?: boolean | null; - 'external'?: boolean | null; - 'deprecated'?: boolean | null; - 'creation_time_in_millis'?: number | null; - 'modification_time_in_millis'?: number | null; - 'author_id'?: string | null; - 'modifier_id'?: string | null; - 'owner_id'?: string | null; +/** +* Sort options to filter metadata details. +*/ +declare class SearchMetadataRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12817,6 +12596,8 @@ declare class Tag { }[]; constructor(); } +type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -12829,102 +12610,102 @@ declare class Tag { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Email customization configuration properties -*/ -declare class TemplatePropertiesInputCreate { + +declare class SearchMetadataRequest { /** - * Background color for call-to-action button in hex format + * Metadata objects such as Liveboards, Answers, and Worksheets. */ - 'cta_button_bg_color'?: string | null; + 'metadata'?: Array; /** - * Text color for call-to-action button in hex format + * Object permission details to search by. */ - 'cta_text_font_color'?: string | null; + 'permissions'?: Array; /** - * Primary background color in hex format + * GUID or name of user who created the metadata object. */ - 'primary_bg_color'?: string | null; + 'created_by_user_identifiers'?: Array; /** - * Home page URL (HTTP/HTTPS only) + * Version of the dependent table of the metadata objects like Worksheets. */ - 'home_url'?: string | null; + 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; /** - * Logo image URL (HTTP/HTTPS only) + * List of metadata objects to exclude from search. */ - 'logo_url'?: string | null; + 'exclude_objects'?: Array; + 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; /** - * Font family for email content (e.g., Arial, sans-serif) + * Includes system-generated metadata objects. */ - 'font_family'?: string | null; + 'include_auto_created_objects'?: boolean | null; /** - * Product name to display + * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. */ - 'product_name'?: string | null; + 'include_dependent_objects'?: boolean | null; /** - * Footer address text + * The maximum number of dependents to include per metadata object. */ - 'footer_address'?: string | null; + 'dependent_objects_record_size'?: number; /** - * Footer phone number + * Includes complete details of the metadata objects. */ - 'footer_phone'?: string | null; + 'include_details'?: boolean | null; /** - * Replacement value for Liveboard + * Includes headers of the metadata objects. */ - 'replacement_value_for_liveboard'?: string | null; + 'include_headers'?: boolean | null; /** - * Replacement value for Answer + * Includes details of the hidden objects, such as a column in a worksheet or a table. */ - 'replacement_value_for_answer'?: string | null; + 'include_hidden_objects'?: boolean | null; /** - * Replacement value for SpotIQ + * Includes objects with incomplete metadata. */ - 'replacement_value_for_spot_iq'?: string | null; + 'include_incomplete_objects'?: boolean | null; /** - * Whether to hide footer address + * Includes visualization headers of the specified Liveboard object. */ - 'hide_footer_address'?: boolean | null; + 'include_visualization_headers'?: boolean | null; /** - * Whether to hide footer phone number + * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. */ - 'hide_footer_phone'?: boolean | null; + 'include_worksheet_search_assist_data'?: boolean | null; /** - * Whether to hide manage notification link + * Includes ID or names of the users who modified the metadata object. */ - 'hide_manage_notification'?: boolean | null; + 'modified_by_user_identifiers'?: Array; /** - * Whether to hide mobile app nudge + * The starting record number from where the records should be included. */ - 'hide_mobile_app_nudge'?: boolean | null; + 'record_offset'?: number; /** - * Whether to hide privacy policy link + * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. */ - 'hide_privacy_policy'?: boolean | null; + 'record_size'?: number; + 'sort_options'?: SearchMetadataRequestSortOptions; /** - * Whether to hide product name + * Tags to filter metadata objects by */ - 'hide_product_name'?: boolean | null; + 'tag_identifiers'?: Array; /** - * Whether to hide ThoughtSpot vocabulary definitions + * Indicates whether to include stats of the metadata objects. */ - 'hide_ts_vocabulary_definitions'?: boolean | null; + 'include_stats'?: boolean | null; /** - * Whether to hide notification status + *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. */ - 'hide_notification_status'?: boolean | null; + 'include_discoverable_objects'?: boolean | null; /** - * Whether to hide error message + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. */ - 'hide_error_message'?: boolean | null; + 'show_resolved_parameters'?: boolean | null; /** - * Whether to hide unsubscribe link + * Indicates the model version of Liveboard to be attached in metadata detail. */ - 'hide_unsubscribe_link'?: boolean | null; + 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; /** - * Whether to hide modify alert + *
Version: 10.11.0.cl or later
If only published objects should be returned */ - 'hide_modify_alert'?: boolean | null; + 'include_only_published_objects'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12940,6 +12721,8 @@ declare class TemplatePropertiesInputCreate { }[]; constructor(); } +type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2"; +type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; /** * ThoughtSpot Public REST API @@ -12952,29 +12735,27 @@ declare class TemplatePropertiesInputCreate { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class Token { +declare class SearchOrgsRequest { /** - * Bearer auth token. + * ID or name of the Org */ - 'token': string; + 'org_identifier'?: string; /** - * Token creation time in milliseconds. + * Description of the Org */ - 'creation_time_in_millis': number; + 'description'?: string; /** - * Token expiration time in milliseconds. + * Visibility of the Org */ - 'expiration_time_in_millis': number; - 'scope': Scope; + 'visibility'?: SearchOrgsRequestVisibilityEnum; /** - * Username to whom the token is issued. + * Status of the Org */ - 'valid_for_user_id': string; + 'status'?: SearchOrgsRequestStatusEnum; /** - * Unique identifier of the user to whom the token is issued. + * GUIDs or names of the users for which you want to retrieve the Orgs data */ - 'valid_for_username': string; + 'user_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12990,6 +12771,8 @@ declare class Token { }[]; constructor(); } +type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN"; +type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; /** * ThoughtSpot Public REST API @@ -13003,24 +12786,78 @@ declare class Token { * Do not edit the class manually. */ -declare class TokenValidationResponse { +/** +* Response for search role api should handle hidden privileges as well. +*/ +declare class SearchRoleResponse { /** - * Token creation time in milliseconds. + * Unique Id of the role. */ - 'creation_time_in_millis': number; + 'id': string; /** - * Token expiration time in milliseconds. + * Name of the role */ - 'expiration_time_in_millis': number; - 'scope': Scope; + 'name': string; /** - * Username to whom the token is issued. + * Description of the role */ - 'valid_for_user_id': string; + 'description': string; /** - * Type of token. + * number of groups assigned with this role */ - 'token_type': string; + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: SearchRoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13036,6 +12873,8 @@ declare class TokenValidationResponse { }[]; constructor(); } +type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -13048,27 +12887,39 @@ declare class TokenValidationResponse { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UnparameterizeMetadataRequest { +declare class SearchRolesRequest { /** - * Type of metadata object to unparameterize. + * unique ID or name of the Roles */ - 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + 'role_identifiers'?: Array; /** - * Unique ID or name of the metadata object to unparameterize. + * Unique Id or name of the Organisation */ - 'metadata_identifier': string; + 'org_identifiers'?: Array; /** - * Type of field in the metadata to unparameterize. + * Unique Id or name of the User Group */ - 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + 'group_identifiers'?: Array; /** - * Name of the field which needs to be unparameterized. + * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. */ - 'field_name': string; + 'privileges'?: Array; /** - * The value to use in place of the variable for the field + * Indicates whether the Role is deprecated. */ - 'value': string; + 'deprecated'?: boolean | null; + /** + * Indicates whether the Role is external + */ + 'external'?: boolean | null; + /** + * Indicates whether the Role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + /** + * Permission details of the Role + */ + 'permissions'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13084,8 +12935,8 @@ declare class UnparameterizeMetadataRequest { }[]; constructor(); } -type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; -type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; +type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -13098,24 +12949,22 @@ type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROP * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UnpublishMetadataRequest { - /** - * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. - */ - 'force'?: boolean | null; +/** +* Options while fetching history runs for the schedule. +*/ +declare class SearchSchedulesRequestHistoryRunsOptions { /** - * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + * Indicates whether to fetch history runs for the scheduled notification. */ - 'include_dependencies': boolean; + 'include_history_runs'?: boolean | null; /** - * Metadata objects. + * Indicates the max number of records that can be fetched as past runs of any scheduled job. */ - 'metadata': Array; + 'record_size'?: number | null; /** - * Unique ID or name of orgs. + * Indicates the starting record number from where history runs records should be fetched. */ - 'org_identifiers': Array; + 'record_offset'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13144,25 +12993,17 @@ declare class UnpublishMetadataRequest { * Do not edit the class manually. */ /** -* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +* Sort options. */ -declare class UpdateCalendarRequestTableReference { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Name of the database. - */ - 'database_name'?: string | null; +declare class SearchSchedulesRequestSortOptions { /** - * Name of the schema. + * Name of the field to apply the sort on. */ - 'schema_name'?: string | null; + 'field_name'?: string | null; /** - * Name of the table. Table names may be case-sensitive depending on the database system. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'table_name': string; + 'order'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13191,40 +13032,25 @@ declare class UpdateCalendarRequestTableReference { * Do not edit the class manually. */ -declare class UpdateCalendarRequest { - /** - * Type of update operation. - */ - 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; - 'table_reference': UpdateCalendarRequestTableReference; - /** - * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. - */ - 'start_date'?: string; - /** - * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. - */ - 'end_date'?: string; - /** - * Type of the calendar. - */ - 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; +declare class SearchSchedulesRequest { /** - * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + * Metadata objects associated with the scheduled jobs. */ - 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + 'metadata'?: Array; /** - * Specify the starting day of the week + * The starting record number from where the records should be included. */ - 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + 'record_offset'?: number; /** - * Prefix to add before the quarter. + * The number of records that should be included. */ - 'quarter_name_prefix'?: string; + 'record_size'?: number; + 'sort_options'?: SearchSchedulesRequestSortOptions; + 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; /** - * Prefix to add before the year. + * unique ID or name of the Schedule */ - 'year_name_prefix'?: string; + 'schedule_identifiers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13240,10 +13066,6 @@ declare class UpdateCalendarRequest { }[]; constructor(); } -type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; -type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; -type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; -type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; /** * ThoughtSpot Public REST API @@ -13256,24 +13078,19 @@ type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateColumnSecurityRulesRequest { - /** - * GUID or name of the table for which we want to create column security rules - */ - 'identifier'?: string; +declare class SearchTagsRequest { /** - * The object ID of the table + * Name or Id of the tag. */ - 'obj_identifier'?: string; + 'tag_identifier'?: string; /** - * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + * A pattern to match case-insensitive name of the Tag object. */ - 'clear_csr'?: boolean | null; + 'name_pattern'?: string; /** - * Array where each object defines the security rule for a specific column + * Color of the tag. */ - 'column_security_rules': Array; + 'color'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13301,35 +13118,18 @@ declare class UpdateColumnSecurityRulesRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConfigRequest { - /** - * Username to authenticate connection to version control system - */ - 'username'?: string; - /** - * Access token corresponding to the user to authenticate connection to version control system - */ - 'access_token'?: string; +/** +* Sort options to filter group details. +*/ +declare class SearchUserGroupsRequestSortOptions { /** - * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + * Name of the field to apply the sort on. */ - 'org_identifier'?: string; + 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; /** - * List the remote branches to configure. Example:[development, production] + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'branch_names'?: Array; - /** - * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later - */ - 'commit_branch_name'?: string; - /** - * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later - */ - 'enable_guid_mapping'?: boolean | null; - /** - * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later - */ - 'configuration_branch_name'?: string; + 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13345,6 +13145,8 @@ declare class UpdateConfigRequest { }[]; constructor(); } +type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13357,43 +13159,73 @@ declare class UpdateConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConnectionConfigurationRequest { + +declare class SearchUserGroupsRequest { /** - * Unique ID or name of the connection. + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. */ - 'connection_identifier': string; + 'default_liveboard_identifiers'?: Array; /** - * Name of the configuration to update. + * Description of the group */ - 'name'?: string; + 'description'?: string; /** - * Description of the configuration. + * Display name of the group */ - 'description'?: string; + 'display_name'?: string; /** - * Type of authentication. + * A pattern to match case-insensitive name of the Group object. */ - 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + 'name_pattern'?: string; /** - * Configuration properties in JSON. + * GUID or name of the group */ - 'configuration'?: any; + 'group_identifier'?: string; /** - * Type of policy. + * ID or name of the Org to which the group belongs */ - 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + 'org_identifiers'?: Array; /** - * Unique ID or name of the User and User Groups. + * Privileges assigned to the group. */ - 'policy_principals'?: Array; + 'privileges'?: Array; /** - * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. */ - 'policy_processes'?: Array; + 'sub_group_identifiers'?: Array; /** - * Indicates whether the configuration enable/disable. + * Group type. */ - 'disable'?: boolean | null; + 'type'?: SearchUserGroupsRequestTypeEnum; + /** + * GUID or name of the users assigned to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: SearchUserGroupsRequestVisibilityEnum; + /** + * Filter groups with a list of Roles assigned to a group + */ + 'role_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUserGroupsRequestSortOptions; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. + */ + 'include_users'?: boolean | null; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. + */ + 'include_sub_groups'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13409,9 +13241,9 @@ declare class UpdateConnectionConfigurationRequest { }[]; constructor(); } -type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN"; -type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; -type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; +type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -13424,27 +13256,18 @@ type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConnectionRequest { - /** - * Unique ID or name of the connection. - */ - 'connection_identifier': string; - /** - * Updated name of the connection. - */ - 'name'?: string; - /** - * Updated description of the connection. - */ - 'description'?: string; +/** +* Sort options. +*/ +declare class SearchUsersRequestSortOptions { /** - * Configuration of the data warehouse in JSON. + * Name of the field to apply the sort on. */ - 'data_warehouse_config'?: any; + 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; /** - * Indicates whether to validate the connection details. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'validate'?: boolean | null; + 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13460,6 +13283,8 @@ declare class UpdateConnectionRequest { }[]; constructor(); } +type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13472,23 +13297,85 @@ declare class UpdateConnectionRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateConnectionV2Request { + +declare class SearchUsersRequest { /** - * Updated name of the connection. + * GUID / name of the user to search */ - 'name'?: string; + 'user_identifier'?: string; /** - * Updated description of the connection. + * A unique display name string for the user account, usually their first and last name */ - 'description'?: string; + 'display_name'?: string; /** - * Configuration of the data warehouse in JSON. + * A pattern to match case-insensitive name of the User object. */ - 'data_warehouse_config'?: any; + 'name_pattern'?: string; /** - * Indicates whether to validate the connection details. + * Visibility of the user */ - 'validate'?: boolean | null; + 'visibility'?: SearchUsersRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * GUID or name of the group to which the user belongs + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the user + */ + 'privileges'?: Array; + /** + * Type of the account + */ + 'account_type'?: SearchUsersRequestAccountTypeEnum; + /** + * Current status of the user account. + */ + 'account_status'?: SearchUsersRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding walkthrough + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * IDs or names of the Orgs to which the user belongs + */ + 'org_identifiers'?: Array; + /** + * Unique ID or name of the user\'s home Liveboard. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects which are assigned as favorites of the user. + */ + 'favorite_metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUsersRequestSortOptions; + /** + * Filters by the role assigned to the user. + */ + 'role_identifiers'?: Array; + /** + * Indicates if the user\'s favorite objects should be displayed. + */ + 'include_favorite_metadata'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13504,6 +13391,10 @@ declare class UpdateConnectionV2Request { }[]; constructor(); } +type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; /** * ThoughtSpot Public REST API @@ -13516,13 +13407,26 @@ declare class UpdateConnectionV2Request { * https://openapi-generator.tech * Do not edit the class manually. */ - /** -* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +* Input for variable scope in search */ -declare class UpdateCustomActionRequestActionDetails { - 'CALLBACK'?: CALLBACKInput; - 'URL'?: URLInput; +declare class ValueScopeInput { + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Model Identifier + */ + 'model_identifier'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13538,6 +13442,7 @@ declare class UpdateCustomActionRequestActionDetails { }[]; constructor(); } +type ValueScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -13551,13 +13456,21 @@ declare class UpdateCustomActionRequestActionDetails { * Do not edit the class manually. */ /** -* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +* Input for variable details in search */ -declare class UpdateCustomActionRequestDefaultActionConfig { +declare class VariableDetailInput { /** - * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * Unique ID or name of the variable */ - 'visibility'?: boolean | null; + 'identifier'?: string | null; + /** + * Type of variable + */ + 'type'?: VariableDetailInputTypeEnum | null; + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + */ + 'name_pattern'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13573,6 +13486,7 @@ declare class UpdateCustomActionRequestDefaultActionConfig { }[]; constructor(); } +type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; /** * ThoughtSpot Public REST API @@ -13586,25 +13500,27 @@ declare class UpdateCustomActionRequestDefaultActionConfig { * Do not edit the class manually. */ -declare class UpdateCustomActionRequest { - 'action_details'?: UpdateCustomActionRequestActionDetails; +declare class SearchVariablesRequest { /** - * Metadata objects to which the custom action needs to be associated. + * Variable details */ - 'associate_metadata'?: Array; - 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + 'variable_details'?: Array; /** - * Unique ID or name of the groups that can view and access the custom action. + * Array of scope filters */ - 'group_identifiers'?: Array; + 'value_scope'?: Array; /** - * Name of the custom action. The custom action name must be unique. + * The starting record number from where the records should be included */ - 'name'?: string; + 'record_offset'?: number; /** - * Type of update operation. Default operation type is ADD + * The number of records that should be included */ - 'operation'?: UpdateCustomActionRequestOperationEnum; + 'record_size'?: number; + /** + * Format in which we want the output + */ + 'output_format'?: SearchVariablesRequestOutputFormatEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13620,7 +13536,7 @@ declare class UpdateCustomActionRequest { }[]; constructor(); } -type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; +type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VALUES"; /** * ThoughtSpot Public REST API @@ -13633,13 +13549,18 @@ type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateEmailCustomizationRequest { - 'template_properties': CreateEmailCustomizationRequestTemplateProperties; +/** +* Sort option includes sort field and sort order. +*/ +declare class SearchWebhookConfigurationsRequestSortOptions { /** - * Unique ID or name of org + * Name of the field to apply the sort on. */ - 'org_identifier'?: string; + 'field_name'?: SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: SearchWebhookConfigurationsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13655,6 +13576,8 @@ declare class UpdateEmailCustomizationRequest { }[]; constructor(); } +type SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type SearchWebhookConfigurationsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13668,15 +13591,28 @@ declare class UpdateEmailCustomizationRequest { * Do not edit the class manually. */ -declare class UpdateMetadataHeaderRequest { +declare class SearchWebhookConfigurationsRequest { /** - * List of header objects to update. + * Unique ID or name of the org. */ - 'headers_update': Array; + 'org_identifier'?: string; /** - * Unique ID or name of the organization. + * Unique ID or name of the webhook. */ - 'org_identifier'?: string; + 'webhook_identifier'?: string; + /** + * Type of webhook event to filter by. + */ + 'event_type'?: SearchWebhookConfigurationsRequestEventTypeEnum; + /** + * The offset point, starting from where the webhooks should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of webhooks that should be included in the response starting from offset position. + */ + 'record_size'?: number; + 'sort_options'?: SearchWebhookConfigurationsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13692,6 +13628,7 @@ declare class UpdateMetadataHeaderRequest { }[]; constructor(); } +type SearchWebhookConfigurationsRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -13704,26 +13641,11 @@ declare class UpdateMetadataHeaderRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Input for updating object ID of a metadata object. -*/ -declare class UpdateObjIdInput { - /** - * GUID or name of the metadata object. - */ - 'metadata_identifier'?: string | null; - /** - * Type of metadata. Required if metadata_identifier is name of the object. - */ - 'type'?: UpdateObjIdInputTypeEnum | null; - /** - * Current object ID value. - */ - 'current_obj_id'?: string | null; +declare class SendAgentMessageRequest { /** - * New object ID value to set. + * messages to be sent to the agent */ - 'new_obj_id': string; + 'messages': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13739,7 +13661,6 @@ declare class UpdateObjIdInput { }[]; constructor(); } -type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; /** * ThoughtSpot Public REST API @@ -13752,12 +13673,9 @@ type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateMetadataObjIdRequest { - /** - * List of metadata objects to update their object IDs. - */ - 'metadata': Array; +declare class SendAgentMessageResponse { + 'success': boolean; + 'message'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13785,27 +13703,15 @@ declare class UpdateMetadataObjIdRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateOrgRequest { +declare class SendAgentMessageStreamingRequest { /** - * Name of the Org - */ - 'name'?: string; - /** - * Description of the Org - */ - 'description'?: string; - /** - * Add Users to an Org - */ - 'user_identifiers'?: Array; - /** - * Add Default Groups to an Org + * Unique identifier for the conversation (used to track context) */ - 'group_identifiers'?: Array; + 'conversation_identifier': string; /** - * Type of update operation. Default operation type is ADD + * messages to be sent to the agent */ - 'operation'?: UpdateOrgRequestOperationEnum; + 'messages': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13821,7 +13727,6 @@ declare class UpdateOrgRequest { }[]; constructor(); } -type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; /** * ThoughtSpot Public REST API @@ -13834,19 +13739,15 @@ type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateRoleRequest { - /** - * Name of the Role. - */ - 'name': string; +declare class SendMessageRequest { /** - * Description of the Role. + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. */ - 'description'?: string; + 'metadata_identifier': string; /** - * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + * A message string with the follow-up question to continue the conversation. */ - 'privileges'?: Array; + 'message': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13862,7 +13763,6 @@ declare class UpdateRoleRequest { }[]; constructor(); } -type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE"; /** * ThoughtSpot Public REST API @@ -13875,12 +13775,15 @@ type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Frequency of the scheduled job run. -*/ -declare class UpdateScheduleRequestFrequency { - 'cron_expression': CronExpressionInput; +declare class ShareMetadataTypeInput { + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ShareMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13896,6 +13799,7 @@ declare class UpdateScheduleRequestFrequency { }[]; constructor(); } +type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -13908,14 +13812,13 @@ declare class UpdateScheduleRequestFrequency { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options to specify the details of a Liveboard. -*/ -declare class UpdateScheduleRequestLiveboardOptions { + +declare class SharePermissionsInput { + 'principal': PrincipalsInput; /** - * Unique ID or name of visualizations. + * Type of access to the shared object */ - 'visualization_identifiers': Array; + 'share_mode': SharePermissionsInputShareModeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13931,6 +13834,7 @@ declare class UpdateScheduleRequestLiveboardOptions { }[]; constructor(); } +type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; /** * ThoughtSpot Public REST API @@ -13943,46 +13847,48 @@ declare class UpdateScheduleRequestLiveboardOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class UpdateScheduleRequestPdfOptions { + +declare class ShareMetadataRequest { /** - * Indicates whether to include complete Liveboard. + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection */ - 'complete_liveboard'?: boolean | null; + 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; /** - * Indicates whether to include cover page with the Liveboard title. + * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type */ - 'include_cover_page'?: boolean | null; + 'metadata_identifiers'?: Array; /** - * Indicates whether to include customized wide logo in the footer if available. + * Metadata details for sharing objects. */ - 'include_custom_logo'?: boolean | null; + 'metadata'?: Array; /** - * Indicates whether to include a page with all applied filters. + * Permission details for sharing the objects. */ - 'include_filter_page'?: boolean | null; + 'permissions': Array; /** - * Indicates whether to include page number in the footer of each page + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. */ - 'include_page_number'?: boolean | null; + 'visualization_identifiers'?: Array; /** - * Text to include in the footer of each page. + * Email IDs to which notifications will be sent. */ - 'page_footer_text'?: string | null; + 'emails'?: Array; /** - * Page orientation of the PDF. + * Message to be included in notification. */ - 'page_orientation'?: string | null; + 'message': string; /** - * Page size. + * Sends object URLs in the customized format in email notifications. */ - 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + 'enable_custom_url'?: boolean | null; /** - * Indicates whether to include only first page of the tables. + * Flag to notify user when any object is shared. */ - 'truncate_table'?: boolean | null; + 'notify_on_share'?: boolean | null; + /** + * Flag to make the object discoverable. + */ + 'has_lenient_discoverability'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13998,7 +13904,7 @@ declare class UpdateScheduleRequestPdfOptions { }[]; constructor(); } -type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4"; +type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION"; /** * ThoughtSpot Public REST API @@ -14011,19 +13917,15 @@ type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. -*/ -declare class UpdateScheduleRequestRecipientDetails { +declare class SingleAnswerRequest { /** - * Emails of the recipients. + * A natural language query string to generate the Answer. */ - 'emails'?: Array | null; + 'query': string; /** - * User or groups to be set as recipients of the schedule notifications. + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. */ - 'principals'?: Array | null; + 'metadata_identifier': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14051,44 +13953,15 @@ declare class UpdateScheduleRequestRecipientDetails { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateScheduleRequest { - /** - * Name of the scheduled job. - */ - 'name'?: string; - /** - * Description of the scheduled job. - */ - 'description'?: string; - /** - * Type of metadata object. - */ - 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; - /** - * Unique ID or name of the metadata object. - */ - 'metadata_identifier'?: string; - /** - * Export file format. - */ - 'file_format'?: UpdateScheduleRequestFileFormatEnum; - 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; - 'pdf_options'?: UpdateScheduleRequestPdfOptions; - /** - * Time zone - */ - 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; - 'frequency'?: UpdateScheduleRequestFrequency; - 'recipient_details'?: UpdateScheduleRequestRecipientDetails; +declare class SortOption { /** - * Status of the schedule + * Name of the field to apply the sort on. */ - 'status'?: UpdateScheduleRequestStatusEnum; + 'field_name'?: SortOptionFieldNameEnum | null; /** - * Personalised view id of the liveboard to be scheduled. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'personalised_view_id'?: string; + 'order'?: SortOptionOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14104,10 +13977,8 @@ declare class UpdateScheduleRequest { }[]; constructor(); } -type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; -type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; -type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; -type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; +type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -14120,11 +13991,15 @@ type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateSystemConfigRequest { +declare class SortOptionInput { /** - * Configuration JSON with the key-value pair of configuration attributes to be updated. + * Name of the field to apply the sort on. */ - 'configuration': any; + 'field_name'?: SortOptionInputFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionInputOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14140,6 +14015,8 @@ declare class UpdateSystemConfigRequest { }[]; constructor(); } +type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SortOptionInputOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -14152,15 +14029,18 @@ declare class UpdateSystemConfigRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateTagRequest { +/** +* Sort options. +*/ +declare class SortOptions { /** - * Name of the tag. + * Name of the field to apply the sort on. */ - 'name'?: string; + 'field_name'?: SortOptionsFieldNameEnum | null; /** - * Hex color code to be assigned to the tag. For example, #ff78a9. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'color'?: string; + 'order'?: SortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14176,6 +14056,8 @@ declare class UpdateTagRequest { }[]; constructor(); } +type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -14188,51 +14070,18 @@ declare class UpdateTagRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class UpdateUserGroupRequest { +/** +* Sort options. +*/ +declare class SortingOptions { /** - * Name of the group to modify. + * Name of the field to apply the sort on. */ - 'name'?: string; + 'field_name'?: string | null; /** - * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + * Sort order : ASC(Ascending) or DESC(Descending). */ - 'default_liveboard_identifiers'?: Array; - /** - * Description for the group. - */ - 'description'?: string; - /** - * Display name of the group. - */ - 'display_name'?: string; - /** - * Privileges to assign to the group. - */ - 'privileges'?: Array; - /** - * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. - */ - 'sub_group_identifiers'?: Array; - /** - * Type of the group - */ - 'type'?: UpdateUserGroupRequestTypeEnum; - /** - * GUID or name of the users to assign to the group. - */ - 'user_identifiers'?: Array; - /** - * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. - */ - 'visibility'?: UpdateUserGroupRequestVisibilityEnum; - /** - * Role identifiers of the Roles that should be assigned to the group. - */ - 'role_identifiers'?: Array; - /** - * Type of update operation. Default operation type is REPLACE - */ - 'operation'?: UpdateUserGroupRequestOperationEnum; + 'order'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14248,10 +14097,6 @@ declare class UpdateUserGroupRequest { }[]; constructor(); } -type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL"; -type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; /** * ThoughtSpot Public REST API @@ -14264,76 +14109,22 @@ type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateUserRequest { - /** - * Name of the user. The username string must be unique. - */ - 'name'?: string; - /** - * A unique display name string for the user account, usually their first and last name - */ - 'display_name'?: string; - /** - * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. - */ - 'visibility'?: UpdateUserRequestVisibilityEnum; - /** - * Email of the user account - */ - 'email'?: string; - /** - * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. - */ - 'account_status'?: UpdateUserRequestAccountStatusEnum; - /** - * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. - */ - 'notify_on_share'?: boolean | null; - /** - * The user preference for revisiting the onboarding experience. - */ - 'show_onboarding_experience'?: boolean | null; - /** - * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. - */ - 'onboarding_experience_completed'?: boolean | null; - /** - * Type of the account. - */ - 'account_type'?: UpdateUserRequestAccountTypeEnum; - /** - * GUIDs or names of the groups. - */ - 'group_identifiers'?: Array; - /** - * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. - */ - 'home_liveboard_identifier'?: string; - /** - * Metadata objects to add to the user\'s favorites list. - */ - 'favorite_metadata'?: Array; - /** - * IDs of the Orgs. - */ - 'org_identifiers'?: Array; - /** - * Type of update operation. Default operation type is REPLACE - */ - 'operation'?: UpdateUserRequestOperationEnum; +/** +* Response format associated with fetch SQL query api +*/ +declare class SqlQuery { /** - * Locale for the user. + * Unique identifier of the metadata. */ - 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + 'metadata_id': string; /** - * Properties for the user + * Name of the metadata. */ - 'extended_properties'?: any; + 'metadata_name': string; /** - * Preferences for the user + * SQL query of a metadata object. */ - 'extended_preferences'?: any; + 'sql_query': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14349,11 +14140,6 @@ declare class UpdateUserRequest { }[]; constructor(); } -type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; -type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; /** * ThoughtSpot Public REST API @@ -14367,60 +14153,23 @@ type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE * Do not edit the class manually. */ -declare class UpdateVariableRequest { - /** - * New name of the variable if we want to rename. - */ - 'name'?: string; +declare class SqlQueryResponse { /** - * Operation to perform on the values. + * Unique identifier of the metadata. */ - 'operation'?: UpdateVariableRequestOperationEnum; + 'metadata_id': string; /** - * Values of variable to be updated. + * Name of the metadata. */ - 'values'?: Array; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -type UpdateVariableRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** -* Input for variable value update -*/ -declare class VariableValueInput { + 'metadata_name': string; /** - * ID or Name of the variable + * Type of the metadata. */ - 'variable_identifier': string; + 'metadata_type': SqlQueryResponseMetadataTypeEnum; /** - * Values of the variable + * SQL query details of metadata objects. */ - 'variable_values': Array; + 'sql_queries': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14436,6 +14185,7 @@ declare class VariableValueInput { }[]; constructor(); } +type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; /** * ThoughtSpot Public REST API @@ -14448,16 +14198,8 @@ declare class VariableValueInput { * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UpdateVariableValuesRequest { - /** - * Variables and values - */ - 'variable_updates': Array; - /** - * Type of update operation - */ - 'operation': UpdateVariableValuesRequestOperationEnum; +declare class SystemConfig { + 'onboarding_content_url'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14473,7 +14215,6 @@ declare class UpdateVariableValuesRequest { }[]; constructor(); } -type UpdateVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; /** * ThoughtSpot Public REST API @@ -14486,182 +14227,2769 @@ type UpdateVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class User { +declare class SystemInfo { /** - * Unique identifier of the user. + * The unique identifier of the object */ - 'id': string; + 'id'?: string | null; /** - * Name of the user. + * Name of the cluster. */ - 'name': string; + 'name'?: string | null; /** - * Display name of the user. + * The release version of the cluster. */ - 'display_name': string; + 'release_version'?: string | null; /** - * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + * The timezone of the cluster. */ - 'visibility': UserVisibilityEnum; + 'time_zone'?: string | null; /** - * Unique identifier of author of the user. + * The default locale of the cluster. */ - 'author_id'?: string | null; + 'locale'?: string | null; /** - * Defines whether the user can change their password. + * The default date format representation of the cluster. */ - 'can_change_password'?: boolean | null; + 'date_format'?: string | null; /** - * Defines whether the response has complete detail of the user. + * The API version of the cluster. */ - 'complete_detail'?: boolean | null; + 'api_version'?: string | null; /** - * Creation time of the user in milliseconds. + * The deployment type of the cluster. */ - 'creation_time_in_millis'?: number | null; - 'current_org'?: Org; + 'type'?: string | null; /** - * Indicates whether the user is deleted. + * The deployed environment of the cluster. */ - 'deleted'?: boolean | null; + 'environment'?: string | null; /** - * Indicates whether the user is deprecated. + * The license applied to the cluster. */ - 'deprecated'?: boolean | null; + 'license'?: string | null; /** - * Type of the user account. + * The default date time format representation of the cluster. */ - 'account_type'?: UserAccountTypeEnum | null; + 'date_time_format'?: string | null; /** - * Status of the user account. + * The default time format representation of the cluster. */ - 'account_status'?: UserAccountStatusEnum | null; + 'time_format'?: string | null; /** - * Email of the user. + * The unique identifier of system user. */ - 'email'?: string | null; + 'system_user_id'?: string | null; /** - * Expiration time of the user in milliseconds. + * The unique identifier of super user. */ - 'expiration_time_in_millis'?: number | null; + 'super_user_id'?: string | null; /** - * Indicates whether the user is external. + * The unique identifier of hidden object. */ - 'external'?: boolean | null; + 'hidden_object_id'?: string | null; /** - * Metadata objects to add to the users\' favorites list. + * The unique identifier of system group. */ - 'favorite_metadata'?: Array | null; + 'system_group_id'?: string | null; /** - * Timestamp of the first login session of the user in milliseconds. + * The unique identifier of tsadmin user. */ - 'first_login_time_in_millis'?: number | null; + 'tsadmin_user_id'?: string | null; /** - * Group mask of the user. + * The unique identifier of admin group. */ - 'group_mask'?: number | null; + 'admin_group_id'?: string | null; /** - * Indicates whether the user is hidden. + * The unique identifier of all tables connection. */ - 'hidden'?: boolean | null; - 'home_liveboard'?: ObjectIDAndName; + 'all_tables_connection_id'?: string | null; /** - * Incomplete details of user if any present. + * The unique identifier of ALL group. */ - 'incomplete_details'?: any | null; + 'all_user_group_id'?: string | null; /** - * Indicates whether it is first login of the user. + * The supported accept language by the cluster. */ - 'is_first_login'?: boolean | null; + 'accept_language'?: string | null; /** - * Last modified time of the user in milliseconds. + * The count of users of ALL group. */ - 'modification_time_in_millis'?: number | null; + 'all_user_group_member_user_count'?: number | null; /** - * Unique identifier of modifier of the user. + * The version number of logical model of the cluster. */ + 'logical_model_version'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemOverrideInfo { + 'config_override_info'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Tag { + 'name': string; + 'id': string; + 'color'?: string | null; + 'deleted'?: boolean | null; + 'hidden'?: boolean | null; + 'external'?: boolean | null; + 'deprecated'?: boolean | null; + 'creation_time_in_millis'?: number | null; + 'modification_time_in_millis'?: number | null; + 'author_id'?: string | null; 'modifier_id'?: string | null; + 'owner_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Email customization configuration properties +*/ +declare class TemplatePropertiesInputCreate { /** - * User preference for receiving email notifications on shared Answers or Liveboard. + * Background color for call-to-action button in hex format */ - 'notify_on_share'?: boolean | null; + 'cta_button_bg_color'?: string | null; /** - * The user preference for turning off the onboarding experience. + * Text color for call-to-action button in hex format */ - 'onboarding_experience_completed'?: boolean | null; + 'cta_text_font_color'?: string | null; /** - * Orgs to which the user belongs. + * Primary background color in hex format */ - 'orgs'?: Array | null; + 'primary_bg_color'?: string | null; /** - * Unique identifier of owner of the user. + * Home page URL (HTTP/HTTPS only) */ - 'owner_id'?: string | null; + 'home_url'?: string | null; /** - * Parent type of the user. + * Logo image URL (HTTP/HTTPS only) */ - 'parent_type'?: UserParentTypeEnum | null; + 'logo_url'?: string | null; /** - * Privileges which are assigned to the user. + * Font family for email content (e.g., Arial, sans-serif) */ - 'privileges'?: Array | null; + 'font_family'?: string | null; /** - * User\'s preference to revisit the new user onboarding experience. + * Product name to display */ - 'show_onboarding_experience'?: boolean | null; + 'product_name'?: string | null; /** - * Indicates whether the user is a super user. + * Footer address text */ - 'super_user'?: boolean | null; + 'footer_address'?: string | null; /** - * Indicates whether the user is a system user. + * Footer phone number */ - 'system_user'?: boolean | null; + 'footer_phone'?: string | null; /** - * Tags associated with the user. + * Replacement value for Liveboard */ - 'tags'?: Array | null; + 'replacement_value_for_liveboard'?: string | null; /** - * Unique identifier of tenant of the user. + * Replacement value for Answer */ - 'tenant_id'?: string | null; + 'replacement_value_for_answer'?: string | null; /** - * Groups to which the user is assigned. + * Replacement value for SpotIQ */ - 'user_groups'?: Array | null; + 'replacement_value_for_spot_iq'?: string | null; /** - * Inherited User Groups which the user is part of. + * Whether to hide footer address */ - 'user_inherited_groups'?: Array | null; + 'hide_footer_address'?: boolean | null; /** - * Indicates whether welcome email is sent for the user. + * Whether to hide footer phone number */ - 'welcome_email_sent'?: boolean | null; + 'hide_footer_phone'?: boolean | null; /** - * Privileges which are assigned to the user with org. + * Whether to hide manage notification link */ - 'org_privileges'?: any | null; + 'hide_manage_notification'?: boolean | null; /** - * Locale for the user. + * Whether to hide mobile app nudge */ - 'preferred_locale'?: string | null; + 'hide_mobile_app_nudge'?: boolean | null; /** - * Properties for the user + * Whether to hide privacy policy link */ - 'extended_properties'?: any | null; + 'hide_privacy_policy'?: boolean | null; /** - * Preferences for the user + * Whether to hide product name */ - 'extended_preferences'?: any | null; + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Token { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class TokenValidationResponse { + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Type of token. + */ + 'token_type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UnparameterizeMetadataRequest { + /** + * Type of metadata object to unparameterize. + */ + 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to unparameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to unparameterize. + */ + 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be unparameterized. + */ + 'field_name': string; + /** + * The value to use in place of the variable for the field + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION"; +type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UnpublishMetadataRequest { + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. + */ + 'force'?: boolean | null; + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + */ + 'include_dependencies': boolean; + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs. + */ + 'org_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +*/ +declare class UpdateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCalendarRequest { + /** + * Type of update operation. + */ + 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; + 'table_reference': UpdateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week + */ + 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateColumnSecurityRulesRequest { + /** + * GUID or name of the table for which we want to create column security rules + */ + 'identifier'?: string; + /** + * The object ID of the table + */ + 'obj_identifier'?: string; + /** + * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + */ + 'clear_csr'?: boolean | null; + /** + * Array where each object defines the security rule for a specific column + */ + 'column_security_rules': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConfigRequest { + /** + * Username to authenticate connection to version control system + */ + 'username'?: string; + /** + * Access token corresponding to the user to authenticate connection to version control system + */ + 'access_token'?: string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the configuration to update. + */ + 'name'?: string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Type of authentication. + */ + 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration'?: any; + /** + * Type of policy. + */ + 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + /** + * Indicates whether the configuration enable/disable. + */ + 'disable'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_CLIENT_CREDENTIALS"; +type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionV2Request { + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +*/ +declare class UpdateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class UpdateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCustomActionRequest { + 'action_details'?: UpdateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name'?: string; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateCustomActionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataHeaderRequest { + /** + * List of header objects to update. + */ + 'headers_update': Array; + /** + * Unique ID or name of the organization. + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for updating object ID of a metadata object. +*/ +declare class UpdateObjIdInput { + /** + * GUID or name of the metadata object. + */ + 'metadata_identifier'?: string | null; + /** + * Type of metadata. Required if metadata_identifier is name of the object. + */ + 'type'?: UpdateObjIdInputTypeEnum | null; + /** + * Current object ID value. + */ + 'current_obj_id'?: string | null; + /** + * New object ID value to set. + */ + 'new_obj_id': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataObjIdRequest { + /** + * List of metadata objects to update their object IDs. + */ + 'metadata': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateOrgRequest { + /** + * Name of the Org + */ + 'name'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Add Users to an Org + */ + 'user_identifiers'?: Array; + /** + * Add Default Groups to an Org + */ + 'group_identifiers'?: Array; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateOrgRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateRoleRequest { + /** + * Name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Frequency of the scheduled job run. +*/ +declare class UpdateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify the details of a Liveboard. +*/ +declare class UpdateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class UpdateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class UpdateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name'?: string; + /** + * Description of the scheduled job. + */ + 'description'?: string; + /** + * Type of metadata object. + */ + 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Export file format. + */ + 'file_format'?: UpdateScheduleRequestFileFormatEnum; + 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; + 'pdf_options'?: UpdateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; + 'frequency'?: UpdateScheduleRequestFrequency; + 'recipient_details'?: UpdateScheduleRequestRecipientDetails; + /** + * Status of the schedule + */ + 'status'?: UpdateScheduleRequestStatusEnum; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; +type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateSystemConfigRequest { + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + */ + 'configuration': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateTagRequest { + /** + * Name of the tag. + */ + 'name'?: string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateUserGroupRequest { + /** + * Name of the group to modify. + */ + 'name'?: string; + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description for the group. + */ + 'description'?: string; + /** + * Display name of the group. + */ + 'display_name'?: string; + /** + * Privileges to assign to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Type of the group + */ + 'type'?: UpdateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: UpdateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the Roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserGroupRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA"; +type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: UpdateUserRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: UpdateUserRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Type of the account. + */ + 'account_type'?: UpdateUserRequestAccountTypeEnum; + /** + * GUIDs or names of the groups. + */ + 'group_identifiers'?: Array; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * IDs of the Orgs. + */ + 'org_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserRequestOperationEnum; + /** + * Locale for the user. + */ + 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; +type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateVariableRequest { + /** + * New name of the variable. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value update in batch operations +*/ +declare class VariableUpdateAssignmentInput { + /** + * ID or Name of the variable + */ + 'variable_identifier': string; + /** + * Values of the variable + */ + 'variable_values': Array; + /** + * Operation to perform + */ + 'operation': VariableUpdateAssignmentInputOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "CLEAR"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value update in batch operations +*/ +declare class VariableUpdateScopeInput { + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Principal type + */ + 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateVariableValuesRequest { + /** + * Variables and values to update + */ + 'variable_assignment': Array; + /** + * Variables and values to update + */ + 'variable_value_scope': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name'?: string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url'?: string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events'?: Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class User { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility': UserVisibilityEnum; + /** + * Unique identifier of author of the user. + */ + 'author_id'?: string | null; + /** + * Defines whether the user can change their password. + */ + 'can_change_password'?: boolean | null; + /** + * Defines whether the response has complete detail of the user. + */ + 'complete_detail'?: boolean | null; + /** + * Creation time of the user in milliseconds. + */ + 'creation_time_in_millis'?: number | null; + 'current_org'?: Org; + /** + * Indicates whether the user is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the user is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Type of the user account. + */ + 'account_type'?: UserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: UserAccountStatusEnum | null; + /** + * Email of the user. + */ + 'email'?: string | null; + /** + * Expiration time of the user in milliseconds. + */ + 'expiration_time_in_millis'?: number | null; + /** + * Indicates whether the user is external. + */ + 'external'?: boolean | null; + /** + * Metadata objects to add to the users\' favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Timestamp of the first login session of the user in milliseconds. + */ + 'first_login_time_in_millis'?: number | null; + /** + * Group mask of the user. + */ + 'group_mask'?: number | null; + /** + * Indicates whether the user is hidden. + */ + 'hidden'?: boolean | null; + 'home_liveboard'?: ObjectIDAndName; + /** + * Incomplete details of user if any present. + */ + 'incomplete_details'?: any | null; + /** + * Indicates whether it is first login of the user. + */ + 'is_first_login'?: boolean | null; + /** + * Last modified time of the user in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * Unique identifier of modifier of the user. + */ + 'modifier_id'?: string | null; + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for turning off the onboarding experience. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Orgs to which the user belongs. + */ + 'orgs'?: Array | null; + /** + * Unique identifier of owner of the user. + */ + 'owner_id'?: string | null; + /** + * Parent type of the user. + */ + 'parent_type'?: UserParentTypeEnum | null; + /** + * Privileges which are assigned to the user. + */ + 'privileges'?: Array | null; + /** + * User\'s preference to revisit the new user onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates whether the user is a super user. + */ + 'super_user'?: boolean | null; + /** + * Indicates whether the user is a system user. + */ + 'system_user'?: boolean | null; + /** + * Tags associated with the user. + */ + 'tags'?: Array | null; + /** + * Unique identifier of tenant of the user. + */ + 'tenant_id'?: string | null; + /** + * Groups to which the user is assigned. + */ + 'user_groups'?: Array | null; + /** + * Inherited User Groups which the user is part of. + */ + 'user_inherited_groups'?: Array | null; + /** + * Indicates whether welcome email is sent for the user. + */ + 'welcome_email_sent'?: boolean | null; + /** + * Privileges which are assigned to the user with org. + */ + 'org_privileges'?: any | null; + /** + * Locale for the user. + */ + 'preferred_locale'?: string | null; + /** + * Properties for the user + */ + 'extended_properties'?: any | null; + /** + * Preferences for the user + */ + 'extended_preferences'?: any | null; + /** + * User Parameters which are specified for the user via JWToken + */ + 'user_parameters'?: any | null; + /** + * Access Control Properties which are specified for the user via JWToken + */ + 'access_control_properties'?: any | null; + /** + * Formula Variables which are specified for the user via JWToken + */ + 'variable_values'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UserParentTypeEnum = "USER" | "GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UserGroupResponse { + /** + * The unique identifier of the object + */ + 'author_id'?: string | null; + /** + * Indicates whether the response has complete detail of the group. + */ + 'complete_detail'?: boolean | null; + /** + * Content details of the group + */ + 'content'?: any | null; + /** + * Creation time of the group in milliseconds + */ + 'creation_time_in_millis'?: number | null; + /** + * Liveboards that are assigned as default Liveboards to the group. + */ + 'default_liveboards'?: Array | null; + /** + * Indicates whether the group is deleted + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the group is deprecated + */ + 'deprecated'?: boolean | null; + /** + * Description of the group + */ + 'description'?: string | null; + /** + * Display name of the group. + */ + 'display_name': string; + /** + * Indicates whether the group is external + */ + 'external'?: boolean | null; + /** + * Generation number of the group + */ + 'generation_number'?: number | null; + /** + * Indicates whether the group is hidden + */ + 'hidden'?: boolean | null; + /** + * The unique identifier of the object + */ + 'id': string; + /** + * Index number of the group + */ + 'index'?: number | null; + /** + * Index version number of the group + */ + 'index_version'?: number | null; + /** + * Metadata version number of the group + */ + 'metadata_version'?: number | null; + /** + * Last modified time of the group in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * The unique identifier of the object + */ + 'modifier_id'?: string | null; + /** + * Name of the group. + */ + 'name': string; + /** + * Orgs in which group exists. + */ + 'orgs'?: Array | null; + /** + * The unique identifier of the object + */ + 'owner_id'?: string | null; + /** + * Parent type of the group. + */ + 'parent_type'?: UserGroupResponseParentTypeEnum | null; + /** + * Privileges which are assigned to the group + */ + 'privileges'?: Array | null; + /** + * Groups who are part of the group + */ + 'sub_groups'?: Array | null; + /** + * Indicates whether the group is a system group. + */ + 'system_group'?: boolean | null; + /** + * Tags associated with the group. + */ + 'tags'?: Array | null; + /** + * Type of the group. + */ + 'type'?: UserGroupResponseTypeEnum | null; + /** + * Users who are part of the group. + */ + 'users'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility': UserGroupResponseVisibilityEnum; + /** + * List of roles assgined to the user + */ + 'roles'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; +type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateMergeRequest { + /** + * Name of the branch from which changes need to be picked for validation + */ + 'source_branch_name': string; + /** + * Name of the branch where files will be merged + */ + 'target_branch_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateTokenRequest { + 'token': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class VariableValue { + /** + * The value of the variable + */ + 'value'?: string | null; + /** + * The value of the variable if it is a list type + */ + 'value_list'?: Array | null; + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Principal type + */ + 'principal_type'?: VariableValuePrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Variable object +*/ +declare class Variable { + /** + * Unique identifier of the variable + */ + 'id': string; + /** + * Name of the variable + */ + 'name': string; + /** + * Type of the variable + */ + 'variable_type'?: VariableVariableTypeEnum | null; + /** + * If the variable is sensitive + */ + 'sensitive'?: boolean | null; + /** + * Values of the variable + */ + 'values'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthApiKey { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthBasicAuth { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthOAuth2 { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthentication { + 'API_KEY'?: WebhookAuthApiKey; + 'BASIC_AUTH'?: WebhookAuthBasicAuth; + /** + * Redacted Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthenticationInput { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookDeleteFailure { + /** + * Unique identifier of the webhook that failed to delete. + */ + 'id': string; + /** + * Name of the webhook that failed to delete. + */ + 'name': string; + /** + * Error message describing why the deletion failed. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookOrg { /** - * User Parameters which are specified for the user via JWToken + * Unique identifier of the org. */ - 'user_parameters'?: any | null; + 'id': string; /** - * Access Control Properties which are specified for the user via JWToken + * Name of the org. */ - 'access_control_properties'?: any | null; + 'name': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14677,10 +17005,6 @@ declare class User { }[]; constructor(); } -type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; -type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; -type UserParentTypeEnum = "USER" | "GROUP"; /** * ThoughtSpot Public REST API @@ -14693,128 +17017,127 @@ type UserParentTypeEnum = "USER" | "GROUP"; * https://openapi-generator.tech * Do not edit the class manually. */ - -declare class UserGroupResponse { - /** - * The unique identifier of the object - */ - 'author_id'?: string | null; - /** - * Indicates whether the response has complete detail of the group. - */ - 'complete_detail'?: boolean | null; - /** - * Content details of the group - */ - 'content'?: any | null; - /** - * Creation time of the group in milliseconds - */ - 'creation_time_in_millis'?: number | null; - /** - * Liveboards that are assigned as default Liveboards to the group. - */ - 'default_liveboards'?: Array | null; - /** - * Indicates whether the group is deleted - */ - 'deleted'?: boolean | null; - /** - * Indicates whether the group is deprecated - */ - 'deprecated'?: boolean | null; - /** - * Description of the group - */ - 'description'?: string | null; +declare class WebhookSignatureVerification { /** - * Display name of the group. + * Signature verification method type. */ - 'display_name': string; + 'type': WebhookSignatureVerificationTypeEnum; /** - * Indicates whether the group is external + * HTTP header where the signature is sent. */ - 'external'?: boolean | null; + 'header': string; /** - * Generation number of the group + * Hash algorithm used for signature verification. */ - 'generation_number'?: number | null; + 'algorithm': WebhookSignatureVerificationAlgorithmEnum; /** - * Indicates whether the group is hidden + * Shared secret used for HMAC signature generation. */ - 'hidden'?: boolean | null; + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSignatureVerificationTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookUser { /** - * The unique identifier of the object + * Unique identifier of the user. */ 'id': string; /** - * Index number of the group - */ - 'index'?: number | null; - /** - * Index version number of the group - */ - 'index_version'?: number | null; - /** - * Metadata version number of the group - */ - 'metadata_version'?: number | null; - /** - * Last modified time of the group in milliseconds. - */ - 'modification_time_in_millis'?: number | null; - /** - * The unique identifier of the object - */ - 'modifier_id'?: string | null; - /** - * Name of the group. + * Name of the user. */ 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookResponse { /** - * Orgs in which group exists. - */ - 'orgs'?: Array | null; - /** - * The unique identifier of the object - */ - 'owner_id'?: string | null; - /** - * Parent type of the group. - */ - 'parent_type'?: UserGroupResponseParentTypeEnum | null; - /** - * Privileges which are assigned to the group + * Unique identifier of the webhook configuration. */ - 'privileges'?: Array | null; + 'id': string; /** - * Groups who are part of the group + * Name of the webhook configuration. */ - 'sub_groups'?: Array | null; + 'name': string; /** - * Indicates whether the group is a system group. + * Description of the webhook configuration. */ - 'system_group'?: boolean | null; + 'description'?: string | null; + 'org'?: WebhookOrg; /** - * Tags associated with the group. + * The webhook endpoint URL. */ - 'tags'?: Array | null; + 'url': string; /** - * Type of the group. + * Additional URL parameters as key-value pairs. */ - 'type'?: UserGroupResponseTypeEnum | null; + 'url_params'?: any | null; /** - * Users who are part of the group. + * List of events this webhook subscribes to. */ - 'users'?: Array | null; + 'events': Array; + 'authentication'?: WebhookAuthentication; + 'signature_verification'?: WebhookSignatureVerification; /** - * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + * Creation time of the webhook configuration in milliseconds. */ - 'visibility': UserGroupResponseVisibilityEnum; + 'creation_time_in_millis': number; /** - * List of roles assgined to the user + * Last modified time of the webhook configuration in milliseconds. */ - 'roles'?: Array | null; + 'modification_time_in_millis': number; + 'created_by'?: WebhookUser; + 'last_modified_by'?: WebhookUser; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14830,9 +17153,7 @@ declare class UserGroupResponse { }[]; constructor(); } -type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; -type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP"; -type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type WebhookResponseEventsEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -14846,23 +17167,23 @@ type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * Do not edit the class manually. */ -/** -* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). -*/ -declare class UserParameterOptions { - 'objects'?: Array | null; +declare class WebhookDeleteResponse { /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * Number of webhooks successfully deleted. */ - 'runtime_filters'?: Array | null; + 'deleted_count': number; /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * Number of webhooks that failed to delete. */ - 'runtime_sorts'?: Array | null; + 'failed_count': number; /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * List of successfully deleted webhooks. */ - 'parameters'?: Array | null; + 'deleted_webhooks': Array; + /** + * List of webhooks that failed to delete with error details. + */ + 'failed_webhooks': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14890,15 +17211,23 @@ declare class UserParameterOptions { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ValidateMergeRequest { +declare class WebhookPagination { /** - * Name of the branch from which changes need to be picked for validation + * The starting record number from where the records are included. */ - 'source_branch_name': string; + 'record_offset': number; /** - * Name of the branch where files will be merged + * The number of records included in the response. */ - 'target_branch_name': string; + 'record_size': number; + /** + * Total number of webhook configurations available. + */ + 'total_count': number; + /** + * Indicates whether more records are available beyond the current response. + */ + 'has_more': boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14926,8 +17255,13 @@ declare class ValidateMergeRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ValidateTokenRequest { - 'token': string; + +declare class WebhookSearchResponse { + /** + * List of webhook configurations matching the search criteria. + */ + 'webhooks': Array; + 'pagination': WebhookPagination; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14955,27 +17289,23 @@ declare class ValidateTokenRequest { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class VariableValue { - /** - * The value of the variable - */ - 'value'?: string | null; +declare class WebhookSignatureVerificationInput { /** - * The unique name of the org + * Signature verification method type. */ - 'org_identifier': string; + 'type': WebhookSignatureVerificationInputTypeEnum; /** - * Principal type + * HTTP header where the signature is sent. */ - 'principal_type'?: VariableValuePrincipalTypeEnum | null; + 'header': string; /** - * Unique ID or name of the principal + * Hash algorithm used for signature verification. */ - 'principal_identifier'?: string | null; + 'algorithm': WebhookSignatureVerificationInputAlgorithmEnum; /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + * Shared secret used for HMAC signature generation. */ - 'priority'?: number | null; + 'secret': string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14988,47 +17318,32 @@ declare class VariableValue { baseName: string; type: string; format: string; - }[]; - constructor(); -} -type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; - -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** -* Variable object -*/ -declare class Variable { - /** - * Unique identifier of the variable - */ - 'id': string; - /** - * Name of the variable - */ - 'name': string; - /** - * Type of the variable - */ - 'variable_type'?: VariableVariableTypeEnum | null; + }[]; + constructor(); +} +type WebhookSignatureVerificationInputTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationInputAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSortOptionsInput { /** - * If the variable is sensitive + * Name of the field to apply the sort on. */ - 'sensitive'?: boolean | null; + 'field_name'?: WebhookSortOptionsInputFieldNameEnum | null; /** - * Values of the variable + * Sort order: ASC (Ascending) or DESC (Descending). */ - 'values'?: Array | null; + 'order'?: WebhookSortOptionsInputOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -15044,7 +17359,8 @@ declare class Variable { }[]; constructor(); } -type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL"; +type WebhookSortOptionsInputFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type WebhookSortOptionsInputOrderEnum = "ASC" | "DESC"; /** * Defines the contract for a middleware intercepting requests before @@ -15242,16 +17558,42 @@ declare class RequiredError extends Error { * no description */ declare class AIApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -15265,6 +17607,14 @@ declare class AIApiRequestFactory extends BaseAPIRequestFactory { singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; } declare class AIApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15273,6 +17623,22 @@ declare class AIApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ createConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15281,6 +17647,22 @@ declare class AIApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ queryGetDecomposedQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15312,7 +17694,7 @@ declare class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; @@ -15522,7 +17904,7 @@ declare class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { */ updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -15757,12 +18139,12 @@ declare class DBTApiRequestFactory extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -16076,7 +18458,7 @@ declare class MetadataApiRequestFactory extends BaseAPIRequestFactory { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; @@ -16602,6 +18984,11 @@ declare class SecurityApiResponseProcessor { * no description */ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -16614,6 +19001,11 @@ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. */ getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -16621,6 +19013,14 @@ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; } declare class SystemApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -16645,6 +19045,14 @@ declare class SystemApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ getSystemOverrideInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -16771,6 +19179,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param commitBranchRequest */ commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -16782,10 +19195,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -16852,10 +19270,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -16879,12 +19302,12 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -16975,10 +19398,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -17078,10 +19506,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -17092,6 +19525,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param getObjectAccessTokenRequest */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -17174,6 +19612,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param searchCommitsRequest */ searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -17235,10 +19678,26 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -17298,7 +19757,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -17381,16 +19840,22 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -17447,6 +19912,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ commitBranch(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17471,6 +19944,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ copyObject(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17583,6 +20064,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ createVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17759,6 +20248,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17927,6 +20424,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ getCustomAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -17943,6 +20448,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ getObjectAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18079,6 +20592,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ searchCommits(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18183,6 +20704,30 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ searchVariables(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18391,6 +20936,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -18561,28 +21114,28 @@ declare class UsersApiResponseProcessor { */ declare class VariableApiRequestFactory extends BaseAPIRequestFactory { /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -18756,19 +21309,106 @@ declare class VersionControlApiResponseProcessor { validateMerge(response: ResponseContext): Promise>; } +/** + * no description + */ +declare class WebhooksApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} +declare class WebhooksApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; +} + declare class PromiseAIApi { private api; constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor); + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -18794,7 +21434,7 @@ declare class PromiseAuthenticationApi { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; @@ -18894,7 +21534,7 @@ declare class PromiseConnectionsApi { */ updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -18984,12 +21624,12 @@ declare class PromiseDBTApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -19120,7 +21760,7 @@ declare class PromiseMetadataApi { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; @@ -19332,6 +21972,11 @@ declare class PromiseSecurityApi { declare class PromiseSystemApi { private api; constructor(configuration: Configuration, requestFactory?: SystemApiRequestFactory, responseProcessor?: SystemApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -19344,6 +21989,11 @@ declare class PromiseSystemApi { * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. */ getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -19415,6 +22065,11 @@ declare class PromiseThoughtSpotRestApi { * @param commitBranchRequest */ commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -19426,10 +22081,15 @@ declare class PromiseThoughtSpotRestApi { */ convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -19496,10 +22156,15 @@ declare class PromiseThoughtSpotRestApi { */ createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -19523,12 +22188,12 @@ declare class PromiseThoughtSpotRestApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; /** * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. */ @@ -19619,10 +22284,15 @@ declare class PromiseThoughtSpotRestApi { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -19722,10 +22392,15 @@ declare class PromiseThoughtSpotRestApi { */ getCurrentUserToken(_options?: Configuration): Promise; /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -19736,6 +22411,11 @@ declare class PromiseThoughtSpotRestApi { * @param getObjectAccessTokenRequest */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -19818,6 +22498,11 @@ declare class PromiseThoughtSpotRestApi { * @param searchCommitsRequest */ searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -19879,10 +22564,26 @@ declare class PromiseThoughtSpotRestApi { */ searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise>; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -19942,7 +22643,7 @@ declare class PromiseThoughtSpotRestApi { */ updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -20025,16 +22726,22 @@ declare class PromiseThoughtSpotRestApi { */ updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -20111,28 +22818,28 @@ declare class PromiseVariableApi { private api; constructor(configuration: Configuration, requestFactory?: VariableApiRequestFactory, responseProcessor?: VariableApiResponseProcessor); /** - * 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. 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 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 */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ deleteVariable(identifier: string, _options?: Configuration): Promise; /** - * 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 */ searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; /** - * 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. * @param updateVariableRequest */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * 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 */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -20189,18 +22896,76 @@ declare class PromiseVersionControlApi { validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise>; } +declare class PromiseWebhooksApi { + private api; + constructor(configuration: Configuration, requestFactory?: WebhooksApiRequestFactory, responseProcessor?: WebhooksApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} + /** - * creates a bearer authentication configuration using params or a token provider - * @param thoughtSpotHost : the base url of the server - * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , - * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or - * function which returns a promise of a string which is the full access token + * Options for additional configuration settings + */ +interface ConfigurationOptions { + /** + * Additional headers to be included in every request + * @example + * ```typescript + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ``` + */ + additionalHeaders?: Record; +} +/** + * creates a bearer authentication configuration using params or a token provider + * @param thoughtSpotHost thoughtSpotHost URL + * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , + * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or + * function which returns a promise of a string which is the full access token + * @param options - Optional configuration for custom headers and other settings + * @returns Configuration object ready for authenticated API calls + * @example + * ```typescript + * const configWithTokenProvider = createBearerAuthenticationConfig( + * "CLUSTER_SERVER_URL", + * YOUR_TOKEN_PROVIDER, + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ); */ -declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise)) => Configuration; +declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise), options?: ConfigurationOptions) => Configuration; /** * creates a basic configuration using params which does not require authentication * @param thoughtSpotHost : the base url of the server + * @param options - Optional configuration for additional headers and other settings + * @returns Basic client configuration for unauthenticated API calls */ -declare const createBasicConfig: (thoughtSpotHost: string) => Configuration; +declare const createBasicConfig: (thoughtSpotHost: string, options?: ConfigurationOptions) => Configuration; -export { PromiseAIApi as AIApi, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AnswerContent, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, Configuration, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, Conversation, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestTypeEnum, CronExpression, CronExpressionInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, ErrorResponse, EurekaDecomposeQueryResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest, GetTokenResponse, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, InputVariableValue, InputVariableValuePrincipalTypeEnum, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, OAuth2Configuration, ObjectIDAndName, Org, OrgInfo, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum, SearchUsersRequestSortOptionsOrderEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestOutputFormatEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SelfDecodingBody, SendMessageRequest, ServerConfiguration, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableRequestOperationEnum, UpdateVariableValuesRequest, UpdateVariableValuesRequestOperationEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableValue, VariableValueInput, VariableValuePrincipalTypeEnum, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; +export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerContextInput, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, Configuration, ConfigureCommunicationChannelPreferencesRequest, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CronExpression, CronExpressionInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, OAuth2Configuration, ObjectIDAndName, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum, SearchUsersRequestSortOptionsOrderEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestOutputFormatEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SelfDecodingBody, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; diff --git a/sdks/typescript/dist/index.js b/sdks/typescript/dist/index.js index eb3d91569..ace13b605 100644 --- a/sdks/typescript/dist/index.js +++ b/sdks/typescript/dist/index.js @@ -281,6 +281,31 @@ function configureAuthMethods(config) { return authMethods; } +// models/AIContext.ts +var _AIContext = class _AIContext { + static getAttributeTypeMap() { + return _AIContext.attributeTypeMap; + } + constructor() { + } +}; +_AIContext.discriminator = void 0; +_AIContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var AIContext = _AIContext; + // models/APIKey.ts var _APIKey = class _APIKey { static getAttributeTypeMap() { @@ -567,6 +592,25 @@ _ActivateUserRequest.attributeTypeMap = [ ]; var ActivateUserRequest = _ActivateUserRequest; +// models/AgentConversation.ts +var _AgentConversation = class _AgentConversation { + static getAttributeTypeMap() { + return _AgentConversation.attributeTypeMap; + } + constructor() { + } +}; +_AgentConversation.discriminator = void 0; +_AgentConversation.attributeTypeMap = [ + { + "name": "conversation_id", + "baseName": "conversation_id", + "type": "string", + "format": "" + } +]; +var AgentConversation = _AgentConversation; + // models/AnswerContent.ts var _AnswerContent = class _AnswerContent { static getAttributeTypeMap() { @@ -622,6 +666,31 @@ _AnswerContent.attributeTypeMap = [ ]; var AnswerContent = _AnswerContent; +// models/AnswerContextInput.ts +var _AnswerContextInput = class _AnswerContextInput { + static getAttributeTypeMap() { + return _AnswerContextInput.attributeTypeMap; + } + constructor() { + } +}; +_AnswerContextInput.discriminator = void 0; +_AnswerContextInput.attributeTypeMap = [ + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + } +]; +var AnswerContextInput = _AnswerContextInput; + // models/AnswerDataResponse.ts var _AnswerDataResponse = class _AnswerDataResponse { static getAttributeTypeMap() { @@ -1185,8 +1254,8 @@ _ColumnSecurityRule.attributeTypeMap = [ "format": "" }, { - "name": "sourceTableDetails", - "baseName": "sourceTableDetails", + "name": "source_table_details", + "baseName": "source_table_details", "type": "ColumnSecurityRuleSourceTable", "format": "" } @@ -1279,20 +1348,20 @@ var _ColumnSecurityRuleResponse = class _ColumnSecurityRuleResponse { _ColumnSecurityRuleResponse.discriminator = void 0; _ColumnSecurityRuleResponse.attributeTypeMap = [ { - "name": "guid", - "baseName": "guid", + "name": "table_guid", + "baseName": "table_guid", "type": "string", "format": "" }, { - "name": "objId", - "baseName": "objId", + "name": "obj_id", + "baseName": "obj_id", "type": "string", "format": "" }, { - "name": "columnSecurityRules", - "baseName": "columnSecurityRules", + "name": "column_security_rules", + "baseName": "column_security_rules", "type": "Array", "format": "" } @@ -1577,6 +1646,56 @@ _CommiterType.attributeTypeMap = [ ]; var CommiterType = _CommiterType; +// models/CommunicationChannelPreferencesResponse.ts +var _CommunicationChannelPreferencesResponse = class _CommunicationChannelPreferencesResponse { + static getAttributeTypeMap() { + return _CommunicationChannelPreferencesResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelPreferencesResponse.discriminator = void 0; +_CommunicationChannelPreferencesResponse.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelPreferencesResponse = _CommunicationChannelPreferencesResponse; + +// models/ConfigureCommunicationChannelPreferencesRequest.ts +var _ConfigureCommunicationChannelPreferencesRequest = class _ConfigureCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureCommunicationChannelPreferencesRequest.discriminator = void 0; +_ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureCommunicationChannelPreferencesRequest = _ConfigureCommunicationChannelPreferencesRequest; + // models/ConnectionConfigurationResponse.ts var _ConnectionConfigurationResponse = class _ConnectionConfigurationResponse { static getAttributeTypeMap() { @@ -1706,6 +1825,43 @@ _ConnectionInput.attributeTypeMap = [ ]; var ConnectionInput = _ConnectionInput; +// models/ContextPayloadV2Input.ts +var _ContextPayloadV2Input = class _ContextPayloadV2Input { + static getAttributeTypeMap() { + return _ContextPayloadV2Input.attributeTypeMap; + } + constructor() { + } +}; +_ContextPayloadV2Input.discriminator = void 0; +_ContextPayloadV2Input.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ContextPayloadV2InputTypeEnum", + "format": "" + }, + { + "name": "answer_context", + "baseName": "answer_context", + "type": "AnswerContextInput", + "format": "" + }, + { + "name": "liveboard_context", + "baseName": "liveboard_context", + "type": "LBContextInput", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var ContextPayloadV2Input = _ContextPayloadV2Input; + // models/Conversation.ts var _Conversation = class _Conversation { static getAttributeTypeMap() { @@ -1725,6 +1881,37 @@ _Conversation.attributeTypeMap = [ ]; var Conversation = _Conversation; +// models/ConversationSettingsInput.ts +var _ConversationSettingsInput = class _ConversationSettingsInput { + static getAttributeTypeMap() { + return _ConversationSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_ConversationSettingsInput.discriminator = void 0; +_ConversationSettingsInput.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + } +]; +var ConversationSettingsInput = _ConversationSettingsInput; + // models/ConvertWorksheetToModelRequest.ts var _ConvertWorksheetToModelRequest = class _ConvertWorksheetToModelRequest { static getAttributeTypeMap() { @@ -1799,6 +1986,99 @@ _CopyObjectRequest.attributeTypeMap = [ ]; var CopyObjectRequest = _CopyObjectRequest; +// models/CreateAgentConversationRequest.ts +var _CreateAgentConversationRequest = class _CreateAgentConversationRequest { + static getAttributeTypeMap() { + return _CreateAgentConversationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequest.discriminator = void 0; +_CreateAgentConversationRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "CreateAgentConversationRequestMetadataContext", + "format": "" + }, + { + "name": "conversation_settings", + "baseName": "conversation_settings", + "type": "CreateAgentConversationRequestConversationSettings", + "format": "" + } +]; +var CreateAgentConversationRequest = _CreateAgentConversationRequest; + +// models/CreateAgentConversationRequestConversationSettings.ts +var _CreateAgentConversationRequestConversationSettings = class _CreateAgentConversationRequestConversationSettings { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestConversationSettings.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestConversationSettings.discriminator = void 0; +_CreateAgentConversationRequestConversationSettings.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + } +]; +var CreateAgentConversationRequestConversationSettings = _CreateAgentConversationRequestConversationSettings; + +// models/CreateAgentConversationRequestMetadataContext.ts +var _CreateAgentConversationRequestMetadataContext = class _CreateAgentConversationRequestMetadataContext { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestMetadataContext.discriminator = void 0; +_CreateAgentConversationRequestMetadataContext.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateAgentConversationRequestMetadataContextTypeEnum", + "format": "" + }, + { + "name": "answer_context", + "baseName": "answer_context", + "type": "AnswerContextInput", + "format": "" + }, + { + "name": "liveboard_context", + "baseName": "liveboard_context", + "type": "LBContextInput", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var CreateAgentConversationRequestMetadataContext = _CreateAgentConversationRequestMetadataContext; + // models/CreateCalendarRequest.ts var _CreateCalendarRequest = class _CreateCalendarRequest { static getAttributeTypeMap() { @@ -2395,6 +2675,18 @@ _CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap = [ "baseName": "hide_modify_alert", "type": "boolean", "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" } ]; var CreateEmailCustomizationRequestTemplateProperties = _CreateEmailCustomizationRequestTemplateProperties; @@ -2955,79 +3247,208 @@ _CreateVariableRequest.attributeTypeMap = [ "format": "" }, { - "name": "sensitive", - "baseName": "sensitive", + "name": "is_sensitive", + "baseName": "is_sensitive", "type": "boolean", "format": "" }, { - "name": "values", - "baseName": "values", - "type": "Array", + "name": "data_type", + "baseName": "data_type", + "type": "CreateVariableRequestDataTypeEnum", "format": "" } ]; var CreateVariableRequest = _CreateVariableRequest; -// models/CronExpression.ts -var _CronExpression = class _CronExpression { +// models/CreateWebhookConfigurationRequest.ts +var _CreateWebhookConfigurationRequest = class _CreateWebhookConfigurationRequest { static getAttributeTypeMap() { - return _CronExpression.attributeTypeMap; + return _CreateWebhookConfigurationRequest.attributeTypeMap; } constructor() { } }; -_CronExpression.discriminator = void 0; -_CronExpression.attributeTypeMap = [ +_CreateWebhookConfigurationRequest.discriminator = void 0; +_CreateWebhookConfigurationRequest.attributeTypeMap = [ { - "name": "day_of_month", - "baseName": "day_of_month", + "name": "name", + "baseName": "name", "type": "string", "format": "" }, { - "name": "day_of_week", - "baseName": "day_of_week", + "name": "description", + "baseName": "description", "type": "string", "format": "" }, { - "name": "hour", - "baseName": "hour", + "name": "url", + "baseName": "url", "type": "string", "format": "" }, { - "name": "minute", - "baseName": "minute", + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + } +]; +var CreateWebhookConfigurationRequest = _CreateWebhookConfigurationRequest; + +// models/CreateWebhookConfigurationRequestAuthentication.ts +var _CreateWebhookConfigurationRequestAuthentication = class _CreateWebhookConfigurationRequestAuthentication { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestAuthentication.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestAuthentication.discriminator = void 0; +_CreateWebhookConfigurationRequestAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", "type": "string", "format": "" }, { - "name": "month", - "baseName": "month", + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var CreateWebhookConfigurationRequestAuthentication = _CreateWebhookConfigurationRequestAuthentication; + +// models/CreateWebhookConfigurationRequestSignatureVerification.ts +var _CreateWebhookConfigurationRequestSignatureVerification = class _CreateWebhookConfigurationRequestSignatureVerification { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestSignatureVerification.discriminator = void 0; +_CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", "type": "string", "format": "" }, { - "name": "second", - "baseName": "second", + "name": "algorithm", + "baseName": "algorithm", + "type": "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", "type": "string", "format": "" } ]; -var CronExpression = _CronExpression; +var CreateWebhookConfigurationRequestSignatureVerification = _CreateWebhookConfigurationRequestSignatureVerification; -// models/CronExpressionInput.ts -var _CronExpressionInput = class _CronExpressionInput { +// models/CronExpression.ts +var _CronExpression = class _CronExpression { static getAttributeTypeMap() { - return _CronExpressionInput.attributeTypeMap; + return _CronExpression.attributeTypeMap; } constructor() { } }; -_CronExpressionInput.discriminator = void 0; -_CronExpressionInput.attributeTypeMap = [ +_CronExpression.discriminator = void 0; +_CronExpression.attributeTypeMap = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } +]; +var CronExpression = _CronExpression; + +// models/CronExpressionInput.ts +var _CronExpressionInput = class _CronExpressionInput { + static getAttributeTypeMap() { + return _CronExpressionInput.attributeTypeMap; + } + constructor() { + } +}; +_CronExpressionInput.discriminator = void 0; +_CronExpressionInput.attributeTypeMap = [ { "name": "day_of_month", "baseName": "day_of_month", @@ -3092,6 +3513,56 @@ _CustomActionMetadataTypeInput.attributeTypeMap = [ ]; var CustomActionMetadataTypeInput = _CustomActionMetadataTypeInput; +// models/DataSource.ts +var _DataSource = class _DataSource { + static getAttributeTypeMap() { + return _DataSource.attributeTypeMap; + } + constructor() { + } +}; +_DataSource.discriminator = void 0; +_DataSource.attributeTypeMap = [ + { + "name": "confidence", + "baseName": "confidence", + "type": "number", + "format": "float" + }, + { + "name": "details", + "baseName": "details", + "type": "EntityHeader", + "format": "" + }, + { + "name": "reasoning", + "baseName": "reasoning", + "type": "string", + "format": "" + } +]; +var DataSource = _DataSource; + +// models/DataSourceContextInput.ts +var _DataSourceContextInput = class _DataSourceContextInput { + static getAttributeTypeMap() { + return _DataSourceContextInput.attributeTypeMap; + } + constructor() { + } +}; +_DataSourceContextInput.discriminator = void 0; +_DataSourceContextInput.attributeTypeMap = [ + { + "name": "guid", + "baseName": "guid", + "type": "string", + "format": "" + } +]; +var DataSourceContextInput = _DataSourceContextInput; + // models/DataWarehouseObjectInput.ts var _DataWarehouseObjectInput = class _DataWarehouseObjectInput { static getAttributeTypeMap() { @@ -3467,6 +3938,25 @@ _DeleteOrgEmailCustomizationRequest.attributeTypeMap = [ ]; var DeleteOrgEmailCustomizationRequest = _DeleteOrgEmailCustomizationRequest; +// models/DeleteWebhookConfigurationsRequest.ts +var _DeleteWebhookConfigurationsRequest = class _DeleteWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _DeleteWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteWebhookConfigurationsRequest.discriminator = void 0; +_DeleteWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "webhook_identifiers", + "baseName": "webhook_identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteWebhookConfigurationsRequest = _DeleteWebhookConfigurationsRequest; + // models/DeployCommitRequest.ts var _DeployCommitRequest = class _DeployCommitRequest { static getAttributeTypeMap() { @@ -3547,6 +4037,37 @@ _DeployResponse.attributeTypeMap = [ ]; var DeployResponse = _DeployResponse; +// models/EntityHeader.ts +var _EntityHeader = class _EntityHeader { + static getAttributeTypeMap() { + return _EntityHeader.attributeTypeMap; + } + constructor() { + } +}; +_EntityHeader.discriminator = void 0; +_EntityHeader.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } +]; +var EntityHeader = _EntityHeader; + // models/ErrorResponse.ts var _ErrorResponse = class _ErrorResponse { static getAttributeTypeMap() { @@ -3566,6 +4087,25 @@ _ErrorResponse.attributeTypeMap = [ ]; var ErrorResponse = _ErrorResponse; +// models/EurekaDataSourceSuggestionResponse.ts +var _EurekaDataSourceSuggestionResponse = class _EurekaDataSourceSuggestionResponse { + static getAttributeTypeMap() { + return _EurekaDataSourceSuggestionResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaDataSourceSuggestionResponse.discriminator = void 0; +_EurekaDataSourceSuggestionResponse.attributeTypeMap = [ + { + "name": "data_sources", + "baseName": "data_sources", + "type": "Array", + "format": "" + } +]; +var EurekaDataSourceSuggestionResponse = _EurekaDataSourceSuggestionResponse; + // models/EurekaDecomposeQueryResponse.ts var _EurekaDecomposeQueryResponse = class _EurekaDecomposeQueryResponse { static getAttributeTypeMap() { @@ -3585,6 +4125,25 @@ _EurekaDecomposeQueryResponse.attributeTypeMap = [ ]; var EurekaDecomposeQueryResponse = _EurekaDecomposeQueryResponse; +// models/EurekaGetRelevantQuestionsResponse.ts +var _EurekaGetRelevantQuestionsResponse = class _EurekaGetRelevantQuestionsResponse { + static getAttributeTypeMap() { + return _EurekaGetRelevantQuestionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaGetRelevantQuestionsResponse.discriminator = void 0; +_EurekaGetRelevantQuestionsResponse.attributeTypeMap = [ + { + "name": "relevant_questions", + "baseName": "relevant_questions", + "type": "Array", + "format": "" + } +]; +var EurekaGetRelevantQuestionsResponse = _EurekaGetRelevantQuestionsResponse; + // models/EurekaLLMDecomposeQueryResponse.ts var _EurekaLLMDecomposeQueryResponse = class _EurekaLLMDecomposeQueryResponse { static getAttributeTypeMap() { @@ -3635,6 +4194,87 @@ _EurekaLLMSuggestedQuery.attributeTypeMap = [ ]; var EurekaLLMSuggestedQuery = _EurekaLLMSuggestedQuery; +// models/EurekaRelevantQuestion.ts +var _EurekaRelevantQuestion = class _EurekaRelevantQuestion { + static getAttributeTypeMap() { + return _EurekaRelevantQuestion.attributeTypeMap; + } + constructor() { + } +}; +_EurekaRelevantQuestion.discriminator = void 0; +_EurekaRelevantQuestion.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + } +]; +var EurekaRelevantQuestion = _EurekaRelevantQuestion; + +// models/EventChannelConfig.ts +var _EventChannelConfig = class _EventChannelConfig { + static getAttributeTypeMap() { + return _EventChannelConfig.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfig.discriminator = void 0; +_EventChannelConfig.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfig = _EventChannelConfig; + +// models/EventChannelConfigInput.ts +var _EventChannelConfigInput = class _EventChannelConfigInput { + static getAttributeTypeMap() { + return _EventChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfigInput.discriminator = void 0; +_EventChannelConfigInput.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigInputEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfigInput = _EventChannelConfigInput; + // models/ExcludeMetadataListItemInput.ts var _ExcludeMetadataListItemInput = class _ExcludeMetadataListItemInput { static getAttributeTypeMap() { @@ -4108,6 +4748,12 @@ _ExportMetadataTMLRequestExportOptions.attributeTypeMap = [ "baseName": "export_column_security_rules", "type": "boolean", "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" } ]; var ExportMetadataTMLRequestExportOptions = _ExportMetadataTMLRequestExportOptions; @@ -4188,6 +4834,12 @@ _ExportOptions.attributeTypeMap = [ "baseName": "export_column_security_rules", "type": "boolean", "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" } ]; var ExportOptions = _ExportOptions; @@ -4976,6 +5628,25 @@ _GetCustomAccessTokenRequest.attributeTypeMap = [ ]; var GetCustomAccessTokenRequest = _GetCustomAccessTokenRequest; +// models/GetDataSourceSuggestionsRequest.ts +var _GetDataSourceSuggestionsRequest = class _GetDataSourceSuggestionsRequest { + static getAttributeTypeMap() { + return _GetDataSourceSuggestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetDataSourceSuggestionsRequest.discriminator = void 0; +_GetDataSourceSuggestionsRequest.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var GetDataSourceSuggestionsRequest = _GetDataSourceSuggestionsRequest; + // models/GetFullAccessTokenRequest.ts var _GetFullAccessTokenRequest = class _GetFullAccessTokenRequest { static getAttributeTypeMap() { @@ -5165,6 +5836,111 @@ _GetObjectAccessTokenRequest.attributeTypeMap = [ ]; var GetObjectAccessTokenRequest = _GetObjectAccessTokenRequest; +// models/GetRelevantQuestionsRequest.ts +var _GetRelevantQuestionsRequest = class _GetRelevantQuestionsRequest { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequest.discriminator = void 0; +_GetRelevantQuestionsRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "GetRelevantQuestionsRequestMetadataContext", + "format": "" + }, + { + "name": "limit_relevant_questions", + "baseName": "limit_relevant_questions", + "type": "number", + "format": "int32" + }, + { + "name": "bypass_cache", + "baseName": "bypass_cache", + "type": "boolean", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "ai_context", + "baseName": "ai_context", + "type": "GetRelevantQuestionsRequestAiContext", + "format": "" + } +]; +var GetRelevantQuestionsRequest = _GetRelevantQuestionsRequest; + +// models/GetRelevantQuestionsRequestAiContext.ts +var _GetRelevantQuestionsRequestAiContext = class _GetRelevantQuestionsRequestAiContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestAiContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestAiContext.discriminator = void 0; +_GetRelevantQuestionsRequestAiContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestAiContext = _GetRelevantQuestionsRequestAiContext; + +// models/GetRelevantQuestionsRequestMetadataContext.ts +var _GetRelevantQuestionsRequestMetadataContext = class _GetRelevantQuestionsRequestMetadataContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestMetadataContext.discriminator = void 0; +_GetRelevantQuestionsRequestMetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestMetadataContext = _GetRelevantQuestionsRequestMetadataContext; + // models/GetTokenResponse.ts var _GetTokenResponse = class _GetTokenResponse { static getAttributeTypeMap() { @@ -5846,49 +6622,6 @@ _InputEurekaNLSRequest.attributeTypeMap = [ ]; var InputEurekaNLSRequest = _InputEurekaNLSRequest; -// models/InputVariableValue.ts -var _InputVariableValue = class _InputVariableValue { - static getAttributeTypeMap() { - return _InputVariableValue.attributeTypeMap; - } - constructor() { - } -}; -_InputVariableValue.discriminator = void 0; -_InputVariableValue.attributeTypeMap = [ - { - "name": "value", - "baseName": "value", - "type": "string", - "format": "" - }, - { - "name": "org_identifier", - "baseName": "org_identifier", - "type": "string", - "format": "" - }, - { - "name": "principal_type", - "baseName": "principal_type", - "type": "InputVariableValuePrincipalTypeEnum", - "format": "" - }, - { - "name": "principal_identifier", - "baseName": "principal_identifier", - "type": "string", - "format": "" - }, - { - "name": "priority", - "baseName": "priority", - "type": "number", - "format": "int32" - } -]; -var InputVariableValue = _InputVariableValue; - // models/JWTMetadataObject.ts var _JWTMetadataObject = class _JWTMetadataObject { static getAttributeTypeMap() { @@ -5989,6 +6722,31 @@ _JWTUserOptionsFull.attributeTypeMap = [ ]; var JWTUserOptionsFull = _JWTUserOptionsFull; +// models/LBContextInput.ts +var _LBContextInput = class _LBContextInput { + static getAttributeTypeMap() { + return _LBContextInput.attributeTypeMap; + } + constructor() { + } +}; +_LBContextInput.discriminator = void 0; +_LBContextInput.attributeTypeMap = [ + { + "name": "liveboard_identifier", + "baseName": "liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifier", + "baseName": "visualization_identifier", + "type": "string", + "format": "" + } +]; +var LBContextInput = _LBContextInput; + // models/LiveboardContent.ts var _LiveboardContent = class _LiveboardContent { static getAttributeTypeMap() { @@ -6218,6 +6976,43 @@ _MetadataAssociationItem.attributeTypeMap = [ ]; var MetadataAssociationItem = _MetadataAssociationItem; +// models/MetadataContext.ts +var _MetadataContext = class _MetadataContext { + static getAttributeTypeMap() { + return _MetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_MetadataContext.discriminator = void 0; +_MetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var MetadataContext = _MetadataContext; + // models/MetadataInput.ts var _MetadataInput = class _MetadataInput { static getAttributeTypeMap() { @@ -6521,6 +7316,93 @@ _Org.attributeTypeMap = [ ]; var Org = _Org; +// models/OrgChannelConfigInput.ts +var _OrgChannelConfigInput = class _OrgChannelConfigInput { + static getAttributeTypeMap() { + return _OrgChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigInput.discriminator = void 0; +_OrgChannelConfigInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "OrgChannelConfigInputOperationEnum", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + }, + { + "name": "reset_events", + "baseName": "reset_events", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigInput = _OrgChannelConfigInput; + +// models/OrgChannelConfigResponse.ts +var _OrgChannelConfigResponse = class _OrgChannelConfigResponse { + static getAttributeTypeMap() { + return _OrgChannelConfigResponse.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigResponse.discriminator = void 0; +_OrgChannelConfigResponse.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "OrgDetails", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigResponse = _OrgChannelConfigResponse; + +// models/OrgDetails.ts +var _OrgDetails = class _OrgDetails { + static getAttributeTypeMap() { + return _OrgDetails.attributeTypeMap; + } + constructor() { + } +}; +_OrgDetails.discriminator = void 0; +_OrgDetails.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var OrgDetails = _OrgDetails; + // models/OrgInfo.ts var _OrgInfo = class _OrgInfo { static getAttributeTypeMap() { @@ -6546,6 +7428,31 @@ _OrgInfo.attributeTypeMap = [ ]; var OrgInfo = _OrgInfo; +// models/OrgPreferenceSearchCriteriaInput.ts +var _OrgPreferenceSearchCriteriaInput = class _OrgPreferenceSearchCriteriaInput { + static getAttributeTypeMap() { + return _OrgPreferenceSearchCriteriaInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgPreferenceSearchCriteriaInput.discriminator = void 0; +_OrgPreferenceSearchCriteriaInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_types", + "baseName": "event_types", + "type": "Array", + "format": "" + } +]; +var OrgPreferenceSearchCriteriaInput = _OrgPreferenceSearchCriteriaInput; + // models/OrgResponse.ts var _OrgResponse = class _OrgResponse { static getAttributeTypeMap() { @@ -8719,6 +9626,31 @@ _SearchCommitsRequest.attributeTypeMap = [ ]; var SearchCommitsRequest = _SearchCommitsRequest; +// models/SearchCommunicationChannelPreferencesRequest.ts +var _SearchCommunicationChannelPreferencesRequest = class _SearchCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _SearchCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCommunicationChannelPreferencesRequest.discriminator = void 0; +_SearchCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SearchCommunicationChannelPreferencesRequest = _SearchCommunicationChannelPreferencesRequest; + // models/SearchConfigRequest.ts var _SearchConfigRequest = class _SearchConfigRequest { static getAttributeTypeMap() { @@ -9946,6 +10878,12 @@ _SearchVariablesRequest.attributeTypeMap = [ "type": "Array", "format": "" }, + { + "name": "value_scope", + "baseName": "value_scope", + "type": "Array", + "format": "" + }, { "name": "record_offset", "baseName": "record_offset", @@ -9967,6 +10905,149 @@ _SearchVariablesRequest.attributeTypeMap = [ ]; var SearchVariablesRequest = _SearchVariablesRequest; +// models/SearchWebhookConfigurationsRequest.ts +var _SearchWebhookConfigurationsRequest = class _SearchWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequest.discriminator = void 0; +_SearchWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "webhook_identifier", + "baseName": "webhook_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "SearchWebhookConfigurationsRequestEventTypeEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchWebhookConfigurationsRequestSortOptions", + "format": "" + } +]; +var SearchWebhookConfigurationsRequest = _SearchWebhookConfigurationsRequest; + +// models/SearchWebhookConfigurationsRequestSortOptions.ts +var _SearchWebhookConfigurationsRequestSortOptions = class _SearchWebhookConfigurationsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequestSortOptions.discriminator = void 0; +_SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchWebhookConfigurationsRequestSortOptions = _SearchWebhookConfigurationsRequestSortOptions; + +// models/SendAgentMessageRequest.ts +var _SendAgentMessageRequest = class _SendAgentMessageRequest { + static getAttributeTypeMap() { + return _SendAgentMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageRequest.discriminator = void 0; +_SendAgentMessageRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageRequest = _SendAgentMessageRequest; + +// models/SendAgentMessageResponse.ts +var _SendAgentMessageResponse = class _SendAgentMessageResponse { + static getAttributeTypeMap() { + return _SendAgentMessageResponse.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageResponse.discriminator = void 0; +_SendAgentMessageResponse.attributeTypeMap = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SendAgentMessageResponse = _SendAgentMessageResponse; + +// models/SendAgentMessageStreamingRequest.ts +var _SendAgentMessageStreamingRequest = class _SendAgentMessageStreamingRequest { + static getAttributeTypeMap() { + return _SendAgentMessageStreamingRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageStreamingRequest.discriminator = void 0; +_SendAgentMessageStreamingRequest.attributeTypeMap = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageStreamingRequest = _SendAgentMessageStreamingRequest; + // models/SendMessageRequest.ts var _SendMessageRequest = class _SendMessageRequest { static getAttributeTypeMap() { @@ -10809,6 +11890,18 @@ _TemplatePropertiesInputCreate.attributeTypeMap = [ "baseName": "hide_modify_alert", "type": "boolean", "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" } ]; var TemplatePropertiesInputCreate = _TemplatePropertiesInputCreate; @@ -12205,18 +13298,6 @@ _UpdateVariableRequest.attributeTypeMap = [ "baseName": "name", "type": "string", "format": "" - }, - { - "name": "operation", - "baseName": "operation", - "type": "UpdateVariableRequestOperationEnum", - "format": "" - }, - { - "name": "values", - "baseName": "values", - "type": "Array", - "format": "" } ]; var UpdateVariableRequest = _UpdateVariableRequest; @@ -12232,20 +13313,75 @@ var _UpdateVariableValuesRequest = class _UpdateVariableValuesRequest { _UpdateVariableValuesRequest.discriminator = void 0; _UpdateVariableValuesRequest.attributeTypeMap = [ { - "name": "variable_updates", - "baseName": "variable_updates", - "type": "Array", + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", "format": "" }, { - "name": "operation", - "baseName": "operation", - "type": "UpdateVariableValuesRequestOperationEnum", + "name": "variable_value_scope", + "baseName": "variable_value_scope", + "type": "Array", "format": "" } ]; var UpdateVariableValuesRequest = _UpdateVariableValuesRequest; +// models/UpdateWebhookConfigurationRequest.ts +var _UpdateWebhookConfigurationRequest = class _UpdateWebhookConfigurationRequest { + static getAttributeTypeMap() { + return _UpdateWebhookConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateWebhookConfigurationRequest.discriminator = void 0; +_UpdateWebhookConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + } +]; +var UpdateWebhookConfigurationRequest = _UpdateWebhookConfigurationRequest; + // models/User.ts var _User = class _User { static getAttributeTypeMap() { @@ -12525,6 +13661,12 @@ _User.attributeTypeMap = [ "baseName": "access_control_properties", "type": "any", "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "any", + "format": "" } ]; var User = _User; @@ -12909,6 +14051,43 @@ _ValidateTokenRequest.attributeTypeMap = [ ]; var ValidateTokenRequest = _ValidateTokenRequest; +// models/ValueScopeInput.ts +var _ValueScopeInput = class _ValueScopeInput { + static getAttributeTypeMap() { + return _ValueScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_ValueScopeInput.discriminator = void 0; +_ValueScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "ValueScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + } +]; +var ValueScopeInput = _ValueScopeInput; + // models/Variable.ts var _Variable = class _Variable { static getAttributeTypeMap() { @@ -12983,6 +14162,80 @@ _VariableDetailInput.attributeTypeMap = [ ]; var VariableDetailInput = _VariableDetailInput; +// models/VariableUpdateAssignmentInput.ts +var _VariableUpdateAssignmentInput = class _VariableUpdateAssignmentInput { + static getAttributeTypeMap() { + return _VariableUpdateAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateAssignmentInput.discriminator = void 0; +_VariableUpdateAssignmentInput.attributeTypeMap = [ + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "VariableUpdateAssignmentInputOperationEnum", + "format": "" + } +]; +var VariableUpdateAssignmentInput = _VariableUpdateAssignmentInput; + +// models/VariableUpdateScopeInput.ts +var _VariableUpdateScopeInput = class _VariableUpdateScopeInput { + static getAttributeTypeMap() { + return _VariableUpdateScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateScopeInput.discriminator = void 0; +_VariableUpdateScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableUpdateScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariableUpdateScopeInput = _VariableUpdateScopeInput; + // models/VariableValue.ts var _VariableValue = class _VariableValue { static getAttributeTypeMap() { @@ -12999,6 +14252,12 @@ _VariableValue.attributeTypeMap = [ "type": "string", "format": "" }, + { + "name": "value_list", + "baseName": "value_list", + "type": "Array", + "format": "" + }, { "name": "org_identifier", "baseName": "org_identifier", @@ -13026,241 +14285,834 @@ _VariableValue.attributeTypeMap = [ ]; var VariableValue = _VariableValue; -// models/VariableValueInput.ts -var _VariableValueInput = class _VariableValueInput { +// models/WebhookAuthApiKey.ts +var _WebhookAuthApiKey = class _WebhookAuthApiKey { static getAttributeTypeMap() { - return _VariableValueInput.attributeTypeMap; + return _WebhookAuthApiKey.attributeTypeMap; } constructor() { } }; -_VariableValueInput.discriminator = void 0; -_VariableValueInput.attributeTypeMap = [ +_WebhookAuthApiKey.discriminator = void 0; +_WebhookAuthApiKey.attributeTypeMap = [ { - "name": "variable_identifier", - "baseName": "variable_identifier", + "name": "key", + "baseName": "key", "type": "string", "format": "" }, { - "name": "variable_values", - "baseName": "variable_values", - "type": "Array", + "name": "value", + "baseName": "value", + "type": "string", "format": "" } ]; -var VariableValueInput = _VariableValueInput; +var WebhookAuthApiKey = _WebhookAuthApiKey; -// middleware.ts -var PromiseMiddlewareWrapper = class { - constructor(middleware) { - this.middleware = middleware; +// models/WebhookAuthApiKeyInput.ts +var _WebhookAuthApiKeyInput = class _WebhookAuthApiKeyInput { + static getAttributeTypeMap() { + return _WebhookAuthApiKeyInput.attributeTypeMap; } - pre(context) { - return from(this.middleware.pre(context)); + constructor() { } - post(context) { - return from(this.middleware.post(context)); +}; +_WebhookAuthApiKeyInput.discriminator = void 0; +_WebhookAuthApiKeyInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookAuthApiKeyInput = _WebhookAuthApiKeyInput; + +// models/WebhookAuthBasicAuth.ts +var _WebhookAuthBasicAuth = class _WebhookAuthBasicAuth { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuth.attributeTypeMap; + } + constructor() { } }; +_WebhookAuthBasicAuth.discriminator = void 0; +_WebhookAuthBasicAuth.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } +]; +var WebhookAuthBasicAuth = _WebhookAuthBasicAuth; -// servers.ts -var ServerConfiguration = class { - constructor(url, variableConfiguration) { - this.url = url; - this.variableConfiguration = variableConfiguration; +// models/WebhookAuthBasicAuthInput.ts +var _WebhookAuthBasicAuthInput = class _WebhookAuthBasicAuthInput { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuthInput.attributeTypeMap; } - /** - * Sets the value of the variables of this server. Variables are included in - * the `url` of this ServerConfiguration in the form `{variableName}` - * - * @param variableConfiguration a partial variable configuration for the - * variables contained in the url - */ - setVariables(variableConfiguration) { - Object.assign(this.variableConfiguration, variableConfiguration); + constructor() { } - getConfiguration() { - return this.variableConfiguration; +}; +_WebhookAuthBasicAuthInput.discriminator = void 0; +_WebhookAuthBasicAuthInput.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" } - getUrl() { - let replacedUrl = this.url; - for (const key in this.variableConfiguration) { - var re = new RegExp("{" + key + "}", "g"); - replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); - } - return replacedUrl; +]; +var WebhookAuthBasicAuthInput = _WebhookAuthBasicAuthInput; + +// models/WebhookAuthOAuth2.ts +var _WebhookAuthOAuth2 = class _WebhookAuthOAuth2 { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2.attributeTypeMap; } - /** - * Creates a new request context for this server using the url with variables - * replaced with their respective values and the endpoint of the request appended. - * - * @param endpoint the endpoint to be queried on the server - * @param httpMethod httpMethod to be used - * - */ - makeRequestContext(endpoint, httpMethod) { - return new RequestContext2(this.getUrl() + endpoint, httpMethod); + constructor() { } }; -var server1 = new ServerConfiguration("{base-url}", { "base-url": "https://localhost:443" }); -var servers = [server1]; +_WebhookAuthOAuth2.discriminator = void 0; +_WebhookAuthOAuth2.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2 = _WebhookAuthOAuth2; -// configuration.ts -function createConfiguration(conf = {}) { - const configuration = { - baseServer: conf.baseServer !== void 0 ? conf.baseServer : server1, - httpApi: conf.httpApi || new IsomorphicFetchHttpLibrary(), - middleware: conf.middleware || [], - authMethods: configureAuthMethods(conf.authMethods) - }; - if (conf.promiseMiddleware) { - conf.promiseMiddleware.forEach( - (m) => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) - ); +// models/WebhookAuthOAuth2Input.ts +var _WebhookAuthOAuth2Input = class _WebhookAuthOAuth2Input { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2Input.attributeTypeMap; } - return configuration; -} + constructor() { + } +}; +_WebhookAuthOAuth2Input.discriminator = void 0; +_WebhookAuthOAuth2Input.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2Input = _WebhookAuthOAuth2Input; -// apis/exception.ts -var ApiException = class extends Error { - constructor(code, message, body, headers) { - super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + JSON.stringify(headers)); - this.code = code; - this.body = body; - this.headers = headers; +// models/WebhookAuthentication.ts +var _WebhookAuthentication = class _WebhookAuthentication { + static getAttributeTypeMap() { + return _WebhookAuthentication.attributeTypeMap; + } + constructor() { } }; +_WebhookAuthentication.discriminator = void 0; +_WebhookAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKey", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuth", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2", + "format": "" + } +]; +var WebhookAuthentication = _WebhookAuthentication; -// apis/baseapi.ts -var BaseAPIRequestFactory = class { - constructor(configuration) { - this.configuration = configuration; +// models/WebhookAuthenticationInput.ts +var _WebhookAuthenticationInput = class _WebhookAuthenticationInput { + static getAttributeTypeMap() { + return _WebhookAuthenticationInput.attributeTypeMap; + } + constructor() { } }; -var RequiredError = class extends Error { - constructor(api, method, field) { - super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); - this.api = api; - this.method = method; - this.field = field; - this.name = "RequiredError"; +_WebhookAuthenticationInput.discriminator = void 0; +_WebhookAuthenticationInput.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var WebhookAuthenticationInput = _WebhookAuthenticationInput; + +// models/WebhookDeleteFailure.ts +var _WebhookDeleteFailure = class _WebhookDeleteFailure { + static getAttributeTypeMap() { + return _WebhookDeleteFailure.attributeTypeMap; + } + constructor() { } }; +_WebhookDeleteFailure.discriminator = void 0; +_WebhookDeleteFailure.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var WebhookDeleteFailure = _WebhookDeleteFailure; -// models/ObjectSerializer.ts -var primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" +// models/WebhookDeleteResponse.ts +var _WebhookDeleteResponse = class _WebhookDeleteResponse { + static getAttributeTypeMap() { + return _WebhookDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookDeleteResponse.discriminator = void 0; +_WebhookDeleteResponse.attributeTypeMap = [ + { + "name": "deleted_count", + "baseName": "deleted_count", + "type": "number", + "format": "int32" + }, + { + "name": "failed_count", + "baseName": "failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "deleted_webhooks", + "baseName": "deleted_webhooks", + "type": "Array", + "format": "" + }, + { + "name": "failed_webhooks", + "baseName": "failed_webhooks", + "type": "Array", + "format": "" + } ]; -var supportedMediaTypes = { - "application/json": Infinity, - "application/octet-stream": 0, - "application/x-www-form-urlencoded": 0 +var WebhookDeleteResponse = _WebhookDeleteResponse; + +// models/WebhookOrg.ts +var _WebhookOrg = class _WebhookOrg { + static getAttributeTypeMap() { + return _WebhookOrg.attributeTypeMap; + } + constructor() { + } }; -var enumsMap = /* @__PURE__ */ new Set([ - "ActionConfigInputPositionEnum", - "ActionConfigInputCreatePositionEnum", - "AssociateMetadataInputTypeEnum", - "AssociateMetadataInputCreateTypeEnum", - "AuthorMetadataTypeInputTypeEnum", - "ColumnSecurityRuleGroupOperationOperationEnum", - "ConnectionConfigurationResponsePolicyProcessesEnum", - "ConnectionConfigurationResponseDataWarehouseTypeEnum", - "ConnectionConfigurationResponsePolicyTypeEnum", - "ConnectionConfigurationSearchRequestPolicyTypeEnum", - "CopyObjectRequestTypeEnum", - "CreateCalendarRequestCreationMethodEnum", - "CreateCalendarRequestCalendarTypeEnum", - "CreateCalendarRequestMonthOffsetEnum", - "CreateCalendarRequestStartDayOfWeekEnum", - "CreateConnectionConfigurationRequestAuthenticationTypeEnum", - "CreateConnectionConfigurationRequestPolicyTypeEnum", - "CreateConnectionConfigurationRequestPolicyProcessesEnum", - "CreateConnectionRequestDataWarehouseTypeEnum", - "CreateConnectionResponseDataWarehouseTypeEnum", - "CreateRoleRequestPrivilegesEnum", - "CreateScheduleRequestMetadataTypeEnum", - "CreateScheduleRequestFileFormatEnum", - "CreateScheduleRequestTimeZoneEnum", - "CreateScheduleRequestPdfOptionsPageSizeEnum", - "CreateUserGroupRequestPrivilegesEnum", - "CreateUserGroupRequestTypeEnum", - "CreateUserGroupRequestVisibilityEnum", - "CreateUserRequestAccountTypeEnum", - "CreateUserRequestAccountStatusEnum", - "CreateUserRequestVisibilityEnum", - "CreateUserRequestPreferredLocaleEnum", - "CreateVariableRequestTypeEnum", - "CustomActionMetadataTypeInputTypeEnum", - "DeleteMetadataTypeInputTypeEnum", - "DeployCommitRequestDeployTypeEnum", - "DeployCommitRequestDeployPolicyEnum", - "ExcludeMetadataListItemInputTypeEnum", - "ExportAnswerReportRequestFileFormatEnum", - "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", - "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", - "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", - "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", - "ExportLiveboardReportRequestFileFormatEnum", - "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", - "ExportMetadataTMLBatchedRequestMetadataTypeEnum", - "ExportMetadataTMLBatchedRequestEdocFormatEnum", - "ExportMetadataTMLRequestEdocFormatEnum", - "ExportMetadataTMLRequestExportSchemaVersionEnum", - "ExportMetadataTypeInputTypeEnum", - "FavoriteMetadataInputTypeEnum", - "FavoriteMetadataItemTypeEnum", - "FetchAnswerDataRequestDataFormatEnum", - "FetchAsyncImportTaskStatusRequestTaskStatusEnum", - "FetchLiveboardDataRequestDataFormatEnum", - "FetchLogsRequestLogTypeEnum", - "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", - "FilterRulesOperatorEnum", - "GenerateCSVRequestCalendarTypeEnum", - "GenerateCSVRequestMonthOffsetEnum", - "GenerateCSVRequestStartDayOfWeekEnum", - "GetCustomAccessTokenRequestPersistOptionEnum", - "GroupsImportListInputPrivilegesEnum", - "GroupsImportListInputTypeEnum", - "GroupsImportListInputVisibilityEnum", - "HeaderUpdateInputTypeEnum", - "ImportEPackAsyncTaskStatusTaskStatusEnum", - "ImportEPackAsyncTaskStatusImportPolicyEnum", - "ImportMetadataTMLAsyncRequestImportPolicyEnum", - "ImportMetadataTMLRequestImportPolicyEnum", - "ImportUserAccountTypeEnum", - "ImportUserAccountStatusEnum", - "ImportUserVisibilityEnum", - "InputVariableValuePrincipalTypeEnum", - "JWTMetadataObjectTypeEnum", - "MetadataInputTypeEnum", - "MetadataListItemInputTypeEnum", - "MetadataListItemInputSubtypesEnum", - "MetadataObjectTypeEnum", - "MetadataResponseTypeEnum", - "MetadataSearchResponseMetadataTypeEnum", - "MetadataSearchSortOptionsFieldNameEnum", - "MetadataSearchSortOptionsOrderEnum", - "OrgResponseStatusEnum", - "OrgResponseVisibilityEnum", - "ParameterizeMetadataRequestMetadataTypeEnum", - "ParameterizeMetadataRequestFieldTypeEnum", - "PdfOptionsPageSizeEnum", - "PdfOptionsInputPageOrientationEnum", - "PermissionInputShareModeEnum", - "PermissionsMetadataTypeInputTypeEnum", - "PrincipalsInputTypeEnum", - "PublishMetadataListItemTypeEnum", - "RegionalSettingsInputCurrencyFormatEnum", - "RegionalSettingsInputUserLocaleEnum", - "RegionalSettingsInputNumberFormatLocaleEnum", +_WebhookOrg.discriminator = void 0; +_WebhookOrg.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookOrg = _WebhookOrg; + +// models/WebhookPagination.ts +var _WebhookPagination = class _WebhookPagination { + static getAttributeTypeMap() { + return _WebhookPagination.attributeTypeMap; + } + constructor() { + } +}; +_WebhookPagination.discriminator = void 0; +_WebhookPagination.attributeTypeMap = [ + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "total_count", + "baseName": "total_count", + "type": "number", + "format": "int32" + }, + { + "name": "has_more", + "baseName": "has_more", + "type": "boolean", + "format": "" + } +]; +var WebhookPagination = _WebhookPagination; + +// models/WebhookResponse.ts +var _WebhookResponse = class _WebhookResponse { + static getAttributeTypeMap() { + return _WebhookResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookResponse.discriminator = void 0; +_WebhookResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "WebhookOrg", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "WebhookAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "WebhookSignatureVerification", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "created_by", + "baseName": "created_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "last_modified_by", + "baseName": "last_modified_by", + "type": "WebhookUser", + "format": "" + } +]; +var WebhookResponse = _WebhookResponse; + +// models/WebhookSearchResponse.ts +var _WebhookSearchResponse = class _WebhookSearchResponse { + static getAttributeTypeMap() { + return _WebhookSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSearchResponse.discriminator = void 0; +_WebhookSearchResponse.attributeTypeMap = [ + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array", + "format": "" + }, + { + "name": "pagination", + "baseName": "pagination", + "type": "WebhookPagination", + "format": "" + } +]; +var WebhookSearchResponse = _WebhookSearchResponse; + +// models/WebhookSignatureVerification.ts +var _WebhookSignatureVerification = class _WebhookSignatureVerification { + static getAttributeTypeMap() { + return _WebhookSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerification.discriminator = void 0; +_WebhookSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerification = _WebhookSignatureVerification; + +// models/WebhookSignatureVerificationInput.ts +var _WebhookSignatureVerificationInput = class _WebhookSignatureVerificationInput { + static getAttributeTypeMap() { + return _WebhookSignatureVerificationInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerificationInput.discriminator = void 0; +_WebhookSignatureVerificationInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationInputTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationInputAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerificationInput = _WebhookSignatureVerificationInput; + +// models/WebhookSortOptionsInput.ts +var _WebhookSortOptionsInput = class _WebhookSortOptionsInput { + static getAttributeTypeMap() { + return _WebhookSortOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSortOptionsInput.discriminator = void 0; +_WebhookSortOptionsInput.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "WebhookSortOptionsInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "WebhookSortOptionsInputOrderEnum", + "format": "" + } +]; +var WebhookSortOptionsInput = _WebhookSortOptionsInput; + +// models/WebhookUser.ts +var _WebhookUser = class _WebhookUser { + static getAttributeTypeMap() { + return _WebhookUser.attributeTypeMap; + } + constructor() { + } +}; +_WebhookUser.discriminator = void 0; +_WebhookUser.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookUser = _WebhookUser; + +// middleware.ts +var PromiseMiddlewareWrapper = class { + constructor(middleware) { + this.middleware = middleware; + } + pre(context) { + return from(this.middleware.pre(context)); + } + post(context) { + return from(this.middleware.post(context)); + } +}; + +// servers.ts +var ServerConfiguration = class { + constructor(url, variableConfiguration) { + this.url = url; + this.variableConfiguration = variableConfiguration; + } + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + setVariables(variableConfiguration) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + getConfiguration() { + return this.variableConfiguration; + } + getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}", "g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl; + } + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + makeRequestContext(endpoint, httpMethod) { + return new RequestContext2(this.getUrl() + endpoint, httpMethod); + } +}; +var server1 = new ServerConfiguration("{base-url}", { "base-url": "https://localhost:443" }); +var servers = [server1]; + +// configuration.ts +function createConfiguration(conf = {}) { + const configuration = { + baseServer: conf.baseServer !== void 0 ? conf.baseServer : server1, + httpApi: conf.httpApi || new IsomorphicFetchHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + (m) => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} + +// apis/exception.ts +var ApiException = class extends Error { + constructor(code, message, body, headers) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + JSON.stringify(headers)); + this.code = code; + this.body = body; + this.headers = headers; + } +}; + +// apis/baseapi.ts +var BaseAPIRequestFactory = class { + constructor(configuration) { + this.configuration = configuration; + } +}; +var RequiredError = class extends Error { + constructor(api, method, field) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + this.api = api; + this.method = method; + this.field = field; + this.name = "RequiredError"; + } +}; + +// models/ObjectSerializer.ts +var primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" +]; +var supportedMediaTypes = { + "application/json": Infinity, + "application/octet-stream": 0, + "application/x-www-form-urlencoded": 0 +}; +var enumsMap = /* @__PURE__ */ new Set([ + "ActionConfigInputPositionEnum", + "ActionConfigInputCreatePositionEnum", + "AssociateMetadataInputTypeEnum", + "AssociateMetadataInputCreateTypeEnum", + "AuthorMetadataTypeInputTypeEnum", + "ColumnSecurityRuleGroupOperationOperationEnum", + "ConnectionConfigurationResponsePolicyProcessesEnum", + "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "ConnectionConfigurationResponsePolicyTypeEnum", + "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "ContextPayloadV2InputTypeEnum", + "CopyObjectRequestTypeEnum", + "CreateAgentConversationRequestMetadataContextTypeEnum", + "CreateCalendarRequestCreationMethodEnum", + "CreateCalendarRequestCalendarTypeEnum", + "CreateCalendarRequestMonthOffsetEnum", + "CreateCalendarRequestStartDayOfWeekEnum", + "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "CreateConnectionConfigurationRequestPolicyTypeEnum", + "CreateConnectionConfigurationRequestPolicyProcessesEnum", + "CreateConnectionRequestDataWarehouseTypeEnum", + "CreateConnectionResponseDataWarehouseTypeEnum", + "CreateRoleRequestPrivilegesEnum", + "CreateScheduleRequestMetadataTypeEnum", + "CreateScheduleRequestFileFormatEnum", + "CreateScheduleRequestTimeZoneEnum", + "CreateScheduleRequestPdfOptionsPageSizeEnum", + "CreateUserGroupRequestPrivilegesEnum", + "CreateUserGroupRequestTypeEnum", + "CreateUserGroupRequestVisibilityEnum", + "CreateUserRequestAccountTypeEnum", + "CreateUserRequestAccountStatusEnum", + "CreateUserRequestVisibilityEnum", + "CreateUserRequestPreferredLocaleEnum", + "CreateVariableRequestTypeEnum", + "CreateVariableRequestDataTypeEnum", + "CreateWebhookConfigurationRequestEventsEnum", + "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "CustomActionMetadataTypeInputTypeEnum", + "DeleteMetadataTypeInputTypeEnum", + "DeployCommitRequestDeployTypeEnum", + "DeployCommitRequestDeployPolicyEnum", + "EventChannelConfigEventTypeEnum", + "EventChannelConfigChannelsEnum", + "EventChannelConfigInputEventTypeEnum", + "EventChannelConfigInputChannelsEnum", + "ExcludeMetadataListItemInputTypeEnum", + "ExportAnswerReportRequestFileFormatEnum", + "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "ExportLiveboardReportRequestFileFormatEnum", + "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "ExportMetadataTMLRequestEdocFormatEnum", + "ExportMetadataTMLRequestExportSchemaVersionEnum", + "ExportMetadataTypeInputTypeEnum", + "FavoriteMetadataInputTypeEnum", + "FavoriteMetadataItemTypeEnum", + "FetchAnswerDataRequestDataFormatEnum", + "FetchAsyncImportTaskStatusRequestTaskStatusEnum", + "FetchLiveboardDataRequestDataFormatEnum", + "FetchLogsRequestLogTypeEnum", + "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "FilterRulesOperatorEnum", + "GenerateCSVRequestCalendarTypeEnum", + "GenerateCSVRequestMonthOffsetEnum", + "GenerateCSVRequestStartDayOfWeekEnum", + "GetCustomAccessTokenRequestPersistOptionEnum", + "GroupsImportListInputPrivilegesEnum", + "GroupsImportListInputTypeEnum", + "GroupsImportListInputVisibilityEnum", + "HeaderUpdateInputTypeEnum", + "ImportEPackAsyncTaskStatusTaskStatusEnum", + "ImportEPackAsyncTaskStatusImportPolicyEnum", + "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "ImportMetadataTMLRequestImportPolicyEnum", + "ImportUserAccountTypeEnum", + "ImportUserAccountStatusEnum", + "ImportUserVisibilityEnum", + "JWTMetadataObjectTypeEnum", + "MetadataInputTypeEnum", + "MetadataListItemInputTypeEnum", + "MetadataListItemInputSubtypesEnum", + "MetadataObjectTypeEnum", + "MetadataResponseTypeEnum", + "MetadataSearchResponseMetadataTypeEnum", + "MetadataSearchSortOptionsFieldNameEnum", + "MetadataSearchSortOptionsOrderEnum", + "OrgChannelConfigInputOperationEnum", + "OrgChannelConfigInputResetEventsEnum", + "OrgPreferenceSearchCriteriaInputEventTypesEnum", + "OrgResponseStatusEnum", + "OrgResponseVisibilityEnum", + "ParameterizeMetadataRequestMetadataTypeEnum", + "ParameterizeMetadataRequestFieldTypeEnum", + "PdfOptionsPageSizeEnum", + "PdfOptionsInputPageOrientationEnum", + "PermissionInputShareModeEnum", + "PermissionsMetadataTypeInputTypeEnum", + "PrincipalsInputTypeEnum", + "PublishMetadataListItemTypeEnum", + "RegionalSettingsInputCurrencyFormatEnum", + "RegionalSettingsInputUserLocaleEnum", + "RegionalSettingsInputNumberFormatLocaleEnum", "RegionalSettingsInputDateFormatLocaleEnum", "ResponseMessageMessageTypeEnum", "ResponseMessageVisualizationTypeEnum", @@ -13273,6 +15125,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "SearchCalendarsRequestSortOptionsFieldNameEnum", "SearchCalendarsRequestSortOptionsOrderEnum", "SearchCommitsRequestMetadataTypeEnum", + "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", "SearchConnectionRequestDataWarehouseTypesEnum", "SearchConnectionRequestDataWarehouseObjectTypeEnum", "SearchConnectionRequestAuthenticationTypeEnum", @@ -13303,6 +15156,9 @@ var enumsMap = /* @__PURE__ */ new Set([ "SearchUsersRequestSortOptionsFieldNameEnum", "SearchUsersRequestSortOptionsOrderEnum", "SearchVariablesRequestOutputFormatEnum", + "SearchWebhookConfigurationsRequestEventTypeEnum", + "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", "ShareMetadataRequestMetadataTypeEnum", "ShareMetadataTypeInputTypeEnum", "SharePermissionsInputShareModeEnum", @@ -13342,8 +15198,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "UpdateUserRequestAccountTypeEnum", "UpdateUserRequestOperationEnum", "UpdateUserRequestPreferredLocaleEnum", - "UpdateVariableRequestOperationEnum", - "UpdateVariableValuesRequestOperationEnum", + "UpdateWebhookConfigurationRequestEventsEnum", "UserVisibilityEnum", "UserAccountTypeEnum", "UserAccountStatusEnum", @@ -13352,11 +15207,22 @@ var enumsMap = /* @__PURE__ */ new Set([ "UserGroupResponseTypeEnum", "UserGroupResponseVisibilityEnum", "UserObjectTypeEnum", + "ValueScopeInputPrincipalTypeEnum", "VariableVariableTypeEnum", "VariableDetailInputTypeEnum", - "VariableValuePrincipalTypeEnum" + "VariableUpdateAssignmentInputOperationEnum", + "VariableUpdateScopeInputPrincipalTypeEnum", + "VariableValuePrincipalTypeEnum", + "WebhookResponseEventsEnum", + "WebhookSignatureVerificationTypeEnum", + "WebhookSignatureVerificationAlgorithmEnum", + "WebhookSignatureVerificationInputTypeEnum", + "WebhookSignatureVerificationInputAlgorithmEnum", + "WebhookSortOptionsInputFieldNameEnum", + "WebhookSortOptionsInputOrderEnum" ]); var typeMap = { + "AIContext": AIContext, "APIKey": APIKey, "APIKeyInput": APIKeyInput, "AccessToken": AccessToken, @@ -13367,7 +15233,9 @@ var typeMap = { "ActionDetailsInput": ActionDetailsInput, "ActionDetailsInputCreate": ActionDetailsInputCreate, "ActivateUserRequest": ActivateUserRequest, + "AgentConversation": AgentConversation, "AnswerContent": AnswerContent, + "AnswerContextInput": AnswerContextInput, "AnswerDataResponse": AnswerDataResponse, "AssignChangeAuthorRequest": AssignChangeAuthorRequest, "AssignTagRequest": AssignTagRequest, @@ -13399,12 +15267,19 @@ var typeMap = { "CommitHistoryResponse": CommitHistoryResponse, "CommitResponse": CommitResponse, "CommiterType": CommiterType, + "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, "ConnectionConfigurationResponse": ConnectionConfigurationResponse, "ConnectionConfigurationSearchRequest": ConnectionConfigurationSearchRequest, "ConnectionInput": ConnectionInput, + "ContextPayloadV2Input": ContextPayloadV2Input, "Conversation": Conversation, + "ConversationSettingsInput": ConversationSettingsInput, "ConvertWorksheetToModelRequest": ConvertWorksheetToModelRequest, "CopyObjectRequest": CopyObjectRequest, + "CreateAgentConversationRequest": CreateAgentConversationRequest, + "CreateAgentConversationRequestConversationSettings": CreateAgentConversationRequestConversationSettings, + "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, "CreateCalendarRequest": CreateCalendarRequest, "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, "CreateConfigRequest": CreateConfigRequest, @@ -13429,9 +15304,14 @@ var typeMap = { "CreateUserGroupRequest": CreateUserGroupRequest, "CreateUserRequest": CreateUserRequest, "CreateVariableRequest": CreateVariableRequest, + "CreateWebhookConfigurationRequest": CreateWebhookConfigurationRequest, + "CreateWebhookConfigurationRequestAuthentication": CreateWebhookConfigurationRequestAuthentication, + "CreateWebhookConfigurationRequestSignatureVerification": CreateWebhookConfigurationRequestSignatureVerification, "CronExpression": CronExpression, "CronExpressionInput": CronExpressionInput, "CustomActionMetadataTypeInput": CustomActionMetadataTypeInput, + "DataSource": DataSource, + "DataSourceContextInput": DataSourceContextInput, "DataWarehouseObjectInput": DataWarehouseObjectInput, "DataWarehouseObjects": DataWarehouseObjects, "Database": Database, @@ -13447,12 +15327,19 @@ var typeMap = { "DeleteMetadataRequest": DeleteMetadataRequest, "DeleteMetadataTypeInput": DeleteMetadataTypeInput, "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, "DeployCommitRequest": DeployCommitRequest, "DeployResponse": DeployResponse, + "EntityHeader": EntityHeader, "ErrorResponse": ErrorResponse, + "EurekaDataSourceSuggestionResponse": EurekaDataSourceSuggestionResponse, "EurekaDecomposeQueryResponse": EurekaDecomposeQueryResponse, + "EurekaGetRelevantQuestionsResponse": EurekaGetRelevantQuestionsResponse, "EurekaLLMDecomposeQueryResponse": EurekaLLMDecomposeQueryResponse, "EurekaLLMSuggestedQuery": EurekaLLMSuggestedQuery, + "EurekaRelevantQuestion": EurekaRelevantQuestion, + "EventChannelConfig": EventChannelConfig, + "EventChannelConfigInput": EventChannelConfigInput, "ExcludeMetadataListItemInput": ExcludeMetadataListItemInput, "ExportAnswerReportRequest": ExportAnswerReportRequest, "ExportAnswerReportRequestRegionalSettings": ExportAnswerReportRequestRegionalSettings, @@ -13486,9 +15373,13 @@ var typeMap = { "GenericInfo": GenericInfo, "GetAsyncImportStatusResponse": GetAsyncImportStatusResponse, "GetCustomAccessTokenRequest": GetCustomAccessTokenRequest, + "GetDataSourceSuggestionsRequest": GetDataSourceSuggestionsRequest, "GetFullAccessTokenRequest": GetFullAccessTokenRequest, "GetFullAccessTokenRequestUserParameters": GetFullAccessTokenRequestUserParameters, "GetObjectAccessTokenRequest": GetObjectAccessTokenRequest, + "GetRelevantQuestionsRequest": GetRelevantQuestionsRequest, + "GetRelevantQuestionsRequestAiContext": GetRelevantQuestionsRequestAiContext, + "GetRelevantQuestionsRequestMetadataContext": GetRelevantQuestionsRequestMetadataContext, "GetTokenResponse": GetTokenResponse, "GroupObject": GroupObject, "GroupsImportListInput": GroupsImportListInput, @@ -13504,11 +15395,11 @@ var typeMap = { "ImportUsersRequest": ImportUsersRequest, "ImportUsersResponse": ImportUsersResponse, "InputEurekaNLSRequest": InputEurekaNLSRequest, - "InputVariableValue": InputVariableValue, "JWTMetadataObject": JWTMetadataObject, "JWTParameter": JWTParameter, "JWTUserOptions": JWTUserOptions, "JWTUserOptionsFull": JWTUserOptionsFull, + "LBContextInput": LBContextInput, "LiveboardContent": LiveboardContent, "LiveboardDataResponse": LiveboardDataResponse, "LiveboardOptions": LiveboardOptions, @@ -13516,6 +15407,7 @@ var typeMap = { "LogResponse": LogResponse, "LoginRequest": LoginRequest, "MetadataAssociationItem": MetadataAssociationItem, + "MetadataContext": MetadataContext, "MetadataInput": MetadataInput, "MetadataListItemInput": MetadataListItemInput, "MetadataObject": MetadataObject, @@ -13525,7 +15417,11 @@ var typeMap = { "ModelTableList": ModelTableList, "ObjectIDAndName": ObjectIDAndName, "Org": Org, + "OrgChannelConfigInput": OrgChannelConfigInput, + "OrgChannelConfigResponse": OrgChannelConfigResponse, + "OrgDetails": OrgDetails, "OrgInfo": OrgInfo, + "OrgPreferenceSearchCriteriaInput": OrgPreferenceSearchCriteriaInput, "OrgResponse": OrgResponse, "OrgType": OrgType, "ParameterValues": ParameterValues, @@ -13587,6 +15483,7 @@ var typeMap = { "SearchCalendarsRequest": SearchCalendarsRequest, "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, "SearchCommitsRequest": SearchCommitsRequest, + "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, "SearchConfigRequest": SearchConfigRequest, "SearchConnectionRequest": SearchConnectionRequest, "SearchConnectionRequestSortOptions": SearchConnectionRequestSortOptions, @@ -13611,6 +15508,11 @@ var typeMap = { "SearchUsersRequest": SearchUsersRequest, "SearchUsersRequestSortOptions": SearchUsersRequestSortOptions, "SearchVariablesRequest": SearchVariablesRequest, + "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, + "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, + "SendAgentMessageRequest": SendAgentMessageRequest, + "SendAgentMessageResponse": SendAgentMessageResponse, + "SendAgentMessageStreamingRequest": SendAgentMessageStreamingRequest, "SendMessageRequest": SendMessageRequest, "ShareMetadataRequest": ShareMetadataRequest, "ShareMetadataTypeInput": ShareMetadataTypeInput, @@ -13664,6 +15566,7 @@ var typeMap = { "UpdateUserRequest": UpdateUserRequest, "UpdateVariableRequest": UpdateVariableRequest, "UpdateVariableValuesRequest": UpdateVariableValuesRequest, + "UpdateWebhookConfigurationRequest": UpdateWebhookConfigurationRequest, "User": User, "UserGroup": UserGroup, "UserGroupResponse": UserGroupResponse, @@ -13673,10 +15576,30 @@ var typeMap = { "UserPrincipal": UserPrincipal, "ValidateMergeRequest": ValidateMergeRequest, "ValidateTokenRequest": ValidateTokenRequest, + "ValueScopeInput": ValueScopeInput, "Variable": Variable, "VariableDetailInput": VariableDetailInput, + "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, + "VariableUpdateScopeInput": VariableUpdateScopeInput, "VariableValue": VariableValue, - "VariableValueInput": VariableValueInput + "WebhookAuthApiKey": WebhookAuthApiKey, + "WebhookAuthApiKeyInput": WebhookAuthApiKeyInput, + "WebhookAuthBasicAuth": WebhookAuthBasicAuth, + "WebhookAuthBasicAuthInput": WebhookAuthBasicAuthInput, + "WebhookAuthOAuth2": WebhookAuthOAuth2, + "WebhookAuthOAuth2Input": WebhookAuthOAuth2Input, + "WebhookAuthentication": WebhookAuthentication, + "WebhookAuthenticationInput": WebhookAuthenticationInput, + "WebhookDeleteFailure": WebhookDeleteFailure, + "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookOrg": WebhookOrg, + "WebhookPagination": WebhookPagination, + "WebhookResponse": WebhookResponse, + "WebhookSearchResponse": WebhookSearchResponse, + "WebhookSignatureVerification": WebhookSignatureVerification, + "WebhookSignatureVerificationInput": WebhookSignatureVerificationInput, + "WebhookSortOptionsInput": WebhookSortOptionsInput, + "WebhookUser": WebhookUser }; var ObjectSerializer = class _ObjectSerializer { static findCorrectType(data, expectedType) { @@ -13877,6 +15800,42 @@ function canConsumeForm(contentTypes) { // apis/AIApi.ts var AIApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("AIApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -13891,7 +15850,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -13914,26 +15873,26 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.7.0.cl or later - * @param queryGetDecomposedQueryRequest + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest */ - queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; - if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { - throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("AIApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); } - const localVarPath = "/api/rest/2.0/ai/analytical-questions"; + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -13950,30 +15909,26 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. - * @param sendMessageRequest + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest */ - sendMessage(conversationIdentifier, sendMessageRequest, _options) { + getRelevantQuestions(getRelevantQuestionsRequest, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; - if (conversationIdentifier === null || conversationIdentifier === void 0) { - throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); - } - if (sendMessageRequest === null || sendMessageRequest === void 0) { - throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("AIApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); } - const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -13990,26 +15945,26 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. - * @param singleAnswerRequest + * Version: 10.7.0.cl or later + * @param queryGetDecomposedQueryRequest */ - singleAnswer(singleAnswerRequest, _options) { + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; - if (singleAnswerRequest === null || singleAnswerRequest === void 0) { - throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { + throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); } - const localVarPath = "/api/rest/2.0/ai/answer/create"; + const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -14025,51 +15980,224 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } -}; -var AIApiResponseProcessor = class { /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createConversation - * @throws ApiException if the response code was not in [200, 299] + * 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) + * @param sendAgentMessageRequest */ - createConversation(response) { + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "conversationIdentifier"); } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "sendAgentMessageRequest"); } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); + } + if (sendMessageRequest === null || sendMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (singleAnswerRequest === null || singleAnswerRequest === void 0) { + throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + } + const localVarPath = "/api/rest/2.0/ai/answer/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var AIApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", "" ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "Conversation", @@ -14077,6 +16205,144 @@ var AIApiResponseProcessor = class { ); return body; } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } @@ -14133,6 +16399,112 @@ var AIApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -14253,7 +16625,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -14276,7 +16648,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -14290,7 +16662,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -14303,7 +16675,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14334,7 +16706,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14365,7 +16737,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14396,7 +16768,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14428,7 +16800,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -14455,7 +16827,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -14491,7 +16863,7 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15067,7 +17439,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15103,7 +17475,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15139,7 +17511,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15179,7 +17551,7 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15455,7 +17827,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15491,7 +17863,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15527,7 +17899,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -15554,7 +17926,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -15581,7 +17953,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -15608,7 +17980,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15644,7 +18016,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -15667,7 +18039,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -15684,7 +18056,7 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16190,7 +18562,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16226,7 +18598,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -16253,7 +18625,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16293,7 +18665,7 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16569,7 +18941,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16605,7 +18977,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -16632,7 +19004,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16668,7 +19040,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -16708,7 +19080,7 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17057,7 +19429,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17133,7 +19505,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17173,25 +19545,28 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { throw new RequiredError("DBTApi", "dbtGenerateTml", "dbtConnectionIdentifier"); } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "modelTables"); + } if (importWorksheets === null || importWorksheets === void 0) { throw new RequiredError("DBTApi", "dbtGenerateTml", "importWorksheets"); } const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17247,7 +19622,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -17274,7 +19649,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -17311,7 +19686,7 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -17756,7 +20131,7 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17792,7 +20167,7 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17828,7 +20203,7 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18053,7 +20428,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18089,7 +20464,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18116,7 +20491,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18152,7 +20527,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18188,7 +20563,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18220,7 +20595,7 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18567,7 +20942,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18603,7 +20978,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18630,7 +21005,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18666,7 +21041,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18706,7 +21081,7 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19043,7 +21418,7 @@ var LogApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19146,7 +21521,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19169,7 +21544,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -19182,7 +21557,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19218,7 +21593,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19254,7 +21629,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19290,7 +21665,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19326,7 +21701,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19362,7 +21737,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19398,7 +21773,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19434,7 +21809,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19470,7 +21845,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19506,7 +21881,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19542,7 +21917,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19578,7 +21953,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19614,7 +21989,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19650,7 +22025,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20590,7 +22965,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20626,7 +23001,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -20653,7 +23028,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20693,7 +23068,7 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20969,7 +23344,7 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21005,7 +23380,7 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21161,7 +23536,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21197,7 +23572,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21224,7 +23599,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21264,7 +23639,7 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21545,7 +23920,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21581,7 +23956,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21608,7 +23983,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21648,7 +24023,7 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21924,7 +24299,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21960,7 +24335,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21996,7 +24371,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22032,7 +24407,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22068,7 +24443,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22104,7 +24479,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22140,7 +24515,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22176,7 +24551,7 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22667,6 +25042,42 @@ var SecurityApiResponseProcessor = class { // apis/SystemApi.ts var SystemApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -22677,7 +25088,7 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22700,7 +25111,7 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22723,7 +25134,43 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22750,7 +25197,7 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22774,6 +25221,62 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { } }; var SystemApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22957,6 +25460,67 @@ var SystemApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23031,7 +25595,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23067,7 +25631,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23103,7 +25667,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23130,7 +25694,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23166,7 +25730,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23206,7 +25770,7 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23594,7 +26158,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23630,7 +26194,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23666,7 +26230,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23702,7 +26266,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23738,7 +26302,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23760,6 +26324,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -23774,7 +26374,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23810,7 +26410,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23833,7 +26433,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -23846,7 +26446,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23868,6 +26468,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -23882,7 +26518,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23918,7 +26554,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23954,7 +26590,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23990,7 +26626,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24026,7 +26662,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24062,7 +26698,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24098,7 +26734,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24134,7 +26770,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24170,7 +26806,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24206,7 +26842,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24242,7 +26878,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24278,7 +26914,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24314,7 +26950,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24337,7 +26973,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -24350,7 +26986,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24372,6 +27008,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -24398,7 +27070,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -24474,7 +27146,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -24514,25 +27186,28 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { return __async(this, null, function* () { var _a, _b, _c; let _config = _options || this.configuration; if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "dbtConnectionIdentifier"); } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "modelTables"); + } if (importWorksheets === null || importWorksheets === void 0) { throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "importWorksheets"); } const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -24588,7 +27263,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24615,7 +27290,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24651,7 +27326,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24678,7 +27353,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24714,7 +27389,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24750,7 +27425,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24786,7 +27461,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24813,7 +27488,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24840,7 +27515,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24867,7 +27542,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24894,7 +27569,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24930,7 +27605,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24957,7 +27632,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24993,7 +27668,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25020,7 +27695,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25047,7 +27722,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25074,7 +27749,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25101,7 +27776,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25115,7 +27790,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -25128,7 +27803,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25155,7 +27866,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25191,7 +27902,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25218,7 +27929,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25254,7 +27965,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25290,7 +28001,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25326,7 +28037,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25362,7 +28073,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25398,7 +28109,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25434,7 +28145,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25470,7 +28181,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25506,7 +28217,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25533,7 +28244,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25569,7 +28280,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25605,7 +28316,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25641,7 +28352,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25677,7 +28388,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25713,7 +28424,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25749,7 +28460,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25781,7 +28492,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25804,7 +28515,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25818,7 +28529,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -25831,7 +28542,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25848,6 +28559,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -25862,7 +28609,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25893,7 +28640,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25910,6 +28657,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -25920,7 +28703,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25943,7 +28726,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25966,7 +28749,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25993,7 +28776,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26029,7 +28812,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26065,7 +28848,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26101,7 +28884,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26137,7 +28920,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26169,7 +28952,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26196,7 +28979,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26232,7 +29015,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26268,7 +29051,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26304,7 +29087,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26344,7 +29127,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26380,7 +29163,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26416,7 +29199,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26452,7 +29235,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26474,6 +29257,42 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -26488,7 +29307,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26524,7 +29343,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26560,7 +29379,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26596,7 +29415,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26632,7 +29451,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26668,7 +29487,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26704,7 +29523,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26740,7 +29559,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26776,7 +29595,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26812,7 +29631,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26848,7 +29667,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26884,7 +29703,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26907,7 +29726,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -26920,7 +29739,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26942,6 +29761,118 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "conversationIdentifier"); + } + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -26960,7 +29891,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26996,7 +29927,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27032,7 +29963,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/answer/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27068,7 +29999,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27104,7 +30035,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27140,7 +30071,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27180,7 +30111,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27216,7 +30147,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27252,7 +30183,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27288,7 +30219,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27328,7 +30259,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27351,7 +30282,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -27368,7 +30299,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27408,7 +30339,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27454,7 +30385,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -27532,7 +30463,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27568,7 +30499,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27604,7 +30535,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27644,7 +30575,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27684,7 +30615,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27724,7 +30655,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27760,7 +30691,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27800,7 +30731,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27840,7 +30771,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27880,7 +30811,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27903,7 +30834,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param updateVariableRequest */ @@ -27920,7 +30851,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27943,7 +30874,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -27953,10 +30884,10 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { throw new RequiredError("ThoughtSpotRestApi", "updateVariableValues", "updateVariableValuesRequest"); } - const localVarPath = "/api/rest/2.0/template/variables/update"; + const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27978,6 +30909,46 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -27988,7 +30959,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -28015,7 +30986,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28051,7 +31022,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28365,6 +31336,62 @@ var ThoughtSpotRestApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -28418,7 +31445,662 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", "" ); return body; @@ -28430,16 +32112,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to convertWorksheetToModel + * @params response Response returned by the server for a request to createRole * @throws ApiException if the response code was not in [200, 299] */ - convertWorksheetToModel(response) { + createRole(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseWorksheetToModelConversion", + "RoleResponse", "" ); return body; @@ -28450,7 +32132,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -28474,12 +32156,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseWorksheetToModelConversion", + "RoleResponse", "" ); return body; @@ -28491,16 +32173,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to copyObject + * @params response Response returned by the server for a request to createSchedule * @throws ApiException if the response code was not in [200, 299] */ - copyObject(response) { + createSchedule(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCopyObject", + "ResponseSchedule", "" ); return body; @@ -28529,14 +32211,6 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("404", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); - } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -28548,7 +32222,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCopyObject", + "ResponseSchedule", "" ); return body; @@ -28560,16 +32234,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createCalendar + * @params response Response returned by the server for a request to createTag * @throws ApiException if the response code was not in [200, 299] */ - createCalendar(response) { + createTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CalendarResponse", + "Tag", "" ); return body; @@ -28609,7 +32283,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CalendarResponse", + "Tag", "" ); return body; @@ -28621,16 +32295,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createConfig + * @params response Response returned by the server for a request to createUser * @throws ApiException if the response code was not in [200, 299] */ - createConfig(response) { + createUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "User", "" ); return body; @@ -28670,7 +32344,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "User", "" ); return body; @@ -28682,16 +32356,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createConnection + * @params response Response returned by the server for a request to createUserGroup * @throws ApiException if the response code was not in [200, 299] */ - createConnection(response) { + createUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateConnectionResponse", + "UserGroupResponse", "" ); return body; @@ -28731,7 +32405,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateConnectionResponse", + "UserGroupResponse", "" ); return body; @@ -28743,16 +32417,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createConnectionConfiguration + * @params response Response returned by the server for a request to createVariable * @throws ApiException if the response code was not in [200, 299] */ - createConnectionConfiguration(response) { + createVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ConnectionConfigurationResponse", + "Variable", "" ); return body; @@ -28792,60 +32466,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ConnectionConfigurationResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createConversation - * @throws ApiException if the response code was not in [200, 299] - */ - createConversation(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Conversation", + "Variable", "" ); return body; @@ -28857,16 +32478,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createCustomAction + * @params response Response returned by the server for a request to createWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - createCustomAction(response) { + createWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCustomAction", + "WebhookResponse", "" ); return body; @@ -28906,7 +32527,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseCustomAction", + "WebhookResponse", "" ); return body; @@ -28918,69 +32539,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createEmailCustomization - * @throws ApiException if the response code was not in [200, 299] - */ - createEmailCustomization(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateEmailCustomizationResponse", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "CreateEmailCustomizationResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createOrg + * @params response Response returned by the server for a request to dbtConnection * @throws ApiException if the response code was not in [200, 299] */ - createOrg(response) { + dbtConnection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "OrgResponse", + "any", "" ); return body; @@ -29020,68 +32588,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "OrgResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createRole - * @throws ApiException if the response code was not in [200, 299] - */ - createRole(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "RoleResponse", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "RoleResponse", + "any", "" ); return body; @@ -29093,16 +32600,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createSchedule + * @params response Response returned by the server for a request to dbtGenerateSyncTml * @throws ApiException if the response code was not in [200, 299] */ - createSchedule(response) { + dbtGenerateSyncTml(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseSchedule", + "any", "" ); return body; @@ -29142,7 +32649,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseSchedule", + "any", "" ); return body; @@ -29154,16 +32661,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createTag + * @params response Response returned by the server for a request to dbtGenerateTml * @throws ApiException if the response code was not in [200, 299] */ - createTag(response) { + dbtGenerateTml(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Tag", + "any", "" ); return body; @@ -29203,7 +32710,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Tag", + "any", "" ); return body; @@ -29215,16 +32722,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createUser + * @params response Response returned by the server for a request to dbtSearch * @throws ApiException if the response code was not in [200, 299] */ - createUser(response) { + dbtSearch(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "Array", "" ); return body; @@ -29264,7 +32771,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "Array", "" ); return body; @@ -29276,16 +32783,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createUserGroup + * @params response Response returned by the server for a request to deactivateUser * @throws ApiException if the response code was not in [200, 299] */ - createUserGroup(response) { + deactivateUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "UserGroupResponse", + "ResponseActivationURL", "" ); return body; @@ -29325,7 +32832,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "UserGroupResponse", + "ResponseActivationURL", "" ); return body; @@ -29337,19 +32844,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createVariable + * @params response Response returned by the server for a request to deleteCalendar * @throws ApiException if the response code was not in [200, 299] */ - createVariable(response) { + deleteCalendar(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Variable", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29386,7 +32888,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Variable", + "void", "" ); return body; @@ -29398,19 +32900,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtConnection + * @params response Response returned by the server for a request to deleteConfig * @throws ApiException if the response code was not in [200, 299] */ - dbtConnection(response) { + deleteConfig(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "any", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29447,7 +32944,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "void", "" ); return body; @@ -29459,19 +32956,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @params response Response returned by the server for a request to deleteConnection * @throws ApiException if the response code was not in [200, 299] */ - dbtGenerateSyncTml(response) { + deleteConnection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "any", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29508,7 +33000,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "void", "" ); return body; @@ -29520,20 +33012,71 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtGenerateTml + * @params response Response returned by the server for a request to deleteConnectionConfiguration * @throws ApiException if the response code was not in [200, 299] */ - dbtGenerateTml(response) { + deleteConnectionConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -29569,7 +33112,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "void", "" ); return body; @@ -29581,20 +33124,71 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to dbtSearch + * @params response Response returned by the server for a request to deleteCustomAction * @throws ApiException if the response code was not in [200, 299] */ - dbtSearch(response) { + deleteCustomAction(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -29630,7 +33224,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -29642,20 +33236,63 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deactivateUser + * @params response Response returned by the server for a request to deleteEmailCustomization * @throws ApiException if the response code was not in [200, 299] */ - deactivateUser(response) { + deleteEmailCustomization(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseActivationURL", + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -29691,7 +33328,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseActivationURL", + "void", "" ); return body; @@ -29703,10 +33340,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteCalendar + * @params response Response returned by the server for a request to deleteOrg * @throws ApiException if the response code was not in [200, 299] */ - deleteCalendar(response) { + deleteOrg(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -29759,10 +33396,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConfig + * @params response Response returned by the server for a request to deleteOrgEmailCustomization * @throws ApiException if the response code was not in [200, 299] */ - deleteConfig(response) { + deleteOrgEmailCustomization(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -29790,7 +33427,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -29815,10 +33452,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConnection + * @params response Response returned by the server for a request to deleteRole * @throws ApiException if the response code was not in [200, 299] */ - deleteConnection(response) { + deleteRole(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -29854,7 +33491,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( @@ -29871,10 +33508,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @params response Response returned by the server for a request to deleteSchedule * @throws ApiException if the response code was not in [200, 299] */ - deleteConnectionConfiguration(response) { + deleteSchedule(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -29927,10 +33564,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteConnectionV2 + * @params response Response returned by the server for a request to deleteTag * @throws ApiException if the response code was not in [200, 299] */ - deleteConnectionV2(response) { + deleteTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -29983,10 +33620,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteCustomAction + * @params response Response returned by the server for a request to deleteUser * @throws ApiException if the response code was not in [200, 299] */ - deleteCustomAction(response) { + deleteUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30039,10 +33676,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteDbtConnection + * @params response Response returned by the server for a request to deleteUserGroup * @throws ApiException if the response code was not in [200, 299] */ - deleteDbtConnection(response) { + deleteUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30095,10 +33732,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteEmailCustomization + * @params response Response returned by the server for a request to deleteVariable * @throws ApiException if the response code was not in [200, 299] */ - deleteEmailCustomization(response) { + deleteVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -30112,7 +33749,7 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", @@ -30120,6 +33757,14 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -30143,14 +33788,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteMetadata + * @params response Response returned by the server for a request to deleteWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - deleteMetadata(response) { + deleteWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30187,7 +33837,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "WebhookDeleteResponse", "" ); return body; @@ -30199,14 +33849,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteOrg + * @params response Response returned by the server for a request to deployCommit * @throws ApiException if the response code was not in [200, 299] */ - deleteOrg(response) { + deployCommit(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30243,7 +33898,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -30255,20 +33910,21 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges * @throws ApiException if the response code was not in [200, 299] */ - deleteOrgEmailCustomization(response) { + downloadConnectionMetadataChanges(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30276,7 +33932,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30284,23 +33940,23 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", - "" + "HttpFile", + "binary" ); return body; } @@ -30311,20 +33967,21 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteRole + * @params response Response returned by the server for a request to exportAnswerReport * @throws ApiException if the response code was not in [200, 299] */ - deleteRole(response) { + exportAnswerReport(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30332,7 +33989,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30340,7 +33997,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -30348,15 +34005,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); - throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", - "" + "HttpFile", + "binary" ); return body; } @@ -30367,20 +34024,21 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteSchedule + * @params response Response returned by the server for a request to exportLiveboardReport * @throws ApiException if the response code was not in [200, 299] */ - deleteSchedule(response) { + exportLiveboardReport(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30388,7 +34046,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30396,7 +34054,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -30404,15 +34062,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "" + "binary" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", - "" + "HttpFile", + "binary" ); return body; } @@ -30423,14 +34081,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteTag + * @params response Response returned by the server for a request to exportMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - deleteTag(response) { + exportMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30467,7 +34130,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -30479,14 +34142,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteUser + * @params response Response returned by the server for a request to exportMetadataTMLBatched * @throws ApiException if the response code was not in [200, 299] */ - deleteUser(response) { + exportMetadataTMLBatched(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30523,7 +34191,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "any", "" ); return body; @@ -30535,14 +34203,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteUserGroup + * @params response Response returned by the server for a request to fetchAnswerData * @throws ApiException if the response code was not in [200, 299] */ - deleteUserGroup(response) { + fetchAnswerData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30579,7 +34252,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "AnswerDataResponse", "" ); return body; @@ -30591,14 +34264,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteVariable + * @params response Response returned by the server for a request to fetchAnswerSqlQuery * @throws ApiException if the response code was not in [200, 299] */ - deleteVariable(response) { + fetchAnswerSqlQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -30635,7 +34313,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "SqlQueryResponse", "" ); return body; @@ -30647,16 +34325,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deployCommit + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus * @throws ApiException if the response code was not in [200, 299] */ - deployCommit(response) { + fetchAsyncImportTaskStatus(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "GetAsyncImportStatusResponse", "" ); return body; @@ -30696,7 +34374,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "GetAsyncImportStatusResponse", "" ); return body; @@ -30708,29 +34386,33 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @params response Response returned by the server for a request to fetchColumnSecurityRules * @throws ApiException if the response code was not in [200, 299] */ - downloadConnectionMetadataChanges(response) { + fetchColumnSecurityRules(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body = yield response.getBodyAsFile(); + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30738,23 +34420,23 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "HttpFile", - "binary" + "Array", + "" ); return body; } @@ -30765,21 +34447,25 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportAnswerReport + * @params response Response returned by the server for a request to fetchConnectionDiffStatus * @throws ApiException if the response code was not in [200, 299] */ - exportAnswerReport(response) { + fetchConnectionDiffStatus(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body = yield response.getBodyAsFile(); + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30787,7 +34473,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30795,7 +34481,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -30803,15 +34489,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "HttpFile", - "binary" + "FetchConnectionDiffStatusResponse", + "" ); return body; } @@ -30822,21 +34508,25 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportLiveboardReport + * @params response Response returned by the server for a request to fetchLiveboardData * @throws ApiException if the response code was not in [200, 299] */ - exportLiveboardReport(response) { + fetchLiveboardData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body = yield response.getBodyAsFile(); + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } @@ -30844,7 +34534,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } @@ -30852,7 +34542,7 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } @@ -30860,15 +34550,15 @@ var ThoughtSpotRestApiResponseProcessor = class { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", - "binary" + "" ); throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "HttpFile", - "binary" + "LiveboardDataResponse", + "" ); return body; } @@ -30879,16 +34569,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportMetadataTML + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery * @throws ApiException if the response code was not in [200, 299] */ - exportMetadataTML(response) { + fetchLiveboardSqlQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -30928,7 +34618,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -30940,16 +34630,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @params response Response returned by the server for a request to fetchLogs * @throws ApiException if the response code was not in [200, 299] */ - exportMetadataTMLBatched(response) { + fetchLogs(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -30989,7 +34679,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -31001,16 +34691,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAnswerData + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals * @throws ApiException if the response code was not in [200, 299] */ - fetchAnswerData(response) { + fetchPermissionsOfPrincipals(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AnswerDataResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -31050,7 +34740,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AnswerDataResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -31062,16 +34752,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata * @throws ApiException if the response code was not in [200, 299] */ - fetchAnswerSqlQuery(response) { + fetchPermissionsOnMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfMetadataResponse", "" ); return body; @@ -31111,7 +34801,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfMetadataResponse", "" ); return body; @@ -31123,19 +34813,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @params response Response returned by the server for a request to forceLogoutUsers * @throws ApiException if the response code was not in [200, 299] */ - fetchAsyncImportTaskStatus(response) { + forceLogoutUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31172,7 +34857,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "void", "" ); return body; @@ -31184,16 +34869,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @params response Response returned by the server for a request to generateCSV * @throws ApiException if the response code was not in [200, 299] */ - fetchColumnSecurityRules(response) { + generateCSV(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -31204,7 +34889,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31220,7 +34905,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31228,12 +34913,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -31245,16 +34930,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @params response Response returned by the server for a request to getCurrentUserInfo * @throws ApiException if the response code was not in [200, 299] */ - fetchConnectionDiffStatus(response) { + getCurrentUserInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "User", "" ); return body; @@ -31294,7 +34979,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "User", "" ); return body; @@ -31306,16 +34991,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardData + * @params response Response returned by the server for a request to getCurrentUserToken * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardData(response) { + getCurrentUserToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "GetTokenResponse", "" ); return body; @@ -31355,7 +35040,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "GetTokenResponse", "" ); return body; @@ -31367,16 +35052,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @params response Response returned by the server for a request to getCustomAccessToken * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardSqlQuery(response) { + getCustomAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "AccessToken", "" ); return body; @@ -31387,7 +35072,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31395,7 +35080,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31403,7 +35088,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31411,12 +35096,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "AccessToken", "" ); return body; @@ -31428,43 +35113,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLogs + * @params response Response returned by the server for a request to getDataSourceSuggestions * @throws ApiException if the response code was not in [200, 299] */ - fetchLogs(response) { + getDataSourceSuggestions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "EurekaDataSourceSuggestionResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "EurekaDataSourceSuggestionResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31472,12 +35149,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "EurekaDataSourceSuggestionResponse", "" ); return body; @@ -31489,16 +35166,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @params response Response returned by the server for a request to getFullAccessToken * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOfPrincipals(response) { + getFullAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "Token", "" ); return body; @@ -31538,7 +35215,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "Token", "" ); return body; @@ -31550,16 +35227,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @params response Response returned by the server for a request to getObjectAccessToken * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOnMetadata(response) { + getObjectAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "Token", "" ); return body; @@ -31599,7 +35276,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "Token", "" ); return body; @@ -31611,14 +35288,72 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to forceLogoutUsers + * @params response Response returned by the server for a request to getRelevantQuestions * @throws ApiException if the response code was not in [200, 299] */ - forceLogoutUsers(response) { + getRelevantQuestions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31655,7 +35390,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "SystemConfig", "" ); return body; @@ -31667,16 +35402,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to generateCSV + * @params response Response returned by the server for a request to getSystemInformation * @throws ApiException if the response code was not in [200, 299] */ - generateCSV(response) { + getSystemInformation(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "SystemInfo", "" ); return body; @@ -31716,7 +35451,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "SystemInfo", "" ); return body; @@ -31728,16 +35463,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserInfo + * @params response Response returned by the server for a request to getSystemOverrideInfo * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserInfo(response) { + getSystemOverrideInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "SystemOverrideInfo", "" ); return body; @@ -31777,7 +35512,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "SystemOverrideInfo", "" ); return body; @@ -31789,16 +35524,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserToken + * @params response Response returned by the server for a request to importMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserToken(response) { + importMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Array", "" ); return body; @@ -31838,7 +35573,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Array", "" ); return body; @@ -31850,16 +35585,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCustomAccessToken + * @params response Response returned by the server for a request to importMetadataTMLAsync * @throws ApiException if the response code was not in [200, 299] */ - getCustomAccessToken(response) { + importMetadataTMLAsync(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -31870,7 +35605,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31878,7 +35613,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31886,7 +35621,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -31894,12 +35629,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -31911,16 +35646,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getFullAccessToken + * @params response Response returned by the server for a request to importUserGroups * @throws ApiException if the response code was not in [200, 299] */ - getFullAccessToken(response) { + importUserGroups(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUserGroupsResponse", "" ); return body; @@ -31960,7 +35695,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUserGroupsResponse", "" ); return body; @@ -31972,16 +35707,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getObjectAccessToken + * @params response Response returned by the server for a request to importUsers * @throws ApiException if the response code was not in [200, 299] */ - getObjectAccessToken(response) { + importUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUsersResponse", "" ); return body; @@ -32021,7 +35756,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "ImportUsersResponse", "" ); return body; @@ -32033,19 +35768,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemConfig + * @params response Response returned by the server for a request to login * @throws ApiException if the response code was not in [200, 299] */ - getSystemConfig(response) { + login(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32082,7 +35812,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", + "void", "" ); return body; @@ -32094,19 +35824,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemInformation + * @params response Response returned by the server for a request to logout * @throws ApiException if the response code was not in [200, 299] */ - getSystemInformation(response) { + logout(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32143,7 +35868,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", + "void", "" ); return body; @@ -32155,19 +35880,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemOverrideInfo + * @params response Response returned by the server for a request to parameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - getSystemOverrideInfo(response) { + parameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32204,7 +35924,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", + "void", "" ); return body; @@ -32216,19 +35936,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTML + * @params response Response returned by the server for a request to publishMetadata * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTML(response) { + publishMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32265,7 +35980,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -32277,43 +35992,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTMLAsync + * @params response Response returned by the server for a request to queryGetDecomposedQuery * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTMLAsync(response) { + queryGetDecomposedQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "EurekaDecomposeQueryResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "EurekaDecomposeQueryResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32321,12 +36028,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "EurekaDecomposeQueryResponse", "" ); return body; @@ -32338,19 +36045,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUserGroups + * @params response Response returned by the server for a request to resetUserPassword * @throws ApiException if the response code was not in [200, 299] */ - importUserGroups(response) { + resetUserPassword(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32387,7 +36089,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", + "void", "" ); return body; @@ -32399,16 +36101,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUsers + * @params response Response returned by the server for a request to revertCommit * @throws ApiException if the response code was not in [200, 299] */ - importUsers(response) { + revertCommit(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", + "RevertResponse", "" ); return body; @@ -32448,7 +36150,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", + "RevertResponse", "" ); return body; @@ -32460,10 +36162,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to login + * @params response Response returned by the server for a request to revokeToken * @throws ApiException if the response code was not in [200, 299] */ - login(response) { + revokeToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -32516,71 +36218,20 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to logout + * @params response Response returned by the server for a request to searchCalendars * @throws ApiException if the response code was not in [200, 299] */ - logout(response) { + searchCalendars(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to parameterizeMetadata - * @throws ApiException if the response code was not in [200, 299] - */ - parameterizeMetadata(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -32616,7 +36267,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -32628,14 +36279,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to publishMetadata + * @params response Response returned by the server for a request to searchCommits * @throws ApiException if the response code was not in [200, 299] */ - publishMetadata(response) { + searchCommits(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32672,7 +36328,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -32684,68 +36340,20 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences * @throws ApiException if the response code was not in [200, 299] */ - queryGetDecomposedQuery(response) { + searchCommunicationChannelPreferences(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", + "CommunicationChannelPreferencesResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to resetUserPassword - * @throws ApiException if the response code was not in [200, 299] - */ - resetUserPassword(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -32781,7 +36389,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CommunicationChannelPreferencesResponse", "" ); return body; @@ -32793,16 +36401,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revertCommit + * @params response Response returned by the server for a request to searchConfig * @throws ApiException if the response code was not in [200, 299] */ - revertCommit(response) { + searchConfig(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "Array", "" ); return body; @@ -32842,7 +36450,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "Array", "" ); return body; @@ -32854,14 +36462,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeToken + * @params response Response returned by the server for a request to searchConnection * @throws ApiException if the response code was not in [200, 299] */ - revokeToken(response) { + searchConnection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -32898,7 +36511,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "Array", "" ); return body; @@ -32910,16 +36523,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCalendars + * @params response Response returned by the server for a request to searchCustomActions * @throws ApiException if the response code was not in [200, 299] */ - searchCalendars(response) { + searchCustomActions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -32959,7 +36572,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -32971,16 +36584,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCommits + * @params response Response returned by the server for a request to searchData * @throws ApiException if the response code was not in [200, 299] */ - searchCommits(response) { + searchData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SearchDataResponse", "" ); return body; @@ -33020,7 +36633,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SearchDataResponse", "" ); return body; @@ -33032,16 +36645,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchConfig + * @params response Response returned by the server for a request to searchEmailCustomization * @throws ApiException if the response code was not in [200, 299] */ - searchConfig(response) { + searchEmailCustomization(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33054,21 +36667,13 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("401", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -33081,7 +36686,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33093,16 +36698,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchConnection + * @params response Response returned by the server for a request to searchMetadata * @throws ApiException if the response code was not in [200, 299] */ - searchConnection(response) { + searchMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33142,7 +36747,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33154,16 +36759,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCustomActions + * @params response Response returned by the server for a request to searchOrgs * @throws ApiException if the response code was not in [200, 299] */ - searchCustomActions(response) { + searchOrgs(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33203,7 +36808,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33215,16 +36820,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchData + * @params response Response returned by the server for a request to searchRoles * @throws ApiException if the response code was not in [200, 299] */ - searchData(response) { + searchRoles(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SearchDataResponse", + "Array", "" ); return body; @@ -33259,65 +36864,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SearchDataResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to searchEmailCustomization - * @throws ApiException if the response code was not in [200, 299] - */ - searchEmailCustomization(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33329,16 +36881,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchMetadata + * @params response Response returned by the server for a request to searchSchedules * @throws ApiException if the response code was not in [200, 299] */ - searchMetadata(response) { + searchSchedules(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33378,7 +36930,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33390,16 +36942,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchOrgs + * @params response Response returned by the server for a request to searchTags * @throws ApiException if the response code was not in [200, 299] */ - searchOrgs(response) { + searchTags(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33439,7 +36991,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33451,16 +37003,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchRoles + * @params response Response returned by the server for a request to searchUserGroups * @throws ApiException if the response code was not in [200, 299] */ - searchRoles(response) { + searchUserGroups(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33495,12 +37047,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33512,16 +37064,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchSchedules + * @params response Response returned by the server for a request to searchUsers * @throws ApiException if the response code was not in [200, 299] */ - searchSchedules(response) { + searchUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33561,7 +37113,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33573,16 +37125,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchTags + * @params response Response returned by the server for a request to searchVariables * @throws ApiException if the response code was not in [200, 299] */ - searchTags(response) { + searchVariables(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33622,7 +37174,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "Array", "" ); return body; @@ -33634,16 +37186,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchUserGroups + * @params response Response returned by the server for a request to searchWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - searchUserGroups(response) { + searchWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookSearchResponse", "" ); return body; @@ -33683,7 +37235,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookSearchResponse", "" ); return body; @@ -33695,43 +37247,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchUsers + * @params response Response returned by the server for a request to sendAgentMessage * @throws ApiException if the response code was not in [200, 299] */ - searchUsers(response) { + sendAgentMessage(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "any", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -33739,12 +37283,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -33756,43 +37300,35 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchVariables + * @params response Response returned by the server for a request to sendAgentMessageStreaming * @throws ApiException if the response code was not in [200, 299] */ - searchVariables(response) { + sendAgentMessageStreaming(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SendAgentMessageResponse", "" ); return body; } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", + "SendAgentMessageResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + return body; } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -33800,12 +37336,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SendAgentMessageResponse", "" ); return body; @@ -35058,10 +38594,66 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUser + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup * @throws ApiException if the response code was not in [200, 299] */ - updateUser(response) { + updateUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35114,10 +38706,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUserGroup + * @params response Response returned by the server for a request to updateVariable * @throws ApiException if the response code was not in [200, 299] */ - updateUserGroup(response) { + updateVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35170,10 +38762,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariable + * @params response Response returned by the server for a request to updateVariableValues * @throws ApiException if the response code was not in [200, 299] */ - updateVariable(response) { + updateVariableValues(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35226,10 +38818,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariableValues + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - updateVariableValues(response) { + updateWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -35466,7 +39058,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35502,7 +39094,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35538,7 +39130,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35574,7 +39166,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35610,7 +39202,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -35637,7 +39229,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35673,7 +39265,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35709,7 +39301,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35745,7 +39337,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -35785,7 +39377,7 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36399,7 +39991,7 @@ var UsersApiResponseProcessor = class { // apis/VariableApi.ts var VariableApiRequestFactory = class extends BaseAPIRequestFactory { /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -36412,7 +40004,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36435,7 +40027,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -36448,7 +40040,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -36462,7 +40054,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -36475,7 +40067,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36498,7 +40090,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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. * @param updateVariableRequest */ @@ -36515,7 +40107,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36538,7 +40130,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -36548,10 +40140,10 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { throw new RequiredError("VariableApi", "updateVariableValues", "updateVariableValuesRequest"); } - const localVarPath = "/api/rest/2.0/template/variables/update"; + const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36883,7 +40475,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36919,7 +40511,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36955,7 +40547,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -36991,7 +40583,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37031,7 +40623,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37067,7 +40659,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37103,7 +40695,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37139,7 +40731,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37175,7 +40767,7 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.17.1"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -37491,7 +41083,251 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "RevertResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", "" ); return body; @@ -37499,20 +41335,174 @@ var VersionControlApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } +}; + +// apis/WebhooksApi.ts +var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.19.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var WebhooksApiResponseProcessor = class { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCommits + * @params response Response returned by the server for a request to createWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - searchCommits(response) { + createWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookResponse", "" ); return body; @@ -37552,7 +41542,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookResponse", "" ); return body; @@ -37564,16 +41554,16 @@ var VersionControlApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchConfig + * @params response Response returned by the server for a request to deleteWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - searchConfig(response) { + deleteWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookDeleteResponse", "" ); return body; @@ -37613,7 +41603,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "WebhookDeleteResponse", "" ); return body; @@ -37625,16 +41615,16 @@ var VersionControlApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateConfig + * @params response Response returned by the server for a request to searchWebhookConfigurations * @throws ApiException if the response code was not in [200, 299] */ - updateConfig(response) { + searchWebhookConfigurations(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "WebhookSearchResponse", "" ); return body; @@ -37674,7 +41664,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RepoConfigObject", + "WebhookSearchResponse", "" ); return body; @@ -37686,19 +41676,14 @@ var VersionControlApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to validateMerge + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - validateMerge(response) { + updateWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37735,7 +41720,7 @@ var VersionControlApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -37752,6 +41737,24 @@ var ObservableAIApi = class { this.requestFactory = requestFactory || new AIApiRequestFactory(configuration); this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -37770,6 +41773,42 @@ var ObservableAIApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConversation(rsp))); })); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -37788,6 +41827,43 @@ var ObservableAIApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.queryGetDecomposedQuery(rsp))); })); } + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -37867,7 +41943,7 @@ var ObservableAuthenticationApi = class { })); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -38205,7 +42281,7 @@ var ObservableConnectionsApi = class { })); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -38457,13 +42533,13 @@ var ObservableDBTApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); let middlewarePreObservable = from(requestContextPromise); for (let middleware of this.configuration.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); @@ -38863,7 +42939,7 @@ var ObservableMetadataApi = class { })); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -39555,6 +43631,24 @@ var ObservableSystemApi = class { this.requestFactory = requestFactory || new SystemApiRequestFactory(configuration); this.responseProcessor = responseProcessor || new SystemApiResponseProcessor(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -39606,6 +43700,24 @@ var ObservableSystemApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemOverrideInfo(rsp))); })); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -39837,6 +43949,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.commitBranch(rsp))); })); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -39874,7 +44004,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -39891,6 +44021,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.copyObject(rsp))); })); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -40126,7 +44274,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -40143,6 +44291,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createVariable(rsp))); })); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -40192,13 +44358,13 @@ var ObservableThoughtSpotRestApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); let middlewarePreObservable = from(requestContextPromise); for (let middleware of this.configuration.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); @@ -40535,7 +44701,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -40552,6 +44718,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); })); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -40911,7 +45095,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -40928,6 +45112,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCustomAccessToken(rsp))); })); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -40964,6 +45166,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getObjectAccessToken(rsp))); })); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -41267,6 +45487,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommits(rsp))); })); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -41484,7 +45722,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -41501,6 +45739,61 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchVariables(rsp))); })); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -41703,7 +45996,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -41955,7 +46248,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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. * @param updateVariableRequest */ @@ -41974,7 +46267,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -41991,6 +46284,25 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariableValues(rsp))); })); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -42240,7 +46552,7 @@ var ObservableVariableApi = class { this.responseProcessor = responseProcessor || new VariableApiResponseProcessor(); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -42258,7 +46570,7 @@ var ObservableVariableApi = class { })); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -42276,7 +46588,7 @@ var ObservableVariableApi = class { })); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -42294,7 +46606,7 @@ var ObservableVariableApi = class { })); } /** - * 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. * @param updateVariableRequest */ @@ -42313,7 +46625,7 @@ var ObservableVariableApi = class { })); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -42501,12 +46813,100 @@ var ObservableVersionControlApi = class { })); } }; +var ObservableWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebhooksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebhooksApiResponseProcessor(); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } +}; // types/PromiseAPI.ts var PromiseAIApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -42515,6 +46915,22 @@ var PromiseAIApi = class { const result = this.api.createConversation(createConversationRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -42523,6 +46939,23 @@ var PromiseAIApi = class { const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); return result.toPromise(); } + /** + * 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -42560,7 +46993,7 @@ var PromiseAuthenticationApi = class { return result.toPromise(); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { @@ -42714,7 +47147,7 @@ var PromiseConnectionsApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -42840,13 +47273,13 @@ var PromiseDBTApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); return result.toPromise(); } /** @@ -43036,7 +47469,7 @@ var PromiseMetadataApi = class { return result.toPromise(); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { @@ -43356,6 +47789,14 @@ var PromiseSystemApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -43377,6 +47818,14 @@ var PromiseSystemApi = class { const result = this.api.getSystemOverrideInfo(_options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -43484,6 +47933,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.commitBranch(commitBranchRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -43501,13 +47958,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. * @param copyObjectRequest */ copyObject(copyObjectRequest, _options) { const result = this.api.copyObject(copyObjectRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -43613,13 +48078,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { const result = this.api.createVariable(createVariableRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -43649,13 +48122,13 @@ var PromiseThoughtSpotRestApi = class { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options) { - const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); return result.toPromise(); } /** @@ -43802,13 +48275,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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 */ deleteVariable(identifier, _options) { const result = this.api.deleteVariable(identifier, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -43968,13 +48449,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. * @param getCustomAccessTokenRequest */ getCustomAccessToken(getCustomAccessTokenRequest, _options) { const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -43991,6 +48480,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -44124,6 +48621,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.searchCommits(searchCommitsRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -44221,13 +48726,38 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { const result = this.api.searchVariables(searchVariablesRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 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) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -44320,7 +48850,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -44442,7 +48972,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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. * @param updateVariableRequest */ @@ -44451,13 +48981,22 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -44573,7 +49112,7 @@ var PromiseVariableApi = class { this.api = new ObservableVariableApi(configuration, requestFactory, responseProcessor); } /** - * 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. 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 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 */ createVariable(createVariableRequest, _options) { @@ -44581,7 +49120,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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 */ deleteVariable(identifier, _options) { @@ -44589,7 +49128,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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 */ searchVariables(searchVariablesRequest, _options) { @@ -44597,7 +49136,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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. * @param updateVariableRequest */ @@ -44606,7 +49145,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * 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 */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -44692,15 +49231,78 @@ var PromiseVersionControlApi = class { return result.toPromise(); } }; +var PromiseWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } +}; // utils/config.ts -var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider) => { +var createAdditionalHeadersMiddleware = (additionalHeaders) => { + return { + /** + * Pre-request middleware to add custom headers to every API call + * @param requestContext - The request context to modify + */ + pre: (requestContext) => { + Object.entries(additionalHeaders).forEach(([headerName, headerValue]) => { + requestContext.setHeaderParam(headerName, headerValue); + }); + return Promise.resolve(requestContext); + }, + /** + * Post-request middleware for response processing + * @param responseContext - The response context + */ + post: (responseContext) => Promise.resolve(responseContext) + }; +}; +var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider, options) => { const serverConfig = new ServerConfiguration( thoughtSpotHost, {} ); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } const config = createConfiguration({ - baseServer: serverConfig + baseServer: serverConfig, + promiseMiddleware: middleware }); const authApiClient = new PromiseAuthenticationApi(config); let configTokenProvider; @@ -44725,19 +49327,27 @@ var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider) = }; const globalConfig = createConfiguration({ authMethods: authConfig, - baseServer: serverConfig + baseServer: serverConfig, + promiseMiddleware: middleware }); return globalConfig; }; -var createBasicConfig = (thoughtSpotHost) => { +var createBasicConfig = (thoughtSpotHost, options) => { const thoughtSpotServer = new ServerConfiguration(thoughtSpotHost, {}); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } const basicClientConfig = createConfiguration({ - baseServer: thoughtSpotServer + baseServer: thoughtSpotServer, + promiseMiddleware: middleware }); return basicClientConfig; }; export { PromiseAIApi as AIApi, + AIContext, APIKey, APIKeyInput, AccessToken, @@ -44748,7 +49358,9 @@ export { ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, + AgentConversation, AnswerContent, + AnswerContextInput, AnswerDataResponse, ApiException, AssignChangeAuthorRequest, @@ -44783,14 +49395,21 @@ export { CommitHistoryResponse, CommitResponse, CommiterType, + CommunicationChannelPreferencesResponse, + ConfigureCommunicationChannelPreferencesRequest, ConnectionConfigurationResponse, ConnectionConfigurationSearchRequest, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, + ContextPayloadV2Input, Conversation, + ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, + CreateAgentConversationRequest, + CreateAgentConversationRequestConversationSettings, + CreateAgentConversationRequestMetadataContext, CreateCalendarRequest, CreateCalendarRequestTableReference, CreateConfigRequest, @@ -44815,6 +49434,9 @@ export { CreateUserGroupRequest, CreateUserRequest, CreateVariableRequest, + CreateWebhookConfigurationRequest, + CreateWebhookConfigurationRequestAuthentication, + CreateWebhookConfigurationRequestSignatureVerification, CronExpression, CronExpressionInput, PromiseCustomActionApi as CustomActionApi, @@ -44822,6 +49444,8 @@ export { PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, + DataSource, + DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, @@ -44837,13 +49461,20 @@ export { DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteOrgEmailCustomizationRequest, + DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, + EntityHeader, ErrorResponse, + EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, + EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, + EurekaRelevantQuestion, + EventChannelConfig, + EventChannelConfigInput, ExcludeMetadataListItemInput, ExportAnswerReportRequest, ExportAnswerReportRequestRegionalSettings, @@ -44877,9 +49508,13 @@ export { GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, + GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetObjectAccessTokenRequest, + GetRelevantQuestionsRequest, + GetRelevantQuestionsRequestAiContext, + GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupObject, PromiseGroupsApi as GroupsApi, @@ -44898,12 +49533,12 @@ export { ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, - InputVariableValue, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTParameter, JWTUserOptions, JWTUserOptionsFull, + LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, @@ -44913,6 +49548,7 @@ export { LoginRequest, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, + MetadataContext, MetadataInput, MetadataListItemInput, MetadataObject, @@ -44922,7 +49558,11 @@ export { ModelTableList, ObjectIDAndName, Org, + OrgChannelConfigInput, + OrgChannelConfigResponse, + OrgDetails, OrgInfo, + OrgPreferenceSearchCriteriaInput, OrgResponse, OrgType, PromiseOrgsApi as OrgsApi, @@ -44991,6 +49631,7 @@ export { SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCommitsRequest, + SearchCommunicationChannelPreferencesRequest, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestSortOptions, @@ -45015,8 +49656,13 @@ export { SearchUsersRequest, SearchUsersRequestSortOptions, SearchVariablesRequest, + SearchWebhookConfigurationsRequest, + SearchWebhookConfigurationsRequestSortOptions, PromiseSecurityApi as SecurityApi, SelfDecodingBody, + SendAgentMessageRequest, + SendAgentMessageResponse, + SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, ShareMetadataRequest, @@ -45074,6 +49720,7 @@ export { UpdateUserRequest, UpdateVariableRequest, UpdateVariableValuesRequest, + UpdateWebhookConfigurationRequest, User, UserGroup, UserGroupResponse, @@ -45084,12 +49731,33 @@ export { PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, + ValueScopeInput, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, + VariableUpdateAssignmentInput, + VariableUpdateScopeInput, VariableValue, - VariableValueInput, PromiseVersionControlApi as VersionControlApi, + WebhookAuthApiKey, + WebhookAuthApiKeyInput, + WebhookAuthBasicAuth, + WebhookAuthBasicAuthInput, + WebhookAuthOAuth2, + WebhookAuthOAuth2Input, + WebhookAuthentication, + WebhookAuthenticationInput, + WebhookDeleteFailure, + WebhookDeleteResponse, + WebhookOrg, + WebhookPagination, + WebhookResponse, + WebhookSearchResponse, + WebhookSignatureVerification, + WebhookSignatureVerificationInput, + WebhookSortOptionsInput, + WebhookUser, + PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, diff --git a/sdks/typescript/index.ts b/sdks/typescript/index.ts index 4a6c0210b..27a36f985 100644 --- a/sdks/typescript/index.ts +++ b/sdks/typescript/index.ts @@ -8,6 +8,6 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseAIApi as AIApi, PromiseAuthenticationApi as AuthenticationApi, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, PromiseConnectionsApi as ConnectionsApi, PromiseCustomActionApi as CustomActionApi, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, PromiseEmailCustomizationApi as EmailCustomizationApi, PromiseGroupsApi as GroupsApi, PromiseLogApi as LogApi, PromiseMetadataApi as MetadataApi, PromiseOrgsApi as OrgsApi, PromiseReportsApi as ReportsApi, PromiseRolesApi as RolesApi, PromiseSchedulesApi as SchedulesApi, PromiseSecurityApi as SecurityApi, PromiseSystemApi as SystemApi, PromiseTagsApi as TagsApi, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, PromiseUsersApi as UsersApi, PromiseVariableApi as VariableApi, PromiseVersionControlApi as VersionControlApi } from './types/PromiseAPI'; +export { PromiseAIApi as AIApi, PromiseAuthenticationApi as AuthenticationApi, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, PromiseConnectionsApi as ConnectionsApi, PromiseCustomActionApi as CustomActionApi, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, PromiseEmailCustomizationApi as EmailCustomizationApi, PromiseGroupsApi as GroupsApi, PromiseLogApi as LogApi, PromiseMetadataApi as MetadataApi, PromiseOrgsApi as OrgsApi, PromiseReportsApi as ReportsApi, PromiseRolesApi as RolesApi, PromiseSchedulesApi as SchedulesApi, PromiseSecurityApi as SecurityApi, PromiseSystemApi as SystemApi, PromiseTagsApi as TagsApi, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, PromiseUsersApi as UsersApi, PromiseVariableApi as VariableApi, PromiseVersionControlApi as VersionControlApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI'; export { createBearerAuthenticationConfig, createBasicConfig } from "./utils/config"; \ No newline at end of file diff --git a/sdks/typescript/models/AIContext.ts b/sdks/typescript/models/AIContext.ts new file mode 100644 index 000000000..4fb445085 --- /dev/null +++ b/sdks/typescript/models/AIContext.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AIContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AIContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AgentConversation.ts b/sdks/typescript/models/AgentConversation.ts new file mode 100644 index 000000000..b85b19114 --- /dev/null +++ b/sdks/typescript/models/AgentConversation.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AgentConversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_id': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conversation_id", + "baseName": "conversation_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AgentConversation.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DbtGenerateSyncTmlRequest.ts b/sdks/typescript/models/AnswerContextInput.ts similarity index 56% rename from sdks/typescript/models/DbtGenerateSyncTmlRequest.ts rename to sdks/typescript/models/AnswerContextInput.ts index 90548e536..1083e0821 100644 --- a/sdks/typescript/models/DbtGenerateSyncTmlRequest.ts +++ b/sdks/typescript/models/AnswerContextInput.ts @@ -12,34 +12,34 @@ import { HttpFile } from '../http/http'; -export class DbtGenerateSyncTmlRequest { +export class AnswerContextInput { /** - * Unique ID of the DBT connection. + * Unique identifier of the answer session. */ - 'dbt_connection_identifier': string; + 'session_identifier': string; /** - * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + * Generation number of the answer. */ - 'file_content'?: HttpFile; + 'generation_number': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "dbt_connection_identifier", - "baseName": "dbt_connection_identifier", + "name": "session_identifier", + "baseName": "session_identifier", "type": "string", "format": "" }, { - "name": "file_content", - "baseName": "file_content", - "type": "HttpFile", - "format": "binary" + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" } ]; static getAttributeTypeMap() { - return DbtGenerateSyncTmlRequest.attributeTypeMap; + return AnswerContextInput.attributeTypeMap; } public constructor() { diff --git a/sdks/typescript/models/ColumnSecurityRule.ts b/sdks/typescript/models/ColumnSecurityRule.ts index ad1729bd1..7f641bb63 100644 --- a/sdks/typescript/models/ColumnSecurityRule.ts +++ b/sdks/typescript/models/ColumnSecurityRule.ts @@ -21,7 +21,7 @@ export class ColumnSecurityRule { * Array of groups that have access to this column */ 'groups'?: Array | null; - 'sourceTableDetails'?: ColumnSecurityRuleSourceTable; + 'source_table_details'?: ColumnSecurityRuleSourceTable; static readonly discriminator: string | undefined = undefined; @@ -39,8 +39,8 @@ export class ColumnSecurityRule { "format": "" }, { - "name": "sourceTableDetails", - "baseName": "sourceTableDetails", + "name": "source_table_details", + "baseName": "source_table_details", "type": "ColumnSecurityRuleSourceTable", "format": "" } ]; diff --git a/sdks/typescript/models/ColumnSecurityRuleResponse.ts b/sdks/typescript/models/ColumnSecurityRuleResponse.ts index 838cfef72..a4042156c 100644 --- a/sdks/typescript/models/ColumnSecurityRuleResponse.ts +++ b/sdks/typescript/models/ColumnSecurityRuleResponse.ts @@ -17,34 +17,34 @@ export class ColumnSecurityRuleResponse { /** * GUID of the table for which the column security rules are fetched */ - 'guid'?: string | null; + 'table_guid'?: string | null; /** * Object ID of the table for which the column security rules are fetched */ - 'objId'?: string | null; + 'obj_id'?: string | null; /** * Array containing column security rule objects */ - 'columnSecurityRules'?: Array | null; + 'column_security_rules'?: Array | null; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "guid", - "baseName": "guid", + "name": "table_guid", + "baseName": "table_guid", "type": "string", "format": "" }, { - "name": "objId", - "baseName": "objId", + "name": "obj_id", + "baseName": "obj_id", "type": "string", "format": "" }, { - "name": "columnSecurityRules", - "baseName": "columnSecurityRules", + "name": "column_security_rules", + "baseName": "column_security_rules", "type": "Array", "format": "" } ]; diff --git a/sdks/typescript/models/CommunicationChannelPreferencesResponse.ts b/sdks/typescript/models/CommunicationChannelPreferencesResponse.ts new file mode 100644 index 000000000..2e6a67846 --- /dev/null +++ b/sdks/typescript/models/CommunicationChannelPreferencesResponse.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { HttpFile } from '../http/http'; + +export class CommunicationChannelPreferencesResponse { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array | null; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommunicationChannelPreferencesResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ConfigureCommunicationChannelPreferencesRequest.ts b/sdks/typescript/models/ConfigureCommunicationChannelPreferencesRequest.ts new file mode 100644 index 000000000..5ffe81a4f --- /dev/null +++ b/sdks/typescript/models/ConfigureCommunicationChannelPreferencesRequest.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { HttpFile } from '../http/http'; + +export class ConfigureCommunicationChannelPreferencesRequest { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ContextPayloadV2Input.ts b/sdks/typescript/models/ContextPayloadV2Input.ts new file mode 100644 index 000000000..0b2767bb3 --- /dev/null +++ b/sdks/typescript/models/ContextPayloadV2Input.ts @@ -0,0 +1,65 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnswerContextInput } from '../models/AnswerContextInput'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { LBContextInput } from '../models/LBContextInput'; +import { HttpFile } from '../http/http'; + +export class ContextPayloadV2Input { + /** + * Type of the context. + */ + 'type'?: ContextPayloadV2InputTypeEnum | null; + 'answer_context'?: AnswerContextInput; + 'liveboard_context'?: LBContextInput; + 'data_source_context'?: DataSourceContextInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ContextPayloadV2InputTypeEnum", + "format": "" + }, + { + "name": "answer_context", + "baseName": "answer_context", + "type": "AnswerContextInput", + "format": "" + }, + { + "name": "liveboard_context", + "baseName": "liveboard_context", + "type": "LBContextInput", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ContextPayloadV2Input.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ContextPayloadV2InputTypeEnum = "answer" | "liveboard" | "data_source" ; + diff --git a/sdks/typescript/models/ConversationSettingsInput.ts b/sdks/typescript/models/ConversationSettingsInput.ts new file mode 100644 index 000000000..f31b16d3d --- /dev/null +++ b/sdks/typescript/models/ConversationSettingsInput.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ConversationSettingsInput { + /** + * Enable contextual change analysis. + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. + */ + 'enable_reasoning'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConversationSettingsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateAgentConversationRequest.ts b/sdks/typescript/models/CreateAgentConversationRequest.ts new file mode 100644 index 000000000..a1e7ab9a4 --- /dev/null +++ b/sdks/typescript/models/CreateAgentConversationRequest.ts @@ -0,0 +1,44 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; +import { HttpFile } from '../http/http'; + +export class CreateAgentConversationRequest { + 'metadata_context': CreateAgentConversationRequestMetadataContext; + 'conversation_settings': CreateAgentConversationRequestConversationSettings; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "CreateAgentConversationRequestMetadataContext", + "format": "" + }, + { + "name": "conversation_settings", + "baseName": "conversation_settings", + "type": "CreateAgentConversationRequestConversationSettings", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateAgentConversationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateAgentConversationRequestConversationSettings.ts b/sdks/typescript/models/CreateAgentConversationRequestConversationSettings.ts new file mode 100644 index 000000000..86d339b49 --- /dev/null +++ b/sdks/typescript/models/CreateAgentConversationRequestConversationSettings.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Conversation settings. +*/ +export class CreateAgentConversationRequestConversationSettings { + /** + * Enable contextual change analysis. + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. + */ + 'enable_reasoning'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateAgentConversationRequestConversationSettings.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateAgentConversationRequestMetadataContext.ts b/sdks/typescript/models/CreateAgentConversationRequestMetadataContext.ts new file mode 100644 index 000000000..c4130b25d --- /dev/null +++ b/sdks/typescript/models/CreateAgentConversationRequestMetadataContext.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnswerContextInput } from '../models/AnswerContextInput'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { LBContextInput } from '../models/LBContextInput'; +import { HttpFile } from '../http/http'; + +/** +* Context for the conversation. +*/ +export class CreateAgentConversationRequestMetadataContext { + /** + * Type of the context. + */ + 'type'?: CreateAgentConversationRequestMetadataContextTypeEnum | null; + 'answer_context'?: AnswerContextInput; + 'liveboard_context'?: LBContextInput; + 'data_source_context'?: DataSourceContextInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CreateAgentConversationRequestMetadataContextTypeEnum", + "format": "" + }, + { + "name": "answer_context", + "baseName": "answer_context", + "type": "AnswerContextInput", + "format": "" + }, + { + "name": "liveboard_context", + "baseName": "liveboard_context", + "type": "LBContextInput", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateAgentConversationRequestMetadataContext.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateAgentConversationRequestMetadataContextTypeEnum = "answer" | "liveboard" | "data_source" ; + diff --git a/sdks/typescript/models/CreateConnectionConfigurationRequest.ts b/sdks/typescript/models/CreateConnectionConfigurationRequest.ts index a13e444a1..11410add0 100644 --- a/sdks/typescript/models/CreateConnectionConfigurationRequest.ts +++ b/sdks/typescript/models/CreateConnectionConfigurationRequest.ts @@ -107,7 +107,7 @@ export class CreateConnectionConfigurationRequest { } -export type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" ; +export type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "OAUTH_CLIENT_CREDENTIALS" ; export type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES" ; export type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS" ; diff --git a/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts b/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts index 6bc9cac39..55530989a 100644 --- a/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts +++ b/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts @@ -108,6 +108,14 @@ export class CreateEmailCustomizationRequestTemplateProperties { * Whether to hide modify alert */ 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; static readonly discriminator: string | undefined = undefined; @@ -249,6 +257,18 @@ export class CreateEmailCustomizationRequestTemplateProperties { "baseName": "hide_modify_alert", "type": "boolean", "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/CreateRoleRequest.ts b/sdks/typescript/models/CreateRoleRequest.ts index f16d24717..4667dfea4 100644 --- a/sdks/typescript/models/CreateRoleRequest.ts +++ b/sdks/typescript/models/CreateRoleRequest.ts @@ -67,5 +67,5 @@ export class CreateRoleRequest { } -export type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" ; +export type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; diff --git a/sdks/typescript/models/CreateUserGroupRequest.ts b/sdks/typescript/models/CreateUserGroupRequest.ts index b962d30b3..6ff36aad5 100644 --- a/sdks/typescript/models/CreateUserGroupRequest.ts +++ b/sdks/typescript/models/CreateUserGroupRequest.ts @@ -127,7 +127,7 @@ export class CreateUserGroupRequest { } -export type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; -export type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" ; +export type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; +export type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; export type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; diff --git a/sdks/typescript/models/CreateVariableRequest.ts b/sdks/typescript/models/CreateVariableRequest.ts index 624f5818e..0f328f6e4 100644 --- a/sdks/typescript/models/CreateVariableRequest.ts +++ b/sdks/typescript/models/CreateVariableRequest.ts @@ -10,7 +10,6 @@ * Do not edit the class manually. */ -import { InputVariableValue } from '../models/InputVariableValue'; import { HttpFile } from '../http/http'; export class CreateVariableRequest { @@ -25,11 +24,11 @@ export class CreateVariableRequest { /** * If the variable contains sensitive values like passwords */ - 'sensitive'?: boolean | null; + 'is_sensitive'?: boolean | null; /** - * Values of variable + * Variable Data Type */ - 'values'?: Array; + 'data_type'?: CreateVariableRequestDataTypeEnum; static readonly discriminator: string | undefined = undefined; @@ -47,15 +46,15 @@ export class CreateVariableRequest { "format": "" }, { - "name": "sensitive", - "baseName": "sensitive", + "name": "is_sensitive", + "baseName": "is_sensitive", "type": "boolean", "format": "" }, { - "name": "values", - "baseName": "values", - "type": "Array", + "name": "data_type", + "baseName": "data_type", + "type": "CreateVariableRequestDataTypeEnum", "format": "" } ]; @@ -69,4 +68,5 @@ export class CreateVariableRequest { export type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" ; +export type CreateVariableRequestDataTypeEnum = "VARCHAR" | "INT32" | "INT64" | "DOUBLE" | "DATE" | "DATE_TIME" ; diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequest.ts b/sdks/typescript/models/CreateWebhookConfigurationRequest.ts new file mode 100644 index 000000000..7c973f0c0 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequest.ts @@ -0,0 +1,97 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { HttpFile } from '../http/http'; + +export class CreateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events': Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequestAuthentication.ts b/sdks/typescript/models/CreateWebhookConfigurationRequestAuthentication.ts new file mode 100644 index 000000000..7602d0c87 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequestAuthentication.ts @@ -0,0 +1,65 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { HttpFile } from '../http/http'; + +/** +* Authorization configuration for the webhook. +*/ +export class CreateWebhookConfigurationRequestAuthentication { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequestAuthentication.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequestSignatureVerification.ts b/sdks/typescript/models/CreateWebhookConfigurationRequestSignatureVerification.ts new file mode 100644 index 000000000..80255b2d7 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequestSignatureVerification.ts @@ -0,0 +1,75 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Configuration for webhook signature verification. +*/ +export class CreateWebhookConfigurationRequestSignatureVerification { + /** + * Signature verification method type. + */ + 'type': CreateWebhookConfigurationRequestSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateWebhookConfigurationRequestSignatureVerificationTypeEnum = "HMAC_SHA256" ; +export type CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum = "SHA256" ; + diff --git a/sdks/typescript/models/DataSource.ts b/sdks/typescript/models/DataSource.ts new file mode 100644 index 000000000..9b5b27132 --- /dev/null +++ b/sdks/typescript/models/DataSource.ts @@ -0,0 +1,56 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EntityHeader } from '../models/EntityHeader'; +import { HttpFile } from '../http/http'; + +export class DataSource { + /** + * Confidence score for the data source suggestion. + */ + 'confidence'?: number | null; + 'details'?: EntityHeader; + /** + * LLM reasoning for the data source. + */ + 'reasoning'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "confidence", + "baseName": "confidence", + "type": "number", + "format": "float" + }, + { + "name": "details", + "baseName": "details", + "type": "EntityHeader", + "format": "" + }, + { + "name": "reasoning", + "baseName": "reasoning", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DataSource.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DataSourceContextInput.ts b/sdks/typescript/models/DataSourceContextInput.ts new file mode 100644 index 000000000..d4111e501 --- /dev/null +++ b/sdks/typescript/models/DataSourceContextInput.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DataSourceContextInput { + /** + * Unique identifier of the data source. + */ + 'guid': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "guid", + "baseName": "guid", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DataSourceContextInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DbtConnectionRequest.ts b/sdks/typescript/models/DbtConnectionRequest.ts deleted file mode 100644 index 0e06fcf20..000000000 --- a/sdks/typescript/models/DbtConnectionRequest.ts +++ /dev/null @@ -1,131 +0,0 @@ -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { HttpFile } from '../http/http'; - -export class DbtConnectionRequest { - /** - * Name of the connection. - */ - 'connection_name': string; - /** - * Name of the Database. - */ - 'database_name': string; - /** - * Mention type of Import - */ - 'import_type'?: DbtConnectionRequestImportTypeEnum; - /** - * Access token is mandatory when Import_Type is DBT_CLOUD. - */ - 'access_token'?: string; - /** - * DBT URL is mandatory when Import_Type is DBT_CLOUD. - */ - 'dbt_url'?: string; - /** - * Account ID is mandatory when Import_Type is DBT_CLOUD - */ - 'account_id'?: string; - /** - * Project ID is mandatory when Import_Type is DBT_CLOUD - */ - 'project_id'?: string; - /** - * DBT Environment ID\" - */ - 'dbt_env_id'?: string; - /** - * Name of the project - */ - 'project_name'?: string; - /** - * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \'ZIP_FILE\' - */ - 'file_content'?: HttpFile; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "connection_name", - "baseName": "connection_name", - "type": "string", - "format": "" - }, - { - "name": "database_name", - "baseName": "database_name", - "type": "string", - "format": "" - }, - { - "name": "import_type", - "baseName": "import_type", - "type": "DbtConnectionRequestImportTypeEnum", - "format": "" - }, - { - "name": "access_token", - "baseName": "access_token", - "type": "string", - "format": "" - }, - { - "name": "dbt_url", - "baseName": "dbt_url", - "type": "string", - "format": "" - }, - { - "name": "account_id", - "baseName": "account_id", - "type": "string", - "format": "" - }, - { - "name": "project_id", - "baseName": "project_id", - "type": "string", - "format": "" - }, - { - "name": "dbt_env_id", - "baseName": "dbt_env_id", - "type": "string", - "format": "" - }, - { - "name": "project_name", - "baseName": "project_name", - "type": "string", - "format": "" - }, - { - "name": "file_content", - "baseName": "file_content", - "type": "HttpFile", - "format": "binary" - } ]; - - static getAttributeTypeMap() { - return DbtConnectionRequest.attributeTypeMap; - } - - public constructor() { - } -} - - -export type DbtConnectionRequestImportTypeEnum = "DBT_CLOUD" | "ZIP_FILE" ; - diff --git a/sdks/typescript/models/DbtGenerateTmlRequest.ts b/sdks/typescript/models/DbtGenerateTmlRequest.ts deleted file mode 100644 index 8106985a1..000000000 --- a/sdks/typescript/models/DbtGenerateTmlRequest.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ModelTableList } from '../models/ModelTableList'; -import { HttpFile } from '../http/http'; - -export class DbtGenerateTmlRequest { - /** - * Unique ID of the DBT connection. - */ - 'dbt_connection_identifier': string; - /** - * List of Models and their respective Tables - */ - 'model_tables'?: Array; - /** - * Mention the worksheet tmls to import - */ - 'import_worksheets': DbtGenerateTmlRequestImportWorksheetsEnum; - /** - * List of worksheets is mandatory when import_Worksheets is type SELECTED - */ - 'worksheets'?: Array; - /** - * 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’ - */ - 'file_content'?: HttpFile; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "dbt_connection_identifier", - "baseName": "dbt_connection_identifier", - "type": "string", - "format": "" - }, - { - "name": "model_tables", - "baseName": "model_tables", - "type": "Array", - "format": "" - }, - { - "name": "import_worksheets", - "baseName": "import_worksheets", - "type": "DbtGenerateTmlRequestImportWorksheetsEnum", - "format": "" - }, - { - "name": "worksheets", - "baseName": "worksheets", - "type": "Array", - "format": "" - }, - { - "name": "file_content", - "baseName": "file_content", - "type": "HttpFile", - "format": "binary" - } ]; - - static getAttributeTypeMap() { - return DbtGenerateTmlRequest.attributeTypeMap; - } - - public constructor() { - } -} - - -export type DbtGenerateTmlRequestImportWorksheetsEnum = "ALL" | "NONE" | "SELECTED" ; - diff --git a/sdks/typescript/models/DeleteWebhookConfigurationsRequest.ts b/sdks/typescript/models/DeleteWebhookConfigurationsRequest.ts new file mode 100644 index 000000000..c52b89608 --- /dev/null +++ b/sdks/typescript/models/DeleteWebhookConfigurationsRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteWebhookConfigurationsRequest { + /** + * List of webhook identifiers to delete. + */ + 'webhook_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "webhook_identifiers", + "baseName": "webhook_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteWebhookConfigurationsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EntityHeader.ts b/sdks/typescript/models/EntityHeader.ts new file mode 100644 index 000000000..b039dea46 --- /dev/null +++ b/sdks/typescript/models/EntityHeader.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EntityHeader { + /** + * Description of the data source. + */ + 'description'?: string | null; + /** + * Display name of the data source. + */ + 'data_source_name'?: string | null; + /** + * Unique identifier of the data source. + */ + 'data_source_identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EntityHeader.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaDataSourceSuggestionResponse.ts b/sdks/typescript/models/EurekaDataSourceSuggestionResponse.ts new file mode 100644 index 000000000..43b4c42f4 --- /dev/null +++ b/sdks/typescript/models/EurekaDataSourceSuggestionResponse.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DataSource } from '../models/DataSource'; +import { HttpFile } from '../http/http'; + +export class EurekaDataSourceSuggestionResponse { + /** + * List of data sources suggested. + */ + 'data_sources'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_sources", + "baseName": "data_sources", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaDataSourceSuggestionResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaGetRelevantQuestionsResponse.ts b/sdks/typescript/models/EurekaGetRelevantQuestionsResponse.ts new file mode 100644 index 000000000..95f6a5bf9 --- /dev/null +++ b/sdks/typescript/models/EurekaGetRelevantQuestionsResponse.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { HttpFile } from '../http/http'; + +export class EurekaGetRelevantQuestionsResponse { + /** + * List of relevant questions that can be run on their respective data sources. + */ + 'relevant_questions'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "relevant_questions", + "baseName": "relevant_questions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaGetRelevantQuestionsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaRelevantQuestion.ts b/sdks/typescript/models/EurekaRelevantQuestion.ts new file mode 100644 index 000000000..5ae7807b9 --- /dev/null +++ b/sdks/typescript/models/EurekaRelevantQuestion.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EurekaRelevantQuestion { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the data source on which this query can be run on. + */ + 'data_source_identifier'?: string | null; + /** + * Display name of the data source on which this query can be run on. + */ + 'data_source_name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaRelevantQuestion.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EventChannelConfig.ts b/sdks/typescript/models/EventChannelConfig.ts new file mode 100644 index 000000000..ea9264537 --- /dev/null +++ b/sdks/typescript/models/EventChannelConfig.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EventChannelConfig { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array indicates no channels are enabled. + */ + 'channels': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EventChannelConfig.attributeTypeMap; + } + + public constructor() { + } +} + + +export type EventChannelConfigEventTypeEnum = "LIVEBOARD_SCHEDULE" ; +export type EventChannelConfigChannelsEnum = "EMAIL" | "WEBHOOK" ; + diff --git a/sdks/typescript/models/EventChannelConfigInput.ts b/sdks/typescript/models/EventChannelConfigInput.ts new file mode 100644 index 000000000..16da8be4e --- /dev/null +++ b/sdks/typescript/models/EventChannelConfigInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EventChannelConfigInput { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigInputEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array disables all channels for this event. + */ + 'channels': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigInputEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EventChannelConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type EventChannelConfigInputEventTypeEnum = "LIVEBOARD_SCHEDULE" ; +export type EventChannelConfigInputChannelsEnum = "EMAIL" | "WEBHOOK" ; + diff --git a/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts b/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts index d8eea6765..d632369b0 100644 --- a/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts +++ b/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts @@ -36,6 +36,10 @@ export class ExportMetadataTMLRequestExportOptions { * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later */ 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; static readonly discriminator: string | undefined = undefined; @@ -69,6 +73,12 @@ export class ExportMetadataTMLRequestExportOptions { "baseName": "export_column_security_rules", "type": "boolean", "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/ExportOptions.ts b/sdks/typescript/models/ExportOptions.ts index 83d2e76f6..cb3ff2d28 100644 --- a/sdks/typescript/models/ExportOptions.ts +++ b/sdks/typescript/models/ExportOptions.ts @@ -36,6 +36,10 @@ export class ExportOptions { * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later */ 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; static readonly discriminator: string | undefined = undefined; @@ -69,6 +73,12 @@ export class ExportOptions { "baseName": "export_column_security_rules", "type": "boolean", "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/CreateEmailCustomisationRequest.ts b/sdks/typescript/models/GetDataSourceSuggestionsRequest.ts similarity index 69% rename from sdks/typescript/models/CreateEmailCustomisationRequest.ts rename to sdks/typescript/models/GetDataSourceSuggestionsRequest.ts index a075c5fc5..7b18bad67 100644 --- a/sdks/typescript/models/CreateEmailCustomisationRequest.ts +++ b/sdks/typescript/models/GetDataSourceSuggestionsRequest.ts @@ -12,24 +12,24 @@ import { HttpFile } from '../http/http'; -export class CreateEmailCustomisationRequest { +export class GetDataSourceSuggestionsRequest { /** - * Email customization configuration as key value pair + * User query used to suggest data sources. */ - 'template_properties': any; + 'query': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "template_properties", - "baseName": "template_properties", - "type": "any", + "name": "query", + "baseName": "query", + "type": "string", "format": "" } ]; static getAttributeTypeMap() { - return CreateEmailCustomisationRequest.attributeTypeMap; + return GetDataSourceSuggestionsRequest.attributeTypeMap; } public constructor() { diff --git a/sdks/typescript/models/GetRelevantQuestionsRequest.ts b/sdks/typescript/models/GetRelevantQuestionsRequest.ts new file mode 100644 index 000000000..d44af2ea6 --- /dev/null +++ b/sdks/typescript/models/GetRelevantQuestionsRequest.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; +import { HttpFile } from '../http/http'; + +export class GetRelevantQuestionsRequest { + 'metadata_context': GetRelevantQuestionsRequestMetadataContext; + /** + * Maximum number of relevant questions that is allowed in the response, default = 5. + */ + 'limit_relevant_questions'?: number; + /** + * If true, results are not returned from cache & calculated every time. + */ + 'bypass_cache'?: boolean | null; + /** + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. + */ + 'query': string; + 'ai_context'?: GetRelevantQuestionsRequestAiContext; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "GetRelevantQuestionsRequestMetadataContext", + "format": "" + }, + { + "name": "limit_relevant_questions", + "baseName": "limit_relevant_questions", + "type": "number", + "format": "int32" + }, + { + "name": "bypass_cache", + "baseName": "bypass_cache", + "type": "boolean", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "ai_context", + "baseName": "ai_context", + "type": "GetRelevantQuestionsRequestAiContext", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetRelevantQuestionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetRelevantQuestionsRequestAiContext.ts b/sdks/typescript/models/GetRelevantQuestionsRequestAiContext.ts new file mode 100644 index 000000000..a1624814c --- /dev/null +++ b/sdks/typescript/models/GetRelevantQuestionsRequestAiContext.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Additional context to guide the response. +*/ +export class GetRelevantQuestionsRequestAiContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetRelevantQuestionsRequestAiContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetRelevantQuestionsRequestMetadataContext.ts b/sdks/typescript/models/GetRelevantQuestionsRequestMetadataContext.ts new file mode 100644 index 000000000..0f04b0d6c --- /dev/null +++ b/sdks/typescript/models/GetRelevantQuestionsRequestMetadataContext.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. +*/ +export class GetRelevantQuestionsRequestMetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetRelevantQuestionsRequestMetadataContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GroupsImportListInput.ts b/sdks/typescript/models/GroupsImportListInput.ts index 2f6b54040..cf140d51d 100644 --- a/sdks/typescript/models/GroupsImportListInput.ts +++ b/sdks/typescript/models/GroupsImportListInput.ts @@ -117,7 +117,7 @@ export class GroupsImportListInput { } -export type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; -export type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" ; +export type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; +export type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; export type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; diff --git a/sdks/typescript/models/LBContextInput.ts b/sdks/typescript/models/LBContextInput.ts new file mode 100644 index 000000000..6b23f7e21 --- /dev/null +++ b/sdks/typescript/models/LBContextInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class LBContextInput { + /** + * Unique identifier of the liveboard. + */ + 'liveboard_identifier': string; + /** + * Unique identifier of the visualization. + */ + 'visualization_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "liveboard_identifier", + "baseName": "liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifier", + "baseName": "visualization_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LBContextInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/MetadataContext.ts b/sdks/typescript/models/MetadataContext.ts new file mode 100644 index 000000000..44cca3ab8 --- /dev/null +++ b/sdks/typescript/models/MetadataContext.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class MetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ObjectSerializer.ts b/sdks/typescript/models/ObjectSerializer.ts index 85cc8e230..9da27daac 100644 --- a/sdks/typescript/models/ObjectSerializer.ts +++ b/sdks/typescript/models/ObjectSerializer.ts @@ -1,3 +1,4 @@ +export * from '../models/AIContext'; export * from '../models/APIKey'; export * from '../models/APIKeyInput'; export * from '../models/AccessToken'; @@ -8,7 +9,9 @@ export * from '../models/ActionDetails'; export * from '../models/ActionDetailsInput'; export * from '../models/ActionDetailsInputCreate'; export * from '../models/ActivateUserRequest'; +export * from '../models/AgentConversation'; export * from '../models/AnswerContent'; +export * from '../models/AnswerContextInput'; export * from '../models/AnswerDataResponse'; export * from '../models/AssignChangeAuthorRequest'; export * from '../models/AssignTagRequest'; @@ -40,12 +43,19 @@ export * from '../models/CommitFileType'; export * from '../models/CommitHistoryResponse'; export * from '../models/CommitResponse'; export * from '../models/CommiterType'; +export * from '../models/CommunicationChannelPreferencesResponse'; +export * from '../models/ConfigureCommunicationChannelPreferencesRequest'; export * from '../models/ConnectionConfigurationResponse'; export * from '../models/ConnectionConfigurationSearchRequest'; export * from '../models/ConnectionInput'; +export * from '../models/ContextPayloadV2Input'; export * from '../models/Conversation'; +export * from '../models/ConversationSettingsInput'; export * from '../models/ConvertWorksheetToModelRequest'; export * from '../models/CopyObjectRequest'; +export * from '../models/CreateAgentConversationRequest'; +export * from '../models/CreateAgentConversationRequestConversationSettings'; +export * from '../models/CreateAgentConversationRequestMetadataContext'; export * from '../models/CreateCalendarRequest'; export * from '../models/CreateCalendarRequestTableReference'; export * from '../models/CreateConfigRequest'; @@ -70,9 +80,14 @@ export * from '../models/CreateTagRequest'; export * from '../models/CreateUserGroupRequest'; export * from '../models/CreateUserRequest'; export * from '../models/CreateVariableRequest'; +export * from '../models/CreateWebhookConfigurationRequest'; +export * from '../models/CreateWebhookConfigurationRequestAuthentication'; +export * from '../models/CreateWebhookConfigurationRequestSignatureVerification'; export * from '../models/CronExpression'; export * from '../models/CronExpressionInput'; export * from '../models/CustomActionMetadataTypeInput'; +export * from '../models/DataSource'; +export * from '../models/DataSourceContextInput'; export * from '../models/DataWarehouseObjectInput'; export * from '../models/DataWarehouseObjects'; export * from '../models/Database'; @@ -88,12 +103,19 @@ export * from '../models/DeleteConnectionRequest'; export * from '../models/DeleteMetadataRequest'; export * from '../models/DeleteMetadataTypeInput'; export * from '../models/DeleteOrgEmailCustomizationRequest'; +export * from '../models/DeleteWebhookConfigurationsRequest'; export * from '../models/DeployCommitRequest'; export * from '../models/DeployResponse'; +export * from '../models/EntityHeader'; export * from '../models/ErrorResponse'; +export * from '../models/EurekaDataSourceSuggestionResponse'; export * from '../models/EurekaDecomposeQueryResponse'; +export * from '../models/EurekaGetRelevantQuestionsResponse'; export * from '../models/EurekaLLMDecomposeQueryResponse'; export * from '../models/EurekaLLMSuggestedQuery'; +export * from '../models/EurekaRelevantQuestion'; +export * from '../models/EventChannelConfig'; +export * from '../models/EventChannelConfigInput'; export * from '../models/ExcludeMetadataListItemInput'; export * from '../models/ExportAnswerReportRequest'; export * from '../models/ExportAnswerReportRequestRegionalSettings'; @@ -127,9 +149,13 @@ export * from '../models/GenerateCSVRequest'; export * from '../models/GenericInfo'; export * from '../models/GetAsyncImportStatusResponse'; export * from '../models/GetCustomAccessTokenRequest'; +export * from '../models/GetDataSourceSuggestionsRequest'; export * from '../models/GetFullAccessTokenRequest'; export * from '../models/GetFullAccessTokenRequestUserParameters'; export * from '../models/GetObjectAccessTokenRequest'; +export * from '../models/GetRelevantQuestionsRequest'; +export * from '../models/GetRelevantQuestionsRequestAiContext'; +export * from '../models/GetRelevantQuestionsRequestMetadataContext'; export * from '../models/GetTokenResponse'; export * from '../models/GroupObject'; export * from '../models/GroupsImportListInput'; @@ -145,11 +171,11 @@ export * from '../models/ImportUserType'; export * from '../models/ImportUsersRequest'; export * from '../models/ImportUsersResponse'; export * from '../models/InputEurekaNLSRequest'; -export * from '../models/InputVariableValue'; export * from '../models/JWTMetadataObject'; export * from '../models/JWTParameter'; export * from '../models/JWTUserOptions'; export * from '../models/JWTUserOptionsFull'; +export * from '../models/LBContextInput'; export * from '../models/LiveboardContent'; export * from '../models/LiveboardDataResponse'; export * from '../models/LiveboardOptions'; @@ -157,6 +183,7 @@ export * from '../models/LiveboardOptionsInput'; export * from '../models/LogResponse'; export * from '../models/LoginRequest'; export * from '../models/MetadataAssociationItem'; +export * from '../models/MetadataContext'; export * from '../models/MetadataInput'; export * from '../models/MetadataListItemInput'; export * from '../models/MetadataObject'; @@ -166,7 +193,11 @@ export * from '../models/MetadataSearchSortOptions'; export * from '../models/ModelTableList'; export * from '../models/ObjectIDAndName'; export * from '../models/Org'; +export * from '../models/OrgChannelConfigInput'; +export * from '../models/OrgChannelConfigResponse'; +export * from '../models/OrgDetails'; export * from '../models/OrgInfo'; +export * from '../models/OrgPreferenceSearchCriteriaInput'; export * from '../models/OrgResponse'; export * from '../models/OrgType'; export * from '../models/ParameterValues'; @@ -228,6 +259,7 @@ export * from '../models/Scope'; export * from '../models/SearchCalendarsRequest'; export * from '../models/SearchCalendarsRequestSortOptions'; export * from '../models/SearchCommitsRequest'; +export * from '../models/SearchCommunicationChannelPreferencesRequest'; export * from '../models/SearchConfigRequest'; export * from '../models/SearchConnectionRequest'; export * from '../models/SearchConnectionRequestSortOptions'; @@ -252,6 +284,11 @@ export * from '../models/SearchUserGroupsRequestSortOptions'; export * from '../models/SearchUsersRequest'; export * from '../models/SearchUsersRequestSortOptions'; export * from '../models/SearchVariablesRequest'; +export * from '../models/SearchWebhookConfigurationsRequest'; +export * from '../models/SearchWebhookConfigurationsRequestSortOptions'; +export * from '../models/SendAgentMessageRequest'; +export * from '../models/SendAgentMessageResponse'; +export * from '../models/SendAgentMessageStreamingRequest'; export * from '../models/SendMessageRequest'; export * from '../models/ShareMetadataRequest'; export * from '../models/ShareMetadataTypeInput'; @@ -305,6 +342,7 @@ export * from '../models/UpdateUserGroupRequest'; export * from '../models/UpdateUserRequest'; export * from '../models/UpdateVariableRequest'; export * from '../models/UpdateVariableValuesRequest'; +export * from '../models/UpdateWebhookConfigurationRequest'; export * from '../models/User'; export * from '../models/UserGroup'; export * from '../models/UserGroupResponse'; @@ -314,11 +352,32 @@ export * from '../models/UserParameterOptions'; export * from '../models/UserPrincipal'; export * from '../models/ValidateMergeRequest'; export * from '../models/ValidateTokenRequest'; +export * from '../models/ValueScopeInput'; export * from '../models/Variable'; export * from '../models/VariableDetailInput'; +export * from '../models/VariableUpdateAssignmentInput'; +export * from '../models/VariableUpdateScopeInput'; export * from '../models/VariableValue'; -export * from '../models/VariableValueInput'; +export * from '../models/WebhookAuthApiKey'; +export * from '../models/WebhookAuthApiKeyInput'; +export * from '../models/WebhookAuthBasicAuth'; +export * from '../models/WebhookAuthBasicAuthInput'; +export * from '../models/WebhookAuthOAuth2'; +export * from '../models/WebhookAuthOAuth2Input'; +export * from '../models/WebhookAuthentication'; +export * from '../models/WebhookAuthenticationInput'; +export * from '../models/WebhookDeleteFailure'; +export * from '../models/WebhookDeleteResponse'; +export * from '../models/WebhookOrg'; +export * from '../models/WebhookPagination'; +export * from '../models/WebhookResponse'; +export * from '../models/WebhookSearchResponse'; +export * from '../models/WebhookSignatureVerification'; +export * from '../models/WebhookSignatureVerificationInput'; +export * from '../models/WebhookSortOptionsInput'; +export * from '../models/WebhookUser'; +import { AIContext } from '../models/AIContext'; import { APIKey } from '../models/APIKey'; import { APIKeyInput } from '../models/APIKeyInput'; import { AccessToken } from '../models/AccessToken'; @@ -329,7 +388,9 @@ import { ActionDetails } from '../models/ActionDetails'; import { ActionDetailsInput } from '../models/ActionDetailsInput'; import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; import { AnswerContent } from '../models/AnswerContent'; +import { AnswerContextInput } from '../models/AnswerContextInput'; import { AnswerDataResponse } from '../models/AnswerDataResponse'; import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; import { AssignTagRequest } from '../models/AssignTagRequest'; @@ -361,12 +422,19 @@ import { CommitFileType } from '../models/CommitFileType'; import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConnectionConfigurationResponse , ConnectionConfigurationResponsePolicyProcessesEnum , ConnectionConfigurationResponseDataWarehouseTypeEnum , ConnectionConfigurationResponsePolicyTypeEnum } from '../models/ConnectionConfigurationResponse'; import { ConnectionConfigurationSearchRequest , ConnectionConfigurationSearchRequestPolicyTypeEnum } from '../models/ConnectionConfigurationSearchRequest'; import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input, ContextPayloadV2InputTypeEnum } from '../models/ContextPayloadV2Input'; import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; import { CopyObjectRequest , CopyObjectRequestTypeEnum } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest , CreateCalendarRequestCreationMethodEnum , CreateCalendarRequestCalendarTypeEnum , CreateCalendarRequestMonthOffsetEnum , CreateCalendarRequestStartDayOfWeekEnum } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; @@ -390,10 +458,15 @@ import { CreateScheduleRequestRecipientDetails } from '../models/CreateScheduleR import { CreateTagRequest } from '../models/CreateTagRequest'; import { CreateUserGroupRequest , CreateUserGroupRequestPrivilegesEnum , CreateUserGroupRequestTypeEnum , CreateUserGroupRequestVisibilityEnum } from '../models/CreateUserGroupRequest'; import { CreateUserRequest , CreateUserRequestAccountTypeEnum , CreateUserRequestAccountStatusEnum , CreateUserRequestVisibilityEnum , CreateUserRequestPreferredLocaleEnum } from '../models/CreateUserRequest'; -import { CreateVariableRequest, CreateVariableRequestTypeEnum } from '../models/CreateVariableRequest'; +import { CreateVariableRequest, CreateVariableRequestTypeEnum , CreateVariableRequestDataTypeEnum } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest , CreateWebhookConfigurationRequestEventsEnum } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum , CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CronExpression } from '../models/CronExpression'; import { CronExpressionInput } from '../models/CronExpressionInput'; import { CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; import { Database } from '../models/Database'; @@ -409,12 +482,19 @@ import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest , DeployCommitRequestDeployTypeEnum , DeployCommitRequestDeployPolicyEnum } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EventChannelConfig, EventChannelConfigEventTypeEnum , EventChannelConfigChannelsEnum } from '../models/EventChannelConfig'; +import { EventChannelConfigInput, EventChannelConfigInputEventTypeEnum , EventChannelConfigInputChannelsEnum } from '../models/EventChannelConfigInput'; import { ExcludeMetadataListItemInput , ExcludeMetadataListItemInputTypeEnum } from '../models/ExcludeMetadataListItemInput'; import { ExportAnswerReportRequest , ExportAnswerReportRequestFileFormatEnum } from '../models/ExportAnswerReportRequest'; import { ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum , ExportAnswerReportRequestRegionalSettingsUserLocaleEnum , ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum , ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum } from '../models/ExportAnswerReportRequestRegionalSettings'; @@ -448,9 +528,13 @@ import { GenerateCSVRequest , GenerateCSVRequestCalendarTypeEnum , GenerateCSV import { GenericInfo } from '../models/GenericInfo'; import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; import { GetCustomAccessTokenRequest , GetCustomAccessTokenRequestPersistOptionEnum } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; import { GetTokenResponse } from '../models/GetTokenResponse'; import { GroupObject } from '../models/GroupObject'; import { GroupsImportListInput , GroupsImportListInputPrivilegesEnum , GroupsImportListInputTypeEnum , GroupsImportListInputVisibilityEnum } from '../models/GroupsImportListInput'; @@ -466,11 +550,11 @@ import { ImportUserType } from '../models/ImportUserType'; import { ImportUsersRequest } from '../models/ImportUsersRequest'; import { ImportUsersResponse } from '../models/ImportUsersResponse'; import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; -import { InputVariableValue , InputVariableValuePrincipalTypeEnum } from '../models/InputVariableValue'; import { JWTMetadataObject , JWTMetadataObjectTypeEnum } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; import { LiveboardOptions } from '../models/LiveboardOptions'; @@ -478,6 +562,7 @@ import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; import { LogResponse } from '../models/LogResponse'; import { LoginRequest } from '../models/LoginRequest'; import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; import { MetadataInput , MetadataInputTypeEnum } from '../models/MetadataInput'; import { MetadataListItemInput , MetadataListItemInputTypeEnum , MetadataListItemInputSubtypesEnum } from '../models/MetadataListItemInput'; import { MetadataObject , MetadataObjectTypeEnum } from '../models/MetadataObject'; @@ -487,7 +572,11 @@ import { MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum , Me import { ModelTableList } from '../models/ModelTableList'; import { ObjectIDAndName } from '../models/ObjectIDAndName'; import { Org } from '../models/Org'; +import { OrgChannelConfigInput , OrgChannelConfigInputOperationEnum , OrgChannelConfigInputResetEventsEnum } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; import { OrgInfo } from '../models/OrgInfo'; +import { OrgPreferenceSearchCriteriaInput , OrgPreferenceSearchCriteriaInputEventTypesEnum } from '../models/OrgPreferenceSearchCriteriaInput'; import { OrgResponse , OrgResponseStatusEnum , OrgResponseVisibilityEnum } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; @@ -549,6 +638,7 @@ import { Scope } from '../models/Scope'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum , SearchCalendarsRequestSortOptionsOrderEnum } from '../models/SearchCalendarsRequestSortOptions'; import { SearchCommitsRequest , SearchCommitsRequestMetadataTypeEnum } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; import { SearchConnectionRequest , SearchConnectionRequestDataWarehouseTypesEnum , SearchConnectionRequestDataWarehouseObjectTypeEnum , SearchConnectionRequestAuthenticationTypeEnum } from '../models/SearchConnectionRequest'; import { SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum , SearchConnectionRequestSortOptionsOrderEnum } from '../models/SearchConnectionRequestSortOptions'; @@ -572,7 +662,12 @@ import { SearchUserGroupsRequest , SearchUserGroupsRequestPrivilegesEnum import { SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum , SearchUserGroupsRequestSortOptionsOrderEnum } from '../models/SearchUserGroupsRequestSortOptions'; import { SearchUsersRequest , SearchUsersRequestVisibilityEnum , SearchUsersRequestPrivilegesEnum , SearchUsersRequestAccountTypeEnum , SearchUsersRequestAccountStatusEnum } from '../models/SearchUsersRequest'; import { SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum , SearchUsersRequestSortOptionsOrderEnum } from '../models/SearchUsersRequestSortOptions'; -import { SearchVariablesRequest , SearchVariablesRequestOutputFormatEnum } from '../models/SearchVariablesRequest'; +import { SearchVariablesRequest , SearchVariablesRequestOutputFormatEnum } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest , SearchWebhookConfigurationsRequestEventTypeEnum } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum , SearchWebhookConfigurationsRequestSortOptionsOrderEnum } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; import { SendMessageRequest } from '../models/SendMessageRequest'; import { ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum } from '../models/ShareMetadataRequest'; import { ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum } from '../models/ShareMetadataTypeInput'; @@ -624,9 +719,10 @@ import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; import { UpdateTagRequest } from '../models/UpdateTagRequest'; import { UpdateUserGroupRequest , UpdateUserGroupRequestPrivilegesEnum , UpdateUserGroupRequestTypeEnum , UpdateUserGroupRequestVisibilityEnum , UpdateUserGroupRequestOperationEnum } from '../models/UpdateUserGroupRequest'; import { UpdateUserRequest , UpdateUserRequestVisibilityEnum , UpdateUserRequestAccountStatusEnum , UpdateUserRequestAccountTypeEnum , UpdateUserRequestOperationEnum , UpdateUserRequestPreferredLocaleEnum } from '../models/UpdateUserRequest'; -import { UpdateVariableRequest , UpdateVariableRequestOperationEnum } from '../models/UpdateVariableRequest'; -import { UpdateVariableValuesRequest , UpdateVariableValuesRequestOperationEnum } from '../models/UpdateVariableValuesRequest'; -import { User , UserVisibilityEnum , UserAccountTypeEnum , UserAccountStatusEnum , UserParentTypeEnum } from '../models/User'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest , UpdateWebhookConfigurationRequestEventsEnum } from '../models/UpdateWebhookConfigurationRequest'; +import { User , UserVisibilityEnum , UserAccountTypeEnum , UserAccountStatusEnum , UserParentTypeEnum } from '../models/User'; import { UserGroup } from '../models/UserGroup'; import { UserGroupResponse , UserGroupResponseParentTypeEnum , UserGroupResponseTypeEnum , UserGroupResponseVisibilityEnum } from '../models/UserGroupResponse'; import { UserInfo } from '../models/UserInfo'; @@ -635,10 +731,30 @@ import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput , ValueScopeInputPrincipalTypeEnum } from '../models/ValueScopeInput'; import { Variable , VariableVariableTypeEnum } from '../models/Variable'; import { VariableDetailInput , VariableDetailInputTypeEnum } from '../models/VariableDetailInput'; -import { VariableValue , VariableValuePrincipalTypeEnum } from '../models/VariableValue'; -import { VariableValueInput } from '../models/VariableValueInput'; +import { VariableUpdateAssignmentInput , VariableUpdateAssignmentInputOperationEnum } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput , VariableUpdateScopeInputPrincipalTypeEnum } from '../models/VariableUpdateScopeInput'; +import { VariableValue , VariableValuePrincipalTypeEnum } from '../models/VariableValue'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse , WebhookResponseEventsEnum } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification, WebhookSignatureVerificationTypeEnum , WebhookSignatureVerificationAlgorithmEnum } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput, WebhookSignatureVerificationInputTypeEnum , WebhookSignatureVerificationInputAlgorithmEnum } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum , WebhookSortOptionsInputOrderEnum } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -670,7 +786,9 @@ let enumsMap: Set = new Set([ "ConnectionConfigurationResponseDataWarehouseTypeEnum", "ConnectionConfigurationResponsePolicyTypeEnum", "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "ContextPayloadV2InputTypeEnum", "CopyObjectRequestTypeEnum", + "CreateAgentConversationRequestMetadataContextTypeEnum", "CreateCalendarRequestCreationMethodEnum", "CreateCalendarRequestCalendarTypeEnum", "CreateCalendarRequestMonthOffsetEnum", @@ -693,10 +811,18 @@ let enumsMap: Set = new Set([ "CreateUserRequestVisibilityEnum", "CreateUserRequestPreferredLocaleEnum", "CreateVariableRequestTypeEnum", + "CreateVariableRequestDataTypeEnum", + "CreateWebhookConfigurationRequestEventsEnum", + "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", "CustomActionMetadataTypeInputTypeEnum", "DeleteMetadataTypeInputTypeEnum", "DeployCommitRequestDeployTypeEnum", "DeployCommitRequestDeployPolicyEnum", + "EventChannelConfigEventTypeEnum", + "EventChannelConfigChannelsEnum", + "EventChannelConfigInputEventTypeEnum", + "EventChannelConfigInputChannelsEnum", "ExcludeMetadataListItemInputTypeEnum", "ExportAnswerReportRequestFileFormatEnum", "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", @@ -733,7 +859,6 @@ let enumsMap: Set = new Set([ "ImportUserAccountTypeEnum", "ImportUserAccountStatusEnum", "ImportUserVisibilityEnum", - "InputVariableValuePrincipalTypeEnum", "JWTMetadataObjectTypeEnum", "MetadataInputTypeEnum", "MetadataListItemInputTypeEnum", @@ -743,6 +868,9 @@ let enumsMap: Set = new Set([ "MetadataSearchResponseMetadataTypeEnum", "MetadataSearchSortOptionsFieldNameEnum", "MetadataSearchSortOptionsOrderEnum", + "OrgChannelConfigInputOperationEnum", + "OrgChannelConfigInputResetEventsEnum", + "OrgPreferenceSearchCriteriaInputEventTypesEnum", "OrgResponseStatusEnum", "OrgResponseVisibilityEnum", "ParameterizeMetadataRequestMetadataTypeEnum", @@ -768,6 +896,7 @@ let enumsMap: Set = new Set([ "SearchCalendarsRequestSortOptionsFieldNameEnum", "SearchCalendarsRequestSortOptionsOrderEnum", "SearchCommitsRequestMetadataTypeEnum", + "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", "SearchConnectionRequestDataWarehouseTypesEnum", "SearchConnectionRequestDataWarehouseObjectTypeEnum", "SearchConnectionRequestAuthenticationTypeEnum", @@ -798,6 +927,9 @@ let enumsMap: Set = new Set([ "SearchUsersRequestSortOptionsFieldNameEnum", "SearchUsersRequestSortOptionsOrderEnum", "SearchVariablesRequestOutputFormatEnum", + "SearchWebhookConfigurationsRequestEventTypeEnum", + "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", "ShareMetadataRequestMetadataTypeEnum", "ShareMetadataTypeInputTypeEnum", "SharePermissionsInputShareModeEnum", @@ -837,8 +969,7 @@ let enumsMap: Set = new Set([ "UpdateUserRequestAccountTypeEnum", "UpdateUserRequestOperationEnum", "UpdateUserRequestPreferredLocaleEnum", - "UpdateVariableRequestOperationEnum", - "UpdateVariableValuesRequestOperationEnum", + "UpdateWebhookConfigurationRequestEventsEnum", "UserVisibilityEnum", "UserAccountTypeEnum", "UserAccountStatusEnum", @@ -847,12 +978,23 @@ let enumsMap: Set = new Set([ "UserGroupResponseTypeEnum", "UserGroupResponseVisibilityEnum", "UserObjectTypeEnum", + "ValueScopeInputPrincipalTypeEnum", "VariableVariableTypeEnum", "VariableDetailInputTypeEnum", + "VariableUpdateAssignmentInputOperationEnum", + "VariableUpdateScopeInputPrincipalTypeEnum", "VariableValuePrincipalTypeEnum", + "WebhookResponseEventsEnum", + "WebhookSignatureVerificationTypeEnum", + "WebhookSignatureVerificationAlgorithmEnum", + "WebhookSignatureVerificationInputTypeEnum", + "WebhookSignatureVerificationInputAlgorithmEnum", + "WebhookSortOptionsInputFieldNameEnum", + "WebhookSortOptionsInputOrderEnum", ]); let typeMap: {[index: string]: any} = { + "AIContext": AIContext, "APIKey": APIKey, "APIKeyInput": APIKeyInput, "AccessToken": AccessToken, @@ -863,7 +1005,9 @@ let typeMap: {[index: string]: any} = { "ActionDetailsInput": ActionDetailsInput, "ActionDetailsInputCreate": ActionDetailsInputCreate, "ActivateUserRequest": ActivateUserRequest, + "AgentConversation": AgentConversation, "AnswerContent": AnswerContent, + "AnswerContextInput": AnswerContextInput, "AnswerDataResponse": AnswerDataResponse, "AssignChangeAuthorRequest": AssignChangeAuthorRequest, "AssignTagRequest": AssignTagRequest, @@ -895,12 +1039,19 @@ let typeMap: {[index: string]: any} = { "CommitHistoryResponse": CommitHistoryResponse, "CommitResponse": CommitResponse, "CommiterType": CommiterType, + "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, "ConnectionConfigurationResponse": ConnectionConfigurationResponse, "ConnectionConfigurationSearchRequest": ConnectionConfigurationSearchRequest, "ConnectionInput": ConnectionInput, + "ContextPayloadV2Input": ContextPayloadV2Input, "Conversation": Conversation, + "ConversationSettingsInput": ConversationSettingsInput, "ConvertWorksheetToModelRequest": ConvertWorksheetToModelRequest, "CopyObjectRequest": CopyObjectRequest, + "CreateAgentConversationRequest": CreateAgentConversationRequest, + "CreateAgentConversationRequestConversationSettings": CreateAgentConversationRequestConversationSettings, + "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, "CreateCalendarRequest": CreateCalendarRequest, "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, "CreateConfigRequest": CreateConfigRequest, @@ -925,9 +1076,14 @@ let typeMap: {[index: string]: any} = { "CreateUserGroupRequest": CreateUserGroupRequest, "CreateUserRequest": CreateUserRequest, "CreateVariableRequest": CreateVariableRequest, + "CreateWebhookConfigurationRequest": CreateWebhookConfigurationRequest, + "CreateWebhookConfigurationRequestAuthentication": CreateWebhookConfigurationRequestAuthentication, + "CreateWebhookConfigurationRequestSignatureVerification": CreateWebhookConfigurationRequestSignatureVerification, "CronExpression": CronExpression, "CronExpressionInput": CronExpressionInput, "CustomActionMetadataTypeInput": CustomActionMetadataTypeInput, + "DataSource": DataSource, + "DataSourceContextInput": DataSourceContextInput, "DataWarehouseObjectInput": DataWarehouseObjectInput, "DataWarehouseObjects": DataWarehouseObjects, "Database": Database, @@ -943,12 +1099,19 @@ let typeMap: {[index: string]: any} = { "DeleteMetadataRequest": DeleteMetadataRequest, "DeleteMetadataTypeInput": DeleteMetadataTypeInput, "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, "DeployCommitRequest": DeployCommitRequest, "DeployResponse": DeployResponse, + "EntityHeader": EntityHeader, "ErrorResponse": ErrorResponse, + "EurekaDataSourceSuggestionResponse": EurekaDataSourceSuggestionResponse, "EurekaDecomposeQueryResponse": EurekaDecomposeQueryResponse, + "EurekaGetRelevantQuestionsResponse": EurekaGetRelevantQuestionsResponse, "EurekaLLMDecomposeQueryResponse": EurekaLLMDecomposeQueryResponse, "EurekaLLMSuggestedQuery": EurekaLLMSuggestedQuery, + "EurekaRelevantQuestion": EurekaRelevantQuestion, + "EventChannelConfig": EventChannelConfig, + "EventChannelConfigInput": EventChannelConfigInput, "ExcludeMetadataListItemInput": ExcludeMetadataListItemInput, "ExportAnswerReportRequest": ExportAnswerReportRequest, "ExportAnswerReportRequestRegionalSettings": ExportAnswerReportRequestRegionalSettings, @@ -982,9 +1145,13 @@ let typeMap: {[index: string]: any} = { "GenericInfo": GenericInfo, "GetAsyncImportStatusResponse": GetAsyncImportStatusResponse, "GetCustomAccessTokenRequest": GetCustomAccessTokenRequest, + "GetDataSourceSuggestionsRequest": GetDataSourceSuggestionsRequest, "GetFullAccessTokenRequest": GetFullAccessTokenRequest, "GetFullAccessTokenRequestUserParameters": GetFullAccessTokenRequestUserParameters, "GetObjectAccessTokenRequest": GetObjectAccessTokenRequest, + "GetRelevantQuestionsRequest": GetRelevantQuestionsRequest, + "GetRelevantQuestionsRequestAiContext": GetRelevantQuestionsRequestAiContext, + "GetRelevantQuestionsRequestMetadataContext": GetRelevantQuestionsRequestMetadataContext, "GetTokenResponse": GetTokenResponse, "GroupObject": GroupObject, "GroupsImportListInput": GroupsImportListInput, @@ -1000,11 +1167,11 @@ let typeMap: {[index: string]: any} = { "ImportUsersRequest": ImportUsersRequest, "ImportUsersResponse": ImportUsersResponse, "InputEurekaNLSRequest": InputEurekaNLSRequest, - "InputVariableValue": InputVariableValue, "JWTMetadataObject": JWTMetadataObject, "JWTParameter": JWTParameter, "JWTUserOptions": JWTUserOptions, "JWTUserOptionsFull": JWTUserOptionsFull, + "LBContextInput": LBContextInput, "LiveboardContent": LiveboardContent, "LiveboardDataResponse": LiveboardDataResponse, "LiveboardOptions": LiveboardOptions, @@ -1012,6 +1179,7 @@ let typeMap: {[index: string]: any} = { "LogResponse": LogResponse, "LoginRequest": LoginRequest, "MetadataAssociationItem": MetadataAssociationItem, + "MetadataContext": MetadataContext, "MetadataInput": MetadataInput, "MetadataListItemInput": MetadataListItemInput, "MetadataObject": MetadataObject, @@ -1021,7 +1189,11 @@ let typeMap: {[index: string]: any} = { "ModelTableList": ModelTableList, "ObjectIDAndName": ObjectIDAndName, "Org": Org, + "OrgChannelConfigInput": OrgChannelConfigInput, + "OrgChannelConfigResponse": OrgChannelConfigResponse, + "OrgDetails": OrgDetails, "OrgInfo": OrgInfo, + "OrgPreferenceSearchCriteriaInput": OrgPreferenceSearchCriteriaInput, "OrgResponse": OrgResponse, "OrgType": OrgType, "ParameterValues": ParameterValues, @@ -1083,6 +1255,7 @@ let typeMap: {[index: string]: any} = { "SearchCalendarsRequest": SearchCalendarsRequest, "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, "SearchCommitsRequest": SearchCommitsRequest, + "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, "SearchConfigRequest": SearchConfigRequest, "SearchConnectionRequest": SearchConnectionRequest, "SearchConnectionRequestSortOptions": SearchConnectionRequestSortOptions, @@ -1107,6 +1280,11 @@ let typeMap: {[index: string]: any} = { "SearchUsersRequest": SearchUsersRequest, "SearchUsersRequestSortOptions": SearchUsersRequestSortOptions, "SearchVariablesRequest": SearchVariablesRequest, + "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, + "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, + "SendAgentMessageRequest": SendAgentMessageRequest, + "SendAgentMessageResponse": SendAgentMessageResponse, + "SendAgentMessageStreamingRequest": SendAgentMessageStreamingRequest, "SendMessageRequest": SendMessageRequest, "ShareMetadataRequest": ShareMetadataRequest, "ShareMetadataTypeInput": ShareMetadataTypeInput, @@ -1160,6 +1338,7 @@ let typeMap: {[index: string]: any} = { "UpdateUserRequest": UpdateUserRequest, "UpdateVariableRequest": UpdateVariableRequest, "UpdateVariableValuesRequest": UpdateVariableValuesRequest, + "UpdateWebhookConfigurationRequest": UpdateWebhookConfigurationRequest, "User": User, "UserGroup": UserGroup, "UserGroupResponse": UserGroupResponse, @@ -1169,10 +1348,30 @@ let typeMap: {[index: string]: any} = { "UserPrincipal": UserPrincipal, "ValidateMergeRequest": ValidateMergeRequest, "ValidateTokenRequest": ValidateTokenRequest, + "ValueScopeInput": ValueScopeInput, "Variable": Variable, "VariableDetailInput": VariableDetailInput, + "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, + "VariableUpdateScopeInput": VariableUpdateScopeInput, "VariableValue": VariableValue, - "VariableValueInput": VariableValueInput, + "WebhookAuthApiKey": WebhookAuthApiKey, + "WebhookAuthApiKeyInput": WebhookAuthApiKeyInput, + "WebhookAuthBasicAuth": WebhookAuthBasicAuth, + "WebhookAuthBasicAuthInput": WebhookAuthBasicAuthInput, + "WebhookAuthOAuth2": WebhookAuthOAuth2, + "WebhookAuthOAuth2Input": WebhookAuthOAuth2Input, + "WebhookAuthentication": WebhookAuthentication, + "WebhookAuthenticationInput": WebhookAuthenticationInput, + "WebhookDeleteFailure": WebhookDeleteFailure, + "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookOrg": WebhookOrg, + "WebhookPagination": WebhookPagination, + "WebhookResponse": WebhookResponse, + "WebhookSearchResponse": WebhookSearchResponse, + "WebhookSignatureVerification": WebhookSignatureVerification, + "WebhookSignatureVerificationInput": WebhookSignatureVerificationInput, + "WebhookSortOptionsInput": WebhookSortOptionsInput, + "WebhookUser": WebhookUser, } export class ObjectSerializer { diff --git a/sdks/typescript/models/OrgChannelConfigInput.ts b/sdks/typescript/models/OrgChannelConfigInput.ts new file mode 100644 index 000000000..85fe76d15 --- /dev/null +++ b/sdks/typescript/models/OrgChannelConfigInput.ts @@ -0,0 +1,73 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { HttpFile } from '../http/http'; + +export class OrgChannelConfigInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. + */ + 'operation'?: OrgChannelConfigInputOperationEnum | null; + /** + * Event-specific configurations. Required for REPLACE operation. + */ + 'preferences'?: Array | null; + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. + */ + 'reset_events'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "OrgChannelConfigInputOperationEnum", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + }, + { + "name": "reset_events", + "baseName": "reset_events", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgChannelConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type OrgChannelConfigInputOperationEnum = "REPLACE" | "RESET" ; +export type OrgChannelConfigInputResetEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/OrgChannelConfigResponse.ts b/sdks/typescript/models/OrgChannelConfigResponse.ts new file mode 100644 index 000000000..6519119ce --- /dev/null +++ b/sdks/typescript/models/OrgChannelConfigResponse.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { OrgDetails } from '../models/OrgDetails'; +import { HttpFile } from '../http/http'; + +export class OrgChannelConfigResponse { + 'org': OrgDetails; + /** + * Event-specific communication channel configurations for this org + */ + 'preferences': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org", + "baseName": "org", + "type": "OrgDetails", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgChannelConfigResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgDetails.ts b/sdks/typescript/models/OrgDetails.ts new file mode 100644 index 000000000..56afe019a --- /dev/null +++ b/sdks/typescript/models/OrgDetails.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgDetails { + /** + * Unique id of the org + */ + 'id': string; + /** + * Name of the org + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgPreferenceSearchCriteriaInput.ts b/sdks/typescript/models/OrgPreferenceSearchCriteriaInput.ts new file mode 100644 index 000000000..33927a3a0 --- /dev/null +++ b/sdks/typescript/models/OrgPreferenceSearchCriteriaInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgPreferenceSearchCriteriaInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Event types to search for. If not provided, all event types for this org are returned. + */ + 'event_types'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_types", + "baseName": "event_types", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgPreferenceSearchCriteriaInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type OrgPreferenceSearchCriteriaInputEventTypesEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/RoleResponse.ts b/sdks/typescript/models/RoleResponse.ts index bb10aeac0..4a9c25c74 100644 --- a/sdks/typescript/models/RoleResponse.ts +++ b/sdks/typescript/models/RoleResponse.ts @@ -198,6 +198,6 @@ export class RoleResponse { } -export type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" ; +export type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; export type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; diff --git a/sdks/typescript/models/SearchCommunicationChannelPreferencesRequest.ts b/sdks/typescript/models/SearchCommunicationChannelPreferencesRequest.ts new file mode 100644 index 000000000..a8d8ce715 --- /dev/null +++ b/sdks/typescript/models/SearchCommunicationChannelPreferencesRequest.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; +import { HttpFile } from '../http/http'; + +export class SearchCommunicationChannelPreferencesRequest { + /** + * Event types to search for in cluster-level preferences. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific search criteria. + */ + 'org_preferences'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCommunicationChannelPreferencesRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/SearchConnectionRequest.ts b/sdks/typescript/models/SearchConnectionRequest.ts index d1054e844..95e99166b 100644 --- a/sdks/typescript/models/SearchConnectionRequest.ts +++ b/sdks/typescript/models/SearchConnectionRequest.ts @@ -138,5 +138,5 @@ export class SearchConnectionRequest { export type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" ; export type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN" ; -export type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" ; +export type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" | "OAUTH_CLIENT_CREDENTIALS" ; diff --git a/sdks/typescript/models/SearchRoleResponse.ts b/sdks/typescript/models/SearchRoleResponse.ts index ce09b27e6..033b09253 100644 --- a/sdks/typescript/models/SearchRoleResponse.ts +++ b/sdks/typescript/models/SearchRoleResponse.ts @@ -201,6 +201,6 @@ export class SearchRoleResponse { } -export type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; +export type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; export type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; diff --git a/sdks/typescript/models/SearchRolesRequest.ts b/sdks/typescript/models/SearchRolesRequest.ts index ffa938641..6f7524c43 100644 --- a/sdks/typescript/models/SearchRolesRequest.ts +++ b/sdks/typescript/models/SearchRolesRequest.ts @@ -107,6 +107,6 @@ export class SearchRolesRequest { } -export type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; +export type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; export type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; diff --git a/sdks/typescript/models/SearchUserGroupsRequest.ts b/sdks/typescript/models/SearchUserGroupsRequest.ts index 36c5f63fa..35c054683 100644 --- a/sdks/typescript/models/SearchUserGroupsRequest.ts +++ b/sdks/typescript/models/SearchUserGroupsRequest.ts @@ -195,7 +195,7 @@ export class SearchUserGroupsRequest { } -export type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; -export type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" ; +export type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; +export type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; export type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; diff --git a/sdks/typescript/models/SearchUsersRequest.ts b/sdks/typescript/models/SearchUsersRequest.ts index f15a4d8b5..e8bceddfd 100644 --- a/sdks/typescript/models/SearchUsersRequest.ts +++ b/sdks/typescript/models/SearchUsersRequest.ts @@ -227,7 +227,7 @@ export class SearchUsersRequest { export type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; -export type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; +export type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; export type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER" ; export type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED" ; diff --git a/sdks/typescript/models/SearchVariablesRequest.ts b/sdks/typescript/models/SearchVariablesRequest.ts index fadb98cfc..134465fa6 100644 --- a/sdks/typescript/models/SearchVariablesRequest.ts +++ b/sdks/typescript/models/SearchVariablesRequest.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { ValueScopeInput } from '../models/ValueScopeInput'; import { VariableDetailInput } from '../models/VariableDetailInput'; import { HttpFile } from '../http/http'; @@ -19,6 +20,10 @@ export class SearchVariablesRequest { */ 'variable_details'?: Array; /** + * Array of scope filters + */ + 'value_scope'?: Array; + /** * The starting record number from where the records should be included */ 'record_offset'?: number; @@ -40,6 +45,12 @@ export class SearchVariablesRequest { "type": "Array", "format": "" }, + { + "name": "value_scope", + "baseName": "value_scope", + "type": "Array", + "format": "" + }, { "name": "record_offset", "baseName": "record_offset", @@ -68,5 +79,5 @@ export class SearchVariablesRequest { } -export type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VALUES" | "EDITABLE_METADATA_AND_VALUES" ; +export type SearchVariablesRequestOutputFormatEnum = "METADATA_ONLY" | "METADATA_AND_VALUES" ; diff --git a/sdks/typescript/models/SearchWebhookConfigurationsRequest.ts b/sdks/typescript/models/SearchWebhookConfigurationsRequest.ts new file mode 100644 index 000000000..9ca2aa84e --- /dev/null +++ b/sdks/typescript/models/SearchWebhookConfigurationsRequest.ts @@ -0,0 +1,89 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchWebhookConfigurationsRequest { + /** + * Unique ID or name of the org. + */ + 'org_identifier'?: string; + /** + * Unique ID or name of the webhook. + */ + 'webhook_identifier'?: string; + /** + * Type of webhook event to filter by. + */ + 'event_type'?: SearchWebhookConfigurationsRequestEventTypeEnum; + /** + * The offset point, starting from where the webhooks should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of webhooks that should be included in the response starting from offset position. + */ + 'record_size'?: number; + 'sort_options'?: SearchWebhookConfigurationsRequestSortOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "webhook_identifier", + "baseName": "webhook_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "SearchWebhookConfigurationsRequestEventTypeEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchWebhookConfigurationsRequestSortOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchWebhookConfigurationsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchWebhookConfigurationsRequestEventTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/SearchWebhookConfigurationsRequestSortOptions.ts b/sdks/typescript/models/SearchWebhookConfigurationsRequestSortOptions.ts new file mode 100644 index 000000000..b63e1e451 --- /dev/null +++ b/sdks/typescript/models/SearchWebhookConfigurationsRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort option includes sort field and sort order. +*/ +export class SearchWebhookConfigurationsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: SearchWebhookConfigurationsRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum = "CREATED" | "MODIFIED" | "NAME" ; +export type SearchWebhookConfigurationsRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SendAgentMessageRequest.ts b/sdks/typescript/models/SendAgentMessageRequest.ts new file mode 100644 index 000000000..42eadd42b --- /dev/null +++ b/sdks/typescript/models/SendAgentMessageRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentMessageRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentMessageResponse.ts b/sdks/typescript/models/SendAgentMessageResponse.ts new file mode 100644 index 000000000..d57e859ef --- /dev/null +++ b/sdks/typescript/models/SendAgentMessageResponse.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentMessageResponse { + 'success': boolean; + 'message'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentMessageResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentMessageStreamingRequest.ts b/sdks/typescript/models/SendAgentMessageStreamingRequest.ts new file mode 100644 index 000000000..eae6f0582 --- /dev/null +++ b/sdks/typescript/models/SendAgentMessageStreamingRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentMessageStreamingRequest { + /** + * Unique identifier for the conversation (used to track context) + */ + 'conversation_identifier': string; + /** + * messages to be sent to the agent + */ + 'messages': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentMessageStreamingRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/TemplatePropertiesInputCreate.ts b/sdks/typescript/models/TemplatePropertiesInputCreate.ts index ee7c4b862..3094e1e70 100644 --- a/sdks/typescript/models/TemplatePropertiesInputCreate.ts +++ b/sdks/typescript/models/TemplatePropertiesInputCreate.ts @@ -108,6 +108,14 @@ export class TemplatePropertiesInputCreate { * Whether to hide modify alert */ 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; static readonly discriminator: string | undefined = undefined; @@ -249,6 +257,18 @@ export class TemplatePropertiesInputCreate { "baseName": "hide_modify_alert", "type": "boolean", "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/TokenAccessScopeObject.ts b/sdks/typescript/models/TokenAccessScopeObject.ts index c6a5437e8..fee4693fa 100644 --- a/sdks/typescript/models/TokenAccessScopeObject.ts +++ b/sdks/typescript/models/TokenAccessScopeObject.ts @@ -17,7 +17,7 @@ import { HttpFile } from '../http/http'; */ export class TokenAccessScopeObject { /** - * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. */ 'type'?: TokenAccessScopeObjectTypeEnum | null; /** diff --git a/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts b/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts index 479531650..b566824ce 100644 --- a/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts +++ b/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts @@ -117,7 +117,7 @@ export class UpdateConnectionConfigurationRequest { } -export type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" ; +export type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_CLIENT_CREDENTIALS" ; export type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES" ; export type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS" ; diff --git a/sdks/typescript/models/UpdateDbtConnectionRequest.ts b/sdks/typescript/models/UpdateDbtConnectionRequest.ts deleted file mode 100644 index 4b947c177..000000000 --- a/sdks/typescript/models/UpdateDbtConnectionRequest.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { HttpFile } from '../http/http'; - -export class UpdateDbtConnectionRequest { - /** - * Unique ID of the DBT Connection. - */ - 'dbt_connection_identifier': string; - /** - * Name of the connection. - */ - 'connection_name'?: string; - /** - * Name of the Database. - */ - 'database_name'?: string; - /** - * Mention type of Import - */ - 'import_type'?: UpdateDbtConnectionRequestImportTypeEnum; - /** - * Access token is mandatory when Import_Type is DBT_CLOUD. - */ - 'access_token'?: string; - /** - * DBT URL is mandatory when Import_Type is DBT_CLOUD. - */ - 'dbt_url'?: string; - /** - * Account ID is mandatory when Import_Type is DBT_CLOUD - */ - 'account_id'?: string; - /** - * Project ID is mandatory when Import_Type is DBT_CLOUD - */ - 'project_id'?: string; - /** - * DBT Environment ID\" - */ - 'dbt_env_id'?: string; - /** - * Name of the project - */ - 'project_name'?: string; - /** - * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \'ZIP_FILE\' - */ - 'file_content'?: HttpFile; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "dbt_connection_identifier", - "baseName": "dbt_connection_identifier", - "type": "string", - "format": "" - }, - { - "name": "connection_name", - "baseName": "connection_name", - "type": "string", - "format": "" - }, - { - "name": "database_name", - "baseName": "database_name", - "type": "string", - "format": "" - }, - { - "name": "import_type", - "baseName": "import_type", - "type": "UpdateDbtConnectionRequestImportTypeEnum", - "format": "" - }, - { - "name": "access_token", - "baseName": "access_token", - "type": "string", - "format": "" - }, - { - "name": "dbt_url", - "baseName": "dbt_url", - "type": "string", - "format": "" - }, - { - "name": "account_id", - "baseName": "account_id", - "type": "string", - "format": "" - }, - { - "name": "project_id", - "baseName": "project_id", - "type": "string", - "format": "" - }, - { - "name": "dbt_env_id", - "baseName": "dbt_env_id", - "type": "string", - "format": "" - }, - { - "name": "project_name", - "baseName": "project_name", - "type": "string", - "format": "" - }, - { - "name": "file_content", - "baseName": "file_content", - "type": "HttpFile", - "format": "binary" - } ]; - - static getAttributeTypeMap() { - return UpdateDbtConnectionRequest.attributeTypeMap; - } - - public constructor() { - } -} - - -export type UpdateDbtConnectionRequestImportTypeEnum = "DBT_CLOUD" | "ZIP_FILE" ; - diff --git a/sdks/typescript/models/UpdateRoleRequest.ts b/sdks/typescript/models/UpdateRoleRequest.ts index 1e2fd1929..0be1a87a5 100644 --- a/sdks/typescript/models/UpdateRoleRequest.ts +++ b/sdks/typescript/models/UpdateRoleRequest.ts @@ -57,5 +57,5 @@ export class UpdateRoleRequest { } -export type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" ; +export type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; diff --git a/sdks/typescript/models/UpdateUserGroupRequest.ts b/sdks/typescript/models/UpdateUserGroupRequest.ts index e3ad15f9c..f8e99936d 100644 --- a/sdks/typescript/models/UpdateUserGroupRequest.ts +++ b/sdks/typescript/models/UpdateUserGroupRequest.ts @@ -137,8 +137,8 @@ export class UpdateUserGroupRequest { } -export type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" ; -export type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" ; +export type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" ; +export type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; export type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; export type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; diff --git a/sdks/typescript/models/UpdateVariableRequest.ts b/sdks/typescript/models/UpdateVariableRequest.ts index 500538134..b8f4287f7 100644 --- a/sdks/typescript/models/UpdateVariableRequest.ts +++ b/sdks/typescript/models/UpdateVariableRequest.ts @@ -10,22 +10,13 @@ * Do not edit the class manually. */ -import { InputVariableValue } from '../models/InputVariableValue'; import { HttpFile } from '../http/http'; export class UpdateVariableRequest { /** - * New name of the variable if we want to rename. + * New name of the variable. */ - 'name'?: string; - /** - * Operation to perform on the values. - */ - 'operation'?: UpdateVariableRequestOperationEnum; - /** - * Values of variable to be updated. - */ - 'values'?: Array; + 'name': string; static readonly discriminator: string | undefined = undefined; @@ -35,18 +26,6 @@ export class UpdateVariableRequest { "baseName": "name", "type": "string", "format": "" - }, - { - "name": "operation", - "baseName": "operation", - "type": "UpdateVariableRequestOperationEnum", - "format": "" - }, - { - "name": "values", - "baseName": "values", - "type": "Array", - "format": "" } ]; static getAttributeTypeMap() { @@ -57,6 +36,3 @@ export class UpdateVariableRequest { } } - -export type UpdateVariableRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; - diff --git a/sdks/typescript/models/UpdateVariableValuesRequest.ts b/sdks/typescript/models/UpdateVariableValuesRequest.ts index a24ede17a..c636775ea 100644 --- a/sdks/typescript/models/UpdateVariableValuesRequest.ts +++ b/sdks/typescript/models/UpdateVariableValuesRequest.ts @@ -10,32 +10,33 @@ * Do not edit the class manually. */ -import { VariableValueInput } from '../models/VariableValueInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { HttpFile } from '../http/http'; export class UpdateVariableValuesRequest { /** - * Variables and values + * Variables and values to update */ - 'variable_updates': Array; + 'variable_assignment': Array; /** - * Type of update operation + * Variables and values to update */ - 'operation': UpdateVariableValuesRequestOperationEnum; + 'variable_value_scope': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "variable_updates", - "baseName": "variable_updates", - "type": "Array", + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", "format": "" }, { - "name": "operation", - "baseName": "operation", - "type": "UpdateVariableValuesRequestOperationEnum", + "name": "variable_value_scope", + "baseName": "variable_value_scope", + "type": "Array", "format": "" } ]; @@ -47,6 +48,3 @@ export class UpdateVariableValuesRequest { } } - -export type UpdateVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; - diff --git a/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts b/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts new file mode 100644 index 000000000..17e1cf952 --- /dev/null +++ b/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts @@ -0,0 +1,97 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { HttpFile } from '../http/http'; + +export class UpdateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name'?: string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url'?: string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events'?: Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateWebhookConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/User.ts b/sdks/typescript/models/User.ts index 2c26ed8f9..8bf2d0e47 100644 --- a/sdks/typescript/models/User.ts +++ b/sdks/typescript/models/User.ts @@ -190,6 +190,10 @@ export class User { * Access Control Properties which are specified for the user via JWToken */ 'access_control_properties'?: any | null; + /** + * Formula Variables which are specified for the user via JWToken + */ + 'variable_values'?: any | null; static readonly discriminator: string | undefined = undefined; @@ -463,6 +467,12 @@ export class User { "baseName": "access_control_properties", "type": "any", "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "any", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/UserGroupResponse.ts b/sdks/typescript/models/UserGroupResponse.ts index 54dbc61d6..623d5f06c 100644 --- a/sdks/typescript/models/UserGroupResponse.ts +++ b/sdks/typescript/models/UserGroupResponse.ts @@ -330,6 +330,6 @@ export class UserGroupResponse { export type UserGroupResponseParentTypeEnum = "USER" | "GROUP" ; -export type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" ; +export type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; export type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; diff --git a/sdks/typescript/models/UserObject.ts b/sdks/typescript/models/UserObject.ts index ee2b43ffa..e059a0b83 100644 --- a/sdks/typescript/models/UserObject.ts +++ b/sdks/typescript/models/UserObject.ts @@ -17,7 +17,7 @@ import { HttpFile } from '../http/http'; */ export class UserObject { /** - * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. */ 'type'?: UserObjectTypeEnum | null; /** diff --git a/sdks/typescript/models/ValueScopeInput.ts b/sdks/typescript/models/ValueScopeInput.ts new file mode 100644 index 000000000..ec2f14c9a --- /dev/null +++ b/sdks/typescript/models/ValueScopeInput.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for variable scope in search +*/ +export class ValueScopeInput { + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Model Identifier + */ + 'model_identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "ValueScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ValueScopeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ValueScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/VariableValueInput.ts b/sdks/typescript/models/VariableUpdateAssignmentInput.ts similarity index 63% rename from sdks/typescript/models/VariableValueInput.ts rename to sdks/typescript/models/VariableUpdateAssignmentInput.ts index 5b569b8f8..6a7a2d768 100644 --- a/sdks/typescript/models/VariableValueInput.ts +++ b/sdks/typescript/models/VariableUpdateAssignmentInput.ts @@ -10,13 +10,12 @@ * Do not edit the class manually. */ -import { InputVariableValue } from '../models/InputVariableValue'; import { HttpFile } from '../http/http'; /** -* Input for variable value update +* Input for variable value update in batch operations */ -export class VariableValueInput { +export class VariableUpdateAssignmentInput { /** * ID or Name of the variable */ @@ -24,7 +23,11 @@ export class VariableValueInput { /** * Values of the variable */ - 'variable_values': Array; + 'variable_values': Array; + /** + * Operation to perform + */ + 'operation': VariableUpdateAssignmentInputOperationEnum; static readonly discriminator: string | undefined = undefined; @@ -38,15 +41,24 @@ export class VariableValueInput { { "name": "variable_values", "baseName": "variable_values", - "type": "Array", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "VariableUpdateAssignmentInputOperationEnum", "format": "" } ]; static getAttributeTypeMap() { - return VariableValueInput.attributeTypeMap; + return VariableUpdateAssignmentInput.attributeTypeMap; } public constructor() { } } + +export type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "CLEAR" ; + diff --git a/sdks/typescript/models/InputVariableValue.ts b/sdks/typescript/models/VariableUpdateScopeInput.ts similarity index 74% rename from sdks/typescript/models/InputVariableValue.ts rename to sdks/typescript/models/VariableUpdateScopeInput.ts index 1d596fbb0..4edaf1331 100644 --- a/sdks/typescript/models/InputVariableValue.ts +++ b/sdks/typescript/models/VariableUpdateScopeInput.ts @@ -12,11 +12,10 @@ import { HttpFile } from '../http/http'; -export class InputVariableValue { - /** - * The connection property value - */ - 'value': string; +/** +* Input for variable value update in batch operations +*/ +export class VariableUpdateScopeInput { /** * The unique name of the org */ @@ -24,25 +23,23 @@ export class InputVariableValue { /** * Principal type */ - 'principal_type'?: InputVariableValuePrincipalTypeEnum | null; + 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; /** * Unique ID or name of the principal */ 'principal_identifier'?: string | null; /** - * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level */ 'priority'?: number | null; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "value", - "baseName": "value", - "type": "string", - "format": "" - }, { "name": "org_identifier", "baseName": "org_identifier", @@ -52,7 +49,7 @@ export class InputVariableValue { { "name": "principal_type", "baseName": "principal_type", - "type": "InputVariableValuePrincipalTypeEnum", + "type": "VariableUpdateScopeInputPrincipalTypeEnum", "format": "" }, { @@ -61,6 +58,12 @@ export class InputVariableValue { "type": "string", "format": "" }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, { "name": "priority", "baseName": "priority", @@ -69,7 +72,7 @@ export class InputVariableValue { } ]; static getAttributeTypeMap() { - return InputVariableValue.attributeTypeMap; + return VariableUpdateScopeInput.attributeTypeMap; } public constructor() { @@ -77,5 +80,5 @@ export class InputVariableValue { } -export type InputVariableValuePrincipalTypeEnum = "USER" | "USER_GROUP" ; +export type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP" ; diff --git a/sdks/typescript/models/VariableValue.ts b/sdks/typescript/models/VariableValue.ts index 0d14b2f3f..ce77389fa 100644 --- a/sdks/typescript/models/VariableValue.ts +++ b/sdks/typescript/models/VariableValue.ts @@ -18,6 +18,10 @@ export class VariableValue { */ 'value'?: string | null; /** + * The value of the variable if it is a list type + */ + 'value_list'?: Array | null; + /** * The unique name of the org */ 'org_identifier': string; @@ -43,6 +47,12 @@ export class VariableValue { "type": "string", "format": "" }, + { + "name": "value_list", + "baseName": "value_list", + "type": "Array", + "format": "" + }, { "name": "org_identifier", "baseName": "org_identifier", diff --git a/sdks/typescript/models/WebhookAuthApiKey.ts b/sdks/typescript/models/WebhookAuthApiKey.ts new file mode 100644 index 000000000..64f8ce193 --- /dev/null +++ b/sdks/typescript/models/WebhookAuthApiKey.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthApiKey { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthApiKey.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthApiKeyInput.ts b/sdks/typescript/models/WebhookAuthApiKeyInput.ts new file mode 100644 index 000000000..8b5ff6836 --- /dev/null +++ b/sdks/typescript/models/WebhookAuthApiKeyInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthApiKeyInput { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthApiKeyInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthBasicAuth.ts b/sdks/typescript/models/WebhookAuthBasicAuth.ts new file mode 100644 index 000000000..f14a5d47a --- /dev/null +++ b/sdks/typescript/models/WebhookAuthBasicAuth.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthBasicAuth { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthBasicAuth.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthBasicAuthInput.ts b/sdks/typescript/models/WebhookAuthBasicAuthInput.ts new file mode 100644 index 000000000..99e8bbebd --- /dev/null +++ b/sdks/typescript/models/WebhookAuthBasicAuthInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthBasicAuthInput { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthBasicAuthInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthOAuth2.ts b/sdks/typescript/models/WebhookAuthOAuth2.ts new file mode 100644 index 000000000..926b8b06c --- /dev/null +++ b/sdks/typescript/models/WebhookAuthOAuth2.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthOAuth2 { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthOAuth2.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthOAuth2Input.ts b/sdks/typescript/models/WebhookAuthOAuth2Input.ts new file mode 100644 index 000000000..9f5da720c --- /dev/null +++ b/sdks/typescript/models/WebhookAuthOAuth2Input.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthOAuth2Input { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthOAuth2Input.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthentication.ts b/sdks/typescript/models/WebhookAuthentication.ts new file mode 100644 index 000000000..20a7e388a --- /dev/null +++ b/sdks/typescript/models/WebhookAuthentication.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { HttpFile } from '../http/http'; + +export class WebhookAuthentication { + 'API_KEY'?: WebhookAuthApiKey; + 'BASIC_AUTH'?: WebhookAuthBasicAuth; + /** + * Redacted Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKey", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuth", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthentication.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthenticationInput.ts b/sdks/typescript/models/WebhookAuthenticationInput.ts new file mode 100644 index 000000000..1c646daba --- /dev/null +++ b/sdks/typescript/models/WebhookAuthenticationInput.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { HttpFile } from '../http/http'; + +export class WebhookAuthenticationInput { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthenticationInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateEmailCustomisationResponse.ts b/sdks/typescript/models/WebhookDeleteFailure.ts similarity index 60% rename from sdks/typescript/models/CreateEmailCustomisationResponse.ts rename to sdks/typescript/models/WebhookDeleteFailure.ts index d9a82c31e..caa196a0d 100644 --- a/sdks/typescript/models/CreateEmailCustomisationResponse.ts +++ b/sdks/typescript/models/WebhookDeleteFailure.ts @@ -10,39 +10,31 @@ * Do not edit the class manually. */ -import { OrgType } from '../models/OrgType'; import { HttpFile } from '../http/http'; -export class CreateEmailCustomisationResponse { +export class WebhookDeleteFailure { /** - * Tenant ID + * Unique identifier of the webhook that failed to delete. */ - 'tenant_id': string; - 'org': OrgType; + 'id': string; /** - * Email customization name. + * Name of the webhook that failed to delete. */ 'name': string; /** - * Customization configuration for the email + * Error message describing why the deletion failed. */ - 'template_properties': any; + 'error': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "tenant_id", - "baseName": "tenant_id", + "name": "id", + "baseName": "id", "type": "string", "format": "" }, - { - "name": "org", - "baseName": "org", - "type": "OrgType", - "format": "" - }, { "name": "name", "baseName": "name", @@ -50,14 +42,14 @@ export class CreateEmailCustomisationResponse { "format": "" }, { - "name": "template_properties", - "baseName": "template_properties", - "type": "any", + "name": "error", + "baseName": "error", + "type": "string", "format": "" } ]; static getAttributeTypeMap() { - return CreateEmailCustomisationResponse.attributeTypeMap; + return WebhookDeleteFailure.attributeTypeMap; } public constructor() { diff --git a/sdks/typescript/models/WebhookDeleteResponse.ts b/sdks/typescript/models/WebhookDeleteResponse.ts new file mode 100644 index 000000000..83a30729f --- /dev/null +++ b/sdks/typescript/models/WebhookDeleteResponse.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { HttpFile } from '../http/http'; + +export class WebhookDeleteResponse { + /** + * Number of webhooks successfully deleted. + */ + 'deleted_count': number; + /** + * Number of webhooks that failed to delete. + */ + 'failed_count': number; + /** + * List of successfully deleted webhooks. + */ + 'deleted_webhooks': Array; + /** + * List of webhooks that failed to delete with error details. + */ + 'failed_webhooks': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "deleted_count", + "baseName": "deleted_count", + "type": "number", + "format": "int32" + }, + { + "name": "failed_count", + "baseName": "failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "deleted_webhooks", + "baseName": "deleted_webhooks", + "type": "Array", + "format": "" + }, + { + "name": "failed_webhooks", + "baseName": "failed_webhooks", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookDeleteResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookOrg.ts b/sdks/typescript/models/WebhookOrg.ts new file mode 100644 index 000000000..0a7058164 --- /dev/null +++ b/sdks/typescript/models/WebhookOrg.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookOrg { + /** + * Unique identifier of the org. + */ + 'id': string; + /** + * Name of the org. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookOrg.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookPagination.ts b/sdks/typescript/models/WebhookPagination.ts new file mode 100644 index 000000000..d126caf20 --- /dev/null +++ b/sdks/typescript/models/WebhookPagination.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookPagination { + /** + * The starting record number from where the records are included. + */ + 'record_offset': number; + /** + * The number of records included in the response. + */ + 'record_size': number; + /** + * Total number of webhook configurations available. + */ + 'total_count': number; + /** + * Indicates whether more records are available beyond the current response. + */ + 'has_more': boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "total_count", + "baseName": "total_count", + "type": "number", + "format": "int32" + }, + { + "name": "has_more", + "baseName": "has_more", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookPagination.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookResponse.ts b/sdks/typescript/models/WebhookResponse.ts new file mode 100644 index 000000000..d5d68ddfa --- /dev/null +++ b/sdks/typescript/models/WebhookResponse.ts @@ -0,0 +1,150 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookUser } from '../models/WebhookUser'; +import { HttpFile } from '../http/http'; + +export class WebhookResponse { + /** + * Unique identifier of the webhook configuration. + */ + 'id': string; + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string | null; + 'org'?: WebhookOrg; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any | null; + /** + * List of events this webhook subscribes to. + */ + 'events': Array; + 'authentication'?: WebhookAuthentication; + 'signature_verification'?: WebhookSignatureVerification; + /** + * Creation time of the webhook configuration in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Last modified time of the webhook configuration in milliseconds. + */ + 'modification_time_in_millis': number; + 'created_by'?: WebhookUser; + 'last_modified_by'?: WebhookUser; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "WebhookOrg", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "WebhookAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "WebhookSignatureVerification", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "created_by", + "baseName": "created_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "last_modified_by", + "baseName": "last_modified_by", + "type": "WebhookUser", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookResponseEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/WebhookSearchResponse.ts b/sdks/typescript/models/WebhookSearchResponse.ts new file mode 100644 index 000000000..0611aaf60 --- /dev/null +++ b/sdks/typescript/models/WebhookSearchResponse.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { HttpFile } from '../http/http'; + +export class WebhookSearchResponse { + /** + * List of webhook configurations matching the search criteria. + */ + 'webhooks': Array; + 'pagination': WebhookPagination; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array", + "format": "" + }, + { + "name": "pagination", + "baseName": "pagination", + "type": "WebhookPagination", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSearchResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookSignatureVerification.ts b/sdks/typescript/models/WebhookSignatureVerification.ts new file mode 100644 index 000000000..fbbee7812 --- /dev/null +++ b/sdks/typescript/models/WebhookSignatureVerification.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookSignatureVerification { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSignatureVerification.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookSignatureVerificationTypeEnum = "HMAC_SHA256" ; +export type WebhookSignatureVerificationAlgorithmEnum = "SHA256" ; + diff --git a/sdks/typescript/models/WebhookSignatureVerificationInput.ts b/sdks/typescript/models/WebhookSignatureVerificationInput.ts new file mode 100644 index 000000000..b48449e29 --- /dev/null +++ b/sdks/typescript/models/WebhookSignatureVerificationInput.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookSignatureVerificationInput { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationInputTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationInputAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationInputTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationInputAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSignatureVerificationInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookSignatureVerificationInputTypeEnum = "HMAC_SHA256" ; +export type WebhookSignatureVerificationInputAlgorithmEnum = "SHA256" ; + diff --git a/sdks/typescript/models/WebhookSortOptionsInput.ts b/sdks/typescript/models/WebhookSortOptionsInput.ts new file mode 100644 index 000000000..c84a08019 --- /dev/null +++ b/sdks/typescript/models/WebhookSortOptionsInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookSortOptionsInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: WebhookSortOptionsInputFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: WebhookSortOptionsInputOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "WebhookSortOptionsInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "WebhookSortOptionsInputOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSortOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookSortOptionsInputFieldNameEnum = "CREATED" | "MODIFIED" | "NAME" ; +export type WebhookSortOptionsInputOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/WebhookUser.ts b/sdks/typescript/models/WebhookUser.ts new file mode 100644 index 000000000..fbadaf88b --- /dev/null +++ b/sdks/typescript/models/WebhookUser.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookUser { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookUser.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/all.ts b/sdks/typescript/models/all.ts index a2304b0b2..3b2d8bff3 100644 --- a/sdks/typescript/models/all.ts +++ b/sdks/typescript/models/all.ts @@ -1,3 +1,4 @@ +export * from '../models/AIContext' export * from '../models/APIKey' export * from '../models/APIKeyInput' export * from '../models/AccessToken' @@ -8,7 +9,9 @@ export * from '../models/ActionDetails' export * from '../models/ActionDetailsInput' export * from '../models/ActionDetailsInputCreate' export * from '../models/ActivateUserRequest' +export * from '../models/AgentConversation' export * from '../models/AnswerContent' +export * from '../models/AnswerContextInput' export * from '../models/AnswerDataResponse' export * from '../models/AssignChangeAuthorRequest' export * from '../models/AssignTagRequest' @@ -40,12 +43,19 @@ export * from '../models/CommitFileType' export * from '../models/CommitHistoryResponse' export * from '../models/CommitResponse' export * from '../models/CommiterType' +export * from '../models/CommunicationChannelPreferencesResponse' +export * from '../models/ConfigureCommunicationChannelPreferencesRequest' export * from '../models/ConnectionConfigurationResponse' export * from '../models/ConnectionConfigurationSearchRequest' export * from '../models/ConnectionInput' +export * from '../models/ContextPayloadV2Input' export * from '../models/Conversation' +export * from '../models/ConversationSettingsInput' export * from '../models/ConvertWorksheetToModelRequest' export * from '../models/CopyObjectRequest' +export * from '../models/CreateAgentConversationRequest' +export * from '../models/CreateAgentConversationRequestConversationSettings' +export * from '../models/CreateAgentConversationRequestMetadataContext' export * from '../models/CreateCalendarRequest' export * from '../models/CreateCalendarRequestTableReference' export * from '../models/CreateConfigRequest' @@ -70,9 +80,14 @@ export * from '../models/CreateTagRequest' export * from '../models/CreateUserGroupRequest' export * from '../models/CreateUserRequest' export * from '../models/CreateVariableRequest' +export * from '../models/CreateWebhookConfigurationRequest' +export * from '../models/CreateWebhookConfigurationRequestAuthentication' +export * from '../models/CreateWebhookConfigurationRequestSignatureVerification' export * from '../models/CronExpression' export * from '../models/CronExpressionInput' export * from '../models/CustomActionMetadataTypeInput' +export * from '../models/DataSource' +export * from '../models/DataSourceContextInput' export * from '../models/DataWarehouseObjectInput' export * from '../models/DataWarehouseObjects' export * from '../models/Database' @@ -88,12 +103,19 @@ export * from '../models/DeleteConnectionRequest' export * from '../models/DeleteMetadataRequest' export * from '../models/DeleteMetadataTypeInput' export * from '../models/DeleteOrgEmailCustomizationRequest' +export * from '../models/DeleteWebhookConfigurationsRequest' export * from '../models/DeployCommitRequest' export * from '../models/DeployResponse' +export * from '../models/EntityHeader' export * from '../models/ErrorResponse' +export * from '../models/EurekaDataSourceSuggestionResponse' export * from '../models/EurekaDecomposeQueryResponse' +export * from '../models/EurekaGetRelevantQuestionsResponse' export * from '../models/EurekaLLMDecomposeQueryResponse' export * from '../models/EurekaLLMSuggestedQuery' +export * from '../models/EurekaRelevantQuestion' +export * from '../models/EventChannelConfig' +export * from '../models/EventChannelConfigInput' export * from '../models/ExcludeMetadataListItemInput' export * from '../models/ExportAnswerReportRequest' export * from '../models/ExportAnswerReportRequestRegionalSettings' @@ -127,9 +149,13 @@ export * from '../models/GenerateCSVRequest' export * from '../models/GenericInfo' export * from '../models/GetAsyncImportStatusResponse' export * from '../models/GetCustomAccessTokenRequest' +export * from '../models/GetDataSourceSuggestionsRequest' export * from '../models/GetFullAccessTokenRequest' export * from '../models/GetFullAccessTokenRequestUserParameters' export * from '../models/GetObjectAccessTokenRequest' +export * from '../models/GetRelevantQuestionsRequest' +export * from '../models/GetRelevantQuestionsRequestAiContext' +export * from '../models/GetRelevantQuestionsRequestMetadataContext' export * from '../models/GetTokenResponse' export * from '../models/GroupObject' export * from '../models/GroupsImportListInput' @@ -145,11 +171,11 @@ export * from '../models/ImportUserType' export * from '../models/ImportUsersRequest' export * from '../models/ImportUsersResponse' export * from '../models/InputEurekaNLSRequest' -export * from '../models/InputVariableValue' export * from '../models/JWTMetadataObject' export * from '../models/JWTParameter' export * from '../models/JWTUserOptions' export * from '../models/JWTUserOptionsFull' +export * from '../models/LBContextInput' export * from '../models/LiveboardContent' export * from '../models/LiveboardDataResponse' export * from '../models/LiveboardOptions' @@ -157,6 +183,7 @@ export * from '../models/LiveboardOptionsInput' export * from '../models/LogResponse' export * from '../models/LoginRequest' export * from '../models/MetadataAssociationItem' +export * from '../models/MetadataContext' export * from '../models/MetadataInput' export * from '../models/MetadataListItemInput' export * from '../models/MetadataObject' @@ -166,7 +193,11 @@ export * from '../models/MetadataSearchSortOptions' export * from '../models/ModelTableList' export * from '../models/ObjectIDAndName' export * from '../models/Org' +export * from '../models/OrgChannelConfigInput' +export * from '../models/OrgChannelConfigResponse' +export * from '../models/OrgDetails' export * from '../models/OrgInfo' +export * from '../models/OrgPreferenceSearchCriteriaInput' export * from '../models/OrgResponse' export * from '../models/OrgType' export * from '../models/ParameterValues' @@ -228,6 +259,7 @@ export * from '../models/Scope' export * from '../models/SearchCalendarsRequest' export * from '../models/SearchCalendarsRequestSortOptions' export * from '../models/SearchCommitsRequest' +export * from '../models/SearchCommunicationChannelPreferencesRequest' export * from '../models/SearchConfigRequest' export * from '../models/SearchConnectionRequest' export * from '../models/SearchConnectionRequestSortOptions' @@ -252,6 +284,11 @@ export * from '../models/SearchUserGroupsRequestSortOptions' export * from '../models/SearchUsersRequest' export * from '../models/SearchUsersRequestSortOptions' export * from '../models/SearchVariablesRequest' +export * from '../models/SearchWebhookConfigurationsRequest' +export * from '../models/SearchWebhookConfigurationsRequestSortOptions' +export * from '../models/SendAgentMessageRequest' +export * from '../models/SendAgentMessageResponse' +export * from '../models/SendAgentMessageStreamingRequest' export * from '../models/SendMessageRequest' export * from '../models/ShareMetadataRequest' export * from '../models/ShareMetadataTypeInput' @@ -305,6 +342,7 @@ export * from '../models/UpdateUserGroupRequest' export * from '../models/UpdateUserRequest' export * from '../models/UpdateVariableRequest' export * from '../models/UpdateVariableValuesRequest' +export * from '../models/UpdateWebhookConfigurationRequest' export * from '../models/User' export * from '../models/UserGroup' export * from '../models/UserGroupResponse' @@ -314,7 +352,27 @@ export * from '../models/UserParameterOptions' export * from '../models/UserPrincipal' export * from '../models/ValidateMergeRequest' export * from '../models/ValidateTokenRequest' +export * from '../models/ValueScopeInput' export * from '../models/Variable' export * from '../models/VariableDetailInput' +export * from '../models/VariableUpdateAssignmentInput' +export * from '../models/VariableUpdateScopeInput' export * from '../models/VariableValue' -export * from '../models/VariableValueInput' +export * from '../models/WebhookAuthApiKey' +export * from '../models/WebhookAuthApiKeyInput' +export * from '../models/WebhookAuthBasicAuth' +export * from '../models/WebhookAuthBasicAuthInput' +export * from '../models/WebhookAuthOAuth2' +export * from '../models/WebhookAuthOAuth2Input' +export * from '../models/WebhookAuthentication' +export * from '../models/WebhookAuthenticationInput' +export * from '../models/WebhookDeleteFailure' +export * from '../models/WebhookDeleteResponse' +export * from '../models/WebhookOrg' +export * from '../models/WebhookPagination' +export * from '../models/WebhookResponse' +export * from '../models/WebhookSearchResponse' +export * from '../models/WebhookSignatureVerification' +export * from '../models/WebhookSignatureVerificationInput' +export * from '../models/WebhookSortOptionsInput' +export * from '../models/WebhookUser' diff --git a/sdks/typescript/package-lock.json b/sdks/typescript/package-lock.json index bcb6483c4..ad5ff1e46 100644 --- a/sdks/typescript/package-lock.json +++ b/sdks/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@thoughtspot/rest-api-sdk", - "version": "2.17.1", + "version": "2.19.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@thoughtspot/rest-api-sdk", - "version": "2.17.1", + "version": "2.19.0", "license": "ThoughtSpot Development Tools End User License Agreement", "dependencies": { "es6-promise": "^4.2.4", @@ -30,7 +30,7 @@ }, "node_modules/@babel/code-frame": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", @@ -44,9 +44,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -55,7 +55,7 @@ }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "license": "MIT", @@ -70,7 +70,7 @@ }, "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "license": "MIT", @@ -83,7 +83,7 @@ }, "node_modules/@esbuild/android-arm": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/android-arm/-/android-arm-0.18.20.tgz", "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "cpu": [ "arm" @@ -100,7 +100,7 @@ }, "node_modules/@esbuild/android-arm64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "cpu": [ "arm64" @@ -117,7 +117,7 @@ }, "node_modules/@esbuild/android-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/android-x64/-/android-x64-0.18.20.tgz", "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", "cpu": [ "x64" @@ -134,7 +134,7 @@ }, "node_modules/@esbuild/darwin-arm64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", "cpu": [ "arm64" @@ -151,7 +151,7 @@ }, "node_modules/@esbuild/darwin-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", "cpu": [ "x64" @@ -168,7 +168,7 @@ }, "node_modules/@esbuild/freebsd-arm64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "cpu": [ "arm64" @@ -185,7 +185,7 @@ }, "node_modules/@esbuild/freebsd-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", "cpu": [ "x64" @@ -202,7 +202,7 @@ }, "node_modules/@esbuild/linux-arm": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", "cpu": [ "arm" @@ -219,7 +219,7 @@ }, "node_modules/@esbuild/linux-arm64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "cpu": [ "arm64" @@ -236,7 +236,7 @@ }, "node_modules/@esbuild/linux-ia32": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", "cpu": [ "ia32" @@ -253,7 +253,7 @@ }, "node_modules/@esbuild/linux-loong64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "cpu": [ "loong64" @@ -270,7 +270,7 @@ }, "node_modules/@esbuild/linux-mips64el": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "cpu": [ "mips64el" @@ -287,7 +287,7 @@ }, "node_modules/@esbuild/linux-ppc64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", "cpu": [ "ppc64" @@ -304,7 +304,7 @@ }, "node_modules/@esbuild/linux-riscv64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "cpu": [ "riscv64" @@ -321,7 +321,7 @@ }, "node_modules/@esbuild/linux-s390x": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", "cpu": [ "s390x" @@ -338,7 +338,7 @@ }, "node_modules/@esbuild/linux-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "cpu": [ "x64" @@ -355,7 +355,7 @@ }, "node_modules/@esbuild/netbsd-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "cpu": [ "x64" @@ -372,7 +372,7 @@ }, "node_modules/@esbuild/openbsd-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", "cpu": [ "x64" @@ -389,7 +389,7 @@ }, "node_modules/@esbuild/sunos-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", "cpu": [ "x64" @@ -406,7 +406,7 @@ }, "node_modules/@esbuild/win32-arm64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", "cpu": [ "arm64" @@ -423,7 +423,7 @@ }, "node_modules/@esbuild/win32-ia32": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", "cpu": [ "ia32" @@ -440,7 +440,7 @@ }, "node_modules/@esbuild/win32-x64": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", "cpu": [ "x64" @@ -457,7 +457,7 @@ }, "node_modules/@isaacs/cliui": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "license": "ISC", @@ -475,7 +475,7 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ansi-regex/-/ansi-regex-6.2.2.tgz", "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", @@ -488,7 +488,7 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ansi-styles/-/ansi-styles-6.2.3.tgz", "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", @@ -501,14 +501,14 @@ }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", @@ -526,7 +526,7 @@ }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/strip-ansi/-/strip-ansi-7.1.2.tgz", "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", @@ -542,7 +542,7 @@ }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "license": "MIT", @@ -560,7 +560,7 @@ }, "node_modules/@jest/diff-sequences": { "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", "dev": true, "license": "MIT", @@ -569,9 +569,9 @@ } }, "node_modules/@jest/expect-utils": { - "version": "30.1.2", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.1.2.tgz", - "integrity": "sha512-HXy1qT/bfdjCv7iC336ExbqqYtZvljrV8odNdso7dWK9bSeHtLlvwWWC3YSybSPL03Gg5rug6WLCZAZFH72m0A==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jest/expect-utils/-/expect-utils-30.2.0.tgz", + "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", "dev": true, "license": "MIT", "dependencies": { @@ -583,7 +583,7 @@ }, "node_modules/@jest/get-type": { "version": "30.1.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jest/get-type/-/get-type-30.1.0.tgz", "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", "dev": true, "license": "MIT", @@ -593,7 +593,7 @@ }, "node_modules/@jest/pattern": { "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jest/pattern/-/pattern-30.0.1.tgz", "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", "dev": true, "license": "MIT", @@ -607,7 +607,7 @@ }, "node_modules/@jest/schemas": { "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jest/schemas/-/schemas-30.0.5.tgz", "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", "dev": true, "license": "MIT", @@ -619,9 +619,9 @@ } }, "node_modules/@jest/types": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.0.5.tgz", - "integrity": "sha512-aREYa3aku9SSnea4aX6bhKn4bgv3AXkgijoQgbYV3yvbiGt6z+MQ85+6mIhx9DsKW2BuB/cLR/A+tcMThx+KLQ==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", "dev": true, "license": "MIT", "dependencies": { @@ -639,7 +639,7 @@ }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", @@ -650,7 +650,7 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", @@ -660,14 +660,14 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", @@ -678,7 +678,7 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", @@ -692,7 +692,7 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", @@ -702,7 +702,7 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", @@ -716,7 +716,7 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", @@ -727,21 +727,21 @@ }, "node_modules/@sinclair/typebox": { "version": "0.34.41", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@sinclair/typebox/-/typebox-0.34.41.tgz", "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", "dev": true, "license": "MIT" }, "node_modules/@swc/core": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.13.5.tgz", - "integrity": "sha512-WezcBo8a0Dg2rnR82zhwoR6aRNxeTGfK5QCD6TQ+kg3xx/zNT02s/0o+81h/3zhvFSB24NtqEr8FTw88O5W/JQ==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core/-/core-1.15.0.tgz", + "integrity": "sha512-8SnJV+JV0rYbfSiEiUvYOmf62E7QwsEG+aZueqSlKoxFt0pw333+bgZSQXGUV6etXU88nxur0afVMaINujBMSw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.24" + "@swc/types": "^0.1.25" }, "engines": { "node": ">=10" @@ -751,16 +751,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.13.5", - "@swc/core-darwin-x64": "1.13.5", - "@swc/core-linux-arm-gnueabihf": "1.13.5", - "@swc/core-linux-arm64-gnu": "1.13.5", - "@swc/core-linux-arm64-musl": "1.13.5", - "@swc/core-linux-x64-gnu": "1.13.5", - "@swc/core-linux-x64-musl": "1.13.5", - "@swc/core-win32-arm64-msvc": "1.13.5", - "@swc/core-win32-ia32-msvc": "1.13.5", - "@swc/core-win32-x64-msvc": "1.13.5" + "@swc/core-darwin-arm64": "1.15.0", + "@swc/core-darwin-x64": "1.15.0", + "@swc/core-linux-arm-gnueabihf": "1.15.0", + "@swc/core-linux-arm64-gnu": "1.15.0", + "@swc/core-linux-arm64-musl": "1.15.0", + "@swc/core-linux-x64-gnu": "1.15.0", + "@swc/core-linux-x64-musl": "1.15.0", + "@swc/core-win32-arm64-msvc": "1.15.0", + "@swc/core-win32-ia32-msvc": "1.15.0", + "@swc/core-win32-x64-msvc": "1.15.0" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" @@ -772,9 +772,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.13.5.tgz", - "integrity": "sha512-lKNv7SujeXvKn16gvQqUQI5DdyY8v7xcoO3k06/FJbHJS90zEwZdQiMNRiqpYw/orU543tPaWgz7cIYWhbopiQ==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.0.tgz", + "integrity": "sha512-TBKWkbnShnEjlIbO4/gfsrIgAqHBVqgPWLbWmPdZ80bF393yJcLgkrb7bZEnJs6FCbSSuGwZv2rx1jDR2zo6YA==", "cpu": [ "arm64" ], @@ -789,9 +789,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.13.5.tgz", - "integrity": "sha512-ILd38Fg/w23vHb0yVjlWvQBoE37ZJTdlLHa8LRCFDdX4WKfnVBiblsCU9ar4QTMNdeTBEX9iUF4IrbNWhaF1Ng==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-darwin-x64/-/core-darwin-x64-1.15.0.tgz", + "integrity": "sha512-f5JKL1v1H56CIZc1pVn4RGPOfnWqPwmuHdpf4wesvXunF1Bx85YgcspW5YxwqG5J9g3nPU610UFuExJXVUzOiQ==", "cpu": [ "x64" ], @@ -806,9 +806,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.13.5.tgz", - "integrity": "sha512-Q6eS3Pt8GLkXxqz9TAw+AUk9HpVJt8Uzm54MvPsqp2yuGmY0/sNaPPNVqctCX9fu/Nu8eaWUen0si6iEiCsazQ==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.0.tgz", + "integrity": "sha512-duK6nG+WyuunnfsfiTUQdzC9Fk8cyDLqT9zyXvY2i2YgDu5+BH5W6wM5O4mDNCU5MocyB/SuF5YDF7XySnowiQ==", "cpu": [ "arm" ], @@ -823,9 +823,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.13.5.tgz", - "integrity": "sha512-aNDfeN+9af+y+M2MYfxCzCy/VDq7Z5YIbMqRI739o8Ganz6ST+27kjQFd8Y/57JN/hcnUEa9xqdS3XY7WaVtSw==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.0.tgz", + "integrity": "sha512-ITe9iDtTRXM98B91rvyPP6qDVbhUBnmA/j4UxrHlMQ0RlwpqTjfZYZkD0uclOxSZ6qIrOj/X5CaoJlDUuQ0+Cw==", "cpu": [ "arm64" ], @@ -840,9 +840,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.13.5.tgz", - "integrity": "sha512-9+ZxFN5GJag4CnYnq6apKTnnezpfJhCumyz0504/JbHLo+Ue+ZtJnf3RhyA9W9TINtLE0bC4hKpWi8ZKoETyOQ==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.0.tgz", + "integrity": "sha512-Q5ldc2bzriuzYEoAuqJ9Vr3FyZhakk5hiwDbniZ8tlEXpbjBhbOleGf9/gkhLaouDnkNUEazFW9mtqwUTRdh7Q==", "cpu": [ "arm64" ], @@ -857,9 +857,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.13.5.tgz", - "integrity": "sha512-WD530qvHrki8Ywt/PloKUjaRKgstQqNGvmZl54g06kA+hqtSE2FTG9gngXr3UJxYu/cNAjJYiBifm7+w4nbHbA==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.0.tgz", + "integrity": "sha512-pY4is+jEpOxlYCSnI+7N8Oxbap9TmTz5YT84tUvRTlOlTBwFAUlWFCX0FRwWJlsfP0TxbqhIe8dNNzlsEmJbXQ==", "cpu": [ "x64" ], @@ -874,9 +874,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.13.5.tgz", - "integrity": "sha512-Luj8y4OFYx4DHNQTWjdIuKTq2f5k6uSXICqx+FSabnXptaOBAbJHNbHT/06JZh6NRUouaf0mYXN0mcsqvkhd7Q==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.0.tgz", + "integrity": "sha512-zYEt5eT8y8RUpoe7t5pjpoOdGu+/gSTExj8PV86efhj6ugB3bPlj3Y85ogdW3WMVXr4NvwqvzdaYGCZfXzSyVg==", "cpu": [ "x64" ], @@ -891,9 +891,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.13.5.tgz", - "integrity": "sha512-cZ6UpumhF9SDJvv4DA2fo9WIzlNFuKSkZpZmPG1c+4PFSEMy5DFOjBSllCvnqihCabzXzpn6ykCwBmHpy31vQw==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.0.tgz", + "integrity": "sha512-zC1rmOgFH5v2BCbByOazEqs0aRNpTdLRchDExfcCfgKgeaD+IdpUOqp7i3VG1YzkcnbuZjMlXfM0ugpt+CddoA==", "cpu": [ "arm64" ], @@ -908,9 +908,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.13.5.tgz", - "integrity": "sha512-C5Yi/xIikrFUzZcyGj9L3RpKljFvKiDMtyDzPKzlsDrKIw2EYY+bF88gB6oGY5RGmv4DAX8dbnpRAqgFD0FMEw==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.0.tgz", + "integrity": "sha512-7t9U9KwMwQblkdJIH+zX1V4q1o3o41i0HNO+VlnAHT5o+5qHJ963PHKJ/pX3P2UlZnBCY465orJuflAN4rAP9A==", "cpu": [ "ia32" ], @@ -925,9 +925,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.13.5.tgz", - "integrity": "sha512-YrKdMVxbYmlfybCSbRtrilc6UA8GF5aPmGKBdPvjrarvsmf4i7ZHGCEnLtfOMd3Lwbs2WUZq3WdMbozYeLU93Q==", + "version": "1.15.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.0.tgz", + "integrity": "sha512-VE0Zod5vcs8iMLT64m5QS1DlTMXJFI/qSgtMDRx8rtZrnjt6/9NW8XUaiPJuRu8GluEO1hmHoyf1qlbY19gGSQ==", "cpu": [ "x64" ], @@ -943,14 +943,14 @@ }, "node_modules/@swc/counter": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/counter/-/counter-0.1.3.tgz", "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", "dev": true, "license": "Apache-2.0" }, "node_modules/@swc/types": { "version": "0.1.25", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@swc/types/-/types-0.1.25.tgz", "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==", "dev": true, "license": "Apache-2.0", @@ -960,7 +960,7 @@ }, "node_modules/@tsconfig/node10": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", "dev": true, "license": "MIT", @@ -969,7 +969,7 @@ }, "node_modules/@tsconfig/node12": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true, "license": "MIT", @@ -978,7 +978,7 @@ }, "node_modules/@tsconfig/node14": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true, "license": "MIT", @@ -987,7 +987,7 @@ }, "node_modules/@tsconfig/node16": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true, "license": "MIT", @@ -996,14 +996,14 @@ }, "node_modules/@types/chai": { "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/chai/-/chai-4.3.20.tgz", "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", "dev": true, "license": "MIT" }, "node_modules/@types/chai-as-promised": { "version": "7.1.8", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", "dev": true, "license": "MIT", @@ -1013,7 +1013,7 @@ }, "node_modules/@types/expect": { "version": "24.3.2", - "resolved": "https://registry.npmjs.org/@types/expect/-/expect-24.3.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/expect/-/expect-24.3.2.tgz", "integrity": "sha512-5ev4tL5eBuX9wyC/SFHku1Sizyerg457LiwMgde3sq61TMHbnKjikzwsBLxLpFMflvKuWXfWVW0w3hZg4qml9w==", "deprecated": "This is a stub types definition. expect provides its own type definitions, so you do not need this installed.", "dev": true, @@ -1024,14 +1024,14 @@ }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true, "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "license": "MIT", @@ -1041,7 +1041,7 @@ }, "node_modules/@types/istanbul-reports": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "license": "MIT", @@ -1051,7 +1051,7 @@ }, "node_modules/@types/json5": { "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, "license": "MIT", @@ -1059,39 +1059,39 @@ }, "node_modules/@types/mocha": { "version": "10.0.10", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/mocha/-/mocha-10.0.10.tgz", "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.0.tgz", - "integrity": "sha512-y1dMvuvJspJiPSDZUQ+WMBvF7dpnEqN4x9DDC9ie5Fs/HUZJA3wFp7EhHoVaKX/iI0cRoECV8X2jL8zi0xrHCg==", + "version": "24.10.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.12.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/stack-utils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/stack-utils/-/stack-utils-2.0.3.tgz", "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true, "license": "MIT" }, "node_modules/@types/url-parse": { "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/url-parse/-/url-parse-1.4.4.tgz", "integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==", "dev": true, "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.34", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/yargs/-/yargs-17.0.34.tgz", + "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", "dev": true, "license": "MIT", "dependencies": { @@ -1100,14 +1100,14 @@ }, "node_modules/@types/yargs-parser": { "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true, "license": "MIT" }, "node_modules/acorn": { "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", @@ -1122,7 +1122,7 @@ }, "node_modules/acorn-walk": { "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/acorn-walk/-/acorn-walk-8.3.4.tgz", "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, "license": "MIT", @@ -1137,7 +1137,7 @@ }, "node_modules/ansi-colors": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "license": "MIT", @@ -1147,7 +1147,7 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", @@ -1157,7 +1157,7 @@ }, "node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", @@ -1173,14 +1173,14 @@ }, "node_modules/any-promise": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", "dev": true, "license": "MIT" }, "node_modules/anymatch": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "license": "ISC", @@ -1194,7 +1194,7 @@ }, "node_modules/anymatch/node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", @@ -1207,7 +1207,7 @@ }, "node_modules/arg": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true, "license": "MIT", @@ -1216,14 +1216,14 @@ }, "node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, "license": "Python-2.0" }, "node_modules/array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, "license": "MIT", @@ -1233,7 +1233,7 @@ }, "node_modules/arrify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/arrify/-/arrify-1.0.1.tgz", "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, "license": "MIT", @@ -1243,7 +1243,7 @@ }, "node_modules/assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, "license": "MIT", @@ -1253,14 +1253,14 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", @@ -1273,7 +1273,7 @@ }, "node_modules/brace-expansion": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/brace-expansion/-/brace-expansion-2.0.2.tgz", "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", @@ -1283,7 +1283,7 @@ }, "node_modules/braces": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", @@ -1296,21 +1296,21 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true, "license": "ISC" }, "node_modules/buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true, "license": "MIT" }, "node_modules/bundle-require": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.2.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/bundle-require/-/bundle-require-4.2.1.tgz", "integrity": "sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==", "dev": true, "license": "MIT", @@ -1326,7 +1326,7 @@ }, "node_modules/cac": { "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, "license": "MIT", @@ -1336,7 +1336,7 @@ }, "node_modules/camelcase": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "license": "MIT", @@ -1349,7 +1349,7 @@ }, "node_modules/chai": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/chai/-/chai-4.5.0.tgz", "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "license": "MIT", @@ -1368,7 +1368,7 @@ }, "node_modules/chai-as-promised": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/chai-as-promised/-/chai-as-promised-7.1.2.tgz", "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", "dev": true, "license": "WTFPL", @@ -1381,7 +1381,7 @@ }, "node_modules/chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", @@ -1398,7 +1398,7 @@ }, "node_modules/check-error": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, "license": "MIT", @@ -1411,7 +1411,7 @@ }, "node_modules/chokidar": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "license": "MIT", @@ -1435,9 +1435,9 @@ } }, "node_modules/ci-info": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.0.tgz", - "integrity": "sha512-l+2bNRMiQgcfILUi33labAZYIWlH1kWDp+ecNo5iisRKrbm0xcRyCww71/YU0Fkw0mAFpz9bJayXPjey6vkmaQ==", + "version": "4.3.1", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", "dev": true, "funding": [ { @@ -1452,7 +1452,7 @@ }, "node_modules/cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "license": "ISC", @@ -1464,7 +1464,7 @@ }, "node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", @@ -1477,14 +1477,14 @@ }, "node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, "node_modules/commander": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/commander/-/commander-4.1.1.tgz", "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, "license": "MIT", @@ -1494,7 +1494,7 @@ }, "node_modules/create-require": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true, "license": "MIT", @@ -1503,7 +1503,7 @@ }, "node_modules/cross-spawn": { "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", @@ -1518,7 +1518,7 @@ }, "node_modules/debug": { "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", @@ -1536,7 +1536,7 @@ }, "node_modules/decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, "license": "MIT", @@ -1549,7 +1549,7 @@ }, "node_modules/deep-eql": { "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/deep-eql/-/deep-eql-4.1.4.tgz", "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "license": "MIT", @@ -1562,7 +1562,7 @@ }, "node_modules/diff": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/diff/-/diff-5.2.0.tgz", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "license": "BSD-3-Clause", @@ -1572,7 +1572,7 @@ }, "node_modules/dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "license": "MIT", @@ -1585,27 +1585,27 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, "license": "MIT" }, "node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/es6-promise": { "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/es6-promise/-/es6-promise-4.2.8.tgz", "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "license": "MIT" }, "node_modules/esbuild": { "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/esbuild/-/esbuild-0.18.20.tgz", "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, @@ -1643,7 +1643,7 @@ }, "node_modules/escalade": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", @@ -1653,7 +1653,7 @@ }, "node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", @@ -1666,7 +1666,7 @@ }, "node_modules/execa": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "license": "MIT", @@ -1689,18 +1689,18 @@ } }, "node_modules/expect": { - "version": "30.1.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.1.2.tgz", - "integrity": "sha512-xvHszRavo28ejws8FpemjhwswGj4w/BetHIL8cU49u4sGyXDw2+p3YbeDbj6xzlxi6kWTjIRSTJ+9sNXPnF0Zg==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/expect/-/expect-30.2.0.tgz", + "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "30.1.2", + "@jest/expect-utils": "30.2.0", "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.1.2", - "jest-message-util": "30.1.0", - "jest-mock": "30.0.5", - "jest-util": "30.0.5" + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -1708,7 +1708,7 @@ }, "node_modules/fast-glob": { "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", @@ -1725,7 +1725,7 @@ }, "node_modules/fastq": { "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/fastq/-/fastq-1.19.1.tgz", "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", @@ -1735,7 +1735,7 @@ }, "node_modules/fill-range": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", @@ -1748,7 +1748,7 @@ }, "node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", @@ -1765,7 +1765,7 @@ }, "node_modules/flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, "license": "BSD-3-Clause", @@ -1775,7 +1775,7 @@ }, "node_modules/foreground-child": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/foreground-child/-/foreground-child-3.3.1.tgz", "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", @@ -1792,7 +1792,7 @@ }, "node_modules/foreground-child/node_modules/signal-exit": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", @@ -1805,14 +1805,14 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, @@ -1827,7 +1827,7 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "license": "ISC", @@ -1837,7 +1837,7 @@ }, "node_modules/get-func-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "license": "MIT", @@ -1847,7 +1847,7 @@ }, "node_modules/get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "license": "MIT", @@ -1860,7 +1860,7 @@ }, "node_modules/glob": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, @@ -1881,7 +1881,7 @@ }, "node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "license": "ISC", @@ -1894,7 +1894,7 @@ }, "node_modules/globby": { "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "license": "MIT", @@ -1915,14 +1915,14 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "license": "ISC" }, "node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", @@ -1932,7 +1932,7 @@ }, "node_modules/he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, "license": "MIT", @@ -1942,7 +1942,7 @@ }, "node_modules/human-signals": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "license": "Apache-2.0", @@ -1952,7 +1952,7 @@ }, "node_modules/ignore": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", @@ -1962,7 +1962,7 @@ }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, @@ -1974,14 +1974,14 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "license": "ISC" }, "node_modules/is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", @@ -1994,7 +1994,7 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", @@ -2004,7 +2004,7 @@ }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", @@ -2014,7 +2014,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", @@ -2027,7 +2027,7 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", @@ -2037,7 +2037,7 @@ }, "node_modules/is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, "license": "MIT", @@ -2047,7 +2047,7 @@ }, "node_modules/is-stream": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "license": "MIT", @@ -2060,7 +2060,7 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "license": "MIT", @@ -2073,14 +2073,14 @@ }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "license": "ISC" }, "node_modules/jackspeak": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jackspeak/-/jackspeak-3.4.3.tgz", "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", @@ -2095,51 +2095,51 @@ } }, "node_modules/jest-diff": { - "version": "30.1.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.1.2.tgz", - "integrity": "sha512-4+prq+9J61mOVXCa4Qp8ZjavdxzrWQXrI80GNxP8f4tkI2syPuPrJgdRPZRrfUTRvIoUwcmNLbqEJy9W800+NQ==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jest-diff/-/jest-diff-30.2.0.tgz", + "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", "dev": true, "license": "MIT", "dependencies": { "@jest/diff-sequences": "30.0.1", "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "pretty-format": "30.0.5" + "pretty-format": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "30.1.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.1.2.tgz", - "integrity": "sha512-7ai16hy4rSbDjvPTuUhuV8nyPBd6EX34HkBsBcBX2lENCuAQ0qKCPb/+lt8OSWUa9WWmGYLy41PrEzkwRwoGZQ==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", + "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", "dev": true, "license": "MIT", "dependencies": { "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "jest-diff": "30.1.2", - "pretty-format": "30.0.5" + "jest-diff": "30.2.0", + "pretty-format": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "30.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.1.0.tgz", - "integrity": "sha512-HizKDGG98cYkWmaLUHChq4iN+oCENohQLb7Z5guBPumYs+/etonmNFlg1Ps6yN9LTPyZn+M+b/9BbnHx3WTMDg==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.5", + "@jest/types": "30.2.0", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "micromatch": "^4.0.8", - "pretty-format": "30.0.5", + "pretty-format": "30.2.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" }, @@ -2148,15 +2148,15 @@ } }, "node_modules/jest-mock": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.5.tgz", - "integrity": "sha512-Od7TyasAAQX/6S+QCbN6vZoWOMwlTtzzGuxJku1GhGanAjz9y+QsQkpScDmETvdc9aSXyJ/Op4rhpMYBWW91wQ==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.0.5", + "@jest/types": "30.2.0", "@types/node": "*", - "jest-util": "30.0.5" + "jest-util": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -2164,7 +2164,7 @@ }, "node_modules/jest-regex-util": { "version": "30.0.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jest-regex-util/-/jest-regex-util-30.0.1.tgz", "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", "dev": true, "license": "MIT", @@ -2173,13 +2173,13 @@ } }, "node_modules/jest-util": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.5.tgz", - "integrity": "sha512-pvyPWssDZR0FlfMxCBoc0tvM8iUEskaRFALUtGQYzVEAqisAztmy+R8LnU14KT4XA0H/a5HMVTXat1jLne010g==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.0.5", + "@jest/types": "30.2.0", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", @@ -2192,7 +2192,7 @@ }, "node_modules/joycon": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/joycon/-/joycon-3.1.1.tgz", "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", "dev": true, "license": "MIT", @@ -2202,14 +2202,14 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true, "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", @@ -2222,7 +2222,7 @@ }, "node_modules/json5": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/json5/-/json5-1.0.2.tgz", "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "license": "MIT", @@ -2236,7 +2236,7 @@ }, "node_modules/lilconfig": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/lilconfig/-/lilconfig-3.1.3.tgz", "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "dev": true, "license": "MIT", @@ -2249,14 +2249,14 @@ }, "node_modules/lines-and-columns": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true, "license": "MIT" }, "node_modules/load-tsconfig": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/load-tsconfig/-/load-tsconfig-0.2.5.tgz", "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", "dev": true, "license": "MIT", @@ -2266,7 +2266,7 @@ }, "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", @@ -2282,14 +2282,14 @@ }, "node_modules/lodash.sortby": { "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "dev": true, "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "license": "MIT", @@ -2306,7 +2306,7 @@ }, "node_modules/loupe": { "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "license": "MIT", @@ -2316,28 +2316,28 @@ }, "node_modules/lru-cache": { "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC" }, "node_modules/make-error": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true, "license": "ISC" }, "node_modules/merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true, "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", @@ -2347,7 +2347,7 @@ }, "node_modules/micromatch": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", @@ -2361,7 +2361,7 @@ }, "node_modules/micromatch/node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", @@ -2374,7 +2374,7 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "license": "MIT", @@ -2384,7 +2384,7 @@ }, "node_modules/minimatch": { "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "license": "ISC", @@ -2397,7 +2397,7 @@ }, "node_modules/minimist": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "license": "MIT", @@ -2407,7 +2407,7 @@ }, "node_modules/minipass": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "license": "ISC", @@ -2417,7 +2417,7 @@ }, "node_modules/mkdirp": { "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "license": "MIT", @@ -2430,7 +2430,7 @@ }, "node_modules/mocha": { "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/mocha/-/mocha-10.8.2.tgz", "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", "dev": true, "license": "MIT", @@ -2466,7 +2466,7 @@ }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", @@ -2482,14 +2482,14 @@ }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/mz": { "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "dev": true, "license": "MIT", @@ -2501,7 +2501,7 @@ }, "node_modules/normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", @@ -2511,7 +2511,7 @@ }, "node_modules/npm-run-path": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "license": "MIT", @@ -2524,7 +2524,7 @@ }, "node_modules/object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "license": "MIT", @@ -2534,7 +2534,7 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "license": "ISC", @@ -2544,7 +2544,7 @@ }, "node_modules/onetime": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "license": "MIT", @@ -2560,7 +2560,7 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", @@ -2576,7 +2576,7 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", @@ -2592,14 +2592,14 @@ }, "node_modules/package-json-from-dist": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, "node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", @@ -2609,7 +2609,7 @@ }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", @@ -2619,7 +2619,7 @@ }, "node_modules/path-scurry": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", @@ -2636,7 +2636,7 @@ }, "node_modules/path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "license": "MIT", @@ -2646,7 +2646,7 @@ }, "node_modules/pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, "license": "MIT", @@ -2656,14 +2656,14 @@ }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, "node_modules/picomatch": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", @@ -2676,7 +2676,7 @@ }, "node_modules/pirates": { "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/pirates/-/pirates-4.0.7.tgz", "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, "license": "MIT", @@ -2685,9 +2685,9 @@ } }, "node_modules/pretty-format": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.5.tgz", - "integrity": "sha512-D1tKtYvByrBkFLe2wHJl2bwMJIiT8rW+XA+TiataH79/FszLQMrpGEvzUVkzPau7OCO0Qnrhpe87PqtOAIB8Yw==", + "version": "30.2.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", "dev": true, "license": "MIT", "dependencies": { @@ -2701,7 +2701,7 @@ }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", @@ -2714,7 +2714,7 @@ }, "node_modules/punycode": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", @@ -2724,13 +2724,13 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "license": "MIT" }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ @@ -2751,7 +2751,7 @@ }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "license": "MIT", @@ -2761,14 +2761,14 @@ }, "node_modules/react-is": { "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true, "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "license": "MIT", @@ -2781,7 +2781,7 @@ }, "node_modules/readdirp/node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", @@ -2794,7 +2794,7 @@ }, "node_modules/require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "license": "MIT", @@ -2804,13 +2804,13 @@ }, "node_modules/requires-port": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", "license": "MIT" }, "node_modules/resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "license": "MIT", @@ -2820,7 +2820,7 @@ }, "node_modules/reusify": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", @@ -2831,7 +2831,7 @@ }, "node_modules/rollup": { "version": "3.29.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/rollup/-/rollup-3.29.5.tgz", "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, "license": "MIT", @@ -2848,7 +2848,7 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ @@ -2872,7 +2872,7 @@ }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ @@ -2893,7 +2893,7 @@ }, "node_modules/serialize-javascript": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "license": "BSD-3-Clause", @@ -2903,7 +2903,7 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", @@ -2916,7 +2916,7 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", @@ -2926,14 +2926,14 @@ }, "node_modules/signal-exit": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, "license": "ISC" }, "node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", @@ -2943,7 +2943,7 @@ }, "node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "license": "BSD-3-Clause", @@ -2953,7 +2953,7 @@ }, "node_modules/source-map-support": { "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "license": "MIT", @@ -2964,7 +2964,7 @@ }, "node_modules/stack-utils": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "license": "MIT", @@ -2977,7 +2977,7 @@ }, "node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "license": "MIT", @@ -2987,7 +2987,7 @@ }, "node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", @@ -3003,7 +3003,7 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", @@ -3018,7 +3018,7 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", @@ -3032,7 +3032,7 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", @@ -3045,7 +3045,7 @@ }, "node_modules/strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "license": "MIT", @@ -3056,7 +3056,7 @@ }, "node_modules/strip-final-newline": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, "license": "MIT", @@ -3066,7 +3066,7 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", @@ -3079,7 +3079,7 @@ }, "node_modules/sucrase": { "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/sucrase/-/sucrase-3.35.0.tgz", "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", "dev": true, "license": "MIT", @@ -3102,7 +3102,7 @@ }, "node_modules/sucrase/node_modules/glob": { "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/glob/-/glob-10.4.5.tgz", "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "license": "ISC", @@ -3123,7 +3123,7 @@ }, "node_modules/sucrase/node_modules/minimatch": { "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", @@ -3139,7 +3139,7 @@ }, "node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", @@ -3152,7 +3152,7 @@ }, "node_modules/thenify": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, "license": "MIT", @@ -3162,7 +3162,7 @@ }, "node_modules/thenify-all": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, "license": "MIT", @@ -3175,7 +3175,7 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "license": "MIT", @@ -3188,7 +3188,7 @@ }, "node_modules/tr46": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/tr46/-/tr46-1.0.1.tgz", "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", "dev": true, "license": "MIT", @@ -3198,7 +3198,7 @@ }, "node_modules/tree-kill": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, "license": "MIT", @@ -3208,14 +3208,14 @@ }, "node_modules/ts-interface-checker": { "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true, "license": "Apache-2.0" }, "node_modules/ts-mocha": { "version": "10.1.0", - "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ts-mocha/-/ts-mocha-10.1.0.tgz", "integrity": "sha512-T0C0Xm3/WqCuF2tpa0GNGESTBoKZaiqdUP8guNv4ZY316AFXlyidnrzQ1LUrCT0Wb1i3J0zFTgOh/55Un44WdA==", "dev": true, "license": "MIT", @@ -3237,7 +3237,7 @@ }, "node_modules/ts-node": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ts-node/-/ts-node-7.0.1.tgz", "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", "dev": true, "license": "MIT", @@ -3260,7 +3260,7 @@ }, "node_modules/ts-node/node_modules/diff": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true, "license": "BSD-3-Clause", @@ -3270,7 +3270,7 @@ }, "node_modules/tsconfig-paths": { "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "license": "MIT", @@ -3284,7 +3284,7 @@ }, "node_modules/tsup": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-7.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/tsup/-/tsup-7.2.0.tgz", "integrity": "sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==", "dev": true, "license": "MIT", @@ -3330,7 +3330,7 @@ }, "node_modules/tsup/node_modules/diff": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "license": "BSD-3-Clause", @@ -3342,7 +3342,7 @@ }, "node_modules/tsup/node_modules/postcss-load-config": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/postcss-load-config/-/postcss-load-config-4.0.2.tgz", "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", "dev": true, "funding": [ @@ -3378,7 +3378,7 @@ }, "node_modules/tsup/node_modules/source-map": { "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/source-map/-/source-map-0.8.0-beta.0.tgz", "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", "deprecated": "The work that was done in this beta branch won't be included in future versions", "dev": true, @@ -3392,7 +3392,7 @@ }, "node_modules/tsup/node_modules/ts-node": { "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", @@ -3438,7 +3438,7 @@ }, "node_modules/tsup/node_modules/yn": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, "license": "MIT", @@ -3450,7 +3450,7 @@ }, "node_modules/type-detect": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/type-detect/-/type-detect-4.1.0.tgz", "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "license": "MIT", @@ -3460,7 +3460,7 @@ }, "node_modules/typescript": { "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "license": "Apache-2.0", @@ -3473,15 +3473,15 @@ } }, "node_modules/undici-types": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", - "integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==", + "version": "7.16.0", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, "license": "MIT" }, "node_modules/url-parse": { "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "license": "MIT", "dependencies": { @@ -3491,7 +3491,7 @@ }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true, "license": "MIT", @@ -3500,20 +3500,20 @@ }, "node_modules/webidl-conversions": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/webidl-conversions/-/webidl-conversions-4.0.2.tgz", "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", "dev": true, "license": "BSD-2-Clause" }, "node_modules/whatwg-fetch": { "version": "3.6.20", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", "license": "MIT" }, "node_modules/whatwg-url": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/whatwg-url/-/whatwg-url-7.1.0.tgz", "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "license": "MIT", @@ -3525,7 +3525,7 @@ }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", @@ -3541,14 +3541,14 @@ }, "node_modules/workerpool": { "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/workerpool/-/workerpool-6.5.1.tgz", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true, "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", @@ -3567,7 +3567,7 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", @@ -3585,14 +3585,14 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "license": "ISC" }, "node_modules/y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, "license": "ISC", @@ -3602,7 +3602,7 @@ }, "node_modules/yaml": { "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yaml/-/yaml-2.8.1.tgz", "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", "dev": true, "license": "ISC", @@ -3615,7 +3615,7 @@ }, "node_modules/yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "license": "MIT", @@ -3634,7 +3634,7 @@ }, "node_modules/yargs-parser": { "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "license": "ISC", @@ -3644,7 +3644,7 @@ }, "node_modules/yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "license": "MIT", @@ -3660,7 +3660,7 @@ }, "node_modules/yn": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yn/-/yn-2.0.0.tgz", "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", "dev": true, "license": "MIT", @@ -3670,7 +3670,7 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "resolved": "https://jfrog-colo.corp.thoughtspot.com/artifactory/api/npm/npm-virtual/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "license": "MIT", diff --git a/sdks/typescript/package.json b/sdks/typescript/package.json index ed6231f1a..9fa4357ba 100644 --- a/sdks/typescript/package.json +++ b/sdks/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@thoughtspot/rest-api-sdk", - "version": "2.17.1", + "version": "2.19.0", "description": "Api sdk for thoughtspot's public v2 rest api", "keywords": [ "fetch", diff --git a/sdks/typescript/types/ObjectParamAPI.ts b/sdks/typescript/types/ObjectParamAPI.ts index b042b5037..d8025ceae 100644 --- a/sdks/typescript/types/ObjectParamAPI.ts +++ b/sdks/typescript/types/ObjectParamAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import { Configuration} from '../configuration' +import { AIContext } from '../models/AIContext'; import { APIKey } from '../models/APIKey'; import { APIKeyInput } from '../models/APIKeyInput'; import { AccessToken } from '../models/AccessToken'; @@ -11,7 +12,9 @@ import { ActionDetails } from '../models/ActionDetails'; import { ActionDetailsInput } from '../models/ActionDetailsInput'; import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; import { AnswerContent } from '../models/AnswerContent'; +import { AnswerContextInput } from '../models/AnswerContextInput'; import { AnswerDataResponse } from '../models/AnswerDataResponse'; import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; import { AssignTagRequest } from '../models/AssignTagRequest'; @@ -43,12 +46,19 @@ import { CommitFileType } from '../models/CommitFileType'; import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input } from '../models/ContextPayloadV2Input'; import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; @@ -73,9 +83,14 @@ import { CreateTagRequest } from '../models/CreateTagRequest'; import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; import { CreateUserRequest } from '../models/CreateUserRequest'; import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CronExpression } from '../models/CronExpression'; import { CronExpressionInput } from '../models/CronExpressionInput'; import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; import { Database } from '../models/Database'; @@ -91,12 +106,19 @@ import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; @@ -130,9 +152,13 @@ import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; import { GenericInfo } from '../models/GenericInfo'; import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; import { GetTokenResponse } from '../models/GetTokenResponse'; import { GroupObject } from '../models/GroupObject'; import { GroupsImportListInput } from '../models/GroupsImportListInput'; @@ -148,11 +174,11 @@ import { ImportUserType } from '../models/ImportUserType'; import { ImportUsersRequest } from '../models/ImportUsersRequest'; import { ImportUsersResponse } from '../models/ImportUsersResponse'; import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; -import { InputVariableValue } from '../models/InputVariableValue'; import { JWTMetadataObject } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; import { LiveboardOptions } from '../models/LiveboardOptions'; @@ -160,6 +186,7 @@ import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; import { LogResponse } from '../models/LogResponse'; import { LoginRequest } from '../models/LoginRequest'; import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; import { MetadataInput } from '../models/MetadataInput'; import { MetadataListItemInput } from '../models/MetadataListItemInput'; import { MetadataObject } from '../models/MetadataObject'; @@ -169,7 +196,11 @@ import { MetadataSearchSortOptions } from '../models/MetadataSearchSortOptions'; import { ModelTableList } from '../models/ModelTableList'; import { ObjectIDAndName } from '../models/ObjectIDAndName'; import { Org } from '../models/Org'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; import { OrgInfo } from '../models/OrgInfo'; +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; import { OrgResponse } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; @@ -231,6 +262,7 @@ import { Scope } from '../models/Scope'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; @@ -255,6 +287,11 @@ import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRe import { SearchUsersRequest } from '../models/SearchUsersRequest'; import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; import { SendMessageRequest } from '../models/SendMessageRequest'; import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; @@ -308,6 +345,7 @@ import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; import { UpdateUserRequest } from '../models/UpdateUserRequest'; import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; import { User } from '../models/User'; import { UserGroup } from '../models/UserGroup'; import { UserGroupResponse } from '../models/UserGroupResponse'; @@ -317,14 +355,43 @@ import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput } from '../models/ValueScopeInput'; import { Variable } from '../models/Variable'; import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { VariableValue } from '../models/VariableValue'; -import { VariableValueInput } from '../models/VariableValueInput'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; import { ObservableAIApi } from "./ObservableAPI"; import { AIApiRequestFactory, AIApiResponseProcessor} from "../apis/AIApi"; +export interface AIApiCreateAgentConversationRequest { + /** + * + * @type CreateAgentConversationRequest + * @memberof AIApicreateAgentConversation + */ + createAgentConversationRequest: CreateAgentConversationRequest +} + export interface AIApiCreateConversationRequest { /** * @@ -334,6 +401,24 @@ export interface AIApiCreateConversationRequest { createConversationRequest: CreateConversationRequest } +export interface AIApiGetDataSourceSuggestionsRequest { + /** + * + * @type GetDataSourceSuggestionsRequest + * @memberof AIApigetDataSourceSuggestions + */ + getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest +} + +export interface AIApiGetRelevantQuestionsRequest { + /** + * + * @type GetRelevantQuestionsRequest + * @memberof AIApigetRelevantQuestions + */ + getRelevantQuestionsRequest: GetRelevantQuestionsRequest +} + export interface AIApiQueryGetDecomposedQueryRequest { /** * @@ -343,6 +428,30 @@ export interface AIApiQueryGetDecomposedQueryRequest { queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest } +export interface AIApiSendAgentMessageRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof AIApisendAgentMessage + */ + conversationIdentifier: string + /** + * + * @type SendAgentMessageRequest + * @memberof AIApisendAgentMessage + */ + sendAgentMessageRequest: SendAgentMessageRequest +} + +export interface AIApiSendAgentMessageStreamingRequest { + /** + * + * @type SendAgentMessageStreamingRequest + * @memberof AIApisendAgentMessageStreaming + */ + sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest +} + export interface AIApiSendMessageRequest { /** * Unique identifier of the conversation. @@ -374,6 +483,14 @@ export class ObjectAIApi { this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.13.0.cl or later + * @param param the request object + */ + public createAgentConversation(param: AIApiCreateAgentConversationRequest, options?: Configuration): Promise { + return this.api.createAgentConversation(param.createAgentConversationRequest, options).toPromise(); + } + /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object @@ -382,6 +499,22 @@ export class ObjectAIApi { return this.api.createConversation(param.createConversationRequest, options).toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param param the request object + */ + public getDataSourceSuggestions(param: AIApiGetDataSourceSuggestionsRequest, options?: Configuration): Promise { + return this.api.getDataSourceSuggestions(param.getDataSourceSuggestionsRequest, options).toPromise(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public getRelevantQuestions(param: AIApiGetRelevantQuestionsRequest, options?: Configuration): Promise { + return this.api.getRelevantQuestions(param.getRelevantQuestionsRequest, options).toPromise(); + } + /** * Version: 10.7.0.cl or later * @param param the request object @@ -390,6 +523,22 @@ export class ObjectAIApi { return this.api.queryGetDecomposedQuery(param.queryGetDecomposedQueryRequest, options).toPromise(); } + /** + * 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 param the request object + */ + public sendAgentMessage(param: AIApiSendAgentMessageRequest, options?: Configuration): Promise { + return this.api.sendAgentMessage(param.conversationIdentifier, param.sendAgentMessageRequest, options).toPromise(); + } + + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param param the request object + */ + public sendAgentMessageStreaming(param: AIApiSendAgentMessageStreamingRequest, options?: Configuration): Promise { + return this.api.sendAgentMessageStreaming(param.sendAgentMessageStreamingRequest, options).toPromise(); + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 param the request object @@ -498,7 +647,7 @@ export class ObjectAuthenticationApi { } /** - * 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. * @param param the request object */ public getCustomAccessToken(param: AuthenticationApiGetCustomAccessTokenRequest, options?: Configuration): Promise { @@ -786,7 +935,7 @@ export class ObjectConnectionsApi { } /** - * 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\":[ ] } ``` * @param param the request object */ public updateConnectionV2(param: ConnectionsApiUpdateConnectionV2Request, options?: Configuration): Promise { @@ -1073,19 +1222,19 @@ export interface DBTApiDbtGenerateTmlRequest { */ dbtConnectionIdentifier: string /** - * Mention the worksheet tmls to import + * List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @type string * @memberof DBTApidbtGenerateTml */ - importWorksheets: string + modelTables: string /** - * List of Models and their respective Tables + * Mention the worksheet tmls to import * @type string * @memberof DBTApidbtGenerateTml */ - modelTables?: string + importWorksheets: string /** - * List of worksheets is mandatory when import_Worksheets is type SELECTED + * List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @type string * @memberof DBTApidbtGenerateTml */ @@ -1207,7 +1356,7 @@ export class ObjectDBTApi { * @param param the request object */ public dbtGenerateTml(param: DBTApiDbtGenerateTmlRequest, options?: Configuration): Promise { - return this.api.dbtGenerateTml(param.dbtConnectionIdentifier, param.importWorksheets, param.modelTables, param.worksheets, param.fileContent, options).toPromise(); + return this.api.dbtGenerateTml(param.dbtConnectionIdentifier, param.modelTables, param.importWorksheets, param.worksheets, param.fileContent, options).toPromise(); } /** @@ -1693,7 +1842,7 @@ export class ObjectMetadataApi { } /** - * 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. * @param param the request object */ public copyObject(param: MetadataApiCopyObjectRequest, options?: Configuration): Promise { @@ -2261,6 +2410,15 @@ export class ObjectSecurityApi { import { ObservableSystemApi } from "./ObservableAPI"; import { SystemApiRequestFactory, SystemApiResponseProcessor} from "../apis/SystemApi"; +export interface SystemApiConfigureCommunicationChannelPreferencesRequest { + /** + * + * @type ConfigureCommunicationChannelPreferencesRequest + * @memberof SystemApiconfigureCommunicationChannelPreferences + */ + configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest +} + export interface SystemApiGetSystemConfigRequest { } @@ -2270,6 +2428,15 @@ export interface SystemApiGetSystemInformationRequest { export interface SystemApiGetSystemOverrideInfoRequest { } +export interface SystemApiSearchCommunicationChannelPreferencesRequest { + /** + * + * @type SearchCommunicationChannelPreferencesRequest + * @memberof SystemApisearchCommunicationChannelPreferences + */ + searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest +} + export interface SystemApiUpdateSystemConfigRequest { /** * @@ -2286,6 +2453,14 @@ export class ObjectSystemApi { this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public configureCommunicationChannelPreferences(param: SystemApiConfigureCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.configureCommunicationChannelPreferences(param.configureCommunicationChannelPreferencesRequest, options).toPromise(); + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @param param the request object @@ -2310,6 +2485,14 @@ export class ObjectSystemApi { return this.api.getSystemOverrideInfo( options).toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchCommunicationChannelPreferences(param: SystemApiSearchCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.searchCommunicationChannelPreferences(param.searchCommunicationChannelPreferencesRequest, options).toPromise(); + } + /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param param the request object @@ -2488,6 +2671,15 @@ export interface ThoughtSpotRestApiCommitBranchRequest { commitBranchRequest: CommitBranchRequest } +export interface ThoughtSpotRestApiConfigureCommunicationChannelPreferencesRequest { + /** + * + * @type ConfigureCommunicationChannelPreferencesRequest + * @memberof ThoughtSpotRestApiconfigureCommunicationChannelPreferences + */ + configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest +} + export interface ThoughtSpotRestApiConnectionConfigurationSearchRequest { /** * @@ -2515,6 +2707,15 @@ export interface ThoughtSpotRestApiCopyObjectRequest { copyObjectRequest: CopyObjectRequest } +export interface ThoughtSpotRestApiCreateAgentConversationRequest { + /** + * + * @type CreateAgentConversationRequest + * @memberof ThoughtSpotRestApicreateAgentConversation + */ + createAgentConversationRequest: CreateAgentConversationRequest +} + export interface ThoughtSpotRestApiCreateCalendarRequest { /** * @@ -2641,6 +2842,15 @@ export interface ThoughtSpotRestApiCreateVariableRequest { createVariableRequest: CreateVariableRequest } +export interface ThoughtSpotRestApiCreateWebhookConfigurationRequest { + /** + * + * @type CreateWebhookConfigurationRequest + * @memberof ThoughtSpotRestApicreateWebhookConfiguration + */ + createWebhookConfigurationRequest: CreateWebhookConfigurationRequest +} + export interface ThoughtSpotRestApiDbtConnectionRequest { /** * Name of the connection. @@ -2727,19 +2937,19 @@ export interface ThoughtSpotRestApiDbtGenerateTmlRequest { */ dbtConnectionIdentifier: string /** - * Mention the worksheet tmls to import + * List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @type string * @memberof ThoughtSpotRestApidbtGenerateTml */ - importWorksheets: string + modelTables: string /** - * List of Models and their respective Tables + * Mention the worksheet tmls to import * @type string * @memberof ThoughtSpotRestApidbtGenerateTml */ - modelTables?: string + importWorksheets: string /** - * List of worksheets is mandatory when import_Worksheets is type SELECTED + * List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @type string * @memberof ThoughtSpotRestApidbtGenerateTml */ @@ -2917,6 +3127,15 @@ export interface ThoughtSpotRestApiDeleteVariableRequest { identifier: string } +export interface ThoughtSpotRestApiDeleteWebhookConfigurationsRequest { + /** + * + * @type DeleteWebhookConfigurationsRequest + * @memberof ThoughtSpotRestApideleteWebhookConfigurations + */ + deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest +} + export interface ThoughtSpotRestApiDeployCommitRequest { /** * @@ -3094,6 +3313,15 @@ export interface ThoughtSpotRestApiGetCustomAccessTokenRequest { getCustomAccessTokenRequest: GetCustomAccessTokenRequest } +export interface ThoughtSpotRestApiGetDataSourceSuggestionsRequest { + /** + * + * @type GetDataSourceSuggestionsRequest + * @memberof ThoughtSpotRestApigetDataSourceSuggestions + */ + getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest +} + export interface ThoughtSpotRestApiGetFullAccessTokenRequest { /** * @@ -3112,6 +3340,15 @@ export interface ThoughtSpotRestApiGetObjectAccessTokenRequest { getObjectAccessTokenRequest: GetObjectAccessTokenRequest } +export interface ThoughtSpotRestApiGetRelevantQuestionsRequest { + /** + * + * @type GetRelevantQuestionsRequest + * @memberof ThoughtSpotRestApigetRelevantQuestions + */ + getRelevantQuestionsRequest: GetRelevantQuestionsRequest +} + export interface ThoughtSpotRestApiGetSystemConfigRequest { } @@ -3247,6 +3484,15 @@ export interface ThoughtSpotRestApiSearchCommitsRequest { searchCommitsRequest: SearchCommitsRequest } +export interface ThoughtSpotRestApiSearchCommunicationChannelPreferencesRequest { + /** + * + * @type SearchCommunicationChannelPreferencesRequest + * @memberof ThoughtSpotRestApisearchCommunicationChannelPreferences + */ + searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest +} + export interface ThoughtSpotRestApiSearchConfigRequest { /** * @@ -3364,6 +3610,39 @@ export interface ThoughtSpotRestApiSearchVariablesRequest { searchVariablesRequest: SearchVariablesRequest } +export interface ThoughtSpotRestApiSearchWebhookConfigurationsRequest { + /** + * + * @type SearchWebhookConfigurationsRequest + * @memberof ThoughtSpotRestApisearchWebhookConfigurations + */ + searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest +} + +export interface ThoughtSpotRestApiSendAgentMessageRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof ThoughtSpotRestApisendAgentMessage + */ + conversationIdentifier: string + /** + * + * @type SendAgentMessageRequest + * @memberof ThoughtSpotRestApisendAgentMessage + */ + sendAgentMessageRequest: SendAgentMessageRequest +} + +export interface ThoughtSpotRestApiSendAgentMessageStreamingRequest { + /** + * + * @type SendAgentMessageStreamingRequest + * @memberof ThoughtSpotRestApisendAgentMessageStreaming + */ + sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest +} + export interface ThoughtSpotRestApiSendMessageRequest { /** * Unique identifier of the conversation. @@ -3730,6 +4009,21 @@ export interface ThoughtSpotRestApiUpdateVariableValuesRequest { updateVariableValuesRequest: UpdateVariableValuesRequest } +export interface ThoughtSpotRestApiUpdateWebhookConfigurationRequest { + /** + * Unique ID or name of the webhook configuration. + * @type string + * @memberof ThoughtSpotRestApiupdateWebhookConfiguration + */ + webhookIdentifier: string + /** + * + * @type UpdateWebhookConfigurationRequest + * @memberof ThoughtSpotRestApiupdateWebhookConfiguration + */ + updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest +} + export interface ThoughtSpotRestApiValidateEmailCustomizationRequest { } @@ -3798,6 +4092,14 @@ export class ObjectThoughtSpotRestApi { return this.api.commitBranch(param.commitBranchRequest, options).toPromise(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public configureCommunicationChannelPreferences(param: ThoughtSpotRestApiConfigureCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.configureCommunicationChannelPreferences(param.configureCommunicationChannelPreferencesRequest, options).toPromise(); + } + /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param param the request object @@ -3815,13 +4117,21 @@ export class ObjectThoughtSpotRestApi { } /** - * 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. * @param param the request object */ public copyObject(param: ThoughtSpotRestApiCopyObjectRequest, options?: Configuration): Promise { return this.api.copyObject(param.copyObjectRequest, options).toPromise(); } + /** + * Version: 10.13.0.cl or later + * @param param the request object + */ + public createAgentConversation(param: ThoughtSpotRestApiCreateAgentConversationRequest, options?: Configuration): Promise { + return this.api.createAgentConversation(param.createAgentConversationRequest, options).toPromise(); + } + /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param param the request object @@ -3927,13 +4237,21 @@ export class ObjectThoughtSpotRestApi { } /** - * 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. 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 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 param the request object */ public createVariable(param: ThoughtSpotRestApiCreateVariableRequest, options?: Configuration): Promise { return this.api.createVariable(param.createVariableRequest, options).toPromise(); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public createWebhookConfiguration(param: ThoughtSpotRestApiCreateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.createWebhookConfiguration(param.createWebhookConfigurationRequest, options).toPromise(); + } + /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param param the request object @@ -3955,7 +4273,7 @@ export class ObjectThoughtSpotRestApi { * @param param the request object */ public dbtGenerateTml(param: ThoughtSpotRestApiDbtGenerateTmlRequest, options?: Configuration): Promise { - return this.api.dbtGenerateTml(param.dbtConnectionIdentifier, param.importWorksheets, param.modelTables, param.worksheets, param.fileContent, options).toPromise(); + return this.api.dbtGenerateTml(param.dbtConnectionIdentifier, param.modelTables, param.importWorksheets, param.worksheets, param.fileContent, options).toPromise(); } /** @@ -4103,13 +4421,21 @@ export class ObjectThoughtSpotRestApi { } /** - * 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 param the request object */ public deleteVariable(param: ThoughtSpotRestApiDeleteVariableRequest, options?: Configuration): Promise { return this.api.deleteVariable(param.identifier, options).toPromise(); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public deleteWebhookConfigurations(param: ThoughtSpotRestApiDeleteWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.deleteWebhookConfigurations(param.deleteWebhookConfigurationsRequest, options).toPromise(); + } + /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param param the request object @@ -4271,13 +4597,21 @@ export class ObjectThoughtSpotRestApi { } /** - * 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. * @param param the request object */ public getCustomAccessToken(param: ThoughtSpotRestApiGetCustomAccessTokenRequest, options?: Configuration): Promise { return this.api.getCustomAccessToken(param.getCustomAccessTokenRequest, options).toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param param the request object + */ + public getDataSourceSuggestions(param: ThoughtSpotRestApiGetDataSourceSuggestionsRequest, options?: Configuration): Promise { + return this.api.getDataSourceSuggestions(param.getDataSourceSuggestionsRequest, options).toPromise(); + } + /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param param the request object @@ -4294,6 +4628,14 @@ export class ObjectThoughtSpotRestApi { return this.api.getObjectAccessToken(param.getObjectAccessTokenRequest, options).toPromise(); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public getRelevantQuestions(param: ThoughtSpotRestApiGetRelevantQuestionsRequest, options?: Configuration): Promise { + return this.api.getRelevantQuestions(param.getRelevantQuestionsRequest, options).toPromise(); + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. * @param param the request object @@ -4430,6 +4772,14 @@ export class ObjectThoughtSpotRestApi { return this.api.searchCommits(param.searchCommitsRequest, options).toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchCommunicationChannelPreferences(param: ThoughtSpotRestApiSearchCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.searchCommunicationChannelPreferences(param.searchCommunicationChannelPreferencesRequest, options).toPromise(); + } + /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param param the request object @@ -4527,13 +4877,37 @@ export class ObjectThoughtSpotRestApi { } /** - * 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 param the request object */ public searchVariables(param: ThoughtSpotRestApiSearchVariablesRequest, options?: Configuration): Promise> { return this.api.searchVariables(param.searchVariablesRequest, options).toPromise(); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchWebhookConfigurations(param: ThoughtSpotRestApiSearchWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.searchWebhookConfigurations(param.searchWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 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 param the request object + */ + public sendAgentMessage(param: ThoughtSpotRestApiSendAgentMessageRequest, options?: Configuration): Promise { + return this.api.sendAgentMessage(param.conversationIdentifier, param.sendAgentMessageRequest, options).toPromise(); + } + + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param param the request object + */ + public sendAgentMessageStreaming(param: ThoughtSpotRestApiSendAgentMessageStreamingRequest, options?: Configuration): Promise { + return this.api.sendAgentMessageStreaming(param.sendAgentMessageStreamingRequest, options).toPromise(); + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 param the request object @@ -4623,7 +4997,7 @@ export class ObjectThoughtSpotRestApi { } /** - * 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\":[ ] } ``` * @param param the request object */ public updateConnectionV2(param: ThoughtSpotRestApiUpdateConnectionV2Request, options?: Configuration): Promise { @@ -4727,7 +5101,7 @@ export class ObjectThoughtSpotRestApi { } /** - * 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 param the request object */ public updateVariable(param: ThoughtSpotRestApiUpdateVariableRequest, options?: Configuration): Promise { @@ -4735,13 +5109,21 @@ export class ObjectThoughtSpotRestApi { } /** - * 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 param the request object */ public updateVariableValues(param: ThoughtSpotRestApiUpdateVariableValuesRequest, options?: Configuration): Promise { return this.api.updateVariableValues(param.updateVariableValuesRequest, options).toPromise(); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public updateWebhookConfiguration(param: ThoughtSpotRestApiUpdateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.updateWebhookConfiguration(param.webhookIdentifier, param.updateWebhookConfigurationRequest, options).toPromise(); + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * @param param the request object @@ -5018,7 +5400,7 @@ export class ObjectVariableApi { } /** - * 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. 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 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 param the request object */ public createVariable(param: VariableApiCreateVariableRequest, options?: Configuration): Promise { @@ -5026,7 +5408,7 @@ export class ObjectVariableApi { } /** - * 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 param the request object */ public deleteVariable(param: VariableApiDeleteVariableRequest, options?: Configuration): Promise { @@ -5034,7 +5416,7 @@ export class ObjectVariableApi { } /** - * 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 param the request object */ public searchVariables(param: VariableApiSearchVariablesRequest, options?: Configuration): Promise> { @@ -5042,7 +5424,7 @@ export class ObjectVariableApi { } /** - * 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 param the request object */ public updateVariable(param: VariableApiUpdateVariableRequest, options?: Configuration): Promise { @@ -5050,7 +5432,7 @@ export class ObjectVariableApi { } /** - * 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 param the request object */ public updateVariableValues(param: VariableApiUpdateVariableValuesRequest, options?: Configuration): Promise { @@ -5229,3 +5611,89 @@ export class ObjectVersionControlApi { } } + +import { ObservableWebhooksApi } from "./ObservableAPI"; +import { WebhooksApiRequestFactory, WebhooksApiResponseProcessor} from "../apis/WebhooksApi"; + +export interface WebhooksApiCreateWebhookConfigurationRequest { + /** + * + * @type CreateWebhookConfigurationRequest + * @memberof WebhooksApicreateWebhookConfiguration + */ + createWebhookConfigurationRequest: CreateWebhookConfigurationRequest +} + +export interface WebhooksApiDeleteWebhookConfigurationsRequest { + /** + * + * @type DeleteWebhookConfigurationsRequest + * @memberof WebhooksApideleteWebhookConfigurations + */ + deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest +} + +export interface WebhooksApiSearchWebhookConfigurationsRequest { + /** + * + * @type SearchWebhookConfigurationsRequest + * @memberof WebhooksApisearchWebhookConfigurations + */ + searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest +} + +export interface WebhooksApiUpdateWebhookConfigurationRequest { + /** + * Unique ID or name of the webhook configuration. + * @type string + * @memberof WebhooksApiupdateWebhookConfiguration + */ + webhookIdentifier: string + /** + * + * @type UpdateWebhookConfigurationRequest + * @memberof WebhooksApiupdateWebhookConfiguration + */ + updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest +} + +export class ObjectWebhooksApi { + private api: ObservableWebhooksApi + + public constructor(configuration: Configuration, requestFactory?: WebhooksApiRequestFactory, responseProcessor?: WebhooksApiResponseProcessor) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public createWebhookConfiguration(param: WebhooksApiCreateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.createWebhookConfiguration(param.createWebhookConfigurationRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public deleteWebhookConfigurations(param: WebhooksApiDeleteWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.deleteWebhookConfigurations(param.deleteWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchWebhookConfigurations(param: WebhooksApiSearchWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.searchWebhookConfigurations(param.searchWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public updateWebhookConfiguration(param: WebhooksApiUpdateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.updateWebhookConfiguration(param.webhookIdentifier, param.updateWebhookConfigurationRequest, options).toPromise(); + } + +} diff --git a/sdks/typescript/types/ObservableAPI.ts b/sdks/typescript/types/ObservableAPI.ts index be375af2c..0408ecf1d 100644 --- a/sdks/typescript/types/ObservableAPI.ts +++ b/sdks/typescript/types/ObservableAPI.ts @@ -2,6 +2,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; +import { AIContext } from '../models/AIContext'; import { APIKey } from '../models/APIKey'; import { APIKeyInput } from '../models/APIKeyInput'; import { AccessToken } from '../models/AccessToken'; @@ -12,7 +13,9 @@ import { ActionDetails } from '../models/ActionDetails'; import { ActionDetailsInput } from '../models/ActionDetailsInput'; import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; import { AnswerContent } from '../models/AnswerContent'; +import { AnswerContextInput } from '../models/AnswerContextInput'; import { AnswerDataResponse } from '../models/AnswerDataResponse'; import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; import { AssignTagRequest } from '../models/AssignTagRequest'; @@ -44,12 +47,19 @@ import { CommitFileType } from '../models/CommitFileType'; import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input } from '../models/ContextPayloadV2Input'; import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; @@ -74,9 +84,14 @@ import { CreateTagRequest } from '../models/CreateTagRequest'; import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; import { CreateUserRequest } from '../models/CreateUserRequest'; import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CronExpression } from '../models/CronExpression'; import { CronExpressionInput } from '../models/CronExpressionInput'; import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; import { Database } from '../models/Database'; @@ -92,12 +107,19 @@ import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; @@ -131,9 +153,13 @@ import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; import { GenericInfo } from '../models/GenericInfo'; import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; import { GetTokenResponse } from '../models/GetTokenResponse'; import { GroupObject } from '../models/GroupObject'; import { GroupsImportListInput } from '../models/GroupsImportListInput'; @@ -149,11 +175,11 @@ import { ImportUserType } from '../models/ImportUserType'; import { ImportUsersRequest } from '../models/ImportUsersRequest'; import { ImportUsersResponse } from '../models/ImportUsersResponse'; import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; -import { InputVariableValue } from '../models/InputVariableValue'; import { JWTMetadataObject } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; import { LiveboardOptions } from '../models/LiveboardOptions'; @@ -161,6 +187,7 @@ import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; import { LogResponse } from '../models/LogResponse'; import { LoginRequest } from '../models/LoginRequest'; import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; import { MetadataInput } from '../models/MetadataInput'; import { MetadataListItemInput } from '../models/MetadataListItemInput'; import { MetadataObject } from '../models/MetadataObject'; @@ -170,7 +197,11 @@ import { MetadataSearchSortOptions } from '../models/MetadataSearchSortOptions'; import { ModelTableList } from '../models/ModelTableList'; import { ObjectIDAndName } from '../models/ObjectIDAndName'; import { Org } from '../models/Org'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; import { OrgInfo } from '../models/OrgInfo'; +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; import { OrgResponse } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; @@ -232,6 +263,7 @@ import { Scope } from '../models/Scope'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; @@ -256,6 +288,11 @@ import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRe import { SearchUsersRequest } from '../models/SearchUsersRequest'; import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; import { SendMessageRequest } from '../models/SendMessageRequest'; import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; @@ -309,6 +346,7 @@ import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; import { UpdateUserRequest } from '../models/UpdateUserRequest'; import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; import { User } from '../models/User'; import { UserGroup } from '../models/UserGroup'; import { UserGroupResponse } from '../models/UserGroupResponse'; @@ -318,10 +356,30 @@ import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput } from '../models/ValueScopeInput'; import { Variable } from '../models/Variable'; import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { VariableValue } from '../models/VariableValue'; -import { VariableValueInput } from '../models/VariableValueInput'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; import { AIApiRequestFactory, AIApiResponseProcessor} from "../apis/AIApi"; export class ObservableAIApi { @@ -339,6 +397,29 @@ export class ObservableAIApi { this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -362,6 +443,52 @@ export class ObservableAIApi { })); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -385,6 +512,53 @@ export class ObservableAIApi { })); } + /** + * 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) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -495,7 +669,7 @@ export class ObservableAuthenticationApi { } /** - * 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. * @param getCustomAccessTokenRequest */ public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Observable { @@ -945,7 +1119,7 @@ export class ObservableConnectionsApi { } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -1290,13 +1464,13 @@ export class ObservableDBTApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - public dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -1851,7 +2025,7 @@ export class ObservableMetadataApi { } /** - * 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. * @param copyObjectRequest */ public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Observable { @@ -2789,6 +2963,29 @@ export class ObservableSystemApi { this.responseProcessor = responseProcessor || new SystemApiResponseProcessor(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -2855,6 +3052,29 @@ export class ObservableSystemApi { })); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -3168,6 +3388,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -3215,7 +3458,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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. * @param copyObjectRequest */ public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Observable { @@ -3237,6 +3480,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -3537,7 +3803,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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. 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 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 */ public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Observable { @@ -3559,6 +3825,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -3618,13 +3907,13 @@ export class ObservableThoughtSpotRestApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - public dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -4056,7 +4345,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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 */ public deleteVariable(identifier: string, _options?: Configuration): Observable { @@ -4078,6 +4367,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -4537,7 +4849,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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. * @param getCustomAccessTokenRequest */ public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Observable { @@ -4559,6 +4871,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -4605,6 +4940,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -4993,6 +5351,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -5270,7 +5651,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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 */ public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Observable> { @@ -5292,6 +5673,76 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 10.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) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + + /** + * Version: 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -5549,7 +6000,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -5866,7 +6317,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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. * @param updateVariableRequest */ @@ -5890,7 +6341,7 @@ export class ObservableThoughtSpotRestApi { } /** - * 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 */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Observable { @@ -5912,6 +6363,30 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -6248,7 +6723,7 @@ export class ObservableVariableApi { } /** - * 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. 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 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 */ public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Observable { @@ -6271,7 +6746,7 @@ export class ObservableVariableApi { } /** - * 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 */ public deleteVariable(identifier: string, _options?: Configuration): Observable { @@ -6294,7 +6769,7 @@ export class ObservableVariableApi { } /** - * 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 */ public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Observable> { @@ -6317,7 +6792,7 @@ export class ObservableVariableApi { } /** - * 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. * @param updateVariableRequest */ @@ -6341,7 +6816,7 @@ export class ObservableVariableApi { } /** - * 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 */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Observable { @@ -6590,3 +7065,114 @@ export class ObservableVersionControlApi { } } + +import { WebhooksApiRequestFactory, WebhooksApiResponseProcessor} from "../apis/WebhooksApi"; +export class ObservableWebhooksApi { + private requestFactory: WebhooksApiRequestFactory; + private responseProcessor: WebhooksApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: WebhooksApiRequestFactory, + responseProcessor?: WebhooksApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebhooksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebhooksApiResponseProcessor(); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } + +} diff --git a/sdks/typescript/types/PromiseAPI.ts b/sdks/typescript/types/PromiseAPI.ts index 7cc61c6ee..e3ae5866c 100644 --- a/sdks/typescript/types/PromiseAPI.ts +++ b/sdks/typescript/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import { Configuration} from '../configuration' +import { AIContext } from '../models/AIContext'; import { APIKey } from '../models/APIKey'; import { APIKeyInput } from '../models/APIKeyInput'; import { AccessToken } from '../models/AccessToken'; @@ -11,7 +12,9 @@ import { ActionDetails } from '../models/ActionDetails'; import { ActionDetailsInput } from '../models/ActionDetailsInput'; import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; import { AnswerContent } from '../models/AnswerContent'; +import { AnswerContextInput } from '../models/AnswerContextInput'; import { AnswerDataResponse } from '../models/AnswerDataResponse'; import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; import { AssignTagRequest } from '../models/AssignTagRequest'; @@ -43,12 +46,19 @@ import { CommitFileType } from '../models/CommitFileType'; import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input } from '../models/ContextPayloadV2Input'; import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; @@ -73,9 +83,14 @@ import { CreateTagRequest } from '../models/CreateTagRequest'; import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; import { CreateUserRequest } from '../models/CreateUserRequest'; import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CronExpression } from '../models/CronExpression'; import { CronExpressionInput } from '../models/CronExpressionInput'; import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; import { Database } from '../models/Database'; @@ -91,12 +106,19 @@ import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; @@ -130,9 +152,13 @@ import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; import { GenericInfo } from '../models/GenericInfo'; import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; import { GetTokenResponse } from '../models/GetTokenResponse'; import { GroupObject } from '../models/GroupObject'; import { GroupsImportListInput } from '../models/GroupsImportListInput'; @@ -148,11 +174,11 @@ import { ImportUserType } from '../models/ImportUserType'; import { ImportUsersRequest } from '../models/ImportUsersRequest'; import { ImportUsersResponse } from '../models/ImportUsersResponse'; import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; -import { InputVariableValue } from '../models/InputVariableValue'; import { JWTMetadataObject } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; import { LiveboardOptions } from '../models/LiveboardOptions'; @@ -160,6 +186,7 @@ import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; import { LogResponse } from '../models/LogResponse'; import { LoginRequest } from '../models/LoginRequest'; import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; import { MetadataInput } from '../models/MetadataInput'; import { MetadataListItemInput } from '../models/MetadataListItemInput'; import { MetadataObject } from '../models/MetadataObject'; @@ -169,7 +196,11 @@ import { MetadataSearchSortOptions } from '../models/MetadataSearchSortOptions'; import { ModelTableList } from '../models/ModelTableList'; import { ObjectIDAndName } from '../models/ObjectIDAndName'; import { Org } from '../models/Org'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; import { OrgInfo } from '../models/OrgInfo'; +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; import { OrgResponse } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; @@ -231,6 +262,7 @@ import { Scope } from '../models/Scope'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; @@ -255,6 +287,11 @@ import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRe import { SearchUsersRequest } from '../models/SearchUsersRequest'; import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; import { SendMessageRequest } from '../models/SendMessageRequest'; import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; @@ -308,6 +345,7 @@ import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; import { UpdateUserRequest } from '../models/UpdateUserRequest'; import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; import { User } from '../models/User'; import { UserGroup } from '../models/UserGroup'; import { UserGroupResponse } from '../models/UserGroupResponse'; @@ -317,10 +355,30 @@ import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput } from '../models/ValueScopeInput'; import { Variable } from '../models/Variable'; import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { VariableValue } from '../models/VariableValue'; -import { VariableValueInput } from '../models/VariableValueInput'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; import { ObservableAIApi } from './ObservableAPI'; import { AIApiRequestFactory, AIApiResponseProcessor} from "../apis/AIApi"; @@ -335,6 +393,15 @@ export class PromiseAIApi { this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + /** * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest @@ -344,6 +411,24 @@ export class PromiseAIApi { return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + /** * Version: 10.7.0.cl or later * @param queryGetDecomposedQueryRequest @@ -353,6 +438,25 @@ export class PromiseAIApi { return result.toPromise(); } + /** + * 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) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -408,7 +512,7 @@ export class PromiseAuthenticationApi { } /** - * 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. * @param getCustomAccessTokenRequest */ public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { @@ -608,7 +712,7 @@ export class PromiseConnectionsApi { } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -788,13 +892,13 @@ export class PromiseDBTApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - public dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { - const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); return result.toPromise(); } @@ -1074,7 +1178,7 @@ export class PromiseMetadataApi { } /** - * 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. * @param copyObjectRequest */ public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { @@ -1514,6 +1618,15 @@ export class PromiseSystemApi { this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -1538,6 +1651,15 @@ export class PromiseSystemApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. * @param updateSystemConfigRequest @@ -1685,6 +1807,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. * @param connectionConfigurationSearchRequest @@ -1704,7 +1835,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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. * @param copyObjectRequest */ public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { @@ -1712,6 +1843,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.13.0.cl or later + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + /** * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` * @param createCalendarRequest @@ -1830,7 +1970,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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. 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 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 */ public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { @@ -1838,6 +1978,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. * @param connectionName Name of the connection. @@ -1869,13 +2018,13 @@ export class PromiseThoughtSpotRestApi { /** * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' * @param importWorksheets Mention the worksheet tmls to import - * @param modelTables List of Models and their respective Tables - * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ */ - public dbtGenerateTml(dbtConnectionIdentifier: string, importWorksheets: string, modelTables?: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { - const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent, _options); + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); return result.toPromise(); } @@ -2041,7 +2190,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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 */ public deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -2049,6 +2198,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). * @param deployCommitRequest @@ -2228,7 +2386,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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. * @param getCustomAccessTokenRequest */ public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { @@ -2236,6 +2394,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** * Version: 9.0.0.cl or later Gets an authentication token and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key` (for [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)). To generate a `secret_key` on your cluster, the administrator must enable **Trusted authentication** in the **Develop** > **Customizations** > **Security Settings** page. For more information, see [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable). **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. #### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `True` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, the API call will update user properties like display name, email and group assignment. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). To add a new user and assign privileges, 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 is required. #### Important point to note All options in the token creation APIs changing 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. * @param getFullAccessTokenRequest @@ -2254,6 +2421,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + /** * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. */ @@ -2404,6 +2580,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param searchConfigRequest @@ -2513,7 +2698,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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 */ public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise> { @@ -2521,6 +2706,34 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.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) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + + /** + * 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 Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### 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. > * The streaming protocol uses Server-Sent Events (SSE) + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + /** * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization 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 of the conversation. @@ -2624,7 +2837,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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\":[ ] } ``` * @param connectionIdentifier Unique ID or name of the connection. * @param updateConnectionV2Request */ @@ -2759,7 +2972,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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. * @param updateVariableRequest */ @@ -2769,7 +2982,7 @@ export class PromiseThoughtSpotRestApi { } /** - * 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 */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -2777,6 +2990,16 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -2933,7 +3156,7 @@ export class PromiseVariableApi { } /** - * 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. 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 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 */ public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { @@ -2942,7 +3165,7 @@ export class PromiseVariableApi { } /** - * 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 */ public deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -2951,7 +3174,7 @@ export class PromiseVariableApi { } /** - * 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 */ public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise> { @@ -2960,7 +3183,7 @@ export class PromiseVariableApi { } /** - * 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. * @param updateVariableRequest */ @@ -2970,7 +3193,7 @@ export class PromiseVariableApi { } /** - * 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 */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -3084,3 +3307,59 @@ export class PromiseVersionControlApi { +import { ObservableWebhooksApi } from './ObservableAPI'; + +import { WebhooksApiRequestFactory, WebhooksApiResponseProcessor} from "../apis/WebhooksApi"; +export class PromiseWebhooksApi { + private api: ObservableWebhooksApi + + public constructor( + configuration: Configuration, + requestFactory?: WebhooksApiRequestFactory, + responseProcessor?: WebhooksApiResponseProcessor + ) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } + + +} + + + diff --git a/sdks/typescript/utils/config.ts b/sdks/typescript/utils/config.ts index 8983c5982..8dea49d25 100644 --- a/sdks/typescript/utils/config.ts +++ b/sdks/typescript/utils/config.ts @@ -34,12 +34,9 @@ const createAdditionalHeadersMiddleware = (additionalHeaders: Record { - Object.keys(additionalHeaders).forEach( - (headerName: string) => { - const headerValue = additionalHeaders[headerName]; - requestContext.setHeaderParam(headerName, headerValue); - } - ); + Object.entries(additionalHeaders).forEach(([headerName, headerValue]) => { + requestContext.setHeaderParam(headerName, headerValue); + }); return Promise.resolve(requestContext); }, /**